Repository navigation
fix(computer-use): resolve macOS AX/drag/paste/capture bugs and chat UI flicker - #7510
Merged
Merged
Conversation
jackwener
approved these changes
Dec 2, 2026
jackwener
left a comment
Member
There was a problem hiding this comment.
An indexed window click could start but was rejected when the controller resumed it, because that step only accepted application slots. Both steps now accept window slots and observed application slots from the same epoch.
I reproduced the rejection with the previous controller logic. Four isolated Rust checks passed with the fix, including rejection of stale targets. The required GitHub check passed, and this commit merges cleanly with fd7f3edf. I did not rerun the live macOS click.
Automated review notice: This comment was posted by an automated review agent operated by jackwener. It is not an independent human review and does not replace one.
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.
Summary
Fixes macOS Computer Use AX, screenshot/capture, drag/paste UX, and chat UI flicker issues found during live end-to-end testing:
macOS AX & Capture (
maka-agent/cua65fb74db+platform/computer-use)Slot::Windowclicks no longer route throughIntent::Menuprojection;AXMenuBarItemwindow clicks preferAXPressoverAXPick.scroll(index):clickable_pointnow computes the visible intersection center (CGRectIntersection(frame, clipped)) when the full element center lies outside its clipped viewport (fixing silent no-op scrolls on tallAXTextAreadocuments), while preservingcenter_is_visiblefor reveal logic.bringToFront(upstreamcua65fb74db):SCContentFilter(display:including:[window])+ display-relativesourceRectwhen contained within a display, preventing protruding attached child windows (e.g. macOS Writing Tools or Color Popover) from shrinking/offsetting screenshot coordinates while still capturing occluded windows cleanly.bringToFrontignores untitled non-AXStandardWindowattached child windows overlapping/near the focused target window instead of falsely reporting focus stolen.cua65fb74db): Reduceddrag_at_xy_backgrounddrag-session polling overhead (4ms→25ms+ sleep-before-poll), cutting ~1.25s of redundantCGWindowListCopyWindowInfoIPC per drag.app.drag(from, to, options?): AddedDragOptions(deliveryMode,button,modifier,durationMs,steps) so window-manager drags (moving titlebars, resizing edges, cross-window drags) work explicitly viadeliveryMode: "foreground"and allow finite out-of-windowtocoordinates.paste: Plain-text paste tries backgroundAXSelectedTextreplacement first (no focus steal, no clipboard touch); clipboard paste tries backgroundCmd+Vto the bound window before falling back to temporary foreground activation.getScreenshot()preserves retained macOS AX elements (sogetAXState() -> getScreenshot() -> click(index)no longer throwsstale_element).getScreenshot()/getAXStateAndScreenshot()printScreenshot: WxH pxpixel dimensions alongside the emitted image.platform/computer-use/locales/docs/api.*.mdfiles and regenerated third-party notices.Chat UI Flicker on
cua_replplugins/agent/state/src/computer/sql.rs: Keep an already-authorizedagent_computer_activitiesrow pinned across subsequentSubjectObservedfacts (and promote onAppAuthorizedwhen not yet authorized), eliminating theComputerAppsempty-list flash that unmounted/remounted the 36pxComposerDetailsshelf and bounced the chat list on everycua_replcall.platform/computer-use/src/preview.rs&plugins/workspace/workspace-computer/native/src/evaluate.rs: Skip redundantPreviewRegistryrevision bumps when re-registering the already-active identical target, and only notifypreview_changedwhen preview authority scope actually changes.plugins/agent/conversations/ui/SessionSurface.tsx: GuardcomputerViewport.setwith width/height equality so parent relayout does not fire spurious signal writes.Verification
cargo test -p maka-computer-use --features native-desktop --lib(166 passed, 0 failed)cargo test -p maka-agent-state --lib(108 passed, 0 failed, including newauthorized_activity_stays_pinned_across_subsequent_subject_observed)cargo test -p maka-computer-native --lib(5 passed, 0 failed)cargo clippyclean onmaka-computer-use,maka-computer-native,maka-agent-statetsc -p products/maka/bundle/tsconfig.json --noEmitpassedbiome check,cargo fmt --check,node scripts/ci.mjs check migrations,node scripts/rust/notices.mjs checkall passed