Repository navigation
fix(ui): preview cards ignore external browser preference - #160410
Conversation
Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: a5390928-cbcf-4ee0-949e-9684abcb671a
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 12:44 PM ET / 16:44 UTC (Revision 9). ClawSweeper reviewWhat this changesBrowser preview cards now follow the existing external-link preference for their image and Open button, offer the other destination in their menu, and update related UI documentation and tests. Merge readiness✅ Ready for maintainer review Current main still opens browser preview cards in the managed panel even when the existing external-link preference is enabled. This PR addresses that gap, and the reviewed patch has no actionable finding. The earlier merged preference PR does not make this follow-up redundant. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI turns browser tool results into preview cards in chat. A browser-local preference determines whether a card opens its URL outside OpenClaw or selects its managed browser tab. flowchart LR
A[Browser tool result] --> B[Chat preview card]
C[External-link preference] --> D{Opening choice}
B --> D
D --> E[External browser]
D --> F[Managed browser tab]
B --> G[Alternate menu action]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +41, Tests +112, Docs +3. Total +156 across 8 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the existing browser-local preference as the sole choice of default link destination, with both card actions updating immediately and an explicit route back to the managed tab. Do we have a high-confidence way to reproduce the issue? Yes, from source: on current main, a preview card's image and Open button call the managed-panel handler without consulting the existing preference. I did not execute the failing path in this read-only review. Is this the best way to solve the issue? Yes. Reusing the existing preference, safe URL opener, and native bridge is a narrow repair, and the explicit managed-tab action preserves access to the prior destination. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 202336dcd5f7. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (8 earlier review cycles)
|
Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 17a4cdad-a258-4744-ba4d-4b5b3c553c17
|
@clawsweeper re-review Head 23b18cf fixes the CI fixture mismatch: startup/descriptor and list snapshots now share the same running state. Reproduced the missing-spinner failure with the CI-base snapshot helper; full widget E2E suite passes 11/11, with unchanged assertions and timeouts. Focused typecheck, lint, formatting, and independent P0-P2 review also pass. Browser routing and the requested Open in OpenClaw label are unchanged. The PR body contains the updated diagnosis and proof. |
|
🦞👀 Re-review progress:
|
Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 71c6c56d-266f-4379-846d-ca63a6e99817
|
@clawsweeper re-review Head 8df923d corrects the session-only Stop mock state. The regression now holds history pending while a newer roster read publishes; both unchanged Stop assertions fail with the old contradictory fixture and pass after the canonical-finished transition. Full lifecycle suite passes 16/16; final scoped type/lint/line-cap checks and independent review pass. The existing Stop helper was mechanically extracted to meet the line cap, with all four callers migrated and body equivalence verified. No production behavior, assertions, or timeouts weakened. Updated proof is in the PR body. |
|
🦞👀 Re-review progress:
|
Co-authored-by: VACInc <[email protected]>
Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 039b7f4a-457a-4b1e-87b1-fb63be0971fe
|
@clawsweeper re-review Head 50fc9e3 resolves the actual main conflict by retaining the stronger landed progress-widget fixture unchanged. The remaining preview-fixture correction fixes Date at one sampling instant before comparing describe/history/startup replies; all complete payload, message, and ordering assertions remain. Actual Chromium boundary proof fails the original comparisons before the fix and passes them afterward. Refreshed card tests pass 31/31; types, focused lint, exact-base line-cap, formatting, and independent P0–P2 review pass. The PR body records the proof and local full-suite limitation. No production behavior or timeout changes in this follow-up. |
|
🦞👀 Re-review progress:
|
Resolve the main conflict using its stronger per-read sampling assertions unchanged; remove the duplicate fixture correction from this PR. Co-authored-by: VACInc <[email protected]>
Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 1ef363c7-649d-45fa-ba48-4db814b6649a
|
@clawsweeper re-review Head edc719e resolves the real conflict from the landed preview sampling repair. The board fixture now matches main 026348d byte-for-byte; this PR introduces no board-fixture or progress-widget change. The six remaining authored files are byte-identical to your clean reviewed head50fc9e3c. Refreshed E2E types, 31 card/browser tests (4.98 s), line-cap and whitespace checks pass. Prior-head UI CI lanes all passed; current-head CI remains required. No feature changes or weakened assertions in this reconciliation. |
|
🦞👀 Re-review progress:
|
Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 81de8a48-7a9d-490a-9f46-961594903282
|
@clawsweeper re-review Head c5806ce changes only an existing E2E selector to wait for the effort summary’s application-level enabled state. Forced Chromium ordering held startup pending while catalog/session metadata loaded: the original click was ignored and reproduced the hidden low/high slider; the readiness-aware single click passed with unchanged assertions. Full reasoning suite passes 12/12 (13.610 s tests / 28.30 s Vitest wall); types, lint, format, line-cap and independent P0–P2 review pass. No production behavior, retries, timeouts or assertions changed. Evidence and exact remote proof are in the body. |
|
🦞👀 Re-review progress:
|
Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: b5fa6b18-eaeb-417a-9c7c-abc3c2316865
|
@clawsweeper re-review Head 57a0f88 adds only a typed response to the existing avatar fixture. Main independently showed the same avatar timeout. Actual Chromium diagnosis found that the owner-sharing header requested session.members.listEvidence but received the mock’s generic {ok:true}, so the required members array was missing and rendering stopped. Complete fixture data restores the original own/other avatar geometry without changing assertions or production code. Full Blacksmith proof passes 24/24: avatar 3/3, unchanged hovercard 21/21 (including the prior 390px/dark failure). The hovercard’s earlier failure is not claimed fixed; it was not reproduced. Types/lint/line-cap/format and independent P0–P2 review pass. PR-context headings and work-session links are restored, with the revised description preserved. |
|
🦞👀 Re-review progress:
|
|
Related fixture follow-up: #160563 has merged and reconciles the cached-activity lifecycle-test overlap with this PR. The shared mock Gateway now commits session-only Stop results and makes subsequent session and chat reads honor the committed lifecycle state. The overlapping test retains the This does not supersede this PR's browser-preview external-link preference feature or change production Stop handling. No further state change is needed here. |
…60410) * fix(ui): preview cards ignore external browser preference Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: a5390928-cbcf-4ee0-949e-9684abcb671a * test(ui): keep progress fixture snapshots consistent Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 17a4cdad-a258-4744-ba4d-4b5b3c553c17 * test(ui): keep Stop refresh snapshots consistent Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 71c6c56d-266f-4379-846d-ca63a6e99817 * test(ui): align preview sampling after main reconciliation Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 039b7f4a-457a-4b1e-87b1-fb63be0971fe * test(ui): reconcile landed preview sampling fix Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 1ef363c7-649d-45fa-ba48-4db814b6649a * test(ui): await effort control readiness before clicking Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 81de8a48-7a9d-490a-9f46-961594903282 * test(ui): provide complete avatar sharing fixture Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: b5fa6b18-eaeb-417a-9c7c-abc3c2316865 --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: VACInc <[email protected]>
Related: #159887
Summary
High Level TLDR
Browser preview cards now honor Open links outside OpenClaw. Their image and Open button use the external browser when that preference is on; the menu still offers Open in OpenClaw for the managed tab. Turning the preference off restores the managed-tab primary action and Open in new tab menu action. The choice updates immediately.
What Problem This Solves
Root Cause
The earlier preference change routed ordinary links, but preview cards used their own button handlers. Before this fix, both primary handlers always opened the managed browser panel and never read the browser-local preference. The original web and native card regression cases failed on that behavior while the pre-existing card cases passed.
Change
The card subscribes to the existing theme preference and uses the existing safe external URL and native-link handoff for external opening. Explicit internal opening retains the original managed tab identity. The settings text and action label describe the actual choice. No new settings, shared configuration, or migration.
Evidence
Verification
57a0f882561b49eee1726e1fac7cc291c8ad3fde, at 16:33 UTC and reported no findings, security issues, or before-merge items. Its exact-head receiver completed successfully.check-source-contractson nine daemon/update export-name collisions. This is not green CI. The current-head PR-context, dependency, and security-sensitive checks passed; other job coverage must not be inferred from the failed run.Upstream blocker
The failing guard scans
src/definitions, not this UI change. CI checked out mergee11600cf99f438210041759ec909782571f3d7feover main baseabb37032e7f7be346c8aea410ece8cd27e4f2cf2. The guard and all six collision-bearing modules have identical Git blobs in that base and the tested merge. Running the guard’s exported analyzer on those six modules reproduced the same nine collisions in both trees (a targeted comparison, not a full baseline suite). The affected wrappers were introduced by the upstream lazy service-entry change.This PR does not change CLI/update code or weaken the guard. Green CI remains blocked on an upstream daemon/update export-contract repair. No merge, unrelated CLI repair, or CI rerun was performed.
CI fixture follow-up
The avatar timeout also occurred on main before this PR run. Actual Chromium reproduction identified an incomplete fixture, not an alignment change: the owner-sharing header called
session.members.listEvidence, but the mock returned its generic{ ok: true }fallback. Accessing the required members array interrupted rendering and left the loaded transcript hidden behind its initial skeleton.The fixture now supplies a typed sharing-evidence response with the required arrays and matching session/role. Real-browser own/other avatar checks pass with zero vertical offset and a 10px side gap. All original geometry and multiline assertions remain; no production code, retries or timeouts changed. Scoped types, lint, line-cap, formatting and independent P0–P2 review pass. Full focused Blacksmith Testbox run: 24/24 pass (avatar 3/3 in 3.588 s; unchanged hovercard 21/21 in 32.623 s, including the 390px/dark case in 1.310 s). Vitest wall time: 49.86 s including build. Runner, lease
tbx_01m3md2tttk4ck7e7zs8ba8eh6, command exit 0; lease stopped. No new cases, browser boots, waits or timeout increases.The separate 390px/dark hovercard timeout was not reproduced in the direct Chromium check, and the hovercard code and assertions remain unchanged. Its prior CI failure is not claimed fixed or proven unrelated.
What was not tested
A fresh signed macOS application run was not made. Native handoff is covered at the WebKit bridge boundary. The Chromium proof used synthetic Gateway data, not a live Gateway or real user data.
Before
After
Worked on by
Work sessions
View the OpenClaw team session
Inherited CI failures
check-source-contracts(lint:tmp:export-name-collisions) failed on the exact head run becausemaincarried duplicatesrc/cli/daemon-cli.tsexports at the time (assertForegroundUpdateOrigin,runDaemon*,waitForGatewayUpdateRecovery). This PR does not touchsrc/cli. Fixed onmainby 385ac28 after this run started; landed through the admin exception per the pre-existing-red policy.