fix: clarify Android gesture transform behavior#584
Merged
Conversation
|
1cc075c to
583735b
Compare
dbbe8e0 to
832c4e6
Compare
thymikee
commented
May 26, 2026
Member
Author
thymikee
left a comment
There was a problem hiding this comment.
Reviewed the Android multi-touch helper changes. The qualitative-state guidance, the helper-failure message preservation, and the GestureLab handler-tag tracking all look like solid improvements.
Main concerns:
WAIT_FOR_INPUT_DISPATCH = falseis a meaningful semantics change that isn't fully discussed in the description; async injection plus a 32 ms sleep at the tail is the only thing guarding against stuck-pointer state after the finalACTION_UP. Worth either keeping sync mode for the boundary events (DOWN,POINTER_UP,UP,CANCEL) and using async only for intermediateMOVEframes, or at minimum documenting the trade-off and adding a "failure mid-gesture leaves clean state" test.ANDROID_MULTITOUCH_HELPER_GESTURE_TIMEOUT_MS = 90_000is very generous — 90 s of waiting on a flaky failure mode is a notable UX regression. If 45 s would cover the slowam instrumentcase, that seems strictly better.- The
.nojekylladdition tobuild-docs/action.ymlis unrelated to the stated PR scope and should probably be split out. - Minor nits: redundant
!has(handlerTag)clause inbeginTransformGesture; string-match on parser error message inrunAndroidMultiTouchHelperGestureshould ideally switch to an error code so refactors don't silently break it.
Nothing here is a hard block — happy to re-look once the WAIT_FOR_INPUT_DISPATCH reasoning is clearer.
Generated by Claude Code
832c4e6 to
c8fd3ef
Compare
c8fd3ef to
004fb38
Compare
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.
Summary
Clarify Android combined gesture behavior and stabilize Android multi-touch transform injection.
Android
gesture transformremains documented as a geometric two-finger path whose app-level recognizer results may be non-exact. The helper now keeps boundary events synchronous, injects only move frames asynchronously, preserves helper failure messages through explicit parser error codes, and uses a shorter 45s command timeout for slowam instrumentreturns. The GestureLab fixture also latches simultaneous transform baselines more consistently and uses averaged Android pan touches.Validation
Verified with
pnpm format,pnpm exec vitest run src/utils/__tests__/args.test.ts,pnpm exec vitest run src/platforms/android/__tests__/multitouch-helper.test.ts,pnpm check:quick,pnpm build,pnpm test-app:typecheck, andsh scripts/package-android-multitouch-helper.sh 0.15.2 android-multitouch-helper/dist. Earlier manual Android verification ran Metro on port 8083 withadb reverse tcp:8083 tcp:8083and verified fivegesture transformvariations completed throughagent-devicewith clean input state afterward.Known gap: the emulator/Expo run stayed system-unstable after reboot, with Android framework ANR dialogs and UIAutomator snapshot timeouts, so I could not complete reliable app-text assertions inside Gesture Lab in that pass. Direct helper instrumentation and command-level transforms completed without stale pointers.
Touched 9 files. Scope stays within Android gesture behavior, the GestureLab fixture, CLI/docs guidance, and command-planning assertions.