Skip to content

feat(cua-driver): animate drag as a continuous point-to-point gesture #2625

Description

@f-trycua

Problem

The agent cursor currently represents drag with the same general movement treatment used for ordinary pointer travel. During a real drag, this does not clearly communicate the gesture from source to destination or distinguish press, hold, travel, and release.

Desired behavior

Render a drag as one continuous point-to-point gesture driven by the real action arguments:

  1. Move to the source point.
  2. Enter the drag state when the button is pressed.
  3. Keep the drag treatment active while the overlay follows the dispatched path from from_x/from_y to to_x/to_y.
  4. Show a subtle release or drop response at the destination.
  5. Return to idle only after the real action completes.

The animation should use duration_ms and steps where available so the overlay stays synchronized with the dispatched gesture instead of playing a separate generic glide.

Requirements

  • Preserve the drag semantic icon throughout the held movement.
  • Avoid a generic move animation or visual teleport between the source and destination.
  • Compose correctly with background/foreground, AX/pixel, browser/desktop, and session-color treatments.
  • Support left, right, and middle-button drag variants without requiring separate themes.
  • Respect reduced-motion mode with an understandable low-motion fallback.
  • Keep the behavior consistent across macOS, Windows, and Linux renderers.
  • Keep custom cursor themes compatible through the existing semantic drag state rather than adding a required new icon.

Acceptance criteria

  • A real drag action visibly traverses the complete source-to-destination path while the drag state remains active.
  • Press, travel, and release phases are ordered and synchronized with native input delivery.
  • The action gallery includes a deterministic point-to-point drag preview.
  • Automated tests cover interpolation, lifecycle ordering, reduced motion, and modifier composition.
  • Cross-platform video or visual evidence confirms the result on macOS, Windows, and Linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions