Skip to content

fix(browser): Browser panel lags behind typing and the live view stutters - #197927

Merged
hannesrudolph merged 12 commits into
openclaw:mainfrom
daniel-lxs:browser-panel-responsiveness
Nov 13, 2026
Merged

hannesrudolph merged 12 commits into
openclaw:mainfrom
daniel-lxs:browser-panel-responsiveness

Conversation

@daniel-lxs

@daniel-lxs daniel-lxs commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Closes #165752

What Problem This Solves

Fixes: typing, clicking and the live view in the Control UI Browser panel lag far behind the person driving it, because every input waits for a 250 ms navigation-guard window and the screencast waits 50 ms before asking for each frame.

User Impact

User impact: in the Browser panel, typed characters reach the page in about 160 to 320 ms (median) instead of seconds, and the live view runs at a higher frame rate. Agent browser tools behave exactly as before.

Why This Change Was Made

  • Live view. Each screencast frame is acknowledged once the first viewer socket has taken it, allowing slower viewers to skip frames without delaying faster viewers. The 50 ms wait remains only when every viewer is congested, and Chrome still holds at most one unacknowledged frame, so frames never queue.
  • Input. The panel sends input through a new POST /operator/input route instead of one POST /act per input. A request carries an ordered burst of key presses, text inserts and clicks, and the panel sends whatever was typed while one burst was in flight as the next burst. Each request runs its burst inside one guarded interaction on the /act execution path: the same document request fence, download policy, dialog handling and quarantine. The 250 ms post-action window and the final navigation checks run once per burst instead of once per input.
  • Navigation stays checked. A main-frame navigation request or commit stops the burst before any further input, and the response reports navigated: true; the panel drops the withheld input with a notice. A subframe navigation (an ad or embed reloading) does not stop input; its committed URL is still policy-checked, and a denied one stops the burst. Each request reports its own policy denial or blockedByDialog.
  • Profiles without the route. Existing-session and Lightpanda profiles answer 501 OPERATOR_INPUT_UNSUPPORTED, and the panel falls back to one /act per input there, as before.
  • docs/tools/browser-control.md documents the route and the frame pacing.

Trade-offs for review:

  • The navigation guard covers about 250 ms after the last input of a burst, the same window as one /act action. A page script that starts a navigation later than that (for example from a timer about 200 ms or more after a key) is not fenced by this request, exactly as after an /act key press.
  • Each burst waits the full 250 ms window before it is answered, which sets the typing latency above. Keys typed meanwhile go out together in the next burst.
  • Scrolling (evaluate through /act) and hover are unchanged.

Evidence

Typing 30 characters at 60 ms intervals into a field of a local test page, through an isolated Gateway and the Control UI Browser panel in headless Chromium, timed from each key press in the panel to the character arriving in the page:

Key to page, p50 / p90 / max Last key to last character
main (one /act per input) 3210 / 5760 / 6191 ms 6.2 s
This PR, run 1 163 / 276 / 291 ms 179 ms
This PR, run 2 254 / 421 / 538 ms 254 ms
This PR, run 3 321 / 657 / 725 ms 60 ms

All 30 characters arrived in order in every run.

Live view: an animated page streamed from headless Chromium through the screencast session to a local WebSocket client, 6 interleaved runs against main: 18.2 fps on average on main, 24.6 fps with this PR. This PR was faster in every pair.

Tests on this head:

  • Real Chromium operator input (OPENCLAW_BROWSER_OPERATOR_INPUT_E2E=1), plus the interaction navigation-guard, policy-abort and batch tests and route admission: 5 files, 63 passed. The Chromium cases: keys after a main-frame navigation never reach the new document; typing continues through an allowed iframe reload; an iframe navigation to a blocked address rejects the burst; a blocked navigation started by a click in the burst stays blocked.
  • Control UI Browser panel tests: 44 passed.
  • Typecheck of extensions, and format and lint of the changed files: clean.

Regression tests, each failing on the code without its fix and passing with it:

  • Screencast, shares one JPEG message across viewers, acks once one viewer took it, and backs off when congested: with the acknowledgement waiting for every viewer, a slow viewer's pending write left 0 acknowledgements.
  • Screencast, releases a frame stalled on the only viewer when another viewer joins: 0 acknowledgements after the second viewer joined.
  • Route admission, answers operator input on Lightpanda with the panel's per-action fallback code: Lightpanda answered BROWSER_CAPABILITY_UNSUPPORTED, so the panel had no fallback.
  • Panel, notices input withheld from the burst that navigated: no notice.
  • Panel, types again after a queued click recovers from a failed click: the key after the recovery click was dropped.
  • Panel, stops per-action fallback input once the panel no longer owns it: the queued c was still sent after switching to Annotate.
  • Panel, asks a new browser route for operator input after an unsupported one: input stayed on /act.
  • Panel, keeps typing out of the old field when a dialog stops the click and keeps typing out of the old field when a dialog drops a queued click: the next key was sent to the previously focused field.

Live proof limits:

  • A dialog opening mid-burst in a live browser. The panel's handling of a blockedByDialog response is covered by committed tests.
  • The panel against a live Lightpanda or existing-session browser. The fallback answer is covered by a route test.
  • A headed managed browser or a remote browser node was not exercised.

Ack each screencast frame once every viewer socket has taken it instead of
after a fixed 50 ms. Keep the 50 ms back-off only when every viewer is
congested, so capture still never queues frames.
The Control UI browser panel sent every click, key and text insert as its
own /act call. Each held the navigation request guard for 250 ms after the
action and the panel waited for it, so typing landed at about one character
per 265 ms.

Add POST /operator/input for the panel. It takes an ordered burst of
press, insertText and clickCoords inputs. A tab's operator input shares one
guarded interaction (same request fence, download policy, dialog handling
and quarantine as /act) while input keeps arriving; the post-action window
and final checks run once when it ends. A main-frame navigation request or
commit ends the session before any further input, and the next input waits
until the guard has checked it. Invocation-bound policies never share a
session. The panel sends input typed during an in-flight burst as the next
burst and drops queued input after a reported navigation.

Agent tools keep /act unchanged.
Lightpanda's engine admission rejected POST /operator/input with
BROWSER_CAPABILITY_UNSUPPORTED before the route ran, so the Control UI
panel showed an error instead of falling back to one /act per input.

Admit the route on Lightpanda and let it answer from profile capabilities:
existing-session profiles and profiles without visual actions get
OPERATOR_INPUT_UNSUPPORTED, the code the panel falls back on.
@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui extensions: browser size: XL labels Nov 12, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 12, 2026
@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR batches Browser-panel input under one navigation guard per request and acknowledges screencast frames after the first viewer’s write completes.

Example: Type abcdefghijklmnopqrstuvwxyz1234 at 60 ms intervals in the Browser panel.

  • Before: The reported baseline took another 6.2 seconds to deliver the final character.
  • After: The three reported candidate runs delivered all characters in order, with median key-to-page latency of 163–321 ms.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, supported by shipped-entry-point evidence, and free of identified blocking defects; hosted validation remains in progress.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The current body reports per-request burst typing through an isolated Gateway and real Control UI with ordered after-fix results; real Chromium exercises navigation boundaries, and inspected earlier screenshots plus transport traces support unchanged panel recovery and screencast behavior without relabeling their revisions.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Typing in the Browser panel accumulates seconds of delay, and fixed screencast acknowledgement waits reduce live-view responsiveness.
Reason: The reported baseline and candidate results demonstrate substantial user value, while the final design preserves the established bounded navigation guard and existing agent-tool path.

Merge readiness

✅ Ready for maintainer review

This PR addresses a confirmed Browser-panel backlog that remains on current main. The latest revision removes the long-lived session and deferred-error design behind the previous maintainer question; no blocking defect was found. Exact-head CI is still pending.

Priority: P2
Reviewed head: bea363420659fb0157ef98c9d8df05b077fcb788

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI forwards human keyboard and pointer input through browser Gateway routes to Playwright; Chromium screencast frames return through plugin-owned WebSockets to the panel.

flowchart LR
  A[Browser panel] --> B[Ordered input bursts]
  B --> C[Gateway browser admission]
  C --> D[Shared interaction guard]
  D --> E[Managed Chromium]
  E --> F[Screencast session]
  F --> A
Loading

Technical review

Best possible solution:

Retain the request-scoped burst implementation and delivery-paced screencast, then land through the existing exact-head checks.

Do we have a high-confidence way to reproduce the issue?

Current-main source establishes response-serialized input and its cumulative guard delay, supported by official-release reports and the contributor’s real-Gateway baseline measurements.

Is this the best way to solve the issue?

The latest revision is a focused solution: it amortizes the existing guard across ordered inputs without retaining a competing session lifecycle or passing failures to later requests.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against d1c800bf9518.

Provenance checked

  • Keyboard ordering and focus keeps the original intent (24a845b: Native paste needed to wait for clicks and avoid sending text to a previously focused field; later ordering changes also serialized clicks behind text.)
  • Screencast pacing changes intended behavior with a stated reason (a7175b2: The original live stream used delayed acknowledgements to bound capture work and avoid frame queues; this PR explains and measures replacing fixed pacing with delivery pacing while preserving congestion bounds.)
  • Interaction navigation fence keeps the original intent (2d31996: Navigation-capable actions require request interception, final reconciliation and a bounded post-action window; each operator burst now runs through that same owner.)
  • Action target continuity keeps the original intent (91888cf: Post-action target identity must come from the acted-on Page rather than inferred tab matches; the extracted execution owner retains this behavior.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 24a845b adds ui/src/components/browser/browser-panel-controller-input.ts:82 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 24a845b79efd; files: ui/src/components/browser/browser-panel-controller-input.ts)
  • Piyush Bag: Raw commit 91888cf adds extensions/browser/src/browser/pw-tools-core.interactions.execution.ts:277 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 91888cf68bca; files: extensions/browser/src/browser/pw-tools-core.interactions.execution.ts)

PR surface

Source +436, Tests +309, Docs +20. Total +765 across 20 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 13 542 106 +436
Tests 6 319 10 +309
Docs 1 23 3 +20
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 20 884 119 +765

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus test growth Production +542/-106 lines; tests and support +319/-10 lines. Growth supplies a bounded input transport, reuses the existing interaction owner, and covers distinct ordering, navigation, dialog and viewer-congestion failures.

Root-cause cluster

Relationship: same_root_cause
Canonical: #165752
Summary: The canonical issue tracks the response-serialized typing backlog; another open PR proposes a different repair, while error retention is separate work.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on maintainer: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: The confirmed typing backlog impairs interactive browser use, with limited scope and no demonstrated urgent runtime outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (6 earlier review cycles)
  • reviewed 2026-11-12T21:49:10.212Z sha d6b5c5d :: needs real behavior proof before merge. :: [P2] Let fast viewers progress without waiting for slow socket writes | [P2] Retain finishing sessions until their guard has settled | [P2] Scope unsupported-input state to the current browser route | [P2] Recheck queued input ownership between fallback actions | [P2] Clear focus uncertainty after the queued recovery click succeeds | [P2] Report unsent inputs from the active burst
  • reviewed 2026-11-12T22:22:24.784Z sha f828488 :: needs real behavior proof before merge. :: [P2] Let fast viewers progress without waiting for slow socket writes | [P2] Retain finishing sessions until their guard has settled | [P2] Scope unsupported-input state to the current browser route | [P2] Recheck queued input ownership between fallback actions | [P2] Clear focus uncertainty after the queued recovery click succeeds | [P2] Report unsent inputs from the active burst
  • reviewed 2026-11-13T00:32:18.075Z sha e336c78 :: needs real behavior proof before merge. :: [P2] Surface dialog-interrupted bursts instead of reporting success
  • reviewed 2026-11-13T02:58:12.355Z sha a546f95 :: needs real behavior proof before merge. :: [P2] Invalidate focus when a dialog discards a queued click | [P2] Keep acknowledgement progress when the only writer stalls
  • reviewed 2026-11-13T03:55:42.585Z sha f01c54b :: blocked before merge. :: none
  • reviewed 2026-11-13T04:26:07.117Z sha f1231e3 :: ready, awaiting a maintainer decision. :: none

