Repository navigation
feat(onboarding): require explicit AI choice in desktop and Control UI - #140336
Conversation
Use the shared Model Setup contract for explicit provider selection, managed plugin installation, local custom endpoints, and native conversation consent. Resume admitted setup only for its authenticated Gateway owner and preserve unresolved activation receipts when cancellation or reconnect is ambiguous. Worked on by: - @steipete Co-authored-by: steipete <[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 6, 2026, 3:01 PM ET / 19:01 UTC. ClawSweeper reviewWhat this changesMakes desktop and Control UI setup require an explicit provider choice, expose installation and custom-endpoint actions, collect native-conversation consent, and preserve setup across reconnects and uncertain cancellation. Merge readiness✅ Ready for maintainer review This PR remains useful: current main and the latest release retain automatic provider selection, and the merged prerequisite explicitly deferred Control UI/Tauri parity. No actionable introduced defect was found. Priority: P2 Review scores
Verification
How this fits togetherDesktop onboarding opens the shared Control UI Model Setup page, which discovers providers through the selected Gateway. Explicit user actions enter the Gateway’s existing setup wizard, then verification leads into chat or guided onboarding. flowchart TD
A[Desktop or browser setup] --> B[Gateway provider discovery]
B --> C[Provider choices and discovery consent]
C --> D[Explicit user action]
D --> E[Gateway setup wizard]
E --> F[Model verification]
E --> G[Reconnect or cancellation recovery]
G --> E
F --> H[Chat or guided onboarding]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +292, Tests +2084, Docs +21, Other +19. Total +2416 across 33 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one shared explicit-choice setup flow backed by the existing Gateway wizard, server-owned consent rules, and visible recovery actions. Do we have a high-confidence way to reproduce the issue? Yes, from source: opening first-run setup with an eligible detected candidate reaches automatic activation on current main and v2026.9.2. Runtime reproduction was not executed during this read-only review. Is this the best way to solve the issue? Yes. Removing automatic activation at its shared UI owner and consuming the existing setup contract avoids a desktop-only workaround or parallel provider implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7d95c2f50bb9. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Keep the real handler/UI consent cases in the existing isolated Gateway runner with the shared UI DOM setup. Update the splash heading expectation and apply the Rust formatter's navigation-test layout.
|
Merged via squash.
|
openclaw#140336) * feat(linux): require explicit AI onboarding choice Use the shared Model Setup contract for explicit provider selection, managed plugin installation, local custom endpoints, and native conversation consent. Resume admitted setup only for its authenticated Gateway owner and preserve unresolved activation receipts when cancellation or reconnect is ambiguous. Worked on by: - @steipete Co-authored-by: steipete <[email protected]> * test(onboarding): run setup composition in the Gateway test lane Keep the real handler/UI consent cases in the existing isolated Gateway runner with the shared UI DOM setup. Update the splash heading expectation and apply the Rust formatter's navigation-test layout. * test(onboarding): verify isolated setup fixture ownership * test(onboarding): select AI before the channel handoff --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: steipete <[email protected]>
Related: #139675
What Problem This Solves
Fixes an issue where opening first-run setup in the desktop companion or Control UI would start the first detected provider before the user selected it. Fresh installations also lacked clear install/custom-endpoint actions and native-conversation consent in the shared Web UI. This completes the companion half of the onboarding repair prompted by community reports of missing provider choices.
Why This Change Was Made
Model Setup now consumes the shared setup contract landed in #139675: read-only detection, explicit typed provider actions, and an unchecked native discovery choice when the server requires it. Tauri opens this actual shared page; both saved
firstRun=1links and newfirstRun=explicitlinks preserve the intended flow.The old automatic-selection owner was
ui/src/pages/model-setup/first-run-setup.ts. The provider view did not distinguish install/custom actions or render server consent metadata. Recovery also discarded admitted wizards on disconnect and treated cancellation as complete before the Gateway acknowledged it. The repair keeps the admitted wizard bound to the authenticated hello scope, agent, connection revision and setup visit. Reconnect reads its next step without repeating authentication or its last answer; uncertain cancellation retains its receipt and visible recovery action.A URL-only change would leave automatic work in the shared page. Replaying authentication after a disconnect could repeat an already committed operation. Clearing the receipt when Cancel is clicked would mistake a request for acknowledgment. Those approaches are deliberately avoided; no new receipt fields, storage semantics, recovery deadlines, provider list or installer were introduced.
User Impact
Evidence
Final head:
6f6f9b67ddec03494baa145e13ee9e26800c1173, based on landed prerequisite64bf824613261007a3f452974d63f83d6db7f512.OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs ui/src/pages/model-setup src/gateway/server-methods/system-agent-setup-control-ui.test.ts.node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner <focused file or model-setup filter>.test/vitest-projects-config.test.ts, retaining exact membership and exclusion assertions. Scope replacement, protected cancellation, missing-session recovery and cancellation coalescing regressions failed at their intended boundaries before repair.pnpm check:changed: passed for the full candidate and each subsequent test-only correction, including all applicable type, export, lint and policy guards. Testbox runs: full candidate, runner and formatting corrections, inventory, explicit handoff. Each wrapper exited 0 and its lease completed; the backing workflow may show cancellation after the successful one-shot lease closes.pnpm protocol:check,pnpm ui:i18n:verify, focused UI test type graphs, andgit diff --check: passed. Fresh independent autoreview before every commit: clean at P0/P1, no accepted/actionable findings. Native review artifacts validate for the final head.9c4826e0bbd4b3d55b7b2043e449e92999002962(run). A fresh candidate built with the normal public-package pipeline starts without Meta; the actual selected-agent Web UI displays unchecked consent and sends only setup detection before the click. It then performs managed capability approval, installation, authentication, model testing, exact route/profile persistence and onboarding handoff. Both first-run link forms survive restart/relaunch without replaying setup or inference. Installing Codex later preserves both catalog opt-outs and the selected route. Gateway HTTP/WebSocket traffic is real; provider HTTP is synthetic. The final head differs only in the Custodian E2E fixture, verified by an otherwise-empty Git diff. No live Meta account or native Tauri window launch is claimed.CI found stale fixture assumptions, a UI-only runner receiving a Node-backed composition test, and Rust formatting differences. These are corrected with assertions intact. An unrelated release-navigation failure from main was repaired by its existing owner in #140337; its merge ancestry is verified. Two package-harness gaps—a passive brand icon fixture and the configured-page button name—were corrected without relaxing egress, authentication, persistence or no-replay assertions.
Actual source UI in isolated Chromium, with the same synthetic Gateway fixture and viewport on both revisions. Before: opening the page already started provider activation. After: detection stops at the unchecked discovery choice and provider buttons; Meta/custom actions are visible. The after flow explicitly clicked one provider, cancelled it, and observed no fallback. Captures were inspected for secrets, private data and unrelated desktop content before upload. The after flow was recaptured on the final head; its report records detection only before the click and no fallback after cancellation. Published image downloads were independently verified against the inspected SHA-256 hashes.
Provider action comparison
Actual packaged Gateway: capability review and authentication form
The credential field was empty and masked before entry. Captures contain only the isolated fixture's data.
Production/test delta against the landed base: +301 production (+481/-180; shared UI +292, native Rust +9), +2,094 tests/fixtures (+2,362/-268, including colocated Rust tests), and +21 docs (+30/-9). Total: 33 files, +2,873/-457. Feature growth is explicitly authorized. Consent presentation and lifecycle recovery are partly funded by removing automatic candidate activation, its host callback, the obsolete fallback tail, duplicate verification reset, the one-call provider-reset wrapper, and implicit credential selection. No baseline, snapshot, assertion or dependency-policy weakening.
Credits: builds on RoboClaw's recovered desktop/shared-UI draft and Peter Steinberger's requested behavior. The recovered commit retains RoboClaw's original author and Peter's human contribution trailers.