feat(cli): preview --browser-no-gpu for gpu-unstable hosts#2252
Conversation
4dab6e7 to
f3c3a15
Compare
miga-heygen
left a comment
There was a problem hiding this comment.
#2252 — preview --browser-no-gpu for gpu-unstable hosts
Verdict: LGTM 🟢
New CLI flag for preview: --browser-no-gpu passes --disable-gpu to the launched browser. Correctly requires --browser-path — can't pass Chromium flags to the system default browser (error + process.exitCode = 1 with actionable message). Tests verify buildBrowserArgs with and without the flag.
Addresses NVIDIA Xid 32 reset reports on NixOS. Small, well-gated.
Review by Miga
miguel-heygen
left a comment
There was a problem hiding this comment.
Reviewed current head f3c3a15. --browser-no-gpu is validated as requiring --browser-path, propagated through preview/studio, and defaults off; argument tests cover flag presence/absence. Required checks are green. APPROVE.
james-russo-rames-d-jusso
left a comment
There was a problem hiding this comment.
Reviewed at f3c3a15.
Small clean escape-hatch for a real driver bug (NixOS/NVIDIA Xid resets). The validation error catches the misuse ("without --browser-path the open-package fallback can't receive Chromium flags") with the correct alternative (--no-open). Threaded through all three preview launch modes (dev, local-studio, embedded) via openStudioBrowser, and the two buildBrowserArgs unit tests cover the append + omit paths.
The flag is preview-scoped so there's no capture-path implication to worry about — this doesn't influence render/snapshot/check output.
LGTM from my side.
jrusso1020
left a comment
There was a problem hiding this comment.
Approving per the channel stamp-flow: Rames-D and Magi both cleared, CI clean at f3c3a15.
8821646 to
8bbd5a6
Compare
f3c3a15 to
3dc08c0
Compare
The base branch was changed.

What
Adds
hyperframes preview --browser-no-gpu(requires--browser-path): launches the opened browser with--disable-gpu. Threaded throughopenBrowser'sdisableGpuoption and all three preview launch modes (dev, local-studio, embedded).Why
Wild report: on NixOS,
preview's auto-opened hardware-accelerated Chrome triggered NVIDIA Xid 32 driver crashes. Preview has no way to avoid launching a hardware-accelerated browser on a GPU-unstable host; this gives an explicit opt-out.Validation
New unit tests in
openBrowser.test.ts(buildBrowserArgsappends/omits--disable-gpucorrectly) — 25 tests total, all green. Validation error added when--browser-no-gpuis passed without--browser-path(the system default browser can't receive Chromium flags).🤖 Generated with Claude Code