Skip to content

feat(cli): preview --browser-no-gpu for gpu-unstable hosts#2252

Merged
vanceingalls merged 1 commit into
mainfrom
07-11-feat_cli_preview_--browser-no-gpu_for_gpu-unstable_hosts
Jul 11, 2026
Merged

feat(cli): preview --browser-no-gpu for gpu-unstable hosts#2252
vanceingalls merged 1 commit into
mainfrom
07-11-feat_cli_preview_--browser-no-gpu_for_gpu-unstable_hosts

Conversation

@vanceingalls

@vanceingalls vanceingalls commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

What

Adds hyperframes preview --browser-no-gpu (requires --browser-path): launches the opened browser with --disable-gpu. Threaded through openBrowser's disableGpu option 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 (buildBrowserArgs appends/omits --disable-gpu correctly) — 25 tests total, all green. Validation error added when --browser-no-gpu is passed without --browser-path (the system default browser can't receive Chromium flags).

🤖 Generated with Claude Code

@miga-heygen miga-heygen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#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
miguel-heygen previously approved these changes Jul 11, 2026

@miguel-heygen miguel-heygen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 james-russo-rames-d-jusso left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Review by Rames D Jusso

jrusso1020
jrusso1020 previously approved these changes Jul 11, 2026

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving per the channel stamp-flow: Rames-D and Magi both cleared, CI clean at f3c3a15.

@vanceingalls vanceingalls force-pushed the 07-11-fix_cli_settle_post-seek_font_subset_loads_before_audit_screenshots branch from 8821646 to 8bbd5a6 Compare July 11, 2026 21:18
@vanceingalls vanceingalls force-pushed the 07-11-feat_cli_preview_--browser-no-gpu_for_gpu-unstable_hosts branch from f3c3a15 to 3dc08c0 Compare July 11, 2026 21:18
Base automatically changed from 07-11-fix_cli_settle_post-seek_font_subset_loads_before_audit_screenshots to main July 11, 2026 21:28
@vanceingalls vanceingalls dismissed stale reviews from jrusso1020 and miguel-heygen July 11, 2026 21:28

The base branch was changed.

@vanceingalls vanceingalls merged commit 676af2b into main Jul 11, 2026
22 of 31 checks passed
@vanceingalls vanceingalls deleted the 07-11-feat_cli_preview_--browser-no-gpu_for_gpu-unstable_hosts branch July 11, 2026 21:29
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.

5 participants