Skip to content

fix(cli): suggest only a Chrome path that exists when the browser download fails - #6954

Merged
miguel-heygen merged 1 commit into
mainfrom
fix/browser-hint-existing-path
Nov 2, 2026
Merged

miguel-heygen merged 1 commit into
mainfrom
fix/browser-hint-existing-path

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

When the Chrome download fails, the hint told people to export HYPERFRAMES_BROWSER_PATH=... with a made-up default path. If that file does not exist, setting it makes every later run hard-fail with "is set to X, which does not exist".

The hint now names the Chrome actually found on the machine, or, when none is installed, says no Chrome or Chromium was found and offers no path to export.

Why

Reproduced by blocking the download host and running hyperframes browser ensure, then following the hint.

Test

Rewritten hint tests: with an installed Chrome (darwin, linux) the hint carries the real path; with none (darwin, linux, win32) it carries no export line. 75 tests pass 3 runs in a row.

fails without the fix: packages/cli/src/browser/manager.test.ts › downloadBrowser — install failure surfaces HYPERFRAMES_BROWSER_PATH hint › offers no path to export when no Chrome is installed, so a dead override is never suggested (darwin, linux, win32)

Size

Under 100 changed source lines; the rest is the rewritten tests.

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 271 (base branch 271), smooth 105 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (0)

Unstable (1)

  • seqplainkeys-none-center-r0-nested-z100: tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true / tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true / tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true

@heygengenesis heygengenesis Bot 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.

Approve at 87b9cb91.

The hint now uses findSystemBrowser() instead of a hard-coded per-platform path. It can only name a file that existsSync found or that which/where returned, so it never names a dead path. With no Chrome installed it drops the export line and says to install Chrome first.

  • Fails-without-fix line. It names offers no path to export when no Chrome is installed…. The old code always emitted export HYPERFRAMES_BROWSER_PATH="…", so that test fails without the fix.
  • Tests are hermetic. beforeEach resets modules and mocks child_process, so which google-chrome on a CI runner that has Chrome can't leak into the "none installed" cases. SYSTEM_CHROME_PATHS is re-evaluated per platform after setPlatform.
  • When each hint shows. The "installed" hint only appears on the preferManagedChrome path, because otherwise a system Chrome would already have been used. The test covers that.

Nits, not blocking:

  • The suite comment above failInstall still says the linux case exercises browserPathHintForPlatform, which this PR deletes.
  • On win32 with Chrome installed, the hint still prints POSIX export syntax. That predates this PR.

CI: Producer: unit tests failed on renderOrchestrator.stall.test.ts › retries a stalled attempt on fewer workers…. This PR only touches packages/cli, and main is green, so I read it as a flake. It needs a rerun before merge.

@miguel-heygen
miguel-heygen added this pull request to the merge queue Nov 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 1, 2026
@miguel-heygen
miguel-heygen added this pull request to the merge queue Nov 1, 2026
Merged via the queue into main with commit 7c5c1ce Nov 2, 2026
137 of 139 checks passed
@miguel-heygen
miguel-heygen deleted the fix/browser-hint-existing-path branch November 2, 2026 00:11
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.

1 participant