Let a laptop trackpad scroll the terminal - #32
Merged
Conversation
Picks up antgrid-ai/dart_terminal#8. Two independent paths in the terminal view dropped precision scrolling, and a two-finger scroll hits both: the wheel path rounded each event to whole lines and discarded the remainder (a mouse notch survives that, a touchpad's few-pixel events all round to zero), and the pan-zoom path — what a trackpad actually delivers — returned early whenever the program had mouse reporting on, which a full-screen agent holds for its entire run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two-finger scroll does nothing in the terminal on a laptop. The fix is entirely in the fork — this bumps the pin to
c262d5f(antgrid-ai/dart_terminal master with #8 merged).Two independent paths dropped precision scrolling, and a trackpad hits both, which is why nothing about the gesture worked in either direction at any speed:
(scrollDelta.dy / linePixels).round(), remainder discarded. A mouse notch is worth several lines and survives; a precision touchpad reports a few pixels per event, every one rounds to zero, and the transcript never moves however long you scroll.PointerPanZoom*is what a two-finger scroll actually delivers (macOS always, Windows precision touchpads via DirectManipulation), and a full-screen agent holds mouse reporting for its entire run — so the only scroll input a laptop has was dead for the whole session. It now forwards one wheel step per line crossed, reusing the same_sendWheelStepthe real wheel uses.Fork side carries two new tests, both failing before that change: a trackpad pan under
normalMouse+sgrMousereaches the program asBUTTON_FOUR, and quarter-line wheel deltas still scroll.Gates
flutter analyze lib test— No issues found.flutter test— 2639 pass.npm run check:font-tokens— OK. Fork package on the merged commit: 214 pass, 28 fail, the same 28 that fail on itsmasteron this machine (POSIX-shell and glyph-metric cases).Not verified on hardware
The fork's repros are synthetic pointer sequences, so they prove the code path, not the platform — which of the two bugs was the one biting on the reporting laptop is still unmeasured, and neither fix has been driven by a real trackpad yet.