Repository navigation
feat(desktop): wire sandboxes into the desktop app - #203
Merged
Merged
Conversation
The sandbox providers bind-mount a real dist/node directory into the guest, which the server copy inlined via virtual:codev-server cannot provide. Packaged builds now carry it as the server-bundle extraResource (node.js + wasm only; the sourcemap outweighs the bundle), and serverBundleDir() resolves it there or falls back to the workspace build in dev, keeping both version-locked to the running app. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Builds the per-platform provider (macOS vz, Windows wsl, Linux bwrap; wsl and bwrap share the bwrap rootfs asset, only vz has its own image), feeds it into createSandboxController with store-backed persistence, and registers the sandbox-* IPC channels beside the WSL ones. No unavailable-stub split: the controller exists everywhere and availability() carries the unsupported message or the warn-never-block Windows warnings to the renderer. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds the renderer slice over the sandbox controller: app-owned wire types (mirroring wsl/types), a SandboxesProvider context with state and availability queries, preload api.sandboxes over the sandbox-* channels, a third ServerConnection.Sidecar variant "sandbox" keyed sandbox:<name>, ready-sandbox connections in the server list with a startup fallback so a persisted sandbox default never blocks launch, and a settings section with add dialog (native folder picker, warn-never-block availability banner), start/reset/default/delete actions, and en+es strings. 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.
The desktop wiring for the sandbox backends (post-Phase-3 integration): three commits taking
@codev/sandboxfrom zero consumers to a usable feature — packaged server bundle → main-process controller + IPC → renderer/settings UI. Mirrors the WSL servers vertical slice one-for-one so upstream conflicts resolve the same way in both.Commit 1 — ship the server bundle as a mountable resource
Every provider bind-mounts a real
dist/nodedirectory into its guest; the copy inlined viavirtual:codev-servercan't serve that. Packaged builds now carryserver-bundleas an extraResource (node.js+*.wasmonly — the 54MB sourcemap outweighs the bundle and is excluded), and the fork-onlyserverBundleDir()resolves it underprocess.resourcesPath, falling back to the workspace build in dev. Both stay version-locked to the running app. Covered by a new builder-config test.Commit 2 — main-process controller + IPC
Fork-only
src/main/sandbox/{controller,ipc}.ts: platform dispatch (darwin → vz, win32 → wsl, linux → bwrap),createSandboxControllerwith store-backed persistence (sandboxeskey),resolveImagevia the manifest. WSL resolves thebwrap-*manifest asset — the manifest only publishes bwrap/vz images and WSL boots the same rootfs tarball.sandbox-*IPC channels registered beside the WSL ones; no unavailable-stub split becauseavailability()itself carries the unsupported message or the warn-never-block Windows warnings.Commit 3 — renderer + settings
packages/app/src/sandbox/types.ts, exported as./sandbox/typeslike./wsl/types),SandboxesProvidercontext with state + availability queries, preloadapi.sandboxes.ServerConnection.Sidecarvariant{ variant: "sandbox"; name }keyedsandbox:<name>; ready sandboxes appear in the server list, and a fork-onlystartupServerwrapper keeps a persistedsandbox:default from blocking launch until the sandbox is ready (same rule the WSL slice applies towsl:keys).handleRemoveroutessandbox:keys to the controller so delete actually unregisters the VM/distro; en+es strings added.Verification
codev-vmmextraResource (tracked follow-ups) — dev-mode vz/bwrap paths can be exercised once a local image is staged.🤖 Generated with Claude Code