Skip to content

scroll: dispatch real wheel events instead of in-page scrollBy #2

Description

@yassiEmp

What

agent-hands scroll <px> moves window.scrollY with window.scrollBy in eased steps (scrollBy in cli/gestures.mjs). A page listening to wheel events sees nothing; a page listening to scroll sees human-like stepping. Measured on docs/assets/measure.html, 15 Sep 2026: wheel.events: 0 after scroll 600.

Fix

Replace the in-page write with Input.dispatchMouseEvent { type: "mouseWheel", x, y, deltaY } at the current cursor position, keeping the same burst-and-pause pacing (notches of 90 to 190 px, 16 ms frames, 70 to 260 ms pauses).

Acceptance

  • On the probe page, agent-hands scroll 600 yields wheel.events > 0, bursts >= 3, and the page still ends near the same scrollY.
  • scroll inside a scrollable <div> under the cursor scrolls that element, as a wheel would, instead of the document.
  • docs/evidence.md "Limits" entry for scroll updated with the new numbers.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions