Skip to content

fix(ui): keep stopped historical browser panels on Start - #139089

Merged
obviyus merged 5 commits into
openclaw:mainfrom
ylcn91:fix/browser-stale-tab-restore
Sep 5, 2026
Merged

obviyus merged 5 commits into
openclaw:mainfrom
ylcn91:fix/browser-stale-tab-restore

Conversation

@ylcn91

@ylcn91 ylcn91 commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Related: #138999. Follow-up to #139064. The running-browser passive-focus change in #134480 remains separate.

What Problem This Solves

Opening historical browser results while the managed browser is stopped showed Browser request failed: browser not running above Start browser. The panel tried to focus an old target after /tabs had already reported running: false.

Why This Change Was Made

The selection owner now keeps routed targets unselected until the tab snapshot arrives, and leaves no selected target when the browser is stopped. The existing no-target path skips focus and capture, and Reload stays disabled. The existing Start action launches the browser and refreshes its current tabs.

This also covers selecting the same historical card while its next tab snapshot is pending. Historical title/URL remain visible. No configuration, storage, protocol, or plugin SDK change.

User Impact

Stopped historical sessions show the normal Start browser state without a red error. Explicit Start and valid running-tab focus, screenshots, and thumbnails still work.

Evidence

Real Linux Control UI, Gateway, and managed Chromium; no mocked Gateway or browser responses. A transparent observer recorded browser request/response traffic.

  • Baseline: a4514a0aff9de7bd299f70d821398df606df1a4f. /tabs returned stopped, followed by failed /tabs/focus and the visible red note.
  • Candidate: 2f045f307099833ebc5b843f5ca29a7e837c19f1. Stopped history and repeated card selection sent no focus/capture after the stopped snapshot. Reload stayed disabled, including during the pending snapshot.
  • Clicking Start launched Chromium and populated the panel. A valid historical tab then focused and captured successfully, with a live thumbnail. A fresh client after browser stop returned to clean Start without launching Chromium.
  • The card's independent thumbnail attempt can precede the stopped snapshot; this change does not suppress that separate metadata-preview path.
Current main Repaired
Stopped history shows a red focus error Stopped history shows clean Start with Reload disabled

Additional inspected captures: explicit Start, running tab and thumbnail, fresh-client reconnect.

Validation:

  • node scripts/run-vitest.mjs ui/src/components/browser ui/src/lib/chat/browser-tab-preview.test.ts ui/src/pages/chat/components/browser-tab-card.test.ts — 127 tests passed; the final test-only cleanup reran all 13 route tests.
  • The regression failed on current main for extra focus/capture requests. Intermediate candidates also failed the added stopped and pending Reload assertions before their owner-state repairs.
  • Pinned formatting, scoped type-aware lint, source ratchets, git diff --check, and the combined pnpm build ciArtifacts passed.
  • CI for the published head.

Production +4/-4 (net 0); tests +61; docs +8. Contributor intent and ancestry retained.

Proof scope: real managed-browser flow on Linux; host/node route siblings have deterministic test coverage. A separate running-tab capture-cancellation timeout occurred during overlapping refresh/stale-card testing; its capture path is unchanged here and is retained as a follow-up, not claimed fixed by this PR.

…he historical tab's browser is stopped

Opening a session with old browser results makes the browser panel follow the
latest historical tab. After the tab listing already reported the browser as
stopped, the panel still sent a focus request, which the gateway rejects, so
every session open rendered a red "Browser request failed" note above the
Start browser state.

The controller now stops after a route refresh reports running=false and leaves
the existing Start affordance. Follow-up to openclaw#139064, which stopped the gateway
from launching a browser for historical targets; the UI symptom remained.

Related: openclaw#138999
@clawsweeper

clawsweeper Bot commented Sep 5, 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.

@ylcn91
ylcn91 marked this pull request as ready for review September 5, 2026 12:51
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: XS labels Sep 5, 2026
@clawsweeper clawsweeper Bot added 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. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 10:45 AM ET / 14:45 UTC.

ClawSweeper review

What this changes

The Browser panel leaves historical tabs unselected while checking their status or when their browser is stopped, with regression coverage and recovery documentation.

Merge readiness

✅ Ready for maintainer review

This remains a useful follow-up: current main still selects stopped historical targets, and the related merged repair does not resolve the panel error. No introduced correctness or security defect was found.

Priority: P2
Reviewed head: 2f045f307099833ebc5b843f5ca29a7e837c19f1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-state repair with meaningful regression coverage and strong real-flow evidence; no actionable patch defect remains.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The supplied real Linux Control UI/Gateway/Chromium run on the exact head exercises historical selection, stopped and pending snapshots, explicit Start, live focus/capture, and reconnect with recorded successful outcomes. Linked captures could not be reopened because GitHub DNS failed; the recorded proof assessment is preserved.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The supplied real Linux Control UI/Gateway/Chromium run on the exact head exercises historical selection, stopped and pending snapshots, explicit Start, live focus/capture, and reconnect with recorded successful outcomes. Linked captures could not be reopened because GitHub DNS failed; the recorded proof assessment is preserved.
Evidence reviewed 12 items Pinned patch scope: The verified merge-base-to-head delta contains only the Browser controller, its route regression test, and browser documentation. Base-only changes and the stale test merge were excluded from patch attribution.
Current-main defect remains: Current main assigns the historical target before refreshing tabs and restores that target even when the snapshot reports running=false; the subsequent focus request remains reachable. The controller is unchanged between the pinned merge base and fetched main.
Latest-release comparison: Tree lookups for the supplied latest release and fetched main resolve this controller to the same blob, fe94a09bf5f781eaeebc40eab5fafc8eadfbe7f9. The proposed selection repair is absent from both; this comparison does not claim identical surrounding Gateway behavior.
Findings None None.
Security None None.

How this fits together

The Control UI Browser panel follows browser results from conversation history and requests current tab information through the Gateway. Its selection state controls focus, screenshots, Reload, and the Start browser display.

flowchart TD
  A[Historical browser result] --> B[Panel selection]
  B --> C[Gateway tab snapshot]
  C --> D{Browser running?}
  D -->|No| E[Start browser display]
  D -->|Yes| F[Resolve tab and capture preview]
  E -->|User clicks Start| G[Launch and refresh current tabs]
  G --> C
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source 0, Tests +61, Docs +8. Total +69 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 4 4 0
Tests 1 61 0 +61
Docs 1 8 0 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 73 4 +69

Review metrics

Metric Value Why it matters
Production versus regression coverage Production net 0; tests +61; documentation +8 The repair reshapes existing selection state without adding a parallel runtime path.

Technical review

Best possible solution:

Keep selection ownership in the panel controller, using the existing empty-selection and explicit Start paths without adding another startup policy.

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

Yes: opening historical browser results with the browser stopped reaches an invalid focus request on current main. Source inspection and the supplied real Linux baseline agree; this review did not execute the scenario.

Is this the best way to solve the issue?

Yes. Repairing selection before focus also fixes Reload through its existing state dependency; hiding the error or changing Gateway startup policy would leave the panel's invalid selection intact.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 2f5f5de32db3.

Labels

Label justifications:

  • P2: This repairs misleading errors and Reload state in historical Browser panels while preserving an available Start recovery path.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The supplied real Linux Control UI/Gateway/Chromium run on the exact head exercises historical selection, stopped and pending snapshots, explicit Start, live focus/capture, and reconnect with recorded successful outcomes. Linked captures could not be reopened because GitHub DNS failed; the recorded proof assessment is preserved.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied real Linux Control UI/Gateway/Chromium run on the exact head exercises historical selection, stopped and pending snapshots, explicit Start, live focus/capture, and reconnect with recorded successful outcomes. Linked captures could not be reopened because GitHub DNS failed; the recorded proof assessment is preserved.

Evidence

What I checked:

  • Pinned patch scope: The verified merge-base-to-head delta contains only the Browser controller, its route regression test, and browser documentation. Base-only changes and the stale test merge were excluded from patch attribution. (ui/src/components/browser/browser-panel-controller.ts:549, 2f045f307099)
  • Current-main defect remains: Current main assigns the historical target before refreshing tabs and restores that target even when the snapshot reports running=false; the subsequent focus request remains reachable. The controller is unchanged between the pinned merge base and fetched main. (ui/src/components/browser/browser-panel-controller.ts:564, 2f5f5de32db3)
  • Latest-release comparison: Tree lookups for the supplied latest release and fetched main resolve this controller to the same blob, fe94a09bf5f781eaeebc40eab5fafc8eadfbe7f9. The proposed selection repair is absent from both; this comparison does not claim identical surrounding Gateway behavior. (ui/src/components/browser/browser-panel-controller.ts:538, ad6fe23aecb9)
  • Caller, selection owner, and recovery: Historical following calls selectTab with the recorded route. The patch changes selection ownership before and after the tab snapshot, reusing the existing null-target exit. Reload already depends on activeTargetId, and Start already launches then refreshes current tabs. (ui/src/components/browser/browser-panel.ts:202, 2f045f307099)
  • Browser contract and implementation boundary: The Browser plugin returns an empty stopped snapshot from /tabs and rejects focus when unreachable. Explicit target lookup cannot start a browser, while targetless startup remains supported. The UI calls this OpenClaw-owned browser.request implementation; no Codex runtime or protocol dependency signal was found. (extensions/browser/src/browser/server-context.ts:159, 2f045f307099)
  • Regression and sibling coverage: The added case checks stopped history, a pending repeated selection, disabled Reload, absence of focus, and successful explicit Start. Existing route cases cover host/node routing, raw-target aliases, blocked tabs, and stale captures. Thumbnail ownership remains separate and already handles capture failure without losing card metadata. (ui/src/components/browser/browser-panel-route.test.ts:220, 2f045f307099)

Likely related people:

  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Shakker: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-05T13:04:10.227Z sha 60f189a :: blocked before merge. :: none
  • reviewed 2026-09-05T14:14:23.029Z sha 2f045f3 :: needs maintainer review before merge. :: none

@ylcn91

ylcn91 commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Re the two "before merge" items: the linked captures were inspected before upload. browser-panel-before.png shows the red Browser request failed: browser not running note above the "The gateway browser is not running / Start browser" empty state; browser-panel-after.png and control-ui-after.png show the same panel with no note, the Start browser button, and the history card keeping its title/URL with no thumbnail. Request traffic in the same runs: before /screenshot, /tabs, /tabs/focus; after /screenshot, /tabs.

@obviyus obviyus self-assigned this Sep 5, 2026
@obviyus obviyus changed the title fix(ui): browser panel reports a failed focus instead of Start when the historical tab's browser is stopped fix(ui): keep stopped historical browser panels on Start Sep 5, 2026
@obviyus

obviyus commented Sep 5, 2026 •

Copy link
Copy Markdown
Collaborator

Verified the full Browser-panel flow on 2f045f307099833ebc5b843f5ca29a7e837c19f1 with a real Gateway and managed Chromium.

  • Current main reproduced the failed focus after running:false.
  • The repair keeps stopped and pending historical selections empty, so focus/capture are skipped and Reload stays disabled.
  • Explicit Start, valid running-tab focus/capture, thumbnails, and fresh-client stopped history passed.
  • I inspected all original captures and the new before/after captures in the updated PR body. This resolves the previous review's visual-verification gap.
  • 127 focused tests passed; the final test-only cleanup reran all 13 route tests. Pinned formatting, scoped type-aware lint, source ratchets, whitespace checks, and pnpm build ciArtifacts passed. Exact commands and proof bounds are in the body.
  • The independent local landing review passed with no findings or security concerns.
  • CI completed with one failed test in checks-node-compact-small-11: subagent-spawn.authority.test.ts expected a completed sibling's task status to be succeeded, but observed running. That native subagent fixture is outside this Browser UI/docs change. All other child jobs passed.

The guarded merge remains pending because the unrelated-failure exception needs matching main-run evidence or explicit approval for the completed run. The passing review and product proof are retained.

The body records the separate running-tab capture-cancellation follow-up. No claim is made that this stopped-state repair fixes it.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@obviyus

obviyus commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

The failed CI test is independent of this Browser repair.

Reproduction without this PR: ran the exact recorded 17-file isolated shard on untouched parent 8abac3db2d4f50f4465d30e4a5c60779d05f1b32, with the same two-worker/two-CPU budget. It reproduced the same subagent-spawn.authority.test.ts:116 failure: 894 passed, 1 failed, expected succeeded, received running. None of this PR's Browser code, test, or docs changes was present. The complete native runtime, test configuration, dependencies, and scripts are unchanged between that parent and this PR head.

Blame and introduction:

The distinction matters: #138910 added the timing-sensitive test; #138059 changed its execution context and exposed the assumption. This does not identify a Browser or subagent production regression. Vitest's actual default wait is 1,000 ms. Diagnostic-only copies retained that assertion and observed successful task settlement after about 7.2 seconds in the first case, versus roughly 0.3 seconds in the next. Preloading the announcement module alone did not eliminate the delay, so no narrower import-only cause is claimed.

