Skip to content

fix(browser): an agent's input runs the tab at 240 fps, so its mouse moves stop waiting for a 60 fps frame - #815

Merged
Hona merged 1 commit into
devfrom
browser-tools/agent-input-fps
Nov 23, 2026
Merged

Hona merged 1 commit into
devfrom
browser-tools/agent-input-fps

Conversation

@Hona

@Hona Hona commented Nov 23, 2026

Copy link
Copy Markdown
Member

What

An agent's mouse moves waited for the off-screen tab's next frame. Blink handles a mouse move at the next frame, and an off-screen tab's frames come at its windowless_frame_rate (60): each of browser.drag's twelve moves waited up to 16.7 ms. Official's window runs at the display's rate.

While an agent's Input.* calls arrive, the tab now runs at 240 fps; one second after the last one it returns to 60. A person's own browsing never runs at the higher rate.

  • apps/browser-engine/src/input_fps.rs (new): boost on an agent input call, relax from the engine loop's poll_frames.
  • cdp_ledger.rs: boosts when an agent's Input.* call passes its checks.
  • clipboard_gate.rs: the pane rate as PANE_FPS.
  • ENGINE_REVISION 19 -> 20; scripts/guardrails/engine-inputs.txt refreshed (engine-revision: ok, 84 inputs).

Measured

44-operation suite on blade, hidden desktop, published dev-475 app, the engine built from the same tree with and without this change (both unoptimized dev builds), medians:

Operation 60 fps (4 rounds) this change (3 rounds) official
drag 248 ms (229-256) 107 ms (102-114) 97 ms
fill 111 ms (50-240) 77 ms (62-84) 51 ms
check 76 ms 64 ms 83 ms
snapshot 102 ms 68 ms 52 ms
click 68 ms (60-82) 82 ms (73-98) 79 ms

Every other operation within noise.

Not proved in this PR

  • On a release (optimized) engine: measured after the engine publishes.
  • GPU / power cost while an agent drives a tab: bounded to one second after its last input call.

…moves stop waiting for a 60 fps frame

Blink handles a mouse move at the next frame, and an off-screen tab's frames come at its windowless_frame_rate (60). Each of a drag's twelve moves waited up to 16.7 ms: 216 ms on blade, where official's window at the display's rate took 97 ms. While an agent's Input.* calls arrive the tab now runs at 240 fps, and returns to 60 one second after the last one. ENGINE_REVISION 20.
@Hona
Hona merged commit 1c251ff into dev Nov 23, 2026
5 of 6 checks passed
@Hona
Hona deleted the browser-tools/agent-input-fps branch November 23, 2026 03:45
@github-actions

github-actions Bot commented Nov 23, 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.

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