Repository navigation
refactor(ui): simplify first-run activation outcomes - #140655
Conversation
Keep terminal receipt classification with the first-run owner and replace the admission flag side channel with a local outcome. Preserve the recovery behavior landed in #139140 without changing Gateway or configuration contracts.
|
🦞👀 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, 10:36 PM ET / September 7, 2026, 02:36 UTC. ClawSweeper reviewWhat this changesThe Control UI passes setup wizard outcomes directly to the first-run recovery owner and represents rejected admission explicitly instead of carrying a separate flag. Merge readiness✅ Ready for maintainer review Keep this maintainer-requested cleanup open. Current main retains the extra outcome translation, and the introduced changes preserve the existing recovery decisions without an actionable correctness finding. Priority: P3 Review scores
Verification
How this fits togetherModel Setup receives Gateway wizard results while users configure AI access. Its first-run recovery owner retains uncertain attempts, releases definitively rejected attempts, and records verified models before onboarding continues. flowchart TD
A[User starts model setup] --> B[Gateway setup wizard]
B --> C[Browser wizard runner]
C --> D[First-run recovery owner]
D --> E[Retain uncertain attempt]
D --> F[Release rejected attempt]
D --> G[Record verified model]
G --> H[Continue onboarding]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -5, Tests +3. Total -2 across 6 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep terminal recovery classification with the first-run owner while preserving exact receipt ownership and the distinction between non-admission and uncertain completion. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes a behavior-preserving cleanup of an existing fix, and source inspection found no introduced failure to reproduce. Is this the best way to solve the issue? Yes. Moving the existing classification into its recovery owner removes a side channel without duplicating capability or changing persistence, protocol, or retry policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f9f4aa93646e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready verification for 27135f769990. The final cleanup preserves the existing first-run recovery contract while deleting the admission side channel and page projection. Production net −5, tests net +3, no new test cases. The initial file-line lint failure was resolved by removing a redundant exception wrapper, not by weakening a guard or baseline.
Commands used for local proof: node scripts/run-vitest.mjs ui/src/pages/model-setupOPENCLAW_VITEST_FS_MODULE_CACHE_PATH=.artifacts/vitest-cache-first-run-e2e node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/model-setup-activation-feedback.e2e.test.ts ui/src/e2e/model-setup-cancel.e2e.test.ts ui/src/e2e/model-setup-reconnect.e2e.test.tsnode scripts/check-changed.mjs -- ui/src/pages/model-setup/first-run-setup.ts ui/src/pages/model-setup/model-setup-page.ts ui/src/pages/model-setup/state.ts ui/src/pages/model-setup/wizard-runner.ts ui/src/pages/model-setup/model-setup-activation.test.ts ui/src/pages/model-setup/wizard-runner.test.tspnpm ui:buildThis is behavior-neutral with unchanged appearance and Gateway contracts. No new live-provider or screenshot claim is made; the current candidate has real-browser and owner-boundary test proof. |
|
Merged via squash.
|
Keep terminal receipt classification with the first-run owner and replace the admission flag side channel with a local outcome. Preserve the recovery behavior landed in openclaw#139140 without changing Gateway or configuration contracts.
Related: #139140 — recoverable onboarding and model-result verification
What Problem This Solves
Maintainer-requested cleanup of the existing Control UI first-run recovery fix. The already-landed fix carried start non-admission as a separate session flag and observer argument, while the page translated wizard results into another outcome shape before updating the receipt owner.
Why This Change Was Made
Pass the wizard outcome directly to the first-run owner, which now decides whether to retain, reject, or verify its receipt. Exact start non-admission uses a local discriminated outcome; it does not manufacture a Gateway-owned rejection fact. This removes the mutable admission flag, extra callback argument, and page-level projection.
User Impact
No intended user-visible change. Generic errors remain unresolved, confirmed cancellation and pre-promotion rejection retain their existing retry semantics, and start non-admission remains distinct from an error after admission. Suspension, retirement, stale/replacement ownership, and the existing verification deadline are unchanged. No Gateway, protocol, configuration, schema, or native changes.
Evidence
pnpm ui:buildpassed.node scripts/check-changed.mjs -- <six changed files>passed, including formatting, core-test/UI typechecks, lint, i18n, and applicable guards.git diff --checkpassed.Production +37/-42 (net -5); tests +10/-7 (net +3). The larger alternative test matrix and documentation prose were not carried forward. One redundant exception assertion was removed; an unexpected exception still fails the test. No new helpers or compatibility paths.
This is a behavior-neutral follow-up, not a second claim to fix the original bug. The relevant real-Gateway history is on the linked onboarding PR; this candidate's proof is the existing owner tests, real-browser E2Es, build, and checks. No appearance changes require new screenshots.
Focused commands: