Repository navigation
Conversation
📝 WalkthroughWalkthroughAdds a macOS agent pointer overlay with motion planning, coordinate conversion, pressed and pulse rendering, and lifecycle cleanup. Integrates pointer feedback into clicks, secondary actions, scrolling, dragging, and synthetic event delivery while refactoring model image capture. Adds synchronized socket shutdown and connection ownership handling, stable development bundle authorization, guarded accessory activation, and expanded native source-safety tests and guardrails. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
thanks for the PR will review it! |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
native/computer-use-macos/Sources/OrcaComputerUseMacOS/main.swift (2)
2381-2382: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winHonor Reduce Motion for the drag path.
The unconditional ten-point path still performs intermediate synchronous UI updates;
followActiononly removes its sleep. Use a single destination point when Reduce Motion is enabled, or route dragging throughPointerMotionPolicy.
3626-3652: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy liftTerminate only when the disconnecting connection is still the owner.
Every authenticated handshake receives an independent
ownsHelperLifetimeflag. A stale owner’s deferred termination can therefore kill the helper after a replacement connection has already completed its handshake. Track owner identity or generation at listener scope and compare it before terminating.
🧹 Nitpick comments (1)
native/computer-use-macos/Tests/OrcaComputerUseMacOSTests/PointerOverlaySourceSafetyTests.swift (1)
26-36: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueDeduplicate source loading logic.
The
executableSourcemethod duplicates the path resolution logic found inAgentEntrypointSourceSafetyTests.mainSource(). Consider extracting this into a shared test helper (for instance, an extension onXCTestCase) to eliminate duplication and simplify future test additions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 14654f6d-aaad-4ea2-882c-81243a7fdabd
📒 Files selected for processing (8)
config/scripts/verify-computer-native.mjsnative/computer-use-macos/Sources/OrcaComputerUseMacOS/AgentPointerOverlay.swiftnative/computer-use-macos/Sources/OrcaComputerUseMacOS/main.swiftnative/computer-use-macos/Sources/OrcaComputerUseMacOSCore/AgentConnectionOwnership.swiftnative/computer-use-macos/Sources/OrcaComputerUseMacOSCore/PointerMotionPolicy.swiftnative/computer-use-macos/Tests/OrcaComputerUseMacOSTests/AgentConnectionOwnershipTests.swiftnative/computer-use-macos/Tests/OrcaComputerUseMacOSTests/PointerMotionPolicyTests.swiftnative/computer-use-macos/Tests/OrcaComputerUseMacOSTests/PointerOverlaySourceSafetyTests.swift
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
native/computer-use-macos/Sources/OrcaComputerUseMacOS/main.swift (1)
2377-2396: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winReset the pressed overlay state when drag event delivery throws.
After Line 2379, any throwing
mousecall bypassesPointerVisibility.release, leaving subsequent overlay rendering pressed. Add adefercleanup with a non-pulsing cancellation/reset path; retainrelease(at:)only for successful completion.
🧹 Nitpick comments (1)
native/computer-use-macos/Tests/OrcaComputerUseMacOSTests/AgentEntrypointSourceSafetyTests.swift (1)
5-18: 🔒 Security & Privacy | 🔵 Trivial | 🏗️ Heavy liftReplace raw substring checks with syntax-aware or behavioral validation. Both test files can accept comments/string literals as evidence and may miss equivalent source forms, weakening the intended security regression coverage.
native/computer-use-macos/Tests/OrcaComputerUseMacOSTests/AgentEntrypointSourceSafetyTests.swift#L5-L18: validate authorization and caller-path cleanup through parsed source or behavior-level tests.native/computer-use-macos/Tests/OrcaComputerUseMacOSTests/PointerOverlaySourceSafetyTests.swift#L5-L23: validate overlay isolation, target-scoped capture, and PID-targeted delivery without relying solely on exact substrings.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 47cf2cf1-a216-4708-aeaf-255ae5ffb709
📒 Files selected for processing (10)
config/scripts/verify-computer-native.mjsnative/computer-use-macos/Sources/OrcaComputerUseMacOS/AgentPointerOverlay.swiftnative/computer-use-macos/Sources/OrcaComputerUseMacOS/main.swiftnative/computer-use-macos/Sources/OrcaComputerUseMacOSCore/AgentConnectionOwnership.swiftnative/computer-use-macos/Sources/OrcaComputerUseMacOSCore/PointerMotionPolicy.swiftnative/computer-use-macos/Tests/OrcaComputerUseMacOSTests/AgentConnectionOwnershipTests.swiftnative/computer-use-macos/Tests/OrcaComputerUseMacOSTests/AgentEntrypointSourceSafetyTests.swiftnative/computer-use-macos/Tests/OrcaComputerUseMacOSTests/ExecutableSourceFixture.swiftnative/computer-use-macos/Tests/OrcaComputerUseMacOSTests/PointerMotionPolicyTests.swiftnative/computer-use-macos/Tests/OrcaComputerUseMacOSTests/PointerOverlaySourceSafetyTests.swift
🚧 Files skipped from review as they are similar to previous changes (2)
- native/computer-use-macos/Sources/OrcaComputerUseMacOS/AgentPointerOverlay.swift
- config/scripts/verify-computer-native.mjs
Fixes #9126
Summary
When Orca performs macOS Computer Use actions through Accessibility APIs or process-targeted Core Graphics events, the action succeeds without moving the native pointer, so the person watching cannot see what the agent is doing.
NSWindowsharing flagscom.stablyai.orca.dev) in addition to the existing per-worktree dev prefix, enabling live validation through the packaged helperScreenshots
Orca model screenshots intentionally omit this UI: both ScreenCaptureKit and the existing Core Graphics fallback capture only the selected target window, while the pointer is a separate helper-owned panel. This is a guarantee of Orca’s capture pipeline, not a claim that other screenshot or recording software cannot capture the overlay.
Manual visual validation was performed in the macOS dev build against Calculator. The agent cursor visibly moved through clicks on 7, 3, and All Clear while the Calculator display changed
0 → 7 → 73 → 0; the native macOS pointer did not move.Testing
pnpm lint— branch Swift files are outside the TypeScript lint paths; the current-main run stops on 2 untouched switch-exhaustiveness errors innative-chat-session-option-labels.tsandskill-freshness-group.tsxpnpm typecheckpnpm test— 31,123 passed and 46 skipped; 23 unrelated local failures in untouched suites: 2 relay environment assertions caused by duplicated inherited Git config variables, 5 PTY shell-ready expectations, and 16 resource-sensitive relay/Git/SSH/OMP/node-pty timeouts or fd assertions while the dev app was runningpnpm build— desktop, web, universal macOS Computer Use helper, and notification helperpnpm verify:computer-native— 52 macOS Swift tests pass; Linux provider syntax/argument guardrails pass; app bundle/signature verification passes. Windows PowerShell parse/handshake checks were skipped locally becausepwshis not installedAI Review Report
Reviewed the complete diff with Codex against the repository checklist:
postToPid. The dev bundle authorization assertion was moved into the existing agent-entrypoint safety suite instead of being mixed into pointer behavior tests.Security Audit
ignoresMouseEvents = true; its panel cannot become key or main and its view is excluded from the accessibility hierarchy.sharingType = .none.postToPid(pid); verification rejects global event-tap posting andCGWarpMouseCursorPosition.com.stablyai.orca.devbundle id is added to the existing trusted dev-id set because the shared launcher uses that value; the existing peer command/path validation remains unchanged.Notes
CGWindowListCreateImagemacOS 14 deprecation warning remains unchanged and is unrelated to this PR.X (Twitter): @dbachko
Generated with Codex
ELI5
When Orca’s agent clicks or drags on the Mac without moving your real mouse, you couldn’t see what it was doing. This adds a separate on-screen pointer overlay that shows agent actions so you can follow along.