Skip to content

feat(dashboard): add Devbox deprecation banner and blocking modal#8892

Open
christianalfoni wants to merge 6 commits into
mainfrom
explore/devbox-deprecation-banner
Open

feat(dashboard): add Devbox deprecation banner and blocking modal#8892
christianalfoni wants to merge 6 commits into
mainfrom
explore/devbox-deprecation-banner

Conversation

@christianalfoni

Copy link
Copy Markdown
Contributor

Summary

Adds a deprecation banner for Devboxes in the dashboard and a blocking modal when creating or forking a Devbox, mirroring the branch-creation deprecation pattern from #8890.

Everything is gated behind a new server-provided team feature flag blockDevboxCreation (expected server flag block_devbox_creation, matching the blockBranchCreation precedent).

Changes

  • Add blockDevboxCreation to the TeamFeatureFlags GraphQL type, dashboard fragments, and the useWorkspaceFeatureFlags hook
  • Banner: DevboxDeprecationStripe warning stripe shown on the Recent and Sandboxes dashboard pages when the flag is set
  • Modal: devboxCreationDeprecated (close-only Alert, same copy as the banner)
  • Guard: forkSandbox opens the deprecation modal instead of forking when creating/forking a Devbox (body.v2) with the flag set. Regular v1 Sandboxes are unaffected.
  • Pass v2: sandbox.isV2 from the SandboxMenu fork entry points so forking an existing Devbox is caught by the guard

⚠️ Before merge

  • Removal date is TBD — banner/modal copy currently says "will be removed soon" with no date. Needs a date dropped in once known.
  • Docs link is a placeholder (https://codesandbox.io/docs) — swap in the real migration guide URL.
  • Server dependency: requires the server to expose blockDevboxCreation on TeamFeatureFlags. If the server also enforces the block (like BRANCH_CREATION_DISABLED for branches), we should add equivalent error-code handling in forkSandbox as a backstop.

Test plan

  • tsc --noEmit passes clean
  • With blockDevboxCreation enabled: banner appears on Recent + Sandboxes pages
  • With flag enabled: creating a Devbox via the Create modal opens the deprecation modal instead of forking
  • With flag enabled: forking a Devbox from the context menu opens the modal
  • With flag enabled: creating/forking a regular Sandbox still works normally

🤖 Generated with Claude Code

Mirror the branch-creation deprecation pattern for Devboxes (v2 sandboxes),
behind a new server-provided blockDevboxCreation team feature flag:

- Add blockDevboxCreation to the TeamFeatureFlags GraphQL type, fragments,
  and the useWorkspaceFeatureFlags hook
- Show a DevboxDeprecationStripe warning banner on the Recent and Sandboxes
  dashboard pages when the flag is set
- Add a devboxCreationDeprecated modal (close-only, mirroring the banner copy)
- Guard the forkSandbox action: when creating or forking a Devbox (body.v2)
  with the flag set, open the deprecation modal instead of forking
- Pass v2: sandbox.isV2 from the SandboxMenu fork entry points so forking an
  existing Devbox is caught by the action guard

Copy intentionally omits a removal date (TBD) and uses a placeholder docs link.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codesandbox

codesandbox Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

christianalfoni and others added 4 commits June 17, 2026 12:18
Showing the deprecation modal from the forkSandbox action while the Create
modal was open just closed the Create modal (modals can't stack), so creating
a Devbox appeared to silently do nothing.

Instead, surface the deprecation banner inline in the Create form when the
Devbox runtime is selected and disable the Create button while the
blockDevboxCreation flag is set. The forkSandbox action guard remains as the
block for the dashboard "Fork" context-menu path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
devboxDeprecated referenced blockDevboxCreation before its const
declaration, causing a 'Cannot access before initialization' (TDZ)
runtime error when the Create modal mounted.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Importing DevboxDeprecationStripe from the app/pages/Dashboard tree into the
Create component risked a circular-init error that only surfaced when the
banner rendered (on selecting Devbox). Inline the MessageStripe directly in
CreateBoxForm instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…x option

When blockDevboxCreation is set, show the deprecation banner at the top of the
Create form immediately (regardless of selected runtime) and disable the Devbox
runtime card outright with a short note. The Create button stays disabled for
Devbox-only templates that can't fall back to Sandbox.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
necoline
necoline previously approved these changes Jun 17, 2026
…docs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants