Skip to content

feat(app): mount folders from the Work sidebar button - #254

Merged
quickbeard merged 2 commits into
mainfrom
mount-project-button
Aug 17, 2026
Merged

quickbeard merged 2 commits into
mainfrom
mount-project-button

Conversation

@quickbeard

Copy link
Copy Markdown
Owner

What

  • The folder button beside Projects on the Work side now opens the sandbox's mount dialog (the same one as the server's menu item in Settings) instead of the Code behavior — a directory picker over the sandbox's own guest filesystem. Same folder-add-left icon; the Work variant carries its own data-action="work-mount-project" hook, and Code keeps home-add-project and the existing Add project behavior untouched.
  • The Settings → Servers menu item is renamed from Folders... to Mount project, and the dialog title follows suit (was Sandbox folders). Both the sidebar button and the menu item read the same sandbox.server.mounts key, so they cannot drift apart.
  • The dialog's intro line no longer warns that the agent edits mounted files without asking.

Why

Folders reach a sandbox by being mounted, not picked: the guest-filesystem picker on Work invited the misreading that it would add a host folder, while the actual mount flow was hidden behind a menu in Settings.

Notes

  • app-sidebar.tsx is fork-only and the changed i18n keys are fork-added, so no DIVERGENCES.md update is needed; the user-facing change is recorded in CHANGELOG.md.
  • With two or more sandboxes the header button does not render; each HomeServerRow (upstream home.tsx) still shows its per-row Add project button with the old guest-picker behavior. Changing that means adding a prop to an upstream file, left for a follow-up decision.
  • bun typecheck and the sidebar/sandbox unit tests pass from packages/app.

🤖 Generated with Claude Code

Quickbeard and others added 2 commits August 17, 2026 13:38
The folder button beside Projects on the Work side opened the Code
behavior — a directory picker over the sandbox's own filesystem — but
folders reach a sandbox by being mounted, not picked. On Work it now
opens the sandbox's mount dialog, the same one as the server menu item
in Settings, which is renamed from "Folders..." to "Mount project" to
match, as is the dialog title. The dialog's intro line drops the
without-asking warning. Code keeps the existing Add project behavior.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
DialogSandboxMounts snapshotted config.mounts into its store once, at
component creation. Opened before the sandboxes query had data — easy
moments after launch — the snapshot froze as an empty list while the
rest of the dialog filled in reactively, so the dialog showed only the
project folder, read as dirty, and Save wrote the empty list back:
every extra folder silently unmounted while its seeded project stayed
in the sidebar looking mounted. The editor is now created only once
the sandbox's state exists, behind a loading dialog, so the snapshot
is always taken from loaded state.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@quickbeard
quickbeard force-pushed the mount-project-button branch from 5b576f5 to 2ec0e04 Compare August 17, 2026 06:38
@quickbeard
quickbeard merged commit c49ed4e into main Aug 17, 2026
0 of 5 checks passed
@quickbeard
quickbeard deleted the mount-project-button branch August 17, 2026 06:39
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