Repository navigation
fix(desktop): build the sandbox VM helper for dev runs - #321
Merged
Merged
Conversation
`bun dev` never built codev-vmm — only prebuild (packaging) did — so on a fresh clone the Work side answered every sandbox dialog with "sandbox VM helper is not installed" (the vz provider stats the dev helperPath, codev-sandbox/native/vzhelper/dist/codev-vmm). Same fresh-clone class of failure predev already fixes for the Electron binary, so the build joins it there: macOS only, host arch (packaging still does --universal), incremental (~1.5s when up to date), and non-fatal — a machine without a Swift toolchain warns and still gets a working app, minus sandboxes. Co-Authored-By: Claude Opus 5 (1M context) <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.
On a fresh clone, opening any sandbox dialog on the Work side of a dev run (
bun dev) dead-ends on:Root cause
The vz provider's availability check stats the helper binary (
packages/codev-sandbox/src/vz/provider.ts:118). In dev runsvmmHelperPath()points at the codev-sandboxdist/build output — but onlyprebuild(packaging) ever ranbuild-vzhelper.ts. Nothing built it forbun dev, so every dev machine that hadn't packaged a release sat in this state. The renderer then caches the failed verdict for the app's lifetime (staleTime: Infinityinsandbox/context.tsx), so even building the helper by hand needs an app relaunch to register.Fix
predev.ts— the hook that already exists for exactly this fresh-clone class of failure (the Electron 42install-electronshim) — now builds the helper on macOS:--universalinprebuild.bun dev.Updated the existing
predev.tsrow inDIVERGENCES.md.Verified
Ran
bun ./scripts/predev.tsend-to-end (helper built and ad-hoc signed withcom.apple.security.virtualization), relaunched the dev app, and drove it over CDP:window.api.sandboxes.availability()→{supported: true}, and the Work-side "Set up your sandbox" dialog now shows the real setup flow (Choose… / Cancel / Set up) with no error line.🤖 Generated with Claude Code