Repository navigation
fix(cua): restore Mac Command shortcuts and native worker packaging - #136018
Conversation
Normalize Command aliases to the native cmd spelling on macOS for desktop and window input, while keeping meta on Linux and Windows. Share the chord and pointer modifier owner and remove unreachable drag-modifier handling without widening the public action schema. Restores documented Command shortcuts. Boundary RED: five Darwin failures; GREEN: 37 cases, 162 owner/contract tests, full changed checks, and managed P0 review. Native WebVNC selection reproduced the old one-character result; candidate native proof follows before landing.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 2, 2026, 8:37 AM ET / 12:37 UTC. ClawSweeper reviewWhat this changesThe PR maps CUA Command aliases to macOS-native input spelling, repairs native-worker package staging and Windows tar paths, and replaces racy test file watches with state polling. Regression provenancePossible regression — probable (reviewed change; known regression link). No predecessor PR is attributed. Merge readinessNo blocking patch defect was found. This remains open because it is maintainer-authored and carries the protected Priority: P1 Review scores
Verification
How this fits togetherThe CUA plugin translates agent computer actions into native-driver calls on desktop and window targets. Packaging scripts build the worker runtime embedded in the Mac app and portable package artifacts. flowchart LR
A[Agent computer action] --> B[CUA provider]
B --> C[Platform modifier normalization]
C --> D[Native CUA driver]
E[Build inputs] --> F[Packaging scripts]
F --> G[Worker runtime bundle]
G --> H[Mac app and portable package]
Decision needed
Why: The patch is coherent and the external-contributor proof gate does not apply to this member-authored PR, but the protected label requires explicit maintainer handling and the dependency/attachment check could not be completed locally. Before merge
Agent review detailsSecurityNone. PR surfaceSource -3, Tests +657, Other +5. Total +659 across 15 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the shared platform-aware CUA normalizer and canonical tar/staging ownership, then merge once a maintainer accepts the recorded native evidence. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main maps Command aliases to meta, while the introduced Darwin path emits cmd through both desktop and window dispatch. This reviewer did not rerun the native Mac scenario. Is this the best way to solve the issue? Yes. Resolving aliases once at the CUA normalization boundary is the narrowest maintainable fix because both desktop and targeted input share it, while packaging cleanup remains in its owning scripts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ca011bdc1b9f. LabelsLabel changes:
Label 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 (6 earlier review cycles)
|
Select the hoisted pack contract for the already materialized bundled AI runtime without changing the workspace install layout. Keep private Mac Swift and worker staging outside the published dist tree. Replace the mocked pnpm command assertion with real tarball coverage and prove stage exclusion, source restoration, cleanup and previous-app safety.
|
@clawsweeper re-review The updated head Signed-artifact acceptance, native Mac/Windows CUA 0.22 verification and refreshed CI remain explicit pre-merge work; no native GREEN is claimed yet. The computer wire schema and persistent-store contracts remain unchanged. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Honor the caller's temp volume for disposable Mac worker package, cache, HOME and verification files while keeping installed payloads beside the destination for same-volume publication. Precreate isolated homes before loading the installer and clean both private allocation roots on failure. The post-sign verifier retains the caller's temp location as well. Use one package-tar owner for bundled AI extraction and archive mode normalization. Convert native directory separators to forward slashes so GNU tar does not decode Windows backslashes; preserve archive basenames, working directories, flags, environment and existing timeouts. The Mac regression fails six intended assertions before the repair and passes all fourteen unchanged afterward; complete owner files pass 202 tests. Existing real pnpm coverage and sibling runners pass 139 tests. Native Windows GNU tar and bsdtar probes confirm the path contract. Managed Codex P0 review of the complete candidate found no findings. Signed-app, portable-package and native CUA acceptance follow before land.
|
@clawsweeper re-review The new head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Consume the existing receipt-race repair from #136036 without changing its three-file patch. Initial asynchronous stat can adopt a control file without emitting a watchFile notification; poll persistent state at the existing 50ms cadence instead. Preserve all shutdown deadlines, signals, process ownership and cleanup assertions. The lost-notification regression fails before the repair; 20 focused cases and the real shared-generation release case pass afterward. Selected changed checks and independent Codex review passed. Application/runtime sources and accepted CUA artifacts are unchanged. Ported-from: 827791a
Keep pending desktop source selection until the node becomes available, and refresh the visible picker through existing presence events. Consolidate session lookup generations and remove the duplicate inventory adapter. Retire the availability deadline at transport dispatch while retaining the existing RPC/caller budgets and cancellation authority. Record in-band provider failures through the existing redacted diagnostic error lifecycle, sharing result and invocation observation without changing stream cleanup. Verified with failing-before/passing-after regressions, 47 Desktop tests, 67 launch-owner/sibling tests, 44 diagnostic tests, the full selected static gate, and managed Codex P0 review. Live native acceptance follows in the canonical build; the two Windows provider failures remain unresolved. Follow-up to #136018 and #135582.
Keep pending desktop source selection until the node becomes available, and refresh the visible picker through existing presence events. Consolidate session lookup generations and remove the duplicate inventory adapter. Retire the availability deadline at transport dispatch while retaining the existing RPC/caller budgets and cancellation authority. Record in-band provider failures through the existing redacted diagnostic error lifecycle, sharing result and invocation observation without changing stream cleanup. Verified with failing-before/passing-after regressions, 47 Desktop tests, 67 launch-owner/sibling tests, 44 diagnostic tests, the full selected static gate, and managed Codex P0 review. Live native acceptance follows in the canonical build; the two Windows provider failures remain unresolved. Follow-up to #136018 and #135582.
Keep pending desktop source selection until the node becomes available, and refresh the visible picker through existing presence events. Consolidate session lookup generations and remove the duplicate inventory adapter. Retire the availability deadline at transport dispatch while retaining the existing RPC/caller budgets and cancellation authority. Record in-band provider failures through the existing redacted diagnostic error lifecycle, sharing result and invocation observation without changing stream cleanup. Verified with failing-before/passing-after regressions, 47 Desktop tests, 67 launch-owner/sibling tests, 44 diagnostic tests, the full selected static gate, and managed Codex P0 review. Live native acceptance follows in the canonical build; the two Windows provider failures remain unresolved. Follow-up to #136018 and #135582.
…penclaw#136018) Restore macOS Command shortcuts at the shared CUA normalization owner while preserving Linux and Windows modifiers. Repair native-worker packaging, scratch placement, Windows tar paths, and the racy worker-receipt test fixture. Verified with exact-head CI including native Mac/Windows jobs, canonical package and signed Mac app checks, and actual cloud-placed Mac/Windows CUA through WebVNC. Preserve the recorded model marker correction and unrelated historical failures; advanced held-pointer semantics remain a named follow-up. Related cloud Desktop readiness and worker lifecycle follow-up: openclaw#136297.
Cloud session Desktop availability could remain stale after approval, replace an explicitly selected source during placement changes, or lose a dispatched worker to its discovery deadline. Offline Continue on Gateway also needed to retire the exact old owner while retaining cleanup responsibility, and aborted model calls could be reported as ordinary transport failures. Consolidate Desktop inventory and session updates, retain explicit source/control/popout intent through placement updates, and retire the discovery deadline after dispatch. Move teardown orchestration to its canonical owner, preserve the exact abandonment decision through retries, and keep ordinary reclaim dependent on physical cleanup acknowledgment. Reuse the canonical diagnostic terminal owner and remove the duplicate adapter. Apply the maintainer-approved, exact-version noVNC 1.7.0 repair: consume ignored extended-clipboard payloads so the following framebuffer message is parsed correctly. Load Desktop-only English with the existing lazy viewer, consolidate package-bin resolution, and register the unchanged retention subprocess with the existing compiled test-fixture owner. Proof on head 8211f9f: 57 Desktop unit and 39 real-browser tests; full runtime-change gate plus focused fixture checks; full package/install verification; one real Linux model turn completing five CUA select-all/type cycles with 13 computer results and 20 uninterrupted passive WebVNC observations. Normal reclaim synchronized the exact 300-byte file and completed provider cleanup with no pending reconciliation. Earlier native Windows/macOS, stale-authority and offline-continuation proof retains its original build identity in the PR. The AWS Mac and Dedicated Host remain intentionally retained. Related: #136018; openclaw/crabbox#1724, openclaw/crabbox#1740, openclaw/crabbox#1743, openclaw/crabbox#1782. No configuration, SQLite schema, or public protocol change. See PR #136297 for dependency provenance, review dispositions, production/test LOC classification, and explicitly unresolved diagnostic follow-ups.
…w#136297) Cloud session Desktop availability could remain stale after approval, replace an explicitly selected source during placement changes, or lose a dispatched worker to its discovery deadline. Offline Continue on Gateway also needed to retire the exact old owner while retaining cleanup responsibility, and aborted model calls could be reported as ordinary transport failures. Consolidate Desktop inventory and session updates, retain explicit source/control/popout intent through placement updates, and retire the discovery deadline after dispatch. Move teardown orchestration to its canonical owner, preserve the exact abandonment decision through retries, and keep ordinary reclaim dependent on physical cleanup acknowledgment. Reuse the canonical diagnostic terminal owner and remove the duplicate adapter. Apply the maintainer-approved, exact-version noVNC 1.7.0 repair: consume ignored extended-clipboard payloads so the following framebuffer message is parsed correctly. Load Desktop-only English with the existing lazy viewer, consolidate package-bin resolution, and register the unchanged retention subprocess with the existing compiled test-fixture owner. Proof on head 8211f9f: 57 Desktop unit and 39 real-browser tests; full runtime-change gate plus focused fixture checks; full package/install verification; one real Linux model turn completing five CUA select-all/type cycles with 13 computer results and 20 uninterrupted passive WebVNC observations. Normal reclaim synchronized the exact 300-byte file and completed provider cleanup with no pending reconciliation. Earlier native Windows/macOS, stale-authority and offline-continuation proof retains its original build identity in the PR. The AWS Mac and Dedicated Host remain intentionally retained. Related: openclaw#136018; openclaw/crabbox#1724, openclaw/crabbox#1740, openclaw/crabbox#1743, openclaw/crabbox#1782. No configuration, SQLite schema, or public protocol change. See PR openclaw#136297 for dependency provenance, review dispositions, production/test LOC classification, and explicitly unresolved diagnostic follow-ups.
Related: landed cloud CUA and WebVNC fixes in #135582.
What Problem This Solves
Mac CUA shortcuts silently lost Command:
cmd+shift+leftselected one character instead of the line although the action reported success. Building and testing the replacement native app also exposed worker packaging failures: pnpm rejected a prepared bundle under the isolated linker default, temporary Swift files entered the published package, Mac verification ignored the chosen scratch volume, and Windows GNU tar decoded directory separators as escapes.Why This Change Was Made
The CUA plugin normalizes modifiers against the provider platform before native dispatch. macOS receives
cmd; Linux and Windows retainmeta. Desktop keys, window keys, standalone modifiers and supported window-click modifiers share this owner. Duplicate chord parsing and unreachable drag-modifier handling are removed; the public schema already rejects drag modifiers.The packaging owner already materializes the private AI runtime as a real bundled directory. Its pnpm pack command now selects the matching hoisted mode without changing installation or workspace configuration. Shared pack arguments preserve the npm path. The Mac builder keeps private Swift staging outside published
dist, and separates disposable package/cache/HOME/verification files from installed runtime staging. Scratch honors the caller's existingTMPDIR; installed payloads stay beside the destination so publication remains a same-volume move. Both private roots are cleaned, isolated homes exist before loading the installer, and the previous app remains untouched until verification succeeds.One shared tar caller owns bundled-AI extraction and archive-mode normalization. It retains archive basenames and archive-parent working directories, and converts native directory separators to forward slashes before passing
-C. This prevents GNU tar from interpreting Windows\n/\apath components as escape sequences. Flags, creation environment, package manager and all deadlines remain unchanged.Combined production/tooling changes are net +2 lines; tests/support are net +657. The additional Mac allocation lifetime and cleanup are necessary to separate scratch placement from same-volume publication; the tar refactor itself is net zero. There are no OpenClaw configuration, dependency, wire-schema, protocol, store or migration changes. The automated persistence flag does not apply: modifier normalization changes ephemeral native arguments, not stored state.
User Impact
Documented Command shortcuts reach the Mac with their intended modifier, including window-targeted input. Malformed-input rejection, unsupported actions and background-delivery refusals keep their existing behavior. Native packages include the private AI runtime without temporary Swift files, respect the builder's scratch location and support both Windows tar implementations tested below. No input fallback, permission escalation, larger timeout, skipped verification gate or package-manager substitution is introduced.
Evidence
cmd+shift+left→ screenshot selected one trailing character without changing the text. The pinned CUA 0.22 native modifier parser acceptscmd/command; the relevant input modules are unchanged from 0.21. A fresh WebVNC baseline capture was saved and fully inspected before the new build.TMPDIR.1b43b57fpassed its full canonical JavaScript build and Intel Swift compilation, then failed the existing 300-second tar-check deadline after extraction consumed 242.573 seconds on forced destination-volume scratch. Its CI run passed both macOS Swift jobs but failed the real Windows bundled-AI test. Both failures are preserved; neither is treated as successful artifact acceptance. The repaired candidate71df626apassed its complete canonical JavaScript build in 8m33.1s, including declarations, UI, import/export checks and startup metadata. Its canonical signed Intel app build completed in 20m40s, followed by independent strict verification of the frozen app, CUA 0.22, embedded Node, MLX and required resources. All four native worker startup checks passed before and after signing. The unchanged tar checker completed in 13 seconds, including 1.9 seconds of extraction. The transfer ZIP also passed complete content/mode/link round-trip and strict signature verification. The matching portable package passed canonical integrity, exact build/worker-byte checks, source restoration and native-app exclusion. Both artifacts are accepted. The strictly signed Mac app and the portable Windows package were subsequently installed and their actual source/build/native-driver identities verified; the Windows installation and doctor checks passed.verifydispatch.827791a4760, unchanged. Node can adopt a control file during its initial asynchronous stat without delivering a watch notification. The new persistent-file regression failed against the old fixture at its original 10-second deadline, then passed with direct state polling at the unchanged 50 ms cadence. All 20 focused cases plus the real shared-generation release case passed, along with the selected changed checks and independent Codex review. The final head16fb0f49differs from the accepted71df626anative artifacts only in those three test/support files; all 36,577 other tracked inputs and accepted artifacts are unchanged. No new native-build identity is claimed.71df626a, while security-hook fetching failed before scanning and the receipt-race test failed. That run was superseded by the real test repair. Exact-head CI for16fb0f49is now successful: both Mac jobs and both Windows jobs passed, followed by the requiredopenclaw/ci-gateat 12:15 UTC on September 2. The original security job failed during PR-history fetching before scanning. After the run became terminal, one normal job retry passed history fetching, leaked-credential scanning, private-key detection and dependency auditing on the workflow's GitHub-hosted Ubuntu runner. This proves the retry path, not a repair of the original Blacksmith Git transport failure.71df626aartifact with CUA 0.22: the real placed worker reporteddarwin/x64and its assigned workspace, took a fresh screenshot, clicked using that frame, sentcmd+shift+left, and returned a fresh screenshot showing the complete second line selected. Independent WebVNC observation confirmed the selection; the first line was unchanged. A subsequent real typing turn preserved both baseline lines and visibly read back its exact marker. That typing probe did not satisfy its separate physical-line-ordinal expectation because a blank line remained; no newline repair is claimed. Both workers were reclaimed, their known temporary states were removed and workspace proof files reconciled.777b4089; its CUA plugin and the three packaging owners are byte-identical to16fb0f49. The placed worker reportedwin32/x64and its assigned workspace. Native screenshots delivered 1024×768 JPEG images and fresh frame IDs; clicking Increment changed Count 0 to 1. The first model turn supplied an older marker to the type tool and falsely claimed the requested value in its final answer. That failed marker check is preserved: the actual typed text matched the tool argument. One explicitly corrective turn used a fresh screenshot, coordinate click, Ctrl+A and one type action; WebVNC independently confirmed the complete requested marker in both field and display while Count remained 1. Both actual worker processes and their reported temporary state directories were absent after normal reclaim, capacity returned to zero occupied slots, and the unique workspace JSON reconciled byte-for-byte against the actual write serialization. No shell GUI input, clipboard, accessibility write, fixture reset, or native VNC viewer was used.71df626anative app. Its actual worker and temporary state disappeared after normal reclaim while the native app/node stayed alive. The earlier Mac availability failure and two Windows provider failures remain preserved; this does not establish a network root cause. Shared launch-deadline, provider-error diagnostics and Desktop readiness repairs continue separately in #136297.cmd/command; their exact Git blobs match the inspected source. This completes the native-contract and visual-artifact Rank-up move. Accept the documented native compatibility evidence under the requested autonomous landing. A fresh independent Codex P0 review of the complete 15-file16fb0f49PR patch also passed without findings. The automated stored-data annotation is inapplicable:actions.tsnormalizes transient native-input arguments and does not change serialization, persistent storage, schemas or migrations.Named follow-up: CUA held-pointer modifier contract. Accepted held-button modifiers and movement semantics need separate ordered gesture/cleanup proof at the CUA boundary. This repair does not change that contract or emulate unsupported input.
Mac Command proof through WebVNC
Both captures show the same synthetic document and accepted CUA 0.22 app. The first is the baseline immediately before the fresh command; the second shows the complete line selected by that command. No native VNC viewer was used.
Before the fresh Command action:
After
cmd+shift+left:Windows CUA proof through WebVNC
The first capture is the clean synthetic baseline. The second follows the two explicitly described turns above, including the model's corrected marker selection. It is not presented as an uninterrupted first-attempt success.