Skip to content

fix(ui): open browser cards after delayed panel renders - #153253

Merged
roboclaw-bot merged 1 commit into
mainfrom
openclaw/fix-localhost-link-browser-navigation
Sep 22, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
openclaw/fix-localhost-link-browser-navigation

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: clicking Open on a browser card can leave the Browser panel empty or show the wrong page when the chat pane renders late.

User Impact

User impact: the selected browser page opens after the panel is ready. Browser permissions, URL restrictions, and thumbnail behavior are unchanged.

Why This Change Was Made

The handoff waited for an older render to finish instead of the render it had just requested. It now waits for the current render and keeps the existing checks that reject cancelled or outdated requests.

Tightly related cleanup keeps the panel-type list in one place and removes unused mock-call tracking from the regression fixture. The new regression uses a controlled clock rather than a real sleep or polling. No tests were deleted; the ordering, cancellation, and delayed-render cases protect distinct behavior. Production change: 4 additions / 8 deletions (net −4). Tests: 140 additions.

Evidence

  • The cleaned-up regression fails with the original wait (no routed tab-focus request) and passes with the fix. It uses real Lit rendering, the real sidebar and browser panel, and checks both tab selection and the displayed preview.
  • All 80 focused tests across six suites passed; the final fixture correction also passed its 11-test owner file, the owning ui-chat typecheck, UI typecheck, and targeted lint. A full local check identified the new sidebar API’s required presentation ID; the fixture was corrected rather than weakening the check. Fresh independent AutoReview found no actionable P0–P2 findings in the final staged candidate.
  • Final single-worker test cost for the changed file: 11 tests, 2.33 seconds for the Vitest run and 3.10 seconds including the repository wrapper (warm cache); the browser regression itself took 105 ms. The prior six-suite run completed in 5.46 seconds. Hosted CI: the changed file passed in 0.511 seconds of test time; the browser regression took 251 ms (UI shard 2/3).
  • The existing before/after images show the actual Control UI in Chromium with a mock Gateway, synthetic page contents, and a deliberately delayed render. The browser-opening repair is unchanged by the type/test cleanup. This is controlled boundary proof, not a production replay or a claim that every foreground click fails.
  • The branch has been refreshed onto current main, which supersedes the earlier upstream CI blockers. Exact-head CI passed for 7721f85, including the required gate, UI unit/E2E tests, types, and lint.

Reported by @vyctorbrzezowski.

Work sessions

Before

Before: clicking Local bundle preview opens Other browser page

After

After: the same click opens Local bundle preview


View the OpenClaw team session

@clawsweeper

clawsweeper Bot commented Sep 19, 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 app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Sep 19, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 19, 2026 23:32
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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 19, 2026
@clawsweeper

clawsweeper Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 22, 2026, 5:40 PM ET / 21:40 UTC (Revision 4).

ClawSweeper review

What this changes

The PR makes browser-card opens wait for the newly scheduled chat-pane render and adds a deterministic regression covering tab selection and the displayed preview.

Merge readiness

✅ Ready for maintainer review

The fix remains necessary on current main. The previous fixture finding is resolved, the supplied visual proof supports the intended result, and no introduced blocking defect remains.

Priority: P2
Reviewed head: 7721f8536a9cc7f14f7b98cb6d39441d870eb1a9

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with directly relevant visual proof, meaningful regression coverage, and the previous typecheck defect resolved.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected Chromium before/after captures show the actual Control UI changing from the wrong browser page to the selected card's preview under a controlled delayed render and mock Gateway. The deterministic regression supplements this visible result; no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected Chromium before/after captures show the actual Control UI changing from the wrong browser page to the selected card's preview under a controlled delayed render and mock Gateway. The deterministic regression supplements this visible result; no stored-data contract changes.
Evidence reviewed 9 items Introduced repair and retained guards: The pinned introduction changes the awaited promise after requestUpdate to the current owner's updateComplete. Queue identity, owner identity, session identity, and post-sidebar-commit checks remain intact; terminal delivery retains its separate existing path.
Production caller explains the stale promise: The lifecycle adapter returns a fresh object containing the pane's current updateComplete value on each current() call. Re-reading that adapter after requestUpdate therefore obtains the newly scheduled render rather than the earlier captured promise.
Current main still needs the repair: Fetched main still awaits owner.updateComplete after requesting another render. Its implementation does not contain this correction.
Findings None None.
Security None None.

