Repository navigation
fix(macos): keep tokenless native dashboards connected after route refresh - #160763
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: needs maintainer review before merge. Reviewed September 28, 2026, 8:12 PM ET / September 29, 2026, 00:12 UTC (Revision 5). ClawSweeper reviewWhat this changesThe macOS dashboard now admits accepted tokenless native connections during route replacement and URL refresh, with WebKit recovery and refusal regression coverage. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Current main still rejects accepted tokenless native dashboards during Primary route refresh. This PR addresses both rejecting checks, and the prior review findings have been addressed. No new actionable patch defect is evident. Priority: P1 Review scores
Verification
How this fits togetherThe macOS dashboard manager turns Gateway route and native connection state into a WebKit dashboard document. The document asks the native app to sign Gateway authentication challenges before the web UI connects. flowchart LR
A[Gateway route update] --> C[Dashboard admission]
B[Accepted native connection] --> C
C --> D[WebKit dashboard]
D --> E[Native challenge signer]
E --> F[Gateway authorization]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceOther +199. Total +199 across 8 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Land the focused route admission repair with its native WebKit regression coverage while retaining the existing final challenge and revocation checks. Do we have a high-confidence way to reproduce the issue? Yes. The pre-fix hosted WebKit run reports failure for the three route transitions, and current main retains the rejecting guards; this read-only review did not execute macOS tests. Is this the best way to solve the issue? Yes. Using the existing accepted-binding predicate in both route checks is a narrow repair, while the native bridge remains responsible for live challenge authorization. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9481b2275e89. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
@clawsweeper re-review Final candidate: |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…fresh (openclaw#160763) * test(macos): reproduce tokenless Primary dashboard route rejection * test(macos): isolate tokenless route regression fixtures * fix(macos): keep accepted tokenless dashboards connected * test(macos): preserve unavailable dashboard window authority * test(macos): await dashboard document readiness events
Related: #159860
What Problem This Solves
Fixes: the macOS Primary dashboard becomes stuck reconnecting after a route refresh when its accepted native connection has a scoped device grant but no shared startup token or password.
User Impact
An already accepted native device keeps its dashboard across route refresh and recovery. Unavailable authority and revoked grants still refuse access; no pairing bypass or startup device-token export is introduced.
Why This Change Was Made
Both Primary route admission paths now recognize an accepted native binding, including an empty shared-credential projection. Missing authority remains distinct from accepted tokenless authority.
Evidence
7c9f98f750fdCI passed the tokenless regression (71.083s), saved-profile reconnect (9.705s), and window ownership/refusal/recovery (0.799s). The 2,323-test / 272-suite default partition had one issue: the existing Aqua background test timed out polling document readiness. The new candidate uses the existing event-driven readiness helper with the same five-second timeout and an explicit native-command-ready assertion. Both appearances and all real WebKit rendering assertions remain unchanged. The scheduling cause is unproven; this is not a claim of flake eradication.33f463747a30: macOS Swift test job passed. The default partition passed 2,323 tests / 272 suites in 208.500s, including all three tokenless transitions (62.134s), saved-profile reconnect (9.759s), unavailable-authority/window recovery, and both Aqua background appearances (57.486s). Named and rendered partitions also passed (6 and 2 tests). Full CI passed, including the Swift package and macOS Node lanes and aggregate CI gate (9 successful jobs; 31 correctly scope-skipped; zero failures/cancellations).Native/WebKit execution uses disposable hosted macOS CI only. The transport responses and page are controlled fixtures, not a live deployed Gateway or operator desktop.
Before
After
The after capture's transparent background is composited onto white; captured content is unchanged. Screenshots supplement the native signing assertions above.
Credit: Jason (Json), @fuller-stack-dev.