Skip to content

feat(macos): guide onboarding through native hosting choices - #196555

Closed
jalehman wants to merge 3 commits into
mainfrom
feat/macos-onboarding-openclaw-id
Closed

jalehman wants to merge 3 commits into
mainfrom
feat/macos-onboarding-openclaw-id

Conversation

@jalehman

@jalehman jalehman commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Related: #196548

What Problem This Solves

macOS setup needs to ask where the assistant should run before starting a local Gateway, and make remote connection options understandable.

User Impact

Users can choose On this Mac, On another computer, or Set up later. Remote discovery and address/browser sign-in share one finder. Local setup keeps runtime preparation and live AI verification, then offers optional native reachability before finishing.

Draft only — not for merge or release. Native OpenClaw ID enrollment is not implemented on main. Its production service explicitly reports unavailable; account sign-in, recovery-kit creation, node/operator credentials and transports are not simulated as successful. The ID screenshots below use labeled fixtures. Release timing and Labs gating remain undecided. No dependency versions or live settings change.

Why This Change Was Made

Native pages reuse the existing discovery, trusted connection editor, browser-profile sign-in, runtime, and AI-verification owners. Fresh launch now enters this flow instead of automatically choosing local and handing off to the Dashboard. Completing AI verification no longer skips the optional native steps. Switching from a browser profile to the primary connection clears browser-only completion and restores AI verification. Browser-profile completion omits primary-only Channels/Skills shortcuts; the existing profile editor opens the saved Gateway instead of sending follow-up actions to another primary connection.

The new service boundary separates presentation from credential custody. Node access and operator/chat access remain two explicit approvals: the six-digit node code never grants chat or administration. A service-supplied owner Access URL can open in the local browser. The existing direct/discovered Gateway routes keep their own authentication and do not display a fabricated ID ceremony.

Native account callback custody and recovery-kit signing remain follow-up work. Apple node transport/app wiring depends on #194201/#196445; this PR is based directly on main and does not modify or stack on those drafts. Native operator identity/transport is a separate dependency.

Evidence

  • Mac Studio/Xcode: swift build --package-path apps/macos --build-system native --product OpenClaw and --build-tests pass.
  • 29 focused tests in 8 suites pass (including a rendered browser-profile/primary final-page regression): startup choice, page order/CLI removal, remote auth/probes, browser-to-primary reset, existing AI verification and Dashboard handoff, ID unavailable/cancellation/separate approval state, supervised Gateway readiness retries.
  • Both opt-in NSHostingView bitmap suites and the rendered final-page assertions pass (3 tests in 3 suites). The Nearby zero/one/many copy regression and browser-profile action regression were red on the defect and green after repair. Actual SwiftUI pages and sheets were regenerated in light and dark, without launching the live app or requesting Screen Recording permission.
  • Changed production Swift: SwiftFormat 0.63.1 passes; SwiftLint 0.65.1 reports zero violations across 10 files. pnpm native:i18n:verify and git diff --check pass. Localization inventory was regenerated with pnpm native:i18n:baseline.
  • Independent read-only Astra review found fresh-launch bypass, stale browser completion, and primary-only follow-up actions after browser-profile completion. All were repaired with focused proof. The fresh repair review confirms the final finding is resolved, with no remaining verified P0–P2 findings.

Proof limits: These are isolated page-content captures, not an end-to-end install or successful OpenClaw ID enrollment. Network, operator-home reads, Keychain and preferences-daemon access were denied. One additional migrated identity-maintenance readiness test is not locally proven: its test-owned Foundation temporary-directory creation fails with EPERM under the Studio sandbox before the changed readiness call. Disposable macOS CI remains required for that test and the full suite. Existing browser sign-in was preserved, not exercised against a live account.

Successful AI setup ending — before / after

Main before this change This draft
Live AI verification succeeds → finish() → Dashboard opens immediately. The same live AI verification succeeds → optional native Reach it from anywhere? → native You're all set → the existing guarded Dashboard handoff.

The changed boundary is presentation after verification, not authentication or inference admission. The route identity, pending activation, live round-trip and cancellation guards remain in place. Base AI completion callbacks show the immediate finish() calls.

Capture limitation: the before/after final-page images below compare actual native page content using the same isolated renderer. Main's successful-AI path bypasses that old native final page and opens the Dashboard; the old final-page image is not a screenshot of that live Dashboard ending. No live-account Dashboard session was captured or fabricated.

Capture geometry

Ordinary pages use the production default 630×752-point content rectangle, 145-point mascot region and 535-point page area. Production vertically centers each page, so shorter pages genuinely have a larger mascot/title gap. Navigation is omitted and labeled as such; the evidence legend is outside the content rectangle. The base and candidate were recaptured with the same renderer.

OpenClaw ID screens are the actual 574-point-wide, intrinsic-height native sheet, including Close. They do not have an onboarding mascot or a fixed-height page area. Their missing enrollment dependencies remain labeled in every image and below.

Before / after — native page content, isolated preview state

Before After
Before: hosting choice, isolated preview state After: hosting choice, isolated preview state
Base native final page — bypassed after successful AI setup. Before: base native final page, bypassed by successful AI setup After: local final page, isolated preview state
New native pages and explicitly fixture-only OpenClaw ID presentations

