Repository navigation
fix(canvas): recognize connected Macs with versioned platform labels - #138958
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 5, 2026, 5:06 AM ET / 09:06 UTC. ClawSweeper reviewWhat this changesCanvas now accepts connected Macs whose platform labels include an OS version, with regression coverage for tool calls and widget presentation. Merge readiness✅ Ready for maintainer review Still needed: current main and v2026.9.1 retain the reported defect. The focused repair has relevant regression coverage and supplied after-fix live evidence; no blocking findings. Priority: P2 Review scores
Verification
How this fits togetherThe Canvas plugin selects paired Macs for tool requests and hosted widget presentation. It checks node metadata before asking the Gateway to invoke the native panel command. flowchart LR
A[Canvas tool or widget] --> C[Canvas eligibility check]
B[Connected node metadata] --> C
C -->|Eligible Mac| D[Select node]
C -->|No eligible node| E[Actionable error]
D --> F[Gateway command authorization]
F --> G[Native Mac panel]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource 0, Tests +18. Total +18 across 3 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: Keep platform recognition in the shared Canvas eligibility predicate, accepting native macOS labels without changing node metadata, configuration, or authorization. Do we have a high-confidence way to reproduce the issue? Yes, from source: a connected node advertising canvas.present with platform "macOS 26.6.2" fails current main's exact comparison. The linked report supplies the real-device reproduction; this review did not execute it. Is this the best way to solve the issue? Yes. Repairing the shared selector covers both affected callers and preserves the native metadata contract; rewriting metadata globally or adding a separate selection path would broaden the change unnecessarily. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bb66e5cbf181. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
* commit '3e4becea5e2ce38ede69e8ecf5302805ecbfc09c': refactor: simplify outbound message execution context (openclaw#139107) fix(models): keep ordinary chat selections session-scoped (openclaw#139232) docs: slim root agent instructions and clarify testing scope (openclaw#139236) test(agents): give the sibling-drain completion wait a tolerance on slow runners (openclaw#139176) refactor(workboard): use canonical queries for card-tree writes (openclaw#139106) fix(canvas): recognize versioned macOS nodes (openclaw#138958) fix: load GitHub connections without a default agent (openclaw#139222) fix(memory): explain unsafe legacy host-event path recovery (openclaw#139195) refactor(talk): centralize typed voice session queries (openclaw#139103) fix(cli): preserve command dispatch and structured errors (openclaw#139067) refactor(agents): consolidate reply failure summaries (openclaw#139175) fix(auth): keep an unset default model unchanged during login (openclaw#139218) perf(media): reuse validated attachment read handles (openclaw#139168) refactor(channels): simplify account configuration updates (openclaw#139096) refactor(android): remove unused updater export root (openclaw#139198) fix(gateway): stop admitting post-ready producers during close (openclaw#139092) fix(gateway): expose agent hook completion outcomes (openclaw#139155) fix(config): return the saved configuration after plugin install commits (openclaw#139203) fix(android): reduce repeated retries to unreachable gateways (openclaw#138732)
Co-authored-by: Colton Harris <[email protected]>
Closes #138956
What Problem This Solves
Fixes an issue where users cannot present Canvas panels on connected Macs whose node metadata reports a versioned platform such as
macOS 26.6.2. The tool rejects the Mac as ineligible even though directcanvas.presentinvocation succeeds.Why This Change Was Made
Recognize bare and versioned macOS platform labels case-insensitively in the shared Canvas eligibility predicate. The existing connection and advertised-command requirements remain enforced. The same correction serves agent tool calls and widget presentation.
User Impact
Connected Macs reporting their OS version can be selected for Canvas presentation. Linux and Android nodes remain excluded.
Evidence
Live reproduction on OpenClaw 2026.9.1:
node.listreports a connected Mac withcanvas.present; the Canvas tool rejects it with no eligible node, while direct node invocation succeeds.The new tool regression and parameterized widget-presenter regression both fail on pre-fix code for the eligibility error.
node scripts/run-vitest.mjs extensions/canvas/src/tool.test.ts extensions/canvas/src/widget-presenter.test.ts extensions/canvas/src/cli.test.ts— 36 passed.node scripts/check-changed.mjs -- extensions/canvas/src/node-eligibility.ts extensions/canvas/src/tool.test.ts extensions/canvas/src/widget-presenter.test.ts— passed, including extension typechecks, lint and runtime cycle checks.Independent autoreview: scoped-clean through P2.
Production delta: 1 line replaced, net zero. Tests: 20 added, 2 removed.
Installed the compiled patched Canvas plugin through the supported plugin installer. Live
tools.invokefor bothcanvasactionspresentandhidenow returnsok: truefor the same Mac. Plugin doctor reports no errors or warnings.This is a node-selection fix with no visual layout changes; before/after proof is the failed/successful tool invocation against the same connected device.
Maintainer verification
Independent GitHub-hosted proof exercised the production Canvas tool and widget presenter through a synthetic WebSocket Gateway on trusted main
8637d26b73b3a8af65ecebd309d401c979a16813. The baseline rejected native versioned and uppercase Mac labels. The exact selector repair passed eight cases across tool present/hide, widget availability, and widget presentation; non-Mac, disconnected, missing-command, and macOS-prefix impostor controls dispatched nothing. The 34 current-main tool/presenter/CLI tests also passed. The executed selector's SHA-256 matches this PR's production file byte-for-byte.The original exact-head CI is green, and fresh independent Codex review through P2 found no actionable defects. Production remains +1/-1 (net zero), tests +20/-2 (net +18).
The independent proof uses a synthetic Gateway transport; it does not show the native panel rendering. Native screenshots could not be collected in this secretless Linux job, which has no paired macOS app or signing identity. The reporter's real-device present/hide results above remain separately attributed. No visual layout code changes.