Repository navigation
feat(app): say why Work opens the Add sandbox dialog - #246
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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
DialogAddSandboxgains an optionalrequiredForWork, and exactly one of the three call sites passes it:workspace/tabs.tsx)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:
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 typecheckclean.🤖 Generated with Claude Code