Repository navigation
feat(ui): add a personal external browser preference - #159887
Conversation
Keep current link behavior by default and let each browser opt out of automatic readers and browser panels. Co-authored-by: VACInc <[email protected]>
|
🦞👀 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 27, 2026, 9:27 PM ET / September 28, 2026, 01:27 UTC (Revision 8). ClawSweeper reviewWhat this changesThe branch adds a browser-local Control UI switch that sends eligible chat links to the regular browser instead of automatic plugin readers or in-app browser panels. Merge readiness✅ Ready for maintainer review Keep open. Current main lacks the requested preference, and the linked issue remains open. The branch is coherent and cleanly mergeable; this review found no introduced correctness blocker, and the browser and native behavior evidence supports the change. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI receives links rendered in chat and chooses whether a plugin reader, an in-app panel, or the browser handles a click. A local preference feeds that choice, while the macOS host receives external-link requests through its WebKit bridge. flowchart LR
A[Chat web link] --> B[Control UI click routing]
C[Browser-local preference] --> B
B --> D{Open externally?}
D -->|No| E[Plugin reader or in-app panel]
D -->|Yes| F{Native host?}
F -->|Yes| G[System browser]
F -->|No| H[Browser navigation]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +60, Tests +103, Docs +14. Total +177 across 16 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep the default-off choice in the existing browser-local settings owner, preserve the earlier panel preference, and land the focused branch through normal maintainer review. Do we have a high-confidence way to reproduce the issue? Not applicable as a defect reproduction: this PR adds an opt-in setting. Current-main source confirms the choice is absent. Is this the best way to solve the issue? Yes. Reusing the browser-local settings owner and checking the preference in the existing link routers is a narrow fit for the requested behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 06fb4362eb7c. 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 (7 earlier review cycles)
|
Seed a pre-change browser-local settings blob and verify the existing panel choice survives enabling, reloading, and disabling external links. Co-authored-by: VACInc <[email protected]>
|
@clawsweeper re-review The current head adds saved-state compatibility coverage: an older browser-local blob with the existing in-app browser preference enabled survives external opt-in, reload, and opt-out. The extended persistence suite (29 tests), lint, and independent review pass. The real Chromium flow also passed with that older saved preference; details and timings are in the PR body. Production code is unchanged from the initially green CI run. The feature and browser-local/default-off approach were requested and approved by maintainer @VACInc in the linked work session; the issue now explicitly tracks that authorized implementation rather than a pending product proposal. Actual native-app proof remains unavailable: no approved Mac test host is connected and the configured Mac-pool preflight denied access. The PR distinguishes the simulated bridge check and unchanged native-handler source inspection from actual native-app execution. Please reassess the updated compatibility and product-direction evidence while retaining any genuinely remaining proof gap. |
|
🦞👀 Re-review progress:
|
Use the approved short label and explanation without changing link behavior or defaults. Co-authored-by: VACInc <[email protected]>
|
@clawsweeper re-review please. The remaining native handoff evidence is now complete for unchanged PR head 375ab9b. Native macOS test passed: production DashboardWindowController + WKWebView, real native bridge/NSWorkspace, and actual Safari. The loopback server observed the unique target URL with Safari's user agent, the browser process was running, and no embedded browser tabs were created. The visible native window/document check passed before the click. Desktop capture showing Safari. Synthetic Gateway data and a programmatic DOM click; this is an isolated native Swift test host, not a packaged-app/physical-device claim. Workflow verifies production sources match this feature head. Blacksmith diagnostics identified a locked desktop; switching only the proof workflow runner to GitHub-hosted macos-26 passed with assertions and timeouts unchanged. No harness/CI changes added to this PR. Full scope, failure diagnosis, test costs, and evidence are now in the PR body. Feature CI remains green on this exact head. |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
Add a browser-local, per-Gateway preference to open eligible links outside OpenClaw. Keep the switch off by default so existing reader and browser-panel behavior stays unchanged. Preserve saved preferences and explicit link actions. Validated with routing and persistence regressions, rendered settings tests, Chromium toggle/reload flows, exact-head CI, and a source-bound native Mac-to-Safari handoff. Co-authored-by: VACInc <[email protected]>
|
PR #160410 has merged as a follow-up to this preference implementation. Browser-preview images and Open buttons now honor "Open links outside OpenClaw," and the overflow menu offers "Open in OpenClaw" when the preference is enabled, preserving access to the original managed tab. This extends the existing preference to a previously uncovered consumer; it does not replace this PR's setting, persistence, or ordinary-link routing. This PR remains merged. |
Closes #159884
Additional instructions
Maintainers can edit this same-repository branch.
What Problem This Solves
People who prefer their regular browser currently have to bypass OpenClaw's built-in link readers or native browser panel one link at a time. The existing Control UI browser preference does not override those paths.
Why This Change Was Made
Add Open links outside OpenClaw under Settings → Appearance → Chat, using the existing browser-local preference storage. It overrides automatic reader and browser-panel routing without erasing the existing browser-panel preference. The default stays off, so upgrades retain current behavior.
The setting does not change shared Gateway configuration, change Gateway profile or database schemas, or sync across devices. A small extraction of the local Chat preference bindings keeps the existing settings page within its line-growth limit.
User Impact
Enable the switch to use ordinary browser navigation on the web or the system-default browser in a native host. Disable it to restore the existing reader/panel behavior. The choice survives reloads in the same browser or app webview and is scoped per Gateway. Internal navigation, downloads, modifier-click behavior, and explicit context-menu choices remain unchanged.
Evidence
Approved wording revision
The switch now reads Open links outside OpenClaw, with Use your browser instead of the OpenClaw built-in browser. and Saved in this browser only. Defaults, storage, and link routing are unchanged.
The existing rendered-control and settings-search tests passed (28 tests); i18n verification, formatting, lint, and whitespace checks passed. Test-audit: only existing copy/discovery expectations changed, with no new cases or test seams. Deslop: no cleanup needed. Copy-only autoreview was scoped-clean at P0–P2. The After screenshot below shows the new wording.
Review follow-up
Latest ClawSweeper review accepted the saved-state compatibility evidence and reports no actionable code findings. Revision 7 reviewed this exact head and accepted the native handoff proof: Ready for maintainer review, no actionable findings, and Before merge: None. Ordinary maintainer review is still required; the PR has not been merged.
Native Mac proof — passed
Successful macOS run 36362385849 exercised the production DashboardWindowController and WKWebView in an isolated Swift test process. With the preference enabled, the real native link handler opened the link through the system-default browser, Safari. The loopback server received the matching unique URL from Safari; its process was running, no embedded browser tabs were created, and the desktop capture shows the external page. The native window and document were verified visible before the click.
The Gateway and page data were synthetic, and the DOM click was programmatic. The native bridge, NSWorkspace handoff, and Safari were real. This is native Mac-host proof, not a physical-device or packaged-app installation test. The runner reported macOS 26.6.2, and the browser reported Safari 26.6.2.
Changed-test costs
Measured separately with pnpm test <file> --maxWorkers=1; wall time includes runner startup. Tests use the existing fixtures, not new per-test processes or timers.
CI values sum the reported test-case durations for current head 375ab9b, excluding import/setup overhead; they are not whole-job wall times. Sources: checks-ui (3/3) and checks-ui (1/3).
Before
After
Captures show the actual Control UI with synthetic data at 1280 × 900 in dark mode. The new switch is enabled in the After capture to demonstrate the opt-in; it defaults off.
Worked on by:
Work sessions
View the OpenClaw team session