Repository navigation
fix(macos): replace misleading AI setup progress - #135041
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 2, 2026, 12:03 AM ET / 04:03 UTC. ClawSweeper reviewWhat this changesThe PR replaces misleading macOS AI-setup timer progress with Gateway-backed progress, cancellation, and terminal-state handling, plus focused coverage. Merge readinessKeep open for final maintainer review: no introduced functional defect was found, but the recorded waiver for a final packaged live cancellation-to-retry trace needs an explicit proof-sufficiency decision. Priority: P2 Review scores
Verification
How this fits togetherThe macOS onboarding client starts provider setup through a Gateway wizard session, then displays installation and verification state before handing off to the dashboard. The changed sheet consumes that session state while the Gateway remains the owner of next, cancel, and session retirement. flowchart LR
Operator[Operator selects AI setup] --> Sheet[macOS setup sheet]
Sheet --> Wizard[Gateway wizard session]
Wizard --> Setup[Plugin install and AI verification]
Setup --> State[Progress and terminal state]
State --> Dashboard[Dashboard handoff]
Decision needed
Why: Exact-head automated coverage exercises the lifecycle ordering, but the retained live packaged cancellation drill was explicitly waived rather than rerun. Before merge
Agent review detailsSecurityNone. PR surfaceSource -81, Tests +148, Docs +9, Other +358. Total +434 across 14 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the state-aware sheet and the single Gateway-owned terminal/cancellation retirement flow, then merge only if the maintainer accepts the documented proof exception. Do we have a high-confidence way to reproduce the issue? Yes — source and native test fixtures define a high-confidence Gateway-backed progress and cancellation path, although this read-only review did not execute it. Is this the best way to solve the issue? Yes — the change removes misleading producer-side timer progress and consumes existing Gateway session state rather than adding a client-side approximation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4e36c68976a9. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (19 earlier review cycles; latest 8 shown)
|
Test-first checkpoint for PR #135041: require direct auth and local preparation to retain their exact wizard and expose cancellation retry. Production is intentionally unchanged so disposable macOS CI records the pre-fix failure before the owner repair.
|
Integrated head GREEN: The one conflict-driven rebase preserved14 commits and all native setup source/tests byte-for-byte from reviewedcda1f196. Canonical inventory regeneration preserved every unrelated main site. Fresh full-branch P0–P2 Codex review is scoped-clean;309 focused TS tests and changed-scope types/lint/guards exited0;4482 inventory entries verified. Production+374/-415 net−41; tests/support+638/-176; docs+12/-3; generated+24/-20. Explicit human proof exception: the maintainer selected Use existing proof, approving omission only of the additional locked-VM live Cancel/unconfirmed/retry drill. It was NOT executed. All4 original real signed normal-flow screenshots remain; they are not captures of the later cancellation matrix. The signedcda1f196 app passed deep/strict Developer ID verification and executable identity checks without operator-host launch; it is not relabeled as integrated-head packaging. ClawSweeper’s current-head source review has no actionable finding. Its native/onboarding validation move is complete, and the extra trace is explicitly skipped under the human decision. Native preparation completed: |
Show provider-aware native activity during gateway-owned work, retain explicit capability review, and expose honest cancellation state. Remove timer-based installation percentages at the shared producer and report the live verification/finalization stages. Refs #134800. Includes installer, activation, and native-sheet regressions plus onboarding documentation.
Resolve app-owned strings before String-based rendering and regenerate the canonical native source inventory. Mount the sheet fixture in a window so accessibility assertions inspect rendered controls, retaining positive assertions and deterministic cleanup.
Initialize Cocoa once and query the exact owned window through the public AX client boundary. SwiftUI creates virtual nodes lazily and does not promise NSAccessibility protocol conformance. Preserve positive control/content checks and await inspection before window cleanup.
SwiftPM's default prohibited activation policy does not permit windows under the AppKit contract. Initialize accessory policy once before Cocoa startup, without activation, and report bounded owned-window discovery facts if AX selection fails.
macOS 26.3 exposes the owned windows but omits their AXIdentifier. Use the required AXTitle of a uniquely titled test window instead, preserving exact window ownership without a fallback selector.
Materialize the SwiftUI accessibility tree through one self-client request, then use public Objective-C getters on the exact retained view. Remove remote window rediscovery and its metadata selectors while preserving positive UI checks and lifecycle cleanup.
Test-first checkpoint for PR #135041: require direct auth and local preparation to retain their exact wizard and expose cancellation retry. Production is intentionally unchanged so disposable macOS CI records the pre-fix failure before the owner repair.
Keep auth and prepare sheets bound to their live wizard generation until cancellation is confirmed or the pending terminal response is consumed. Preserve late admission and purged-session results, remove the hidden-sheet context path, and keep terminal failures dismissible. Give interactive guided activation sole ownership of progress, retaining caller progress only for quiet automatic attempts. Native CI on the test-first predecessor reproduced nine intended failures among 1,907 tests; retained-view accessibility checks passed. Expand the same boundary tests for auth/prepare late admission and terminal outcomes. The native app/test targets compile; repaired native execution remains a CI gate. The guided progress owner probe fails before and passes after.
Move the unchanged tracker into the existing wizard prompter helper so the guided test file stays within its line limit. Preserve all regression assertions and simplify the two immediate mock progress lifecycles.
Extend the existing auth/prepare terminal-reply matrix with the reverse response order and settled request failures. Keep retirement production behavior unchanged for native CI red proof; adapt the error-card call to the current-main initializer.
Separate session retirement from presentation dismissal so delayed cancellation cannot replace or dismiss a terminal provider error. Share retirement with settled request failures and ordinary dismissal, preserving unresolved-session recovery and successful handoff. Retain enabled-control assertions for composed button labels in the native matrix.
Include named enabled AXLink actions alongside AXButton controls, keeping all terminal error and dismissal assertions. Remove the unsuccessful descendant-name workaround; the error-card actions use link styling.
cda1f19 to
91b3f38
Compare
|
Merged via squash.
|
* fix(macos): replace misleading AI setup progress Show provider-aware native activity during gateway-owned work, retain explicit capability review, and expose honest cancellation state. Remove timer-based installation percentages at the shared producer and report the live verification/finalization stages. Refs openclaw#134800. Includes installer, activation, and native-sheet regressions plus onboarding documentation. * fix(macos): localize setup activity and mount sheet tests Resolve app-owned strings before String-based rendering and regenerate the canonical native source inventory. Mount the sheet fixture in a window so accessibility assertions inspect rendered controls, retaining positive assertions and deterministic cleanup. * test(macos): inspect setup sheets through accessibility client Initialize Cocoa once and query the exact owned window through the public AX client boundary. SwiftUI creates virtual nodes lazily and does not promise NSAccessibility protocol conformance. Preserve positive control/content checks and await inspection before window cleanup. * test(macos): initialize a window-capable setup test host SwiftPM's default prohibited activation policy does not permit windows under the AppKit contract. Initialize accessory policy once before Cocoa startup, without activation, and report bounded owned-window discovery facts if AX selection fails. * test(macos): select setup windows by visible title macOS 26.3 exposes the owned windows but omits their AXIdentifier. Use the required AXTitle of a uniquely titled test window instead, preserving exact window ownership without a fallback selector. * test(macos): inspect the retained setup view directly Materialize the SwiftUI accessibility tree through one self-client request, then use public Objective-C getters on the exact retained view. Remove remote window rediscovery and its metadata selectors while preserving positive UI checks and lifecycle cleanup. * test(macos): reproduce unresolved setup cancellation recovery Test-first checkpoint for PR openclaw#135041: require direct auth and local preparation to retain their exact wizard and expose cancellation retry. Production is intentionally unchanged so disposable macOS CI records the pre-fix failure before the owner repair. * fix(onboarding): retain visible cancellation recovery Keep auth and prepare sheets bound to their live wizard generation until cancellation is confirmed or the pending terminal response is consumed. Preserve late admission and purged-session results, remove the hidden-sheet context path, and keep terminal failures dismissible. Give interactive guided activation sole ownership of progress, retaining caller progress only for quiet automatic attempts. Native CI on the test-first predecessor reproduced nine intended failures among 1,907 tests; retained-view accessibility checks passed. Expand the same boundary tests for auth/prepare late admission and terminal outcomes. The native app/test targets compile; repaired native execution remains a CI gate. The guided progress owner probe fails before and passes after. * test(onboarding): share wizard progress ownership tracker Move the unchanged tracker into the existing wizard prompter helper so the guided test file stays within its line limit. Preserve all regression assertions and simplify the two immediate mock progress lifecycles. * test(macos): gate stale provider reconciliation replies * fix(macos): fence retired provider reconciliation * test(macos): reproduce late cancellation after terminal errors Extend the existing auth/prepare terminal-reply matrix with the reverse response order and settled request failures. Keep retirement production behavior unchanged for native CI red proof; adapt the error-card call to the current-main initializer. * fix(macos): retire settled provider auth callbacks Separate session retirement from presentation dismissal so delayed cancellation cannot replace or dismiss a terminal provider error. Share retirement with settled request failures and ordinary dismissal, preserving unresolved-session recovery and successful handoff. Retain enabled-control assertions for composed button labels in the native matrix. * test(macos): inspect link-styled setup error actions Include named enabled AXLink actions alongside AXButton controls, keeping all terminal error and dismissal assertions. Remove the unsuccessful descendant-name workaround; the error-card actions use link styling.
Closes #134800 (native AI setup presents synthetic installation progress in an oversized form).
Additional instructions
Maintainers can edit this same-repository branch.
What Problem This Solves
Fixes an issue where users connecting AI in the macOS app would see a large input form during background installation, including capability-review instructions, a disabled Submit button, and a terminal-style percentage bar that advanced with elapsed time rather than measured work. The last installation message could also remain visible while the actual AI connection was being tested.
Why This Change Was Made
The native client now renders Gateway-owned work as a compact task sheet, carries the selected provider’s existing name and artwork, and expands for interactive review, forms, or device codes. The shared installer no longer manufactures percentages or shortens useful activity messages; the activation owner emits explicit verification and finalization status through the existing wizard progress channel.
The existing consent, session/request generation, cancellation, and successful dashboard handoff remain authoritative. Pending cancellation is visible, unconfirmed cancellation remains retryable, and Gateway-owned steps cannot submit answers. There are no new dependencies, configuration options, protocol fields, or storage changes.
User Impact
AI setup shows what is happening without pretending to know how close installation is to completion. Background work has a native activity indicator instead of a disabled form action. Capability review remains complete and explicit, confirmation remains off until accepted, and cancellation feedback does not claim an operation stopped before the Gateway confirms it.
The shared installer improvement also reaches terminal and web wizard consumers. Provider-reported model-download counters are unchanged.
Evidence
Real native screenshots
Captured from signed builds in a macOS 26.5 QA guest, using a task-owned authenticated Gateway and isolated setup/CLI-auth state. Images contain only the app window and were inspected before upload; no operator configuration or conversations are shown. Baseline:
494f86248e70c46d28d3f1e0e3273450458f9c26; captured candidate corresponds to9e3dd97b8118cca96e5b205e3d67e4ca104eb530. The subsequent localization/test-fixture repair preserves the pictured English copy and layout; these are not newly captured images of that follow-up.The candidate’s real flow displayed the full review, advanced to an unchecked confirmation, accepted an explicit check and Submit, displayed gateway-owned activity without an answer button, and automatically opened the dashboard. The embedded dashboard’s separate device approval was completed and its setup-chat surface loaded. No mocked wizard responses or generated UI images were used.
Current integration and proof
Integrated candidate:
91b3f38570996ea0946e1d75c2f46757d8796a13, rebased once onto pinned main77a24659740fdfaecee81ee14dad2b6af970d773to resolve the actual native-source inventory conflict. All fourteen task commits and human credit were preserved. The four native setup source files and complete native test file are byte-identical to reviewedcda1f196; the source result matches the automatic merge, with only the conflicted inventory regenerated through its canonical owner. Inventory verification passed with 4,482 entries and every unrelated main source site preserved. Main's installer source-selection changes remain intact.Integrated-head CI run33586763047, attempt2 completed GREEN, including release and the required openclaw/ci-gate. Native job100114104534 passed 1,911 app tests/197 suites, 1,571 shared tests/120 suites, all18 terminal-order cases, all6 replacement-generation cases and2+1 auxiliary tests, zero issues. The log identifies test-merge
353aa54804213c9a00dab295c6ea8a1a2ed00b84containing the exact integrated PR head and base5fe22a7d88919f260e7999fc775733feff3cb1fa; native log SHA256 isd4a7c90ddef8dc8c51978e8f5b3d2f443c72628226f6bc2715ef2d7ec685d186. The canonical watcher exited0/GREEN. Three separate non-required Periphery checks remain queued; they are not being described as passed.The first attempt was recovered only after its two remaining Swift jobs were confirmed unassigned with zero steps and all other CI work terminal. Cancellation was confirmed terminal before one failed-job retry. Both retry runners then started in two seconds. No executing job was cancelled or coverage changed.
Fresh full-branch P0–P2 Codex autoreview on the integrated candidate completed cleanly, with no actionable findings; the reviewed tree matches the pushed tree. The focused integrated command exited 0 with 309 tests in five files (62.39 seconds), including guided onboarding, installer sources, activation, wizard sessions and the CLI prompter:
Changed-scope validation exited0, including core/test types, formatting, core lint, dead exports, import cycles and selected ownership guards:
The conflict-driven rebase initially exposed a missing TypeBox module in the local installation. One
pnpm install --frozen-lockfilesucceeded in 2m25s and the generator retry passed. No tracked dependency change, manual node_modules edit, override, generated translation change or changelog edit was used. The earlier 272-test clean-exit proof remains historical; the older 27-test summary followed by a shutdown hang is not counted as a successful command. The separately owned test-wrapper fix #135439 is now merged and incorporated.Cancellation boundary RED/GREEN
Test-first
4ef616664ea44860ba0adc0c6e10b3a58747f457ran native job100060965756 / run33564757477 attempt2: 1,911 app tests, 46 issues. All eight terminal-first failure cases failed error preservation; two original-order cases separately exposed the action lookup. This is executed RED before the production retirement fix.A terminal error previously cleared the server-session fields without retiring callback authority. A delayed Cancel could then overwrite or dismiss the visible error. One canonical retirement owner now revokes the auth generation, request/session, cancellation and input authority while preserving error presentation. Terminal-result application, settled request failure and dismissal share it. Unresolved sessions retain recovery authority; late admission, exact route/generation fences and successful committed handoff remain intact. The existing auth/prepare matrix covers both response orders. No consumer-only status guard, test-only production seam, new timeout or public contract was added.
The intermediate production fix passed every lifecycle assertion but still failed ten Show details lookups. The final test-only correction recognizes named enabled AXButton/AXLink actions and removes the unsuccessful descendant-name workaround without weakening assertions. Run33574051827 attempt2 then passed 1,911 app tests, all18 terminal-order cases, all6 replacement-generation cases, 1,561 shared tests and2+1 auxiliary tests, zero issues. Its native log identifies test-merge
edeeef09f70a7387e9f444c036b141b8f2d00717containing reviewedcda1f196and baseab6726b5d8d27f2e7940f6fdbf3eacd2f20ccb72. This is historical exact-head proof, not a claim that the old run tested the later integration.The earlier direct-auth/prepare presentation and start/next replacement-generation defects also have executed native RED/GREEN records. Installer npm/ClawHub/npm-pack progress and verification-status regressions failed before their owner repairs. Guided CLI activation now has one progress owner rather than overlapping spinners. Existing positive consent, copyable errors, enabled controls and successful dashboard handoff remain covered.
Signed build and explicitly approved live-proof gap
A final app was packaged from
cda1f196and independently verified with Developer ID Peter Steinberger (Y5PE65HELJ), deep/strict signature validation, matching native/embedded-worker source identity and executable SHA256152aa454f2bed99a3d908bbfa00a2d95fe024399dcae4486f8b0df3240493144. This build predates the mechanical integration; it is not presented as a newly packaged integrated head. No native app or OpenClaw native test suite was launched on the operator host.Explicit maintainer decision: the QA VM remained locked, and the maintainer selected Use existing proof, approving omission of only the additional signed real-Gateway Cancel/unconfirmed/retry drill. That drill was not executed. The four original screenshots above prove the earlier real signed visual/normal flow; they do not depict the new cancellation cases. Deterministic fault-injection native tests prove the cancellation response orders. This exception does not waive integration, CI, review or final merge authorization.
ClawSweeper reviewed this integrated head at2026-09-02 03:30UTC and found no actionable source issue. Its exact-head native/onboarding validation move is complete. The additional real cancellation trace is explicitly omitted under the maintainer decision above, not silently skipped or represented as executed. Native review artifacts validated as READY FOR /prepare-pr, and
OPENCLAW_TESTBOX=1 scripts/pr prepare-run 135041completed successfully at the same91b3f385 head. The native wrapper selected exact-head hosted CI (not pre-rebase proof reuse), verified the remote/prep trees match, and made no additional source change or push. Final parent exact-head merge authorization remains required; no merge or issue closure has occurred.Scope and follow-up
Production: +374 / −415 (net −41). Tests/support: +638 / −176 (net +462). Docs: +12 / −3. Generated native inventory: +24 / −20. The terminal-retirement repair itself is production-neutral (+11/−11). The old oversized form, decorative timer/bar, lossy activity shortening, hidden cancellation dismissal and captured-context workaround were removed rather than retained as parallel paths.
The canonical setup-progress issue #134800 stays open until landing. Earlier typecheck and Gateway fixture blockers were repaired by #135407 and #135495 and incorporated; #135448 was superseded. The independent macOS artifact-timeout investigation, unauthenticated automatic-CLI recovery wait, and localization interpolation issue #135487 / PR #135511 remain separate follow-ups; no assertions or deadlines were loosened here.
Operator documentation: https://docs.openclaw.ai/start/onboarding