Repository navigation
Preserve agent-browser configuration during viewport setup and stream discovery - #1304
Conversation
Deploying mouseterm with
|
| Latest commit: |
10167f5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e73e70b3.mouseterm.pages.dev |
| Branch Preview URL: | https://audit-browser-preflight-opti.mouseterm.pages.dev |
dormouse-bot
left a comment
There was a problem hiding this comment.
AGENT_BROWSER_LAUNCH_FLAGS matches the relaunch hash in agent-browser 0.27.0, but current releases hash two more flags that Dormouse already parses: --hide-scrollbars and --allowed-domains (launch_hash in v0.39.1). On 0.39, open <url> --profile /tmp/p --allowed-domains example.com now sends --profile without the domain list on the DPR and viewport calls. That makes those calls send a launch whose hash differs from the blank page's, so the browser relaunches. The final open carries both flags and relaunches again, and the destination loads without the prepared viewport. Before this PR those internal calls sent no launch at all for this command, so the combination is a new regression. Adding both flags (and one of them to the new test's flag lists) closes the gap.
Opening a fresh agent-browser pane with --config or other launch options could fail during viewport preparation, or navigate successfully and then replace the browser while discovering its stream. The internal DPR, viewport, and stream-status calls dropped the options supplied to the destination command; agent-browser can relaunch when those options change.
Carry the same launch configuration through those internal calls. Keep output-control flags on the original command so quiet output cannot hide the DPR response. Update the browser contract and evidence.
Validation: two new viewport regressions fail before the fix; 21 viewport tests pass, including stream discovery after non-navigation commands. Full CLI suite: 261 pass, 14 skipped, one previously reproduced Windows filename-fixture failure. Build, spec, Markdown, and diff checks pass. Live standalone harness reproduced the failure with a temporary config; the fixed Windows browser pane renders a test page whose first script records 1440 x 900 at DPR 1.