Skip to content

feat(app): say why Work opens the Add sandbox dialog - #246

Merged
quickbeard merged 3 commits into
mainfrom
feat/sandbox-work-intro
Aug 16, 2026
Merged

quickbeard merged 3 commits into
mainfrom
feat/sandbox-work-intro

Conversation

@quickbeard

Copy link
Copy Markdown
Owner

Clicking Work before you have a sandbox opens the Add sandbox dialog — Work with no sandbox is a dead end, so the gate asks for one first. But that dialog arrives unbidden and said nothing about why it was there: the first thing it asked for was a name, for something the user had not yet decided they wanted.

It now leads with the reason:

Work runs each session inside a sandbox, so it needs one before you can use it. Cancel to stay on Code.

The second sentence is the part that isn't guessable. Cancelling doesn't drop you into an empty Work side — it leaves you on Code, which is what the gate already does but never said.

Where it appears, and where it doesn't

DialogAddSandbox gains an optional requiredForWork, and exactly one of the three call sites passes it:

Call site Explanation Why
Work gate (workspace/tabs.tsx) yes The dialog opened on its own; it has to say why
Settings → Add server → Add sandbox no A deliberate "add a sandbox" — as you asked
Work empty-state button no Sits directly beneath "No sandbox yet. Create one to work in an isolated environment." — repeating it in the dialog would be noise

That third one is a judgement call rather than something you specified: it is on the Work side, so a stricter reading of "clicking Work" would include it. Say the word and I'll pass the flag there too.

Verified in the running app

Driven over the DevTools protocol with zero sandboxes configured, which is the state that triggers the gate:

  • Clicking Work → dialog opens with the intro (text asserted from the DOM, not just eyeballed).
  • Settings → Add server → Add sandbox → hasIntro: false, dialog unchanged.

Screenshot confirms the line sits above the name field, ahead of the existing per-field hints, so the dialog reads reason-first then field-by-field.

Spanish translated to match, using the localised tab names (Trabajo / Código). bun typecheck clean.

🤖 Generated with Claude Code

quickbeard and others added 3 commits August 16, 2026 20:15
Clicking Work without a sandbox opens the create dialog, because Work with no
sandbox is a dead end. That dialog arrives unbidden and said nothing about why
it was there, so the first thing it asked for was a name for something the
user had not decided they wanted.

It now leads with the reason, and says what cancelling does — which is the part
that is not guessable: the side stays on Code rather than switching to an empty
Work.

Only the gate passes the flag. Settings is a deliberate "add a sandbox" and
needs no preamble, and the Work empty-state button sits directly beneath the
same explanation already.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Two sentences to say one thing. The second told the user what Cancel does,
which the Cancel button and the tab they came from already imply.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
It explains the whole dialog, not the name field it happened to sit above, so
it belongs with the title rather than as the first line of the body.

Uses the component's own DialogTitleGroup instead of placing a paragraph by
hand: that is what the description slot is for, it carries the intended
typography, and it renders a Kobalte Description, so the dialog gains
aria-describedby and screen readers announce the reason with the title.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@quickbeard
quickbeard merged commit dc2d931 into main Aug 16, 2026
0 of 5 checks passed
@quickbeard
quickbeard deleted the feat/sandbox-work-intro branch August 16, 2026 13:26
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