Repository navigation
fix(mcp): accept signed coordinates on secondary displays - #963
rudycelekli wants to merge 1 commit into
Conversation
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
|
🦞👀 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. |
PR SummaryLow Risk Overview Validation is consolidated into a single symmetric range check (replacing separate non-negative and upper-bound guards). Drag still skips this bound when Adds Reviewed by Cursor Bugbot for commit 58d7dc5. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Codex review: needs real behavior proof before merge. Reviewed October 5, 2026, 9:59 AM ET / 13:59 UTC. ClawSweeper reviewWhat this changesThe PR allows MCP mouse moves and foreground drags to use negative secondary-display coordinates while retaining the ±20000 coordinate limit. Merge readiness⛔ Blocked before merge - 2 items remain This remains a useful, focused fix: current main and v4.8.0 still reject valid signed coordinates. No introduced correctness defect was found, but real desktop behavior proof is required before merge. Priority: P2 Review scores
Verification
How this fits togetherPeekaboo's MCP pointer tools translate agent requests into desktop mouse movement and drag operations. Coordinate validation runs before requests reach the native automation services. flowchart TD
A[Agent pointer request] --> B[MCP move or drag tool]
B --> C[Coordinate validation]
C --> D[Foreground consent or background window checks]
D --> E[Desktop automation service]
E --> F[Native pointer events]
F --> G[Action response]
Before merge
Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep the symmetric coordinate validation and verify that real MCP move and foreground drag operations reach their intended secondary-display targets. Do we have a high-confidence way to reproduce the issue? Yes, from source: main rejects an MCP move to '-100,200' or a foreground drag with negative endpoints before dispatch. This read-only review did not execute native desktop automation. Is this the best way to solve the issue? Yes. Widening the existing guards symmetrically is a focused repair of the documented global-coordinate contract and preserves the existing delivery checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 155be0832821. 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
|
|
I checked the concrete environment prerequisite for the requested physical secondary-display proof. The native macOS readiness probe reports Screen Recording=true and Accessibility=true, but exactly one display with frame (0,0,1728,1117); no secondary display with a negative desktop origin exists here. The current handler tests establish parameter acceptance and recorded dispatch only, and I am not treating them as observed pointer movement or foreground dragging. The remaining proof requires an actual secondary display positioned left/below the primary and a current-head MCP move plus foreground drag with observable target diagnostics. That physical proof remains pending; no code or proof override is requested. |
|
Thanks for reporting rejected signed coordinates. Both the actual move and drag handlers reproduce the refusal on main. Owner PR #994 accepts signed coordinates within the existing magnitude limit, with exact recorded-delivery regression tests and updated docs. Closing this duplicate in favor of that pending successor; physical secondary-display input is not claimed as tested. |
Signed global coordinates were rejected by the MCP move and foreground drag handlers, even when they fit the existing coordinate magnitude limit. Accept signed coordinates for both paths while preserving the bounds and target/foreground guards, with exact recorded-delivery regression tests. This finishes the verified claim from #963 and retains contributor credit. The original consolidation also covered #960, #970, #973 and #989. Those fixes have since landed separately on main; this branch has been reconciled and no longer duplicates their implementation. It keeps stronger explicit test-context isolation, complete-detection replacement coverage, and documentation of the now-landed motion and snapshot behavior. The integrated candidate passed 69 native tests across nine Core/SDK suites, strict SwiftLint and SwiftFormat. Reconciled files remain byte-identical; independent Codex review is clean through P2 and final exact-head native CI and CodeQL pass. Pointer delivery is synthetic and does not claim physical secondary-display proof. Co-authored-by: Rudy Mizrahi Celekli <47457359+rudycelekli@users.noreply.github.com>
Change
Secondary displays left of or above the primary display use negative global coordinates. Move and foreground Drag incorrectly reject these valid coordinates even though background Drag and global coordinate geometry support them. Admit signed coordinates symmetrically within the existing magnitude bound.
Observed behavior and regression proof
Native actual MoveTool.execute and DragTool.execute tests with injected owned services reproduce the failure: three signed Move targets and one signed foreground Drag are refused before. After the tool handlers succeed and retain the requested target. NaN, infinity and coordinates outside ±20000 remain refused. Background exact-window admission is unchanged.
Verification
AI assistance was used for investigation, implementation and regression tests.