Repository navigation
feat: hover and press-and-hold - #45
Merged
Merged
Conversation
iamnbutler
force-pushed
the
feat/hover-press
branch
from
October 17, 2026 02:14
b193451 to
934948f
Compare
This was referenced Oct 17, 2026
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.
Adds
desktop_hoveranddesktop_press.desktop_hover
Moves the real pointer over an element (its observed center) or a normalized screenshot point, so tooltips, hover menus and hover states appear. Tracking areas follow the physical pointer, so background delivery can't do this; this is the approved foreground exception, and the tool description and docs say so.
moveMouseWithOutcome(to:duration: 250, steps: 15, profile: .linear).completedwithpointer_moved: true; otherwise it isunknownwithDESKTOP_ACTION_UNVERIFIED.desktop_press
Presses and holds an element or point for
duration_ms(1–10000, default 1000) with the left or right button, then releases in place. It uses the Bridge's exact-window held-pointer lifecycle, which is background delivery and doesn't move the pointer:createExactWindowHeldPointerOwner.beginExactWindowPointerHold(expiry = duration + 2 s).releaseExactWindowPointerHold.disconnectExactWindowHeldPointerOwner. This always runs, including on errors, and releases any button still down.The result reports
release(the termination reason). Anything other thanreleased(for examplewindowChangedorexpired) isunknown. The host also releases at expiry if the client dies.The runtime's
allowedOperationsgains.moveMouseand the five held-pointer operations.Overlay
moveMouseWithOutcomealready sendsshowMouseMovement, so the agent cursor glides to the point just before the real pointer moves there.peekaboo-press.patch(end of the stack) sends long-press feedback before a hold begins, and a single click at the receipt point after a release, revoke or disconnect ends a hold.AgentCursornow:Tests
npm run checknode dist/app.js … --identity "Developer ID Application: Nathan Butler (8S43JJMN6B)").UIAutomationServiceAgentCursorTests(new test: a hold shows a long press then a single click at the same point, and a nil termination shows nothing) andExactWindowHeldPointer*.DESKTOP_TOOLS_STATE=/tmp/cursor-state): a hover or press with a bad snapshot is refused before dispatch. Out-of-rangeduration_msand missing targets are refused in TypeScript.Pending: screen locked
The GUI session was locked (
IOConsoleLocked), sodesktop_inspectcan't capture and no snapshot-based live check could run. Exact checks to run in the morning with the dev app (open -n --env DESKTOP_TOOLS_STATE=/tmp/<x> "Desktop Tools.app") and TextEdit or Safari:desktop_hoveron a toolbar button element (for example a Safari toolbar button). Expectcompleted,pointer_moved: true, and the real pointer at the element's center. Inspect again after about 1 s and expect the tooltip window.refusedwith the "Another window covers this point" message, and the pointer doesn't move.refused.desktop_inspectordesktop_screenimages.desktop_presswithduration_ms: 1500on Safari's Back button, after some history. Expectcompleted,release: "released", and the history menu in the follow-up observation. Then press Escape or click elsewhere.desktop_presswithbutton: "right"on a text view. Expect the context menu. Check that the right button isn't left down afterward: a later left click works normally.unknown,release: "windowChanged", and no stuck button.