Candidate failure: run 33970832010, job 101319169150. All other CI jobs passed. The Browser product proof and independent review remain green and unchanged. No unrelated source was edited or committed.

@obviyus

obviyus commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

landpr-approve-unrelated-red
pr: 139089
head: 2f045f3
run: 33970832010 attempt: 1
failed: checks-node-compact-small-11 job=101319169150 conclusion=failure
check: openclaw/ci-gate

@obviyus
obviyus merged commit d3386f1 into openclaw:main Sep 5, 2026
171 of 173 checks passed
@obviyus

obviyus commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Thanks @ylcn91! Landed as d3386f1 from verified source 2f045f3, preserving contributor credit.

  • Bug: Historical Browser panels selected stopped targets, causing failed focus or Reload requests.
  • Fix: The selection owner keeps routed targets unselected until a running snapshot is confirmed. The existing empty-selection path prevents focus/capture and disables Reload; explicit Start remains available. Production change: +4/-4, net zero.
  • Proof: Real Control UI → Gateway → Chromium runs verified stopped and pending historical selection, preserved title/URL, explicit Start, running-tab focus/capture with thumbnails, and fresh-client reconnect after stopping. The original failure was reproduced on main. 127 focused tests passed; the final test-only cleanup reran all 13 route tests. Formatting, scoped lint, source checks and the remote combined build passed. Detailed proof and captures.
  • Review: The exact-head independent local review passed with no findings. The latest public review also has no before-merge findings or rank-up actions. The separate running-tab capture-cancellation follow-up remains disclosed in the PR body.
  • CI exception: Run 33970832010, job 101319169150 failed subagent-spawn.authority.test.ts:116 in checks-node-compact-small-11: expected succeeded, received running. All other child jobs passed. The untouched parent 8abac3db2d4f50f4465d30e4a5c60779d05f1b32, without any Browser changes, reproduced that exact failure with the same 17-file CI selection: 894 passed, one failed.
  • Verified provenance: fix: stopping subagents stalls behind sibling cleanup #138910 (de891fdf, author/merger @steipete) added the timing-sensitive lifecycle assertion at lines 110–116. feat(agents): allow bounded recursive session spawning by default #138059 (99860445, author/merger @fuller-stack-dev) moved this test into isolated execution at test/vitest/vitest.agents-paths.mjs:27, exposing it. Both commit committers are GitHub. This is test-failure provenance, not a claimed subagent production regression. Full causal evidence.
  • Authorization: No matching main-push failure was found for the automatic exception. The guarded merger instead validated the explicit exact-head/run approval, used the approved CI exception, and verified the final merged commit and attribution. The failed test was not changed or rerun to obtain a green result.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
…9089)

Keep historical browser selections empty until the current tab snapshot confirms a running browser. Reuse the existing no-target path to avoid focus and capture requests while stopped, keep Reload disabled, and preserve explicit Start.

Retain historical card metadata and running-tab focus/capture behavior. Add regression coverage for stopped selection, a pending routed refresh, and Start recovery. Clarify browser recovery documentation.

Follow-up to openclaw#139064 and related to openclaw#138999. Includes the original contribution from @ylcn91.

Co-authored-by: Ayaan Zaidi <[email protected]>
obviyus added a commit that referenced this pull request Sep 9, 2026
Related: #134400, #139089

## What Problem This Solves

The Browser panel followed session results through the explicit tab-selection path. That sent `/tabs/focus` and activated the result tab in an attached browser, even when the operator had left another tab active.

## Why This Change Was Made

Passive following now skips explicit focus while retaining the shared route, capture, lifecycle, and rollback owners. Card Open and selection of a different panel tab still focus normally. Clicking an already-selected panel tab retains its existing no-op.

The selection owner also rejects a historical target absent from its accepted current tab list before capture. This preserves the validation previously supplied by the focus request, restores a valid prior view when safe, and prevents a missing target from entering repeated stream/screenshot recovery. The error directs the operator to select another tab.

## User Impact

Successful Browser results can update the panel without changing the operator's physical browser tab. The merged capture-owner repair in #134400 remains in place. Current streaming, screenshot fallback, attach-only policy, native and remote routes, configuration, protocol, and Browser-card semantics are preserved.

## Evidence

- A public Control UI agent turn through the real Browser tool reproduced one passive focus request and physical tab activation on pinned main. With the same rendered-tab precondition, the final candidate produced no focus request and preserved the sentinel tab while refreshing the result view.
- Fresh source-blind acceptance also exercised the full selection change: the panel and physical browser initially selected Sentinel; a public Browser evaluation of the other Result page changed the panel to Result, displayed newly changed content through routed screenshot/stream capture, and left Sentinel physically active. Explicit Open and different-tab selection each focused once; later results added no focus. Context changes, unavailable history, and recovery were exercised.
- The passive-focus regression failed on main. Two additional missing-history cases failed on the initial candidate for invalid selection, lost rollback, and repeated capture. The corrected candidate passed 138 focused tests across selection, routes, input, pending navigation, snapshot races, streaming, and native boundaries. Formatting and keyless language checks passed.
- [Exact-head CI](https://github.com/openclaw/openclaw/actions/runs/34328435157) passed, including all four cases in the changed [Browser route E2E suite](https://github.com/openclaw/openclaw/actions/runs/34328435157/job/102391432114). The native supplemental E2E attempt hit its 4 GiB limit; that failure was retained and the hosted lane supplied the completed check without raising the native limit.

A background Browser-tool screenshot timed out in a separate acceptance attempt. It remains failed evidence, not a passing capture or a claim of general screenshot reliability. The successful evaluation case above verifies the combined background-target selection and fresh-view outcome. Native macOS and remote-node behavior have source/component coverage; no live native-app or remote-node proof is claimed. Raw captures remain private.

Thanks @scotthuang for the original passive-focus correction. Contributor ancestry and prior review history are preserved.

Co-authored-by: scotthuang <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 10, 2026
Related: openclaw#134400, openclaw#139089

## What Problem This Solves

The Browser panel followed session results through the explicit tab-selection path. That sent `/tabs/focus` and activated the result tab in an attached browser, even when the operator had left another tab active.

## Why This Change Was Made

Passive following now skips explicit focus while retaining the shared route, capture, lifecycle, and rollback owners. Card Open and selection of a different panel tab still focus normally. Clicking an already-selected panel tab retains its existing no-op.

The selection owner also rejects a historical target absent from its accepted current tab list before capture. This preserves the validation previously supplied by the focus request, restores a valid prior view when safe, and prevents a missing target from entering repeated stream/screenshot recovery. The error directs the operator to select another tab.

## User Impact

Successful Browser results can update the panel without changing the operator's physical browser tab. The merged capture-owner repair in openclaw#134400 remains in place. Current streaming, screenshot fallback, attach-only policy, native and remote routes, configuration, protocol, and Browser-card semantics are preserved.

## Evidence

- A public Control UI agent turn through the real Browser tool reproduced one passive focus request and physical tab activation on pinned main. With the same rendered-tab precondition, the final candidate produced no focus request and preserved the sentinel tab while refreshing the result view.
- Fresh source-blind acceptance also exercised the full selection change: the panel and physical browser initially selected Sentinel; a public Browser evaluation of the other Result page changed the panel to Result, displayed newly changed content through routed screenshot/stream capture, and left Sentinel physically active. Explicit Open and different-tab selection each focused once; later results added no focus. Context changes, unavailable history, and recovery were exercised.
- The passive-focus regression failed on main. Two additional missing-history cases failed on the initial candidate for invalid selection, lost rollback, and repeated capture. The corrected candidate passed 138 focused tests across selection, routes, input, pending navigation, snapshot races, streaming, and native boundaries. Formatting and keyless language checks passed.
- [Exact-head CI](https://github.com/openclaw/openclaw/actions/runs/34328435157) passed, including all four cases in the changed [Browser route E2E suite](https://github.com/openclaw/openclaw/actions/runs/34328435157/job/102391432114). The native supplemental E2E attempt hit its 4 GiB limit; that failure was retained and the hosted lane supplied the completed check without raising the native limit.

A background Browser-tool screenshot timed out in a separate acceptance attempt. It remains failed evidence, not a passing capture or a claim of general screenshot reliability. The successful evaluation case above verifies the combined background-target selection and fresh-view outcome. Native macOS and remote-node behavior have source/component coverage; no live native-app or remote-node proof is claimed. Raw captures remain private.

Thanks @scotthuang for the original passive-focus correction. Contributor ancestry and prior review history are preserved.

Co-authored-by: scotthuang <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
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 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: S 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.

2 participants