Reviewed November 13, 2026, 12:48 AM ET / 05:48 UTC (Revision 7).

Reject a late session failure as an Error, build test key lists without
spreading a string, and read operator input entries through the SDK
record guard instead of a type assertion.
@daniel-lxs

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Nov 12, 2026
- Acknowledge a screencast frame once the first viewer has taken it, so a
  slow viewer skips frames instead of stalling the others.
- Keep an operator session registered until its guard has settled when it
  stopped for a navigation, dialog or abort; later input waits for that
  settlement and receives a late denial. Idle-ended sessions still release
  at once.
- Panel: scope the unsupported-input fallback to the browser route that
  answered it, recheck input ownership before each fallback /act, clear
  focus uncertainty when a recovery click succeeds, and show the
  navigation notice when the active burst itself had input withheld.
@clawsweeper clawsweeper Bot removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Nov 12, 2026
Any HTTP(S) subframe navigation ended an operator input session, so an
unrelated iframe reload (ads, embeds) stopped typing and showed the
navigation notice. Only main-frame navigation ends the session now. Each
committed subframe URL is still policy-checked at once; a denied one ends
the session, and the guard rejects input with the denial when it settles.
Document requests, including iframe requests and redirect hops, stay
fenced as before.
@daniel-lxs

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 13, 2026
Replace the long-lived operator input session (idle timer, post-burst
wait, failure hand-off to the next request) with one navigation guard per
request. The burst stops on a main-frame navigation request or commit, or
on a subframe navigation whose URL is denied; allowed iframe navigations
keep input flowing. Each request reports its own navigation, denial or
dialog.

