Repository navigation
feat(app): warn on Work when a sandbox fails to start - #262
Merged
Merged
Conversation
The Work empty state keyed "stopped" off config.stopped, so a sandbox whose boot failed fell into the "not running yet, appears once ready" wait message and the user was left waiting on a boot that already gave up; the failure was only visible in Settings -> Servers. The message decision moves to the pure workspaceEmptyState in workspace/side.ts: a sandbox still coming up (starting runtime, or a create/reset job, whose runtime reads "stopped" while it runs) keeps the wait message, then a failed sandbox is called out with its runtime message and a Try again button that starts it in place, and all-stopped stays the fallback. Co-Authored-By: Claude Fable 5 <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.
What
A sandbox whose boot failed showed the Work sidebar's wait message — "Your sandbox is not running yet. It appears here once it is ready." — a promise that was never going to be kept. The only way to learn something went wrong was to go looking in Settings → Servers.
The Work empty state now says the sandbox failed to start, shows the runtime's failure message (e.g.
sandbox server did not become healthy within 30000ms), and offers a Try again button that starts it in place — the same action as Settings → Servers → Start, with the same error toast.How
WorkspaceEmptyinto the pureworkspaceEmptyStateinpackages/app/src/workspace/side.ts(the testable home for Work-side decisions, besideleavesWorkEmpty). Precedence: a sandbox still coming up wins — astartingruntime, or any create/reset job, whose runtime reads"stopped"while it runs — because one sandbox on its way keeps the wait message true; only then is a failed sandbox called out; a side whose sandboxes are all deliberately stopped is the fallback. The old code keyed "stopped" offconfig.stopped, which is why a failed boot (flag unset) fell into the wait branch.workspace.empty.failed/workspace.empty.failed.retryinen+es.DIVERGENCES.md: the Code/Work workspace split row's i18n key list updated; a stale duplicate of that same row (predatingempty.stopped) removed.CHANGELOG.md: entry under Unreleased → Sandbox.Why it matters
Observed in the wild: a bwrap sandbox boot timed out once at the 30s health gate (the guest server was up ~2s after spawn but never answered
/global/health; 7 standalone replays of the identical create/reset + boot sequence were healthy in 1.7–3.7s, so it was transient host contention). A plain retry would have succeeded — but the sidebar's wait message hid that a retry was even needed.Testing
packages/app/test-browser/workspace-side.test.tscovering none/coming-up/failed/stopped precedence, including "a failure beside a starting sandbox does not interrupt the wait" and "a reset job's stopped runtime still reads as coming up".bun run test:browser(101 tests) andbun typecheckpass frompackages/app.🤖 Generated with Claude Code