Repository navigation
feat(macos): start fresh installs in guided dashboard setup - #169568
Conversation
|
🦞👀 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: blocked before merge. What this changesThis PR starts fresh Mac installations with native progress followed by guided dashboard AI setup and manual recovery. Example: Launch OpenClaw.app without configuration, saved Gateways, or previous onboarding.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep this PR open: it provides useful, maintainer-directed onboarding work absent from main, and the previous generated-translation finding is fixed. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe macOS first-run coordinator delegates runtime and Gateway startup to existing native owners, then hands off to the Control UI, which requests Gateway-owned inference setup. flowchart LR
A[Fresh Mac launch] --> B[First-run coordinator]
B --> C[Runtime and Gateway owners]
C --> D[Dashboard readiness]
D --> E[Control UI setup card]
E --> F[Gateway inference setup]
B --> G[Native manual recovery]
E --> G
Technical reviewBest possible solution: Ship native first-run orchestration and Gateway-owned inference setup together while preserving saved connections and manual recovery. Do we have a high-confidence way to reproduce the issue? This is a feature request implemented as a PR; current-main source confirms the existing native onboarding path, and no target code was executed during this review. Is this the best way to solve the issue? The implementation appropriately reuses runtime, Gateway activation, dashboard navigation, and authentication owners while keeping provider selection on the Gateway. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6d79ee9dd27c. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +1059, Tests +793, Docs +10. Total +1862 across 37 files. Added test files: 3. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (8 earlier review cycles)
Reviewed October 12, 2026, 2:43 PM ET / 18:43 UTC (Revision 9). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
744b0e5 to
44ee1b2
Compare
|
Merged via squash.
|
## What Problem This Solves The Dashboard cancellation test introduced in `ec7fec0636d38748b2205a0a117233441e8b1f2c` (#169568) assumes that returning from native cancellation means WebKit has already published `isLoading = false`. Native teardown calls `stopLoading()`, but the test does not await that asynchronous state change. The assertion failed in [scheduled CI 38305224828](https://github.com/openclaw/openclaw/actions/runs/38305224828/job/114997825068) and again in validation run 38306200884. ## User Impact The regression test waits for WebKit's actual stopped-loading state while preserving cancellation, window cleanup, and pending-navigation checks. This changes one test file, +27/−10 lines, with no production change, sleep, polling, or increased deadline. ## Why This Change Was Made Observe the existing loading-state notification with `AsyncTestSignal` while the fixture's HTTP response remains blocked. Keep the response gated until loading stops so ordinary completion cannot satisfy the cancellation check, and reject failure-page completion. Invalidate the observation on exit; on errors, cancel and join the opening task and release the response gate. ## Evidence - Native CI [38311910220, job 115019805962](https://github.com/openclaw/openclaw/actions/runs/38311910220/job/115019805962), head `0c4b38b77adfcd32fc25a18f5d0ed7fb97c2faae`: the exact cancellation target passed in 7.770 seconds; `DashboardExperienceTests` passed all six tests (nine cases) in 132.289 seconds. The default native invocation passed all 2,505 tests in 282 suites in 551.058 seconds. These are actual Dashboard target and suite results. - Candidate `1efe4806e7ae5beb46ede6a3c40b48e7356d86da` contains the exact reviewed and tested Dashboard source. Native owners, relevant fixture/wait helpers, Swift package dependencies, test runner, Swift configurations, and CI workflow match the passing composition and audited main `012fa012eb6ef3708a6d09a9104b48e784f8327a`. Main still has the unchanged test preimage. The composition also contained a separate MLX test repair; its full native pass is not claimed as an exact-candidate full-suite run. - Pinned SwiftFormat and focused SwiftLint passed with zero violations on the same test source and configuration. Whitespace checks, normal commit hooks, and one isolated Codex review passed with no actionable findings. - Exact-candidate [CI 38309523531](https://github.com/openclaw/openclaw/actions/runs/38309523531) completed successfully, but native and static jobs were skipped. Native compilation/runtime and focused Swift static proof are qualified separately above; skipped checks are not claimed as passing. No new local native runtime was run for this qualification.
…#169568) * feat(macos): start fresh installs in guided dashboard setup * fix(macos): reset onboarding page state for manual recovery * chore(ui): refresh setup card localization inventory * chore(ui): tighten setup card static checks * fix(ios): retain unsupported setup panel handling * fix(ui): advertise only supported native AI setup actions * chore(macos): refresh native localization inventory * test(macos): cover native AI setup panel contract * fix(macos): show first-run setup progress immediately * fix(macos): retire cancelled dashboard setup navigation * fix(ui): simplify guarded onboarding route values
) ## What Problem This Solves The Dashboard cancellation test introduced in `30559a4d18d31b87d49e84697df358dbf082752e` (openclaw#169568) assumes that returning from native cancellation means WebKit has already published `isLoading = false`. Native teardown calls `stopLoading()`, but the test does not await that asynchronous state change. The assertion failed in [scheduled CI 38305224828](https://github.com/openclaw/openclaw/actions/runs/38305224828/job/114997825068) and again in validation run 38306200884. ## User Impact The regression test waits for WebKit's actual stopped-loading state while preserving cancellation, window cleanup, and pending-navigation checks. This changes one test file, +27/−10 lines, with no production change, sleep, polling, or increased deadline. ## Why This Change Was Made Observe the existing loading-state notification with `AsyncTestSignal` while the fixture's HTTP response remains blocked. Keep the response gated until loading stops so ordinary completion cannot satisfy the cancellation check, and reject failure-page completion. Invalidate the observation on exit; on errors, cancel and join the opening task and release the response gate. ## Evidence - Native CI [38311910220, job 115019805962](https://github.com/openclaw/openclaw/actions/runs/38311910220/job/115019805962), head `0c4b38b77adfcd32fc25a18f5d0ed7fb97c2faae`: the exact cancellation target passed in 7.770 seconds; `DashboardExperienceTests` passed all six tests (nine cases) in 132.289 seconds. The default native invocation passed all 2,505 tests in 282 suites in 551.058 seconds. These are actual Dashboard target and suite results. - Candidate `1efe4806e7ae5beb46ede6a3c40b48e7356d86da` contains the exact reviewed and tested Dashboard source. Native owners, relevant fixture/wait helpers, Swift package dependencies, test runner, Swift configurations, and CI workflow match the passing composition and audited main `57a1e1ef0cd47249a4fb3e610b2a19b723ae92c9`. Main still has the unchanged test preimage. The composition also contained a separate MLX test repair; its full native pass is not claimed as an exact-candidate full-suite run. - Pinned SwiftFormat and focused SwiftLint passed with zero violations on the same test source and configuration. Whitespace checks, normal commit hooks, and one isolated Codex review passed with no actionable findings. - Exact-candidate [CI 38309523531](https://github.com/openclaw/openclaw/actions/runs/38309523531) completed successfully, but native and static jobs were skipped. Native compilation/runtime and focused Swift static proof are qualified separately above; skipped checks are not claimed as passing. No new local native runtime was run for this qualification.
Backport of 1ed40a1 (partial: startup-config-preflight native bootstrap initialization before webhook history reads, its regression test, the source-captures test isolation, and the database-schemas doc note; skipped the admitStateSchemaFacts catalog-reuse refactor (not required on this branch), the macOS OnboardingFirstRun readiness-waiter change (OnboardingFirstRun from #169568 is main-only), and the Telegram e2e catalog isolation).
What Problem This Solves
A fresh Mac install currently requires several native setup pages before reaching OpenClaw, and the custodian cannot explain an automatically selected AI connection.
User Impact
Fresh installations with no prior onboarding, saved connection, config, or Gateway profile immediately show native setup progress while preparing the bundled runtime, starting their own local Gateway, and opening custodian onboarding. The same window offers Set up manually, retires pending dashboard navigation when cancelled, becomes the existing recovery page on failure, and closes after the dashboard is ready. They never join a discovered Gateway. Runtime, connection, authentication, and dashboard failures return to the relevant native page with an error. Existing and remote setups retain their current behavior.
The Control UI shows deterministic progress and a dismissible setup summary, with provider alternatives, ChatGPT sign-in, and manual recovery. Native shells can expose Gateway selection, permissions, and AI setup through a shared capability interface. The existing custodian greeting starts after automatic setup succeeds.
Dependency: this PR depends on the companion
openclaw.setup.autoPR from laneauto; the lead will rebase it after that PR lands. The method is feature-detected, with the existing manual behavior when absent. This PR does not implement the Gateway method. Rebased ontoorigin/mainatf466872e035bb50add50e8e0a4ca85e6965567ef, including the Bun pin and current Solid custodian surface. The lead will integrate the dependency after it lands.Why This Change Was Made
Native startup reuses the CLI installer, bundled runtime, Gateway activation, and dashboard owners. Onboarding is marked seen only after the existing shell-ready signal confirms the requested dashboard route. The native AI picker remains available for manual recovery. The UI keeps selection in the Gateway, reuses the existing auth wizard and activation RPC, and ignores results from an old connection. Route rendering waits for its onboarding data, preventing an early caretaker greeting during boot.
Release-note context: fresh Mac installs enter guided dashboard setup automatically; the custodian explains its selected AI and offers alternatives or sign-in while preserving manual recovery.
Native capability contract (Mac and Tauri)
ui/src/app/native-setup.tsownsNativeSetupCapability. A shell may installwindow.__OPENCLAW_NATIVE_SETUP__before UI boot, exposing only supported callbacks:nameis the shell's display label, including its local-device name. The shared fallback for an unnamed local Gateway is This computer; macOS supplies localized This Mac through its Gateway snapshot. The card detects individual capabilities and has no WebKit dependency. Each callback delegates authority and effects to the host's existing owner.For the existing device-settings adapter,
capabilities.aiSetupAvailable: trueexplicitly advertises AI setup. The Mac host publishes it; iOS omits it and retains the terminal fallback. The card observes snapshot updates. The Mac adapter maps AI setup to device settings{ type: "open", panel: "ai-setup" }, Gateway selection to the existing gateways{ type: "open-settings" }message, and permissions to the existingdevice-permissionsroute.ai-setupopens the native AI page without marking onboarding complete. Tauri can implement these callbacks through its existing{ type: "open", panel: "ai-setup" | "gateways" | "permissions" }messages. Browser-only recovery showsopenclaw onboard.Evidence
Current revision, after the main rebase:
Earlier boundary proof remains recorded on the prior head: 181 UI tests, the isolated seven-test native panel contract suite, and broader native compilation. No real Gateway or packaged app was launched. The lead owns signed packaged first-run/recovery, launch timing, and published-driver upgrade proof after companion integration. Operator state, the installed app, and LaunchAgents were untouched.
The native screenshots below render the actual production SwiftUI progress view offscreen. The browser screenshots use the production Control UI and synthetic mock-Gateway fixtures. All full captures were inspected before upload.
Native startup progress
Previously fresh startup displayed no window during preparation. It now presents this same native window through runtime preparation, Gateway startup, and dashboard loading:
Gateway and dashboard progress
Before
After: selected AI
Progress, alternatives, sign-in, and recovery states
Remaining integration/proof hold: the lead must land the automatic-inference dependency and run signed packaged first-run/recovery and published-driver upgrade proof preserving saved local/remote settings. No persisted data schema changes are introduced here.
Independent branch autoreview is clean through P2 on
44ee1b29398324014a839dc5a9b6c3ec84a2f845. The accepted cancellation finding was fixed before the single revision push. Post-push check: ClawSweeper still reports the previous head (744b0e58); no review of this head is available yet. CI preflight failed in “Detect changed scopes” because the original branch included two generatedLocalizable.xcstringsentries alongside source edits. The next integration must discard that file's two-line generated delta while retainingapps/.i18n/native-source.json; the native locale workflow owns publication. The requested one revision push is complete, so this small correction is recorded for the lead's next integration. Companion integration and packaged native proof remain lead-owned.