Repository navigation
feat(app): hide the Work side until a sandbox exists - #292
Merged
Merged
Conversation
The Code/Work strip showed on every desktop install, but Work was empty for anyone who had never made a sandbox. Gate both the side and the strip on workSideAvailable(): sandbox-capable platform and either an existing sandbox or the new general.showWork preference. 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
Every desktop install showed the Code / Work switch above the projects list, even for profiles that had never made a sandbox — Work was an empty side that only offered to build one. Both the Work side and the strip are now gated on a new pure predicate,
workSideAvailable()(fork-onlyworkspace/side.ts):Per the decisions on this:
<Show when={platform.sandboxes}>so non-sandbox builds never offer it. Owning a sandbox shows Work regardless of the switch — hiding the side its servers live on would strand them.removedServeralready steps back to Code; now the strip goes with it.Wiring (fork-only
workspace/tabs.tsx): auseWorkAvailable()hook feeds bothuseWorkspaceSide()'seffectiveSidecall andWorkspaceTabs's<Show>— which previously gated onplatform.sandboxes. Gating both together is deliberate: a hidden strip with Work still selected would leave the user on sandbox servers with no way back to Code.One race preserved from the original split: an undefined sandbox list means "not loaded", not "none", and keeps Work. Collapsing on unknown is what previously bounced the sidebar to Code on every launch and in the beat after the first sandbox was created. The main process answers
sandbox-get-statesynchronously, so that window is sub-frame.DIVERGENCES: new row for the opt-in gate (settings.tsx, settings-v2/general.tsx, i18n are upstream files); the existing Code/Work split row's now-stale
effectiveSideclause updated to point at it. CHANGELOG entry under Desktop / Web UI.Verification
bun typecheckclean inpackages/app; fullbun turbo typecheckgreen via the pre-push hook.bun run test:unit: 690 pass.bun run test:browser: 115 pass, including four newworkSideAvailablecases (no sandbox + opted out → hidden; sandbox exists → shown either way; unsupported platform → never; unloaded list → kept).SettingsProvider(app.tsx:620) is a strict ancestor ofLayoutProvider(viaNewAppLayout→ServerScopedProviders), so the newuseSettings()dependency resolves at every site whereuseWorkspaceSide()already calleduseLayout().🤖 Generated with Claude Code