Skip to content

Restore stock scrolling and use declared input bounds for tracked taps - #2

Open
trissim wants to merge 4 commits into
masterfrom
fix/bounded-fling-input-taps
Open

trissim wants to merge 4 commits into
masterfrom
fix/bounded-fling-input-taps

Conversation

@trissim

@trissim trissim commented Nov 2, 2026 •

Copy link
Copy Markdown

Summary

4 commits, 7 files, +412/-187 against master at eef7194cd1aa09611821b72806211f203589b372. Five gesture methods are byte-identical to upstream 8629e632. The earlier capped/axis-locked implementation failed on the actual phone; its green controls are not acceptance evidence.

Scrolling: use the existing implementation

Before: the fork first removed tracked momentum, then wrapped Scroller with ScrollAxis and FlingState/ActiveFling/MouseFling/ScrollbackFling. Pixel-to-cell conversion, a 500ms limit and one wheel report per frame severely reduced displacement. First-motion axis locking could route a vertical gesture to horizontal wheels.

After: onScroll, onFling, onDown, doScroll and onTouchEvent are restored exactly from upstream. Scroller retains its original row units, half-screen tracked destination and scrollback behavior. The custom families, axis lock, horizontal encoder helper and unused wheel66/67 constants are deleted. Restoration commit b18c6143 alone removes 129 net production lines.

Keyboard: explicit input identity and geometry

Cursor visibility, shape and row cannot identify a tapped input. TextInputRegion decodes OSC 777;input-region;x;y;width;height ST once at the emulator boundary. Bounds use zero-based terminal cells and exclusive upper edges; a zero rectangle clears them. Malformed controls clear/log; resize, reset, buffer and tracking transitions invalidate the input context.

A recent tracked finger tap records its cell and consumes one keyboard request only when the declared rectangle contains it. Session/window/selection/context lifecycle retires stale intent. Android's existing touch-dispatch boundary retires an earlier intent on new touch/cancel, independently of the byte-identical stock gesture methods. The explicit toggle and untracked shell behavior remain unchanged. Native selection and RIGHT long-press opt-in remain.

The paired Textual sender is merged/installed as 9333140a: shared EditableInput on Input/TextArea, inherited by Toad's editor across cursor modes, with read_only at TextArea's existing owner. Outgoing compositor placement supplies the bounds. Existing Toad processes must be relaunched to load it. A receiver APK alone did not supply this missing app data.

Evidence and remaining acceptance

  • Read-only Tree-sitter Java parsing and SHA comparison establish exact equality of all five gesture methods, including after the touch-dispatch correction. Artifacts: upstream-parity-01.json, upstream-parity-02.json in the author's retained scratch.
  • Updated view controls exercise stock positive/negative row displacement, fractional/diagonal scrolling, encoder/origin behavior, scrollback and existing long-press policies. Keyboard controls retain geometry, expiry, new-touch/cancel, context and physical-mouse distinctions. They use the real emulator and Android touch dispatch. Hosted Unit41516055947 executed376 cases across debug/release with0 failures/errors/skips (22 keyboard and19 mouse cases per variant). Both Build41516056051 variants and wrapper41516055992 passed. No local Android suite was run.
  • Historical candidate 7156ddb6: 386 executed tests, zero failures/errors/skips, both Android builds and wrapper passed. Downloaded archives/APK checksums and hosted signer reports were checked. It still failed phone acceptance. Candidate a2dfd603 also had green hosted workflows; it is superseded, not a successful delivery.
  • The posted earlier artifact is preserved, not represented as this head's APK. This head's arm64 APK: https://github.com/OpenHCSDev/termux-app/actions/runs/41516056051/artifacts/13174563694 . Downloaded APK SHA256: 3ec0d8d55b26c5a7682300a61e830d1e11f3f68e94fbbd6c0d8f58ae38e1d96c. Five downloaded archive digests/head identities and the APK checksum match; both hosted signature bundles match the official GitHub debug certificate. Qualification rc0 is retained in upstream-eef-qualification.json and .rc; this is not local apksigner execution or phone acceptance.
  • Done requires the phone: tapping an actual input opens the IME, outside taps do not, explicit toggle/selection remain usable, and a flick glides like stock. Not yet claimed.

Assumed: app-declared bounds are trusted terminal output; applications without this protocol use the unchanged explicit toggle. SSH carries it; mosh/native-remote-client acceptance is outside this APK result.

Copilot AI balanced review requested due to automatic review settings November 2, 2026 18:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@trissim trissim changed the title Restore bounded touch momentum and explicit input-region keyboard intent Restore stock scrolling and use declared input bounds for tracked taps Nov 2, 2026
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.

2 participants