Repository navigation
Improve agent cursor glide timing and click target resolution - #3343
Merged
Merged
Conversation
The purple agent cursor only started moving as the click went out (and, for selector clicks, only after the click succeeded), so it always arrived after the page had already reacted. Its glide was a CSS transition, which the display:none around each post-action screenshot cancelled, so it usually looked like a jump. Cursor (agent-visual-indicator.js, both builds): - Glides with the Web Animations API, 360-760 ms by distance, so the move keeps its timing through screenshot hides. - New WB_SHOW_AGENT_TARGET phases: 'approach' glides ahead of an input and replies arriveInMs; 'done' takes the input's verdict. - Presses once when the trusted click reaches the page (or on a success verdict); a failed click gets no press. Rests and blinks in between. Agent (agent.js, both builds): - _leadAgentCursor glides the cursor onto the target and waits for the landing (capped at AGENT_CURSOR_LEAD_MAX_MS = 800) before the click's page checks and dispatch: click by text, selector, coordinates, vision and click_ax in Chrome; click_ax in Firefox. - Only on a tab showing the run (background.js exposes activeIndicatorTabs); no wait in background tabs, during screenshots or under reduced motion. - _settleAgentCursor sends the verdict after click / click_ax. Tests: test/agent-cursor-lead.mjs (runtime-unit shard) and a browser test in page-monitor-ui.mjs for glide, capture survival, press-with- click, no double press, failed-click and blink. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EsDq6DfcbTGESyuv6gmM7q
Codex review on #614: click({text}) resolved its target and ran its SELECT checks, then waited for the cursor glide, then pressed at the old coordinates. A page that reflowed during the glide (content loading above the target) could get a different control clicked. - click by text: resolve, glide the cursor there, and when it waited, resolve the text again. The SELECT checks, the progress baseline and the press all use the fresh resolution. - click by coordinates: glide before the SELECT check and the input redirect, so they read the page as it is at the click. - _leadAgentCursor resolves to whether it waited, so a caller holding geometry from before the wait knows to resolve again. Selector, vision and click_ax clicks already glide before resolving their target. Tests (delivery-cdp-input.mjs): a text target that moves during the glide is pressed where it is after it; a coordinate click checks its point only after the glide. Both fail on the previous commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EsDq6DfcbTGESyuv6gmM7q
Agent cursor reaches its target before the click
|
@esokullu is attempting to deploy a commit to the esokullu's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
No description provided.