How this fits together

The Control UI passes browser-card clicks through the active chat pane to its lazily rendered sidebar. Once the pane and sidebar finish rendering, the browser panel selects the requested tab and displays its preview.

flowchart LR
  A[Browser card Open click] --> B[Active chat pane]
  B --> C[Schedule sidebar render]
  C --> D[Await current render]
  D --> E{Request still current?}
  E -->|Yes| F[Select browser tab and preview]
  E -->|No| G[Discard outdated request]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -4, Tests +140. Total +136 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 4 8 -4
Tests 1 140 0 +140
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 144 8 +136

Review metrics

Metric Value Why it matters
Reported regression cost 105 ms regression; 2.33 s focused Vitest run The deterministic rendering regression fits the repository's under-five-second file target, according to the captured validation report.

Technical review

Best possible solution:

Keep the existing panel handoff owner, await its newly scheduled render, and preserve cancellation and session checks before delivery.

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

Yes, from source: delay the pane render after opening a browser card, and the old handoff can deliver before the panel exists. The supplied regression and screenshots support this path; this review did not execute it.

Is this the best way to solve the issue?

Yes. Re-reading the render promise after scheduling the update repairs the existing handoff without adding another delivery mechanism or changing browser routing policy.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This repairs a bounded Control UI failure where delayed rendering prevents a browser card from selecting its intended page.
  • 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 (screenshot): Inspected Chromium before/after captures show the actual Control UI changing from the wrong browser page to the selected card's preview under a controlled delayed render and mock Gateway. The deterministic regression supplements this visible result; no stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected Chromium before/after captures show the actual Control UI changing from the wrong browser page to the selected card's preview under a controlled delayed render and mock Gateway. The deterministic regression supplements this visible result; no stored-data contract changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected Chromium before/after captures show the actual Control UI changing from the wrong browser page to the selected card's preview under a controlled delayed render and mock Gateway. The deterministic regression supplements this visible result; no stored-data contract changes.

Evidence

What I checked:

  • Introduced repair and retained guards: The pinned introduction changes the awaited promise after requestUpdate to the current owner's updateComplete. Queue identity, owner identity, session identity, and post-sidebar-commit checks remain intact; terminal delivery retains its separate existing path. (ui/src/pages/chat/chat-pane-session-panel-toggle.ts:177, 7721f8536a9c)
  • Production caller explains the stale promise: The lifecycle adapter returns a fresh object containing the pane's current updateComplete value on each current() call. Re-reading that adapter after requestUpdate therefore obtains the newly scheduled render rather than the earlier captured promise. (ui/src/pages/chat/chat-pane-lifecycle.ts:73, 7721f8536a9c)
  • Current main still needs the repair: Fetched main still awaits owner.updateComplete after requesting another render. Its implementation does not contain this correction. (ui/src/pages/chat/chat-pane-session-panel-toggle.ts:183, d30f66fc26f9)
  • Latest release retains the old wait: The v2026.9.5 source also requests an update and then awaits the previously captured owner.updateComplete; the requested correction is not present there. (ui/src/pages/chat/chat-pane-session-panel-toggle.ts, ec9c1a13db89)
  • Previous finding resolved: The regression now supplies presentationId: "delayed-browser-card", satisfying renderSidebarRegion's required argument. The captured PR body reports the focused 11-test suite and UI test typecheck passing after this correction. Tests were not executed during this read-only review. (ui/src/pages/chat/chat-pane-session-panel-toggle.test.ts:279, 7721f8536a9c)
  • Inspected before/after visual proof: Both prepared PNGs were inspected locally. Before, Other browser page is selected and displayed; after, Local bundle preview is selected and its matching contents appear. The captured body identifies Chromium running the actual Control UI with a mock Gateway and a deliberately delayed render. This directly supports the visible selection repair, without claiming live remote-browser or network-policy validation.

