Skip to content

fix(canvas): recognize connected Macs with versioned platform labels - #138958

Merged
steipete merged 1 commit into
openclaw:mainfrom
opspot-ai:fix/canvas-versioned-macos
Sep 5, 2026
Merged

steipete merged 1 commit into
openclaw:mainfrom
opspot-ai:fix/canvas-versioned-macos

Conversation

@Colton-Harris

@Colton-Harris Colton-Harris commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

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 direct canvas.present invocation 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.list reports a connected Mac with canvas.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.invoke for both canvas actions present and hide now returns ok: true for 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.

@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@Colton-Harris
Colton-Harris marked this pull request as ready for review September 5, 2026 08:06
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Sep 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 5:06 AM ET / 09:06 UTC.

ClawSweeper review

What this changes

Canvas 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
Reviewed head: d5a19af71774c90c60875f7873804c0712909a8a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused shared-owner repair with relevant regression coverage, reported real-device recovery, and no blocking correctness findings.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The captured body reports live tools.invoke present and hide succeeding on the same paired Mac after installing the patched Canvas plugin, directly exercising the changed eligibility owner; caller tests supplement widget-path coverage.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The captured body reports live tools.invoke present and hide succeeding on the same paired Mac after installing the patched Canvas plugin, directly exercising the changed eligibility owner; caller tests supplement widget-path coverage.
Evidence reviewed 11 items Introduced scope verified: The pinned introduced delta contains only the eligibility predicate and its two caller tests. The verified test merge has the supplied base and head as its parents and changes those same paths against its base.
Current main remains affected: The shared predicate still requires platform === "macos", rejecting the native versioned label before either Canvas caller can dispatch.
Latest release remains affected: The v2026.9.1 source contains the same exact comparison; this is not an already-shipped fix.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source 0, Tests +18. Total +18 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 2 20 2 +18
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 21 3 +18

Review metrics

Metric Value Why it matters
Production versus regression coverage Production net 0 lines; tests net +18 lines The existing owner absorbs the fix without production growth, while both affected callers gain versioned-platform coverage.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #138956
Summary: This PR is the focused candidate fix for the same author's open Canvas eligibility report.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best 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.

Labels

Label justifications:

  • P2: Repairs a bounded Canvas selection failure on connected Macs while direct native command invocation remains functional.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The captured body reports live tools.invoke present and hide succeeding on the same paired Mac after installing the patched Canvas plugin, directly exercising the changed eligibility owner; caller tests supplement widget-path coverage.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured body reports live tools.invoke present and hide succeeding on the same paired Mac after installing the patched Canvas plugin, directly exercising the changed eligibility owner; caller tests supplement widget-path coverage.

Evidence

What I checked:

  • Introduced scope verified: The pinned introduced delta contains only the eligibility predicate and its two caller tests. The verified test merge has the supplied base and head as its parents and changes those same paths against its base. (extensions/canvas/src/node-eligibility.ts:19, d5a19af71774)
  • Current main remains affected: The shared predicate still requires platform === "macos", rejecting the native versioned label before either Canvas caller can dispatch. (extensions/canvas/src/node-eligibility.ts:19, bb66e5cbf181)
  • Latest release remains affected: The v2026.9.1 source contains the same exact comparison; this is not an already-shipped fix. (extensions/canvas/src/node-eligibility.ts:19, ad6fe23aecb9)
  • Native metadata contract: InstanceIdentity constructs "macOS <major>.<minor>.<patch>"; GatewayChannel passes that value into the connection payload. The released native source uses the same format. (apps/shared/OpenClawKit/Sources/OpenClawKit/InstanceIdentity.swift:176, ad6fe23aecb9)
  • Shared owner and sibling callers: The Canvas tool resolves nodes through resolveCanvasNodeFromList; the widget presenter filters through the same predicate before default selection. The CLI already resolves an explicit node without this platform comparison. These paths use OpenClaw-owned selection and Gateway APIs; no Codex dependency contract is implicated. (extensions/canvas/src/widget-presenter.ts:17, d5a19af71774)
  • Regression coverage: The added tool case and parameterized widget case exercise versioned metadata through both production callers. Existing cases retain Android, Linux, and disconnected-node rejection. The captured PR body reports pre-fix failures, 36 passing focused tests after the fix, and passing changed-file checks; this read-only review did not execute those tests. (extensions/canvas/src/tool.test.ts:152, d5a19af71774)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-05T08:35:00.030Z sha d5a19af :: needs maintainer review before merge. :: none

@obviyus obviyus assigned obviyus and unassigned obviyus Sep 5, 2026
@steipete
steipete merged commit 7755c7d into openclaw:main Sep 5, 2026
178 checks passed
@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Merged via squash.

vincentkoc added a commit to aniruddhaadak80/openclaw that referenced this pull request Sep 5, 2026
* 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)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: canvas P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Canvas rejects connected Macs reporting versioned platform metadata

3 participants