feat(cua-driver-rs)(platform-windows,platform-linux): glide agent cursor to the field on set_value/type_text - #1731
Conversation
…sor to the field on set_value/type_text The agent-cursor overlay only animated to click targets, so `set_value` and `type_text` filled fields with no visual cue of where the agent was acting. Move/pulse the cursor onto the target element first — reusing the same overlay helpers the click path already uses — when an `element_index` is supplied. - Windows (platform-windows/src/tools/impl_.rs): `SetValueTool` and `TypeTextTool` now pin_overlay_above + overlay_glide_to(center) + ClickPulse before writing. - Linux (platform-linux/src/tools/impl_.rs): both tools resolve `atspi::get_element_bounds` and ClickPulse at the element center (mirrors the existing click path). - macOS already animated the cursor (AgentCursor.animateAndWait) in both tools; no change. The glide only fires when an element_index is provided (where a position is resolvable); the focused-element typing path is unchanged. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughVisual overlay feedback is added to element-targeted text typing and value setting on Linux and Windows. Tools now animate the cursor to the target element center and emit a click pulse before executing their action when an element index or cached position is available. Failures are silently ignored. ChangesOverlay Visual Feedback for Element-Targeted Tools
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
The agent-cursor overlay previously only glided to click targets. During
set_valueandtype_textthe cursor never moved to the field, so recordings showed fields filling with no indication of where the agent was acting.This moves the agent cursor onto the target element before the write — reusing the same overlay helpers the click path already uses — whenever an
element_indexis supplied.Changes
platform-windows/src/tools/impl_.rs):SetValueToolandTypeTextToolnowpin_overlay_above+overlay_glide_to(center)+ClickPulsebefore writing.platform-linux/src/tools/impl_.rs):SetValueToolandTypeTextToolresolveatspi::get_element_boundsandClickPulseat the element center (mirrors the existing click path).AgentCursor.animateAndWait) in both tools — no change.The glide only fires when an
element_indexis provided (where a position is resolvable); the "type into the focused element" path is unchanged.Testing
cargo build -p cua-driver✅🤖 Generated with Claude Code
Summary by CodeRabbit