done later

isolated preview state; no live connection.

done later — isolated preview state; no live connection

Browser-profile ending

Synthetic saved-profile state; the existing browser sign-in implementation was not exercised against a live account. Primary-only follow-up actions are absent. The editor remains responsible for opening the saved profile.

Browser-profile ending — isolated fixture state, no live browser sign-in proof

find

isolated preview state; no live connection.

find — isolated preview state; no live connection

id add mac

FIXTURE — missing dependency: #194201/#196445 enrollment wiring. Enrollment is not implemented; this dependency is also named in the image label.

id add mac — FIXTURE, missing #194201/#196445 enrollment wiring

id chat approval

FIXTURE — missing dependency: member/operator enrollment. Enrollment is not implemented; this dependency is also named in the image label.

id chat approval — FIXTURE, missing member/operator enrollment

id claws

FIXTURE — missing dependency: native account callback and authenticated claw-list wiring. Enrollment is not implemented; this dependency is also named in the image label.

id claws — FIXTURE, missing native account callback and authenticated claw-list wiring

id compare code

FIXTURE — missing dependency: #194201/#196445 enrollment wiring. Enrollment is not implemented; this dependency is also named in the image label.

id compare code — FIXTURE, missing #194201/#196445 enrollment wiring

id connected

FIXTURE — missing dependency: #194201/#196445 enrollment wiring and member/operator enrollment. Enrollment is not implemented; this dependency is also named in the image label.

id connected — FIXTURE, missing #194201/#196445 enrollment wiring and member/operator enrollment

id reachable

FIXTURE — missing dependency: owner signer/kit custody and native account callback. Enrollment is not implemented; this dependency is also named in the image label.

id reachable — FIXTURE, missing owner signer/kit custody and native account callback

id recovery kit

FIXTURE — missing dependency: owner signer/kit custody. Enrollment is not implemented; this dependency is also named in the image label.

id recovery kit — FIXTURE, missing owner signer/kit custody

id sign in

FIXTURE — missing dependency: native account callback. Enrollment is not implemented; this dependency is also named in the image label.

id sign in — FIXTURE, missing native account callback

reach

isolated preview state; no live connection.

reach — isolated preview state; no live connection

Implementation walkthrough and simplification

The superseded automatic-local runner, progress view, and task lifecycle were removed. Gateway readiness tests now exercise their actual readiness boundary instead of fabricated Dashboard-completion counters. Existing installer, authentication and inference gates remain owned by their current implementations. Production delta: +516 / −311 lines; net growth is the requested native ID presentation and its unavailable-service boundary, not a second transport stack.

File Change
MenuBar.swift Route fresh launch through native choice
Onboarding.swift Page ordering and completion state
OnboardingController+FirstRun.swift Remove automatic-local bypass
OnboardingFirstRun.swift Native startup presentation decision
OnboardingFirstRunProgressView.swift Remove superseded progress surface
OnboardingOpenClawID.swift Service contract and cancellable presentation state
OnboardingOpenClawIDView.swift Native ID pages, separate approvals
OnboardingView+AISetupPage.swift Advance after verified AI setup
OnboardingView+Actions.swift Preserve gates and primary-route handoff
OnboardingView+Layout.swift Finder/reachability navigation and page preservation
OnboardingView+Monitoring.swift Probe at the consolidated finder
OnboardingView+Pages.swift Hosting choice, finder and final page
GatewayProcessManagerTests.swift Preserve readiness boundary regressions
OnboardingAISetupTests.swift Verify deferred completion
OnboardingDashboardHandoffTests.swift Handoff and browser-to-primary regression
OnboardingFirstRunTests.swift Native startup and completed-setup decisions
OnboardingOpenClawIDRenderTests.swift Labeled synthetic ID states
OnboardingOpenClawIDTests.swift Fail-closed, cancellation, separate approvals
OnboardingPageTests.swift Semantic page after CLI removal
OnboardingRenderTests.swift Sandboxed actual-page bitmap capture
OnboardingViewSmokeTests.swift Updated page-order contracts
apps/macos/README.md Dependencies and rendering safety
apps/.i18n/native-source.json Regenerated string inventory

@clawsweeper

clawsweeper Bot commented Nov 10, 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.

@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Nov 10, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 10, 2026
@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 437ec6d72030854f829f99ce7e5372f00c35396d, but the PR head is now fc1cf10074dac3867cc71ac0cd4d219871be9c09. Its old verdict and PR readiness labels are no longer current.

Next step
Comment @clawsweeper re-review when the current head is ready; pushes after the first review are not reviewed automatically.

Review history (1 earlier review cycle)
  • reviewed 2026-11-10T09:55:04.608Z sha 437ec6d :: needs changes before merge. :: [P2] Keep final-page actions bound to the saved browser Gateway | [P3] Update the public onboarding guide for the replacement flow

@clawsweeper clawsweeper Bot removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 11, 2026
@jalehman

Copy link
Copy Markdown
Contributor Author

Folded into #196759 by maintainer decision: its exact patch is carried there (stable patch ID matches this PR's head) and is reviewed and CI-tested as part of that PR. Closing in favor of #196759; nothing here is lost.

@jalehman jalehman closed this Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos P2 Normal backlog priority with limited blast radius. size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant