Repository navigation
fix(app): show the host folder name while a sandbox project is unnamed - #258
Merged
Merged
Conversation
A sandbox's project folder is mounted at a fixed guest path, so a fresh project record has no name and displayName() fell back to the guest worktree's basename — "workspace" — until adoptFolderName's rename round-tripped through the guest server (record reported → project.update → project.updated event). enrich() now fills an unnamed project's label from the fork-only sandboxProjectHostName, which maps the connection's guest paths back to host folders: conn.projectDir for the primary (matched by the synced primary directory, or the /workspace literal before sync loads on a relaunch) and conn.mounts[].path for extras. Display-only: the durable server-side rename is unchanged and wins the moment it lands, as does any name the user set. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
quickbeard
force-pushed
the
sandbox-name-flash
branch
from
August 17, 2026 08:35
2feb3ef to
19a546f
Compare
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 freshly created sandbox's project briefly showed "workspace" in the sidebar before flipping to the selected folder's name. The label comes from
displayName()=name || basename(worktree), the guest worktree is the fixed mount point/workspace, and the real name only arrives afteradoptFolderName's rename round-trips through the guest server (record reported →project.update→project.updatedevent).The fix is a display-only fallback:
enrich()incontext/global.tsxfills an unnamed sandbox project's label from the new fork-only helpersandboxProjectHostName(packages/app/src/sandbox/projects.ts), which maps the connection's guest paths back to the host folders the app already knows:conn.projectDir's basename, matched by the synced primary directory — with the/workspaceliteral as a pre-sync fallback so a relaunch doesn't flash either;conn.mounts[].pathbasename.Non-sandbox servers and already-named projects are untouched; the helper returns nothing for unknown guest paths. The durable server-side rename is unchanged and takes precedence the moment it lands, as does any name the user set themselves. (On WSL there was no flash to begin with — the guest primary is the translated host path, whose basename already matches.)
Notes
packages/app/src/sandbox/projects.test.ts(primary via synced directory, WSL-shaped primary, pre-sync/workspace, extra mounts, unknown paths, non-sandbox servers).global.tsxedit with on-conflict guidance; CHANGELOG.md records the user-facing change.bun typecheckand thesrc/sandboxsuite (20 tests) pass frompackages/app.🤖 Generated with Claude Code