Fix macOS action cursor updates and session-scoped cleanup - #381
Merged
Merged
Conversation
Tryanks
marked this pull request as ready for review
September 8, 2026 11:51
Tryanks
force-pushed
the
fix/359-macos-cursor-lifecycle
branch
from
September 8, 2026 12:00
69bd0aa to
07006fb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #359.
On macOS, the first action marker appeared but later moves and drag endpoints stayed at its original position. Calling the AppKit animator with
setFrame:display:delivers subsequent positions; untargeted keyboard actions now use the target window center for feedback. Hidden-panel reveal and drag-start placement use a zero-duration frame animation to supersede any older animation still running after hide/show.Feedback expires one second after submission (including callback delay), with retirement checked every 200 ms. Stop, turn completion, request cancellation/failure, disable, session shutdown and mounted-service teardown invalidate feedback. Closed or hidden target windows retire it. Publication revisions reject delayed callbacks; session/request ownership prevents one session's Stop or an older request's cleanup from clearing another session's newer marker. Runtime uses existing per-session MCP registrations, following Preview's pattern. Registration metadata has no Drop cleanup. Foreground gating and mouse passthrough remain in the native owner.
Validation:
cacab223d81d6cc23badc81c1bfbefc827fccb62. Baseline click(400,466)then move(800,666)left the native frame at(396,461); fixed move reached(796,661). Input delivery and marker movement were checked separately.('move', [{'Height':40,'Width':40,'X':196,'Y':461}], (596,661)). Restoring the fix passed the full sequence. Background hide, foreground return within lifetime, background action without activation, expiry, disable and re-enable passed.--all-targets --locked -- -D warnings), build and tests; iOS simulator, Web and Android checks withRUSTFLAGS='-D warnings'; dependency hygiene pass on final integrated head07006fb7e. Commands:cargo fmt --all --check,cargo clippy --workspace --all-targets --locked -- -D warnings,cargo build --workspace --locked,cargo test --workspace --locked; cross-target commands match the linked CI workflow. Android uses CI NDK 27.1.12297006. Localcargo machetetreats its subcommand as a directory; directcargo-machete .(0.9.2) passes.The opt-in native regression passed on pre-integration head
69bd0aade6796125f2d89a2a3d0dc2ad8b9f0848(production overlay unchanged on final integrated head07006fb7e5f970fbbdbb585fe37a9405379ef83f):cargo test -p computer-use-mcp --test macos_overlay --locked -- --ignored. On preceding headdcfb8e92f, it exposed an actual in-flight animation overwriting the new marker after move → hide → new click; applying the zero-duration animator correction made the same test pass. The test checks actual native move/drag frame deltas, rapid hide/show, passthrough, unchanged foreground, actual CG window visibility before/after native close, and production rejection of late feedback for that closed window. Default workspace tests explicitly report this desktop test ignored. The temporary GUI example was removed. Final integrated source, native evidence and exact-head CI results were independently reviewed and accepted.No other-platform native behavior or multiple-display verification is claimed. The build emits the existing large
__eh_framelinker warning and the dependencyblock 0.1.6future-compatibility notice. No new localized UI strings were introduced; DESIGN and the computer-use lifecycle documentation describe the behavior. Evidence screenshots and exact red/green logs are retained locally under/tmp/tcode-359/for lead review.Final integration: rebased onto
cd83cdda9cb01f0a22ef9d8a57f85f219c71725e, preserving merged #380 usage and #382 sidebar behavior. All three commits are patch-equivalent ingit range-diff; no conflict resolution or semantic changes were needed. Runtime retains the newContextCompacted(_)event shape and adds only session feedback cancellation atTurnCompleted; DESIGN retains both merged sections. Combined-head formatting, full workspace Clippy/build/tests, dependency hygiene and iOS/Web/Android checks all pass. Workspace tests report 1101 passed, zero failed, five ignored, plus the explicitly ignored native runner. Exact-head CI run 34223690533 passed all six jobs on07006fb7e5f970fbbdbb585fe37a9405379ef83f.