Repository navigation
feat(desktop): manage extra sandbox folder mounts from settings - #235
Merged
Merged
Conversation
quickbeard
force-pushed
the
sandbox-mounts-image
branch
from
August 14, 2026 06:30
82c0320 to
abbc898
Compare
quickbeard
force-pushed
the
sandbox-mounts-ui
branch
from
August 14, 2026 06:30
bf6ca05 to
83cbb72
Compare
quickbeard
force-pushed
the
sandbox-mounts-image
branch
from
August 14, 2026 06:33
abbc898 to
14a80d9
Compare
Each sandbox's overflow menu (Settings -> Servers) gains a Folders... item opening a manage-mounts dialog: the original project folder stays fixed, extra host folders can be added (multi-select native picker) and removed, read-write. Windows applies changes hot; macOS and Linux warn that saving restarts the sandbox (disk state survives, the live session drops), and macOS also hints that an old-image sandbox needs Reset before new folders appear. Wiring: a sandbox-update-mounts IPC channel validates shape, structure (shared validateMountPaths: duplicates, nesting, UNC), and existence main-side before calling the controller; normalizePersistedSandbox tolerates old records and drops malformed mount entries rather than the sandbox; the renderer connection carries the resolved runtime mounts. The app mirrors the mount types (it never imports the node package), validates the draft inline via mounts-model.ts for i18n-able messages, and seedSandboxProjects now opens one project per mounted folder, naming each after its host basename. The "cannot be changed later" copy in the add dialog is reworded in en and es. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
quickbeard
force-pushed
the
sandbox-mounts-ui
branch
from
August 14, 2026 06:34
83cbb72 to
9d9682e
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.
Third of three stacked PRs (on #233 and the image PR). The user-facing feature: mount more folders into an existing Work sandbox.
What
DialogSandboxMounts: the original project folder is shown fixed; extra folders can be added via the host-native picker (multiple: true, deliberately bypassinguseDirectoryPicker, whose policy would browse the guest fs) and removed; inline validation via the new puremounts-model.ts(mirrorsvalidateMountPaths— the app never imports the node package); a restart warning on macOS/Linux when the sandbox is live and the draft changed; a macOS-only hint that an old-image sandbox needs Reset before folders appear. Read-write only in v1.sandbox-update-mountsIPC channel — shape (≤16 entries, non-empty string paths), structural validation viavalidateMountPathsfrom@codev/sandbox, and per-pathstatall main-side, keeping the generic controller fs-free.normalizePersistedSandboxaccepts old records (absentmounts) and drops malformed entries rather than the sandbox.updateMounts; the sandbox connection carries the resolvedruntime.mounts; theServerConnectionsandbox variant gainsmounts?;seedSandboxProjectsdrops its single-mount assumption and opens one project per mounted folder, naming each after its host basename (a removed mount's project intentionally stays open — sessions may reference it).sandbox.mounts.*family +sandbox.server.mountsin en and es;sandbox.add.projectDirHintreworded — the folder set is no longer "cannot be changed later".Behavior
Windows applies mount changes instantly (no restart — WSL drives are already automounted; saving is pure path translation). macOS/Linux restart the sandbox on save: guest disk state survives, running terminals and in-flight work stop, and the dialog says so before Save.
Tests
bun test && bun typecheckfrompackages/app(661 pass, incl. newmounts-model.test.ts) andpackages/desktop(78 pass). Manual e2e still worth a pass per platform viabun dev:desktop; one flagged check: a hot mount update on Windows should not reconnect the SDK client (the connection key is unchanged).🤖 Generated with Claude Code