Skip to content

fix(tao): stopping a touchpad glide no longer flings the content on - #896

Merged
kdroidFilter merged 1 commit into
nucleus-3.0from
fix/dm-touch-stops-glide
Nov 1, 2026
Merged

kdroidFilter merged 1 commit into
nucleus-3.0from
fix/dm-touch-stops-glide

Conversation

@kdroidFilter

Copy link
Copy Markdown
Collaborator

Summary

  • On Windows, a two-finger touchpad scroll sometimes "jumped" (reported by Zayit users on mitmachim; -Dnucleus.tao.directManipulation=false worked around it).
  • Cause: putting the fingers down to stop a fast glide (DirectManipulation INERTIA → RUNNING) closed the pan with MOMENTUM_ENDED, i.e. an immediate PanEnd. Compose's TrackpadScrollingLogic flings at PanEnd with the velocity of the last steps — the glide's — so the content flew on under resting fingers.
  • Fix: TaoDirectManipulationGesture closes a glide with a deferred ENDED (the router's grace). The PanEnd lands past Compose's 40 ms velocity horizon, and fingers that move again within the grace continue the same pan. The router shared with macOS is untouched.

Test plan

  • New scene test fingers put down on a fast glide stop the column where it is — fails without the fix (447 → 681 px), passes with it
  • TaoDirectManipulationGestureTest + seeded-walk oracle updated for the new phase sequence
  • :decorated-window-tao:test, detekt, ktlintCheck
  • Headful #706 suite on Windows: 8/8 functional cases; the monkey failed once on seed+0 at first, did not reproduce in 5 later runs with the fix (nor 3 without)
  • Real precision touchpad (none on the dev machine)

…nt on

A DirectManipulation glide closed with MOMENTUM_ENDED, an immediate PanEnd.
Compose flings at PanEnd with the velocity of the last steps, so fingers put
down to stop a fast glide (INERTIA -> RUNNING) threw the content another
half-glide. The glide now closes with a deferred ENDED: the PanEnd lands past
Compose's velocity horizon, and fingers that move again continue the pan.
@kdroidFilter
kdroidFilter merged commit 6d9ba46 into nucleus-3.0 Nov 1, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant