feat(blocks): add block visibility gating (preview blocks + AppConfig reveals)#5526
Conversation
The dependency was pinned to a direct tarball on cdn.sheetjs.com, which now returns 403 (Cloudflare bot-challenge) to automated clients, breaking bun install in CI. npm's own xlsx is frozen at 0.18.5, so switch to the @e965/xlsx mirror which republishes the identical 0.20.3 CDN build to the npm registry. No code changes needed — all imports use bare 'xlsx'.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview
New Copilot/VFS/integration tools keep ungated process-global caches and filter per viewer at stamp/consume time; discovery server tools run inside Reviewed by Cursor Bugbot for commit a5da72e. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR adds block visibility gating for preview and AppConfig-controlled blocks. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (4): Last reviewed commit: "fix(blocks): carry kill-switch entries a..." | Re-trigger Greptile |
|
@greptile review |
|
@greptile review |
# Conflicts: # scripts/check-api-validation-contracts.ts
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4fec85f. Configure here.
|
@greptile review |

Summary
preview: trueon a BlockConfig hides the block from every discovery surface (toolbar, cmd+K, mentions, tool picker, mothership VFS/metadata/tools, Access Control, docs/catalog) in every environment until revealed — fail-closed, including SSRblock-visibilityAppConfig document (per-block{enabled, orgIds, userIds, adminEnabled}rules — admins/org allowlists get a(Preview)name suffix,enabled: true= GA) orPREVIEW_BLOCKSenv for self-host/dev;enabled: falseon a shipped block = discovery kill switchgetBlockstays pure, gated blocks stay ingetAllBlocks()as clones (clone-not-remove), placed instances keep runningblocks/visibility/context (client resolver + per-request server ALS, independent of the custom-block overlay), registry projection with a zero-cost fast path when no preview blocks existappconfig-rules.ts(feature-flags refactored onto it)generate-docs/check-block-registryskip preview blocks (no public docs/catalog/meta until GA); Access Control hides them from the list while keeping stored allowlists viewer-independent/gate-blockskill documents the lifecycle; infra profile landed in simstudioai/infra#262Type of Change
Testing
966 tests across touched suites (new coverage: rule parsing, visibility evaluation, registry projection, hydrate no-op, route, preview-not-exempt), tsc, lint,
check:api-validation:strict, react-query + client-boundary audits,check-block-registry— all green. Route-count baseline 919→920 (new contract-bound route).Checklist