Repository navigation
fix(cua): correct desktop frames, text input, and Settings sizing - #135582
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 11:35 PM ET / September 2, 2026, 03:35 UTC. ClawSweeper reviewWhat this changesThis PR fixes CUA screenshot coordinate mapping, multiline WebVNC input, macOS Settings resizing, and related regression tests and documentation. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep this maintainer-authored, maintainer-labeled PR open for normal maintainer review. The source repair and focused regressions look coherent, but final-head platform evidence is still described as pending and current-main/dependency contract comparison could not be completed from this offline promisor checkout. Priority: P1 Review scores
Verification
How this fits togetherCUA captures a desktop image for the model and maps later actions back to native desktop coordinates. The related macOS and WebVNC changes keep Settings controls reachable and preserve pasted text through the browser desktop viewer. flowchart LR
A[Native desktop] --> B[CUA screenshot capture]
B --> C[Encoded image frame]
C --> D[Action coordinate mapping]
D --> E[Native desktop input]
F[Settings window] --> G[Resizable settings panes]
H[WebVNC text input] --> E
Decision needed
Why: The author is a repository member and the PR has a maintainer label; the remaining judgment is evidence sufficiency across native platform behavior, not an automated repair choice. Before merge
Agent review detailsSecurityNone. PR surfaceSource -9, Tests +269, Docs +10, Other +69. Total +339 across 18 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Attach redacted final-head native Settings and CUA behavior evidence, confirm the Rastermill and noVNC contracts in a dependency-complete environment, then complete normal maintainer review. Do we have a high-confidence way to reproduce the issue? Yes, from source: the preceding provider resized only by width, while the core projected portrait images by their longest edge, allowing frame dimensions and model-visible dimensions to diverge. The new registered-handler regression covers that path, although this reviewer did not execute it. Is this the best way to solve the issue? Yes, provisionally: encoding one bounded bitmap at the CUA capture owner and retaining one coordinate mapping avoids the former two-stage mismatch. Final platform evidence and direct dependency contract inspection remain necessary before a merge recommendation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 48c93976f19f. 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)
|
Keep reference caps separate from delivered screenshot dimensions and preserve frame, geometry, and generation checks. Let macOS Settings use available window space and translate WebVNC line breaks through the existing keyboard owner. Add real frame, metadata, keyboard, and compact-window regressions. Prime the startup test socket without changing readiness timing.
|
@clawsweeper re-review The production repair and its regressions are now pushed. This also includes the shared computer-frame mapping and WebVNC line-break failures found in the same desktop flow. Normal CI and signed-app visual proof are in progress; the PR body describes the owner boundaries and the confirmed failing-before cases. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Preserve recent matching test crash reports in failed native CI logs before temporary HOME cleanup. Keep execution isolation, process and Keychain lifetimes, exit results, and deadlines unchanged. Validate failure-only output and report count/byte limits through the fake native launcher.
Keep the discovery cancellation handle outside observation and use ordinary synchronous cleanup. Task cancellation is thread-safe; the actor-isolated path aborted in SwiftUI disposal on the macOS 26.3 concurrency runtime. Preserve the ordered Settings resize regression and existing cancellation. Observe the transient composer cue before the browser gesture while keeping live focus, text, styles and expiry assertions. Correct the documented ARD credential lifetime without changing authentication behavior. Native regression: exact-head CI 33577461251 captured the invalid-free stack; next native CI must prove the repair. Local pinned Swift lint/format and all 18 selected UI/docs checks pass. Sidebar browser cases and owner tests pass.
The temporary collector recovered the native crash stack, but publishing raw report text would add an unnecessary CI disclosure surface. Remove the collector and its sole coverage after diagnosis, preserving the original launcher isolation, exit handling, and resource cleanup.
Encode one bounded bitmap before issuing a frame, then map coordinates against its actual dimensions. Preserve both the core capture-cap and direct returned-width conventions for that same image. Exercise registered snapshot/action handlers with real encoded images across compact, portrait, Retina, and one-pixel frames. Document the shared execution identity and direct coordinate contract.
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.
…enclaw#135582) Encode one bounded desktop bitmap and use its actual dimensions for direct and agent coordinate actions. Preserve current-frame, geometry, generation, and bounds checks. Fit macOS Settings to smaller displays, avoid the discovery teardown actor hop, and translate WebVNC line breaks through the existing noVNC keyboard owner. Includes regression and ordered native UI coverage, canonical signed Intel packaging, final-candidate Mac and Windows placed-worker/WebVNC proof, workspace reconciliation and physical cleanup. CI 33585757846 attempt 2 passed. Production net -9 lines; no new configuration, protocol, persistent data, or dependency surface. Mac baseline-caret and Command-modifier follow-ups, the unproved control-WebSocket disconnect, and the public-media access limitation remain explicitly documented in the PR.
What Problem This Solves
A fresh screenshot could still be followed by a rejected or mis-scaled computer action. On a 1024 × 768 Mac, Settings also extended beyond the display and hid controls, while pasted WebVNC text lost its line breaks.
Why This Change Was Made
The CUA capture owner now produces one image bounded by its longest edge. Frame mapping uses that image’s actual encoded dimensions. Both the requested cap and the returned image width identify this same frame, preserving direct
screen.snapshot→computer.actcallers as well as the agent tool. This absorbs the direct-call review finding without adding a protocol field or a second scaling path. Compact, portrait, Retina, rounded, and one-pixel captures are covered. Geometry, generation, current-frame, and coordinate-bound checks remain intact; core metadata honors the encoder’s minimum one-pixel dimension.The Settings root and Window scene no longer impose duplicate 1120 × 790 fixed frames. The preferred initial size remains, while the existing panes can resize and scroll. Native CI exposed a separate Swift backdeployment crash when SwiftUI discarded
GatewayDiscoveryModeloutside a task. Its cancellation-only task handle is now excluded from observation and cancelled in ordinary deinitialization, preserving cancellation without that actor hop. The temporary crash collector used to diagnose it was removed.WebVNC converts LF, CRLF, and CR to Enter through noVNC’s existing keyboard owner. Ordinary keys and UTF-16 handling are unchanged. The ARD documentation now describes the existing per-panel, same-node in-memory credential lifetime accurately; this PR changes no credential storage.
Two existing fixtures were repaired without extending production deadlines or animations: startup readiness establishes its socket before its 50 ms / 500 ms budgets and still observes an unavailable health reply before recovery; the sidebar test records the 600 ms attention cue at the browser event boundary instead of relying on a later host poll. Both retain their behavioral assertions.
No configuration, protocol, persistent data model, or dependency surface is added. Frame IDs and capture dimensions are transient execution state, not a storage migration. Against the PR merge base, production is +35/−44 (net −9), tests net +338 (including the desktop-suite move), and docs net +10.
Evidence
448edc81b4ab: scroll-retention first, then resize, 2/2 XCTest cases in 7.627 seconds. Native tests also passed 1,911 Swift Testing cases; SharedKit passed 1,571 tests. Final native job. The actual CI checkout was merge2432aee1d9b8e7d71190f1716975dd072343b456, with raw PR head448edc81b4abas its second parent.@novnc/novnc1.7.0 keyboard was exercised, not only a mock. The bounded trace below records key-down symbols; every generated key had a balanced release. Unicode and physical Enter traces were unchanged.a+ LF +b0x61, 0x100000a, 0x620x61, 0xff0d, 0x62a+ CRLF +b0x61, 0x100000d, 0x100000a, 0x620x61, 0xff0d, 0x62a+ CR +b0x61, 0x100000d, 0x620x61, 0xff0d, 0x62The dependency source was inspected locally:
Keyboard._handleKeyDownemits press/release forcode: Unidentified;getKeysymresolves Enter through the special-key table; Return is0xff0d. This closes the earlier reviewer’s dependency-inspection gap.The focused commands below ran with Node 24.20.0 from the frozen candidate checkout; the first was captured red before the owner repair and passed after it.
User Impact
Fresh CUA screenshots now remain valid for coordinate actions on compact, portrait, Retina, and rounded-size captures. Settings fits a 1024 × 768 remote Mac, and WebVNC pasted line breaks reach the remote editor. Existing provider selection, input permissions, current-frame fencing, and direct screenshot callers keep their contracts.
Final candidate and live proof
The full canonical Intel build at
448edc81b4abf606206a6d8a0b29a01a4cc917b2passed, including MLX, strict Developer ID signing, package inventory, and both bundled-worker readiness modes. The separately verified archive was installed on the retained Intel Mac through a normal app quit, signed replacement, and launch. The isolated Gateway and clean Windows installation use the portable artifact built from the same unchanged source and dist. All six npm lifecycle hooks completed, and the Windows CUA doctor check reported no findings.execwith no overridden working directory and returneddarwin/x64and its actual remote workspace. Fresh screenshot → coordinate click → key → type → screenshot all succeeded, with the new synthetic marker independently visible through WebVNC. The unique workspace JSON reconciled exactly; seven samples observed the actual running worker. After normal reclaim, both completed test workers were gone, the typing worker's reported temporary state directory was absent, the slot was free, and the app/native node remained running.End, which scrolls on macOS instead of moving the caret to the end. Therefore strict preservation of the original baseline is not claimed, even though the input primitives and marker succeeded. A separate harmlesscmd+shift+leftcheck reproduced a pre-existing Command-alias bug: one character selected instead of the line. That adapter repair is a separate reviewed follow-up, not represented as fixed by this PR. One earlier bundle install lost the native control WebSocket; the same app/node reconnected after two seconds and a new placement succeeded. No retry, timeout, permission, or transport-policy workaround was added, and the disconnect's underlying cause remains unproved.win32/x64in the placed workspace. Sixteen physical samples matched the ACK-bound running worker, native node, session, placement generation, and owner epoch. Normal reclaim completed; the worker and its exact temporary state directory/database were absent, with the slot free.Final CI run 33585757846, attempt 2 is successful, including the required
openclaw/ci-gate. Attempt 1 completed 233 jobs without failures while two native jobs remained unassigned; one normal failed-job rerun assigned native runners and completed successfully. No runner policy or test gate changed.The live artifacts intentionally pin raw head
448edc81b4aband CUA Driver 0.21.0. The actual successful CI merge checkout already includes main's CUA 0.22.0 and native dependency updates. The changed production owners remain applicable on current main, Rastermill 0.3.2 and noVNC 1.7.0 are unchanged, and the relevant CUA capture/input contracts were inspected across both exact tags. A single current-main signed rebuild and native Command-key retest will follow; this is not a claim that the raw-head live artifacts already contain 0.22.0.Dependency contracts and review closure
The installed Rastermill 0.3.2 implementation and types were inspected:
resize.maxSidebounds the longest edge,enlarge: falsepreserves a smaller native bitmap, encoded output reports actual dimensions, and dimensions are clamped to at least one pixel. The producer uses that one returned bitmap for frame issuance and metadata. Tests cover direct returned width and agent-requested cap against that same frame; no second image/scaling interpretation remains. The installed noVNC 1.7.0 keyboard contract was inspected and exercised as detailed above.The review's serialized-state flag refers to
CuaFrameState: it is created insideopenExecution, retained only by that provider execution, and discarded on close.frame.tsdoes not write a persistent store, file, or SQLite schema. The stablev2026.8.1directscreen.snapshot→computer.actcontract accepts the actual returned image width; that behavior is preserved. No migration or stored-data version change is involved.The latest ClawSweeper review's requested final-platform proof and dependency inspection are addressed above, with the explicit Mac fixture and follow-up limits retained. Its optional visual rank-up evidence was captured and every full saved image was inspected. Publication remains a concrete gap: GitHub attachment upload was unavailable, and the approved artifact upload succeeded but anonymous retrieval returns HTTP 403 / Cloudflare 1010. The four sanitized before/after images are retained with content hashes; no inaccessible URL is presented as working public evidence. No account, access-policy, or hosting change was made to bypass that failure. The newline before/after captures use different synthetic strings and prove line-break behavior, not byte-identical text comparison.
Named follow-ups remain the Mac Command modifier adapter, pre-existing native Peekaboo direct-portrait mapping, broader actor-isolated teardown coverage, and connection-close diagnostics. An ordinary closed WebVNC stream still requires its visible Reconnect action. The earlier optional desktop E2E attempt stopped before assertions and is not counted as a pass.