Likely related people:

  • vyctorbrzezowski: 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 (3 earlier review cycles)
  • reviewed 2026-09-19T23:39:56.869Z sha 8f87e95 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-20T19:09:33.217Z sha 75299eb :: needs maintainer review before merge. :: none
  • reviewed 2026-09-22T21:20:15.398Z sha b922a5d219abb754be8c88dac713daeca308c53a :: needs changes before merge. :: [P2] Supply the required presentation ID in the regression fixture

@roboclaw-bot
roboclaw-bot force-pushed the openclaw/fix-localhost-link-browser-navigation branch from 8f87e95 to 75299eb Compare September 20, 2026 18:45
@roboclaw-bot
roboclaw-bot force-pushed the openclaw/fix-localhost-link-browser-navigation branch from 75299eb to b922a5d Compare September 22, 2026 21:11
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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 22, 2026
Wait for the new pane render before delivering the selected browser tab. Derive panel tag types from the event table, and keep the regression deterministic without real waits or unused callback spies.

Co-authored-by: vyctorbrzezowski <[email protected]>
@roboclaw-bot
roboclaw-bot force-pushed the openclaw/fix-localhost-link-browser-navigation branch from b922a5d to 7721f85 Compare September 22, 2026 21:30
@clawsweeper clawsweeper Bot added 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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 22, 2026
@roboclaw-bot
roboclaw-bot merged commit 3cab8df into main Sep 22, 2026
127 of 128 checks passed
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

@roboclaw-bot
roboclaw-bot deleted the openclaw/fix-localhost-link-browser-navigation branch September 22, 2026 23:09
vincentkoc added a commit that referenced this pull request Sep 22, 2026
* commit '7d7f977ccfc1ac177526232e4f4960febd010015': (91 commits)
  test: avoid unused target setup in package profile fixtures (#155972)
  fix(worktrees): batch snapshot metadata reads
  test(plugin-state): distinguish borrowed and foreign lifecycle owners
  refactor(agents): share external harness session and attempt machinery (#152181)
  chore(i18n): refresh native locales (#156006)
  chore(test): retain Doctor fixture settlement diagnostics (#155944)
  perf(codex): reuse unchanged inference request bytes (#155987)
  perf(test): prepare snapshot ownership subprocess imports (#155973)
  perf(test): consolidate channel registry coverage (#155014)
  fix(runtime): preserve Node worker dependencies and cleanup diagnostics (#155292)
  perf(test): prepare worktree GC child runtime (#155928)
  fix(ui): open browser cards after delayed panel renders (#153253)
  fix(update): retain the running updater by hard link instead of copying the package (#155977)
  feat(decisions): add explicit evaluation and Labs opt-in foundation (#155134)
  fix(state): preserve lifecycle custody across worker dispatch
  improve: reuse shared tooling fixtures and defer legacy updater proof (#155731)
  improve(ui): reduce real-Gateway test preparation (#155979)
  perf(state): move session RPC SQL off the Gateway main thread (#155740)
  docs(freebsd): explain native Codex runtime limits (#155980)
  fix(qa): count Code Mode nested tool activity as transcript tool evidence (#155976)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 23, 2026
)

Wait for the new pane render before delivering the selected browser tab. Derive panel tag types from the event table, and keep the regression deterministic without real waits or unused callback spies.

Co-authored-by: vyctorbrzezowski <[email protected]>
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
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 maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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.

1 participant