Skip to content

fix(cli): capture names its local page server's port in the bypass entry - #7965

Merged
jrusso1020 merged 1 commit into
mainfrom
fix/capture-direct-host-port
Nov 16, 2026
Merged

jrusso1020 merged 1 commit into
mainfrom
fix/capture-direct-host-port

Conversation

@jrusso1020

Copy link
Copy Markdown
Collaborator

What

hyperframes capture now builds its browser's proxy-bypass entry for the local page server with pageServerDirectHost, the same helper the render and Studio paths use since #7945. The entry always names a port.

Why

Capture still built the entry from new URL(localOrigin).host. For an origin on its scheme's default port (http://localhost), host has no port, so the entry was localhost and Chrome applied it to every port on that host. Capture was the one launch site #7945 didn't switch to the helper.

Related work

Refs #7945

How

A one-line swap in packages/cli/src/capture/launchCaptureBrowser.ts to the exported pageServerDirectHost. Other launch arguments are unchanged.

Test plan

  • Unit tests added/updated. launchCaptureBrowser.test.ts adds "names a local page server's default port in its bypass entry", which expects --proxy-bypass-list=<-loopback>;localhost:80 for http://localhost. It fails without the fix: with the old new URL(...).host line restored, that test fails and the other 7 pass. With the fix, all 8 pass.
  • Manual testing performed
  • Documentation updated (if applicable)
  • Comments follow CONTRIBUTING.md "Comments": they say why, not what, and a bug fix says what the code must do and how to reproduce the bug

oxlint, oxfmt --check, tsc --noEmit (cli), and the comment citation and ratchet checks pass locally.

— Rames Jusso (hyperframes)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@vanceingalls vanceingalls 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.

Approved at 715dfb6. Capture's bypass entry now comes from pageServerDirectHost like the render and Studio paths, so an origin on its scheme's default port (http://localhost) yields localhost:80 instead of a host-wide localhost bypass. The new test fails with the old .host line. Required checks 9/9.

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

Approved at 715dfb6. capture now builds its bypass entry with pageServerDirectHost, the same helper the engine's browser manager and the CLI's page network already use (browserManager.ts:863, pageNetwork.ts:44). So http://localhost becomes localhost:80 instead of a bare host, which Chrome reads as every port on that host. The new test pins the default-port case.

@jrusso1020
jrusso1020 added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit a9b0371 Nov 16, 2026
70 checks passed
@jrusso1020
jrusso1020 deleted the fix/capture-direct-host-port branch November 16, 2026 17:49
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.

3 participants