Trade-offs, measured with the Browser panel typing harness (30 keys at
60 ms): key-to-page p50 163-321 ms and max 291-725 ms, against 56-84 ms
and 138-447 ms for the session. A script navigation that starts about
200 ms or more after the last key can outlive the guard and reach a
blocked address, as it can after a single POST /act action; the session
kept the guard up for 1 s after input and blocked it.
@daniel-lxs

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. labels Nov 13, 2026
@hannesrudolph
hannesrudolph merged commit 9ffa050 into openclaw:main Nov 13, 2026
132 of 136 checks passed
steipete added a commit that referenced this pull request Nov 13, 2026
Observe the ordered click and Enter requests on the human-input route introduced by #197927 while preserving existing-tab and route identity assertions.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 14, 2026
…ters (openclaw#197927)

* perf(browser): pace panel screencast acks to frame delivery

Ack each screencast frame once every viewer socket has taken it instead of
after a fixed 50 ms. Keep the 50 ms back-off only when every viewer is
congested, so capture still never queues frames.

* perf(browser): share one navigation guard across panel input bursts

The Control UI browser panel sent every click, key and text insert as its
own /act call. Each held the navigation request guard for 250 ms after the
action and the panel waited for it, so typing landed at about one character
per 265 ms.

Add POST /operator/input for the panel. It takes an ordered burst of
press, insertText and clickCoords inputs. A tab's operator input shares one
guarded interaction (same request fence, download policy, dialog handling
and quarantine as /act) while input keeps arriving; the post-action window
and final checks run once when it ends. A main-frame navigation request or
commit ends the session before any further input, and the next input waits
until the guard has checked it. Invocation-bound policies never share a
session. The panel sends input typed during an in-flight burst as the next
burst and drops queued input after a reported navigation.

Agent tools keep /act unchanged.

* fix(browser): let operator input answer for profiles without sessions

Lightpanda's engine admission rejected POST /operator/input with
BROWSER_CAPABILITY_UNSUPPORTED before the route ran, so the Control UI
panel showed an error instead of falling back to one /act per input.

Admit the route on Lightpanda and let it answer from profile capabilities:
existing-session profiles and profiles without visual actions get
OPERATOR_INPUT_UNSUPPORTED, the code the panel falls back on.

* fix(browser): satisfy static checks in operator input

Reject a late session failure as an Error, build test key lists without
spreading a string, and read operator input entries through the SDK
record guard instead of a type assertion.

* fix(browser): address operator input and screencast review findings

- Acknowledge a screencast frame once the first viewer has taken it, so a
  slow viewer skips frames instead of stalling the others.
- Keep an operator session registered until its guard has settled when it
  stopped for a navigation, dialog or abort; later input waits for that
  settlement and receives a late denial. Idle-ended sessions still release
  at once.
- Panel: scope the unsupported-input fallback to the browser route that
  answered it, recheck input ownership before each fallback /act, clear
  focus uncertainty when a recovery click succeeds, and show the
  navigation notice when the active burst itself had input withheld.

* fix(browser): keep dialog-interrupted panel input out of the old field

When a page dialog stops an operator input burst, the panel treated the
burst as delivered: a click the dialog withheld cleared focus uncertainty,
so the next keys went to the previously focused field, and withheld or
queued input was dropped without a word. Read blockedByDialog from the
response, keep focus uncertain when a click was withheld, drop the queued
input and tell the user the dialog stopped it.

* fix(browser): keep a panel action's error visible through passive refreshes

An action's error, such as a navigation blocked by policy, disappeared from
the Browser panel while the page kept streaming: the automatic viewport
sync runs through runAction, which cleared the error before every action,
and refreshAll cleared it on every passive refresh. Viewport sync is now a
passive action that leaves the error in place, and refreshAll keeps an
error that came from the person's own action. The person's next action
still clears it.

* Revert "fix(browser): keep a panel action's error visible through passive refreshes"

This reverts commit 7182806. The bug also exists on main, so the fix moves to its own pull request.

* fix(browser): release stalled screencast frames and dropped dialog clicks

- Screencast: when the only viewer's write is still pending, a viewer that
  joins would inherit its frozen capture. Acknowledge the outstanding frame
  when a new viewer becomes ready, so the next frame reaches everyone.
- Panel: when a dialog stops a burst, a click still queued behind it is
  dropped too. Keep focus uncertain in that case, so later typing waits for
  a new click instead of reaching the previously focused field.

* fix(browser): keep operator input through allowed iframe navigations

Any HTTP(S) subframe navigation ended an operator input session, so an
unrelated iframe reload (ads, embeds) stopped typing and showed the
navigation notice. Only main-frame navigation ends the session now. Each
committed subframe URL is still policy-checked at once; a denied one ends
the session, and the guard rejects input with the denial when it settles.
Document requests, including iframe requests and redirect hops, stay
fenced as before.

* refactor(browser): guard each operator input burst on its own

Replace the long-lived operator input session (idle timer, post-burst
wait, failure hand-off to the next request) with one navigation guard per
request. The burst stops on a main-frame navigation request or commit, or
on a subframe navigation whose URL is denied; allowed iframe navigations
keep input flowing. Each request reports its own navigation, denial or
dialog.

Trade-offs, measured with the Browser panel typing harness (30 keys at
60 ms): key-to-page p50 163-321 ms and max 291-725 ms, against 56-84 ms
and 138-447 ms for the session. A script navigation that starts about
200 ms or more after the last key can outlive the guard and reach a
blocked address, as it can after a single POST /act action; the session
kept the guard up for 1 s after input and blocked it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation extensions: browser P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Embedded Browser panel types characters slower than operator input

2 participants