Skip to content

chore(config): retire the remaining NEXT_PUBLIC_* flag twins - #10342

Merged
waleedlatif1 merged 2 commits into
stagingfrom
chore/retire-flag-twins
Nov 23, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
chore/retire-flag-twins

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

The browser now reads BILLING_ENABLED, E2B_ENABLED, SLACK_EXTENDED_SCOPES, DISABLE_INVITATIONS and DISABLE_PUBLIC_API from the deployment-shape projection on <html>, the same path the enterprise flags and REGISTRATION_MODE already take. The five NEXT_PUBLIC_* twins that had to be kept in sync by hand are gone.

  • env-flags: the browser branches read the projected value, and a document without a projection reads it as off. Adds isE2bEnabled.
  • Deployment shape: projects e2bEnabled, slackExtendedScopes, invitationsDisabled and publicApiDisabled. They're optional so app versions that predate them keep parsing during a rolling deploy.
  • The Pi block and usePermissionConfig read the deployment shape instead of getEnv('NEXT_PUBLIC_*').
  • The env schema, Helm values (chart 1.15.4), docs, docs generator and e2e scripts no longer mention the twins.
  • sim-setup: the twin pairing and the E2B mismatch check are removed. doctor now warns that a leftover twin does nothing and names the server variable that replaces it.

Behavior is unchanged for any deployment where each twin already matched its server variable, which sim-setup doctor required. Pi's cloud modes now follow E2B_ENABLED directly.

Testing

  • deployment-projection.dom.test.ts covers the projected switches. It fails when the browser ignores the projection.
  • Ran blocks, the permission hook, deployment shape, env-capabilities, sandbox conformance, webhook deploy, sim-setup (105 tests) and the sim-setup and deployment-config type-checks.
  • Ran the check:client-boundary, check:comment-hygiene and check:docs audits.

The browser now reads BILLING_ENABLED, E2B_ENABLED, SLACK_EXTENDED_SCOPES,
DISABLE_INVITATIONS and DISABLE_PUBLIC_API through the deployment-shape
projection, like the enterprise flags, instead of NEXT_PUBLIC_* twins that had
to be kept in sync by hand.

- env-flags: browser branches read the projected value (absent reads as off);
  add isE2bEnabled
- deployment shape: project e2bEnabled, slackExtendedScopes,
  invitationsDisabled and publicApiDisabled (optional for rolling compatibility)
- Pi block and usePermissionConfig read the deployment shape
- env schema, Helm values, docs and e2e scripts drop the twins
- sim-setup: remove the twin pairing and the E2B mismatch check; doctor now
  warns that a leftover twin does nothing and names its server variable
@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Nov 23, 2026 7:07pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 31 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable new issue was found.

Summary

Moves five browser flags from paired environment variables to the server’s deployment shape.

  • Browser billing, Slack, invitation, public API, and Pi settings now follow the server’s projected answers.
  • Setup tools stop syncing retired browser twins and warn when one remains.

Intentional behavior noted by waleedlatif1: Pi cloud modes now follow E2B_ENABLED directly, and missing optional switches read as false during rolling deploys.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Server environment] --> B[Resolved deployment shape]
  B --> C[HTML attribute]
  B --> D[Workspace host context]
  C --> E[Browser readers]
  D --> F[Seeded deployment shape]
  F --> G[Pi and permission controls]
Loading

Reviews (1) · Last reviewed commit: "chore(helm): bump chart to 1.15.4" · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit 3b3c0b5 into staging Nov 23, 2026
161 of 163 checks passed

This branch was successfully deployed

1 active deployment
Preview — 4a059b84 Deployed Nov 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant