You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pan a long agent transcript (opencode) on a touchscreen. The view stops dead the moment the finger lifts, so covering a long session means repeated swipes, and it doesn't match the glide a touchpad or browser gives you. Everything else about the recognizer feels right on a ThinkPad Z16 Gen 2: 8px slop, axis lock, second-finger reject, and with #245 fixed the wheel is a consistent 3 rows per detent.
What would you like wmux to do?
After pointerup on a committed vertical pan, keep scrolling with the release velocity and decay to zero, through the same synthetic-wheel path. Cancel on a new pointerdown or any rejected gesture; vertical only. Decay/velocity cap as constants would be fine; a setting is optional.
What do you do today instead?
Repeated swipes; the wheel for long distances.
Worth noting the web terminal handler deliberately skipped momentum (its comment cites xterm.js#594), so this would be the first implementation. You said in #243 you'd hand-roll it if wanted; happy to test and tune builds on the device.
Shipped in v2.14.0. A committed vertical pan that ends in a flick now glides and decays through the same synthetic-wheel path. Velocity is a least-squares fit over the last ~100 ms, with a pause of 80 ms or more before lift giving no fling. Min is 0.25 px/ms, cap 4 px/ms, and the time constant is 325 ms, frame-rate independent. A new pointerdown, a real wheel, hiding the pane or unmount all cancel it. All constants are in src/renderer/utils/touch-fling.ts. I couldn't feel it without a touchscreen, so your Z16 is the real test: tell me what to tune.
Fling feedback after real use on a ThinkPad Z16 Gen 2 (Windows 11, v2.17.1):
Feels great. Flicks glide and decay like a phone, the pause-before-lift rule works (a placement drag never flings), hard flicks stop in the right place, and a new touch or a wheel cancels instantly. No tuning request on the fling itself.
One adjacent thing, filed separately as #267: while dragging, pan speed tracks the app's rows-per-report multiplier, so at opencode's default scroll_speed 3 the content outruns the finger. That's the mirror of #245 and distinct from the fling, which I'd like to keep at its current distance.
Activity
feat(terminal): momentum after a touch flick (#248)
amirlehmam commentedon Sep 29, 2026
Shipped in v2.14.0. A committed vertical pan that ends in a flick now glides and decays through the same synthetic-wheel path. Velocity is a least-squares fit over the last ~100 ms, with a pause of 80 ms or more before lift giving no fling. Min is 0.25 px/ms, cap 4 px/ms, and the time constant is 325 ms, frame-rate independent. A new pointerdown, a real wheel, hiding the pane or unmount all cancel it. All constants are in
src/renderer/utils/touch-fling.ts. I couldn't feel it without a touchscreen, so your Z16 is the real test: tell me what to tune.Mattheinrichs commentedon Oct 2, 2026
Fling feedback after real use on a ThinkPad Z16 Gen 2 (Windows 11, v2.17.1):
Feels great. Flicks glide and decay like a phone, the pause-before-lift rule works (a placement drag never flings), hard flicks stop in the right place, and a new touch or a wheel cancels instantly. No tuning request on the fling itself.
One adjacent thing, filed separately as #267: while dragging, pan speed tracks the app's rows-per-report multiplier, so at opencode's default
scroll_speed3 the content outruns the finger. That's the mirror of #245 and distinct from the fling, which I'd like to keep at its current distance.