Skip to content

fix(browser): read the engine's messages in the turn they arrive again (re-land #640) - #732

Merged
Hona merged 1 commit into
devfrom
browser-tools/reland-640
Nov 22, 2026
Merged

Hona merged 1 commit into
devfrom
browser-tools/reland-640

Conversation

@Hona

@Hona Hona commented Nov 22, 2026

Copy link
Copy Markdown
Member

What

Re-lands #640: the browser engine's messages wake a quiet update that reads them and steps the agent's browser commands in the same turn, instead of waiting for the window's next frame (17–45 ms per DevTools round trip on blade).

Why it was reverted, and why it is safe now

#675 reverted #640 because back/forward returned before their history commit was applied: the faster wake exposed an early end in the settle logic. That logic is fixed since:

The diff is exactly git revert b76cc0a558 on top of dev: 6 files, +49 / −3, no settle change. No engine input (crates/browser-pane/src/client/mod.rs and sidecar.rs only, not device.rs / installer.rs).

Not proved in this PR

  • The back/forward sequence check (4 configurations) on this PR's own build: I run it as a follow-up and post the result here.
  • Per-command latency on this build versus dev.

…n (re-land #640)

#640 gave the engine's messages their own quiet waker, so each DevTools round trip of an agent's
browser command no longer waits for the window's next frame. #675 reverted it because back/forward
then ended before their history commit was applied. That early end was in the settle logic, fixed
since by #706 and #696 (back/forward now wait for the commit's own DevTools events), so the faster
wake comes back unchanged.

This reverts commit b76cc0a.
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

PR test build retired — merged into dev. Install or auto-update OpenCode (Rune) from https://anoma.ly/release/opencode/desktop-rune/dev/macos-arm64-dmg.

@Hona
Hona merged commit f60b398 into dev Nov 22, 2026
7 checks passed
@Hona
Hona deleted the browser-tools/reland-640 branch November 22, 2026 22:08
@Hona

Hona commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Follow-up check on this PR's CI build (exe bd1095f4…, published engine 156.0.26-10, hidden desktop): back/forward 0/160 first-try failures in 4 sequences x 4 configurations (plain, uBOL, cross-origin frame, both); first command median 27 ms; snapshot after forward ~150 -> ~55 ms median versus dev-474. Cases 0/100 wrong (same-document pushState / anchor and no entry at the 1.2 s grace; bfcache / no-store 19-66 ms). Smoke 12/12 (proof\smoke\2026-11-23\080142-BROWSER-TOOLS-732-smoke-f4f67ba33b-unknown.txt).

Hona added a commit that referenced this pull request Nov 23, 2026
…sk for one (#819)

#732 (re-land of #640) set the browser engine's message waker in open.rs on every target, but launch::browser_waker exists only off wasm32, so the scheduled web build failed on dev (open.rs:203/206). Both lines are now native-only, as browser_waker itself is. Checked: scripts/web.ps1 -Check (cargo check -p opencode-web --lib --target wasm32-unknown-unknown) exit 0, web clock ok.
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