fix(mothership): rebuild copilot VFS trigger/integration overviews per viewer#5694
fix(mothership): rebuild copilot VFS trigger/integration overviews per viewer#5694TheodoreSpeaks wants to merge 2 commits into
Conversation
triggers.md and the oauth/api-key integration summaries were baked once into the process-global static component cache under null visibility, so a revealed-preview viewer got the per-trigger schema file but the trigger was permanently missing from the overview catalog. Move these three aggregate files out of getStaticComponentFiles and rebuild them per materialize in buildViewerScopedComponentFiles, filtered through the viewer's visibility (isHiddenUnder / isStaticFileHidden / filterExposedIntegrationTools) so an overview entry appears exactly when its per-file schema does. Per-file schemas stay in the shared ungated cache, include/exclude-filtered at stamp time as before. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QCHVAfWcDYNQFbNMemQJwK
…to one resettable object The static component files and their integration/trigger path-owner maps were three separate module globals, with the owner maps populated as a side effect of the file build and never reset. Bundle all three into one StaticComponents object built and cached atomically, thread it through isStaticFileHidden and the per-viewer overview builder, and add resetStaticComponents (test/hot-reload seam, mirrors resetExposedIntegrationToolsCache) so a rebuild clears files and owner maps together — no stale or double-populated owner maps.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Viewer-scoped overviews — Atomic static cache — Per-file component schemas stay in a single Reviewed by Cursor Bugbot for commit d00860a. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR makes Copilot VFS overview files reflect each viewer’s block visibility. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "improvement(mothership): bundle copilot ..." | Re-trigger Greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit d00860a. Configure here.
Summary
components/triggers/triggers.md,environment/oauth-integrations.json,environment/api-key-integrations.json) out of the frozen process-global cache and rebuild them per viewer, filtered through the caller's block visibility — so a revealed preview block now appears in the overview catalog, not just its per-file schema. Previously these were baked once at null visibility, leaving the catalog permanently incomplete for revealed-preview viewers (e.g. a sim tester withslack_v2revealed saw theslack_oauthschema file but not thetriggers.mdrow).isHiddenUnder,isStaticFileHidden,filterExposedIntegrationTools) so an overview entry appears exactly when its per-file schema does.StaticComponentsobject bundling the file map plus the integration/trigger path-owner maps (previously three separate module globals with the owner maps populated as a side effect and never reset). AddresetStaticComponentsso a rebuild clears files and owner maps together — no stale or double-populated owner maps.Type of Change
Testing
Tested manually.
tsc --noEmitclean,bun run lintandbun run check:api-validation:strictpass. Confirmed no LLM prompt-cache impact on the mothership side: these overview files are delivered only as on-demand VFS tool results appended to the transcript, never injected into a cached system-prompt prefix, so per-viewer rebuilds cannot invalidate a cached prefix (per-file schemas already varied per-viewer the same way).Checklist