Skip to content

feat(browser): set up the Chrome extension from this Mac - #139466

Merged
steipete merged 2 commits into
mainfrom
codex/chrome-extension-auto-install
Sep 5, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/chrome-extension-auto-install

Conversation

@steipete

@steipete steipete commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Closes #139448

What Problem This Solves

Chrome extension setup requires separate native-host preparation and a manual trip to the Store, and the Mac app has no local setup action. A downloaded but disabled extension can also be mistaken for a ready installation.

Why This Change Was Made

The installer now registers the native host before creating Chrome's supported per-user external Store request on macOS. Chrome downloads the official extension and retains control of approval, enablement, updates, and uninstall decisions. The Mac dashboard's This Mac → Browser setup action always runs the local CLI, even with a remote Gateway.

Store requests and recorded enablement are reported separately. --no-store preserves development-only setup, and uninstall-store removes only OpenClaw-owned request metadata without changing native hosts. Linux and Windows retain their documented Store/manual paths. Setup instructions and Doctor guidance match these boundaries.

User Impact

Mac users can start Chrome extension setup from one dashboard action or CLI command, then approve it in Chrome. Running Chrome may need a restart before it sees the request; OpenClaw does not restart it or bypass approval. Status directs users to check the extension's connected state rather than treating installation as connection proof.

Evidence

  • Focused browser installer/lifecycle/CLI tests: 98 passed.
  • Focused dashboard and native-bridge contract tests: 131 passed; 35 bridge/device tests passed again after the final layout and status refinement.
  • Native app and test compilation passed locally. Both macOS Swift CI lanes (release and tests) passed on this head; native tests were not run against the operator desktop.
  • Actual installer proof in isolated Google Chrome 152.0.7977.76 on macOS: owned request created after native-host registration, Store download visible in two profiles, both correctly pending approval, no reported issues. Removing the request removed the externally installed extension on the next Chrome start.
  • Store proof used the currently distributed 2.2.0 extension. It does not claim 2.3 publication or authenticated pairing proof.
  • Final focused installer/CLI follow-up: 14 tests passed, plus the native-host E2E test launched the generated host with isolated configuration and verified its framed bootstrap response.
  • Docs MDX, formatting, and whitespace checks passed. Independent review found no remaining actionable P0–P2 issues after fixing cross-browser status aggregation.
  • Full build passed. Required final-head CI passed. All local changed-check lanes completed: lint, types, docs, state/helper guards, and macOS tooling tests. The final macOS tooling group passed on a focused retry after an unchanged checkout-fixture cleanup case transiently observed a surviving child; no process-management or test-expectation changes were made. Initial CI caught two addressed integration details (ownership-key lint and the CLI command inventory). The unchanged process-group cleanup test passed on this head. A board-widget UI test failed despite a byte-identical UI tree passing on the prior head; its exact-job retry passed without changes to the UI test or production UI.

Chrome installation: before / awaiting approval

These are actual isolated Chrome screenshots with no signed-in account or personal data.

Before: no OpenClaw extension

After installer request and Chrome restart: OpenClaw downloaded, pending approval

Mac settings: before / setup requested

These render the actual dashboard page with a synthetic native bridge. The click forwarded exactly one setup request; these UI captures do not claim native execution or a connected extension.

Before: browser settings without extension setup

After: local Chrome setup with explicit approval instructions

Upgrade and stored-data compatibility

The new JSON file is Chrome's documented external-extension registration contract. This change adds no SQLite schema, migration, persisted native-device snapshot field, or new OpenClaw runtime store. The ownership marker is new, unpublished metadata; existing Store installations, browser preferences, native-host registrations, and development copies retain their owners and existing repair paths.

The installer lifecycle tests verify repeated setup is idempotent, Chrome preference bytes remain unchanged, foreign/malformed/symlink registrations are preserved, --no-store leaves the request absent, and native-host removal does not remove the Store request. Explicit uninstall-store removes only our exact owned metadata. Actual Chrome proof covered a fresh profile, a second profile, pending approval, and cleanup followed by browser restart. These are additive installation and removal paths; there is no prior shipped OpenClaw Store-request format to migrate.

Request the official Store extension through supported macOS registration after native bootstrap is ready. Preserve Chrome approval and uninstall decisions, keep development-only setup and owned cleanup, and expose a local Mac dashboard action with accurate pending status.
@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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime extensions: browser size: L maintainer Maintainer-authored PR labels Sep 5, 2026
@steipete
steipete marked this pull request as ready for review September 5, 2026 22:32
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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: blocked before merge. Reviewed September 5, 2026, 7:31 PM ET / 23:31 UTC.

ClawSweeper review

What this changes

Adds local Chrome extension setup to Mac settings, macOS Store installation requests and owned cleanup to the CLI, and separate reporting for download and approval status.

Merge readiness

⛔ Blocked before merge - 1 item remains

This remains a useful implementation with no actionable defect found. The supplied compatibility explanation, lifecycle coverage, and Chrome observations resolve the previous upgrade-proof blocker.

Priority: P2
Reviewed head: bc0ce916fecf8ed32391493fd25e9bb8a42c04ee

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with useful real Chrome observations, meaningful lifecycle coverage, and a resolved compatibility explanation.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): The supplied isolated macOS Chrome run exercises the production installer’s request, pending-approval, and removal paths. Synthetic dashboard captures provide supplemental UI evidence only; native execution and authenticated pairing are not claimed, and attachment retrieval was unavailable to this reviewer.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The supplied isolated macOS Chrome run exercises the production installer’s request, pending-approval, and removal paths. Synthetic dashboard captures provide supplemental UI evidence only; native execution and authenticated pairing are not claimed, and attachment retrieval was unavailable to this reviewer.
Evidence reviewed 8 items Reviewed introduction boundary: Inspected the merge-base-to-head changes at the pinned checkout. Base-only changes and the stale test merge were not treated as contributions or removals by this PR.
Still necessary on main: Fetched main still describes install as native-host preparation and lacks the new Store-request flag. Neither fetched main nor the supplied latest-release tree contains the new native setup or external-install owner files. The supplied GitHub context identifies this as the open implementation for #139448.
Additive external registration: The new owner creates only the fixed official Store request, uses exclusive creation, validates ownership and canonical filesystem paths, and refuses foreign or malformed registrations. Installation invokes it after successful native-host registration; removal is a separate explicit command.
Findings None None.
Security None None.

How this fits together

The Mac dashboard sends device-local actions through its native bridge to the local OpenClaw CLI. The browser plugin prepares Chrome’s native host and installation request, while Chrome controls download, approval, and extension removal.

flowchart TD
  A[Mac browser settings] --> B[Authorized native bridge]
  B --> C[Local browser installer]
  D[CLI setup command] --> C
  C --> E[Native host and Store request]
  E --> F[Chrome download and approval]
  F --> G[Installation status]
  G --> A
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +347, Tests +286, Docs +70, Other +135. Total +838 across 26 files.

View PR surface stats
Area Files Added Removed Net
Source 8 362 15 +347
Tests 9 316 30 +286
Docs 3 97 27 +70
Config 0 0 0 0
Generated 0 0 0 0
Other 6 135 0 +135
Total 26 910 72 +838

Review metrics

Metric Value Why it matters
New setup controls 1 CLI flag, 1 cleanup command, 1 native bridge action Development-only setup and explicit cleanup accompany the new macOS installation default.
Production versus test growth production +442 net lines; tests +326 net lines Production growth implements the external registration lifecycle and native setup flow, with tests protecting ownership, approval reporting, and bridge behavior.

Stored data model

Persistent data-model change detected: serialized state: extensions/browser/src/browser/extension-install-external.ts, unknown-data-model-change: extensions/browser/src/browser/extension-install-external.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #139448
Summary: This PR implements the matching open setup request; the issue should remain open until the implementation lands.

Members:

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

Technical review

Best possible solution:

Keep one local installer shared by the CLI and Mac dashboard, with Chrome retaining approval and removal control and status distinguishing installation from connection.

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

Not applicable as a feature proposal; current main confirms the missing local setup action and Store-request path, and the supplied evidence describes the new installer’s observed behavior.

Is this the best way to solve the issue?

Yes. Reusing the local installer and Chrome’s supported registration contract avoids a competing installation mechanism while preserving browser consent and existing settings.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The supplied isolated macOS Chrome run exercises the production installer’s request, pending-approval, and removal paths. Synthetic dashboard captures provide supplemental UI evidence only; native execution and authenticated pairing are not claimed, and attachment retrieval was unavailable to this reviewer.

Label justifications:

  • P2: This is a bounded Chrome setup improvement with existing manual installation paths still available.
  • 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. Sufficient (linked_artifact): The supplied isolated macOS Chrome run exercises the production installer’s request, pending-approval, and removal paths. Synthetic dashboard captures provide supplemental UI evidence only; native execution and authenticated pairing are not claimed, and attachment retrieval was unavailable to this reviewer.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied isolated macOS Chrome run exercises the production installer’s request, pending-approval, and removal paths. Synthetic dashboard captures provide supplemental UI evidence only; native execution and authenticated pairing are not claimed, and attachment retrieval was unavailable to this reviewer.

Evidence

What I checked:

  • Reviewed introduction boundary: Inspected the merge-base-to-head changes at the pinned checkout. Base-only changes and the stale test merge were not treated as contributions or removals by this PR. (bc0ce916fecf)
  • Still necessary on main: Fetched main still describes install as native-host preparation and lacks the new Store-request flag. Neither fetched main nor the supplied latest-release tree contains the new native setup or external-install owner files. The supplied GitHub context identifies this as the open implementation for Simplify Chrome extension setup with a supported macOS install request #139448. (extensions/browser/src/cli/browser-cli-extension.ts:162, 1c1b334fccc6)
  • Additive external registration: The new owner creates only the fixed official Store request, uses exclusive creation, validates ownership and canonical filesystem paths, and refuses foreign or malformed registrations. Installation invokes it after successful native-host registration; removal is a separate explicit command. (extensions/browser/src/browser/extension-install-external.ts:90, bc0ce916fecf)
  • Chrome contract verified: Chrome’s official documentation confirms the per-user macOS External Extensions directory, Store update URL, user enablement requirement, startup discovery, removal behavior, and remembered uninstall decisions: alternative installation methods. This is the external contract used by the new registration file.
  • Previous compatibility blocker resolved: The supplied PR body and feat(browser): set up the Chrome extension from this Mac #139466 (comment) explain the new external format and absence of an older shipped format to migrate. Inspected lifecycle tests cover unchanged Chrome preference bytes, idempotence, foreign/malformed/symlink preservation, native-host cleanup independence, unsupported platforms, and development-only setup. No database schema or persisted native snapshot field changes are introduced. (extensions/browser/src/browser/extension-install-external.test.ts:47, bc0ce916fecf)
  • Native authority and local execution: The new action accepts no caller-supplied command. Existing main-frame, WebView, trusted-origin, current-document, and queue-cancellation checks surround it; setup revalidates after CLI discovery and uses the local profile-aware command. Navigation retires queued requests, and the existing process owner checks cancellation and tears down its process group. (apps/macos/Sources/OpenClaw/ChromeExtensionSetup.swift:61, bc0ce916fecf)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; 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 (4 earlier review cycles)
  • reviewed 2026-09-05T22:38:58.370Z sha 3c22960 :: blocked before merge. :: none
  • reviewed 2026-09-05T22:51:57.613Z sha bc0ce91 :: blocked before merge. :: none
  • reviewed 2026-09-05T23:04:21.082Z sha bc0ce91 :: blocked before merge. :: none
  • reviewed 2026-09-05T23:19:01.778Z sha bc0ce91 :: blocked before merge. :: none

Use a descriptive ownership key accepted by the lint policy and include uninstall-store in the existing CLI import-boundary contract.
@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Added the stored-data compatibility proof to the PR description. The new file implements Chrome's documented external-extension registration contract; no OpenClaw database schema or persisted native snapshot changes. Lifecycle tests prove unchanged Chrome preference bytes, preservation of foreign registrations, idempotent setup, development-only behavior, and separate owned cleanup. Actual isolated Chrome proof covers two profiles and removal on restart. There is no prior shipped OpenClaw Store-request format requiring migration.

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 5, 2026
@steipete
steipete merged commit 8964a4d into main Sep 5, 2026
283 of 285 checks passed
@steipete
steipete deleted the codex/chrome-extension-auto-install branch September 5, 2026 23:56
@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

* feat(browser): set up the Chrome extension from this Mac

Request the official Store extension through supported macOS registration after native bootstrap is ready. Preserve Chrome approval and uninstall decisions, keep development-only setup and owned cleanup, and expose a local Mac dashboard action with accurate pending status.

* fix(browser): align Store setup metadata and CLI checks

Use a descriptive ownership key accepted by the lint policy and include uninstall-store in the existing CLI import-boundary contract.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos app: web-ui App: web-ui docs Improvements or additions to documentation extensions: browser gateway Gateway runtime maintainer Maintainer-authored PR 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.

Simplify Chrome extension setup with a supported macOS install request

1 participant