Repository navigation
perf(mobile): skip the post-gesture stabilization wait for a test's swipe and scroll - #1668
Merged
Merged
Conversation
…wipe and scroll Send postGestureStabilization: false with a test's own swipe and scroll, and re-read a control until two reads agree on its bounds before the first action within 2 s of such a gesture, so a tap does not land on a list still coasting. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…re, and say what the re-read costs Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
🟢 e2e ios agent: 21 passed, 1 skipped25 agent steps · 12 replayed from cache · 62 model calls · 387.8k tokens (81% cached) · $0.0275 All 22 tests in 1 file
Tested by e2e 0.23.0 · 9m 18s · ios-simulator · run artifacts |
Contributor
🟢 e2e android agent: 20 passed24 agent steps · 15 replayed from cache · 38 model calls · 208.0k tokens (86% cached) · $0.0121 All 20 tests in 1 file
Tested by e2e 0.23.0 · 6m 18s · android-emulator · run artifacts |
Contributor
🟢 e2e ios: 55 passed, 1 skippedAll 56 tests in 7 files
Tested by e2e 0.23.0 · 6m 56s · ios-simulator · run artifacts |
Contributor
🟢 e2e android: 57 passed, 1 skippedAll 58 tests in 7 files
Tested by e2e 0.23.0 · 9m 39s · android-emulator · run artifacts |
Collaborator
Author
|
[claude-sonnet-5-5] responding on behalf of kdy1 Ready for review. Left for the human:
|
This was referenced Nov 16, 2026
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.
postGestureStabilization: false, so agent-device stops holding the next read for up to 3.5 s (1.5 s poll budget plus a 2 s distrust extension) after a gesture the test checks withexpect. The agent's gestures keep the wait.scrollUntilVisiblefinds the control while the list still coasts, and the tap lands on a moving list, which swallows it to stop the scroll. The step passes and nothing navigates. So the first action on a control within 2 s of a skipped wait re-reads the control every 100 ms until two reads agree on its bounds (steadiedinpackages/mobile/src/surface.ts). A list that already rests costs one extra snapshot.fillandclearkeeprelocated's input checks on every re-read, and the poll stops withOPERATION_TIMEOUTwhen the action budget cannot fit another poll. Both came from the fresh-context review.0.21.37-nightly.20261109.153accepts it.Verified
Ran it locally: yes
node node_modules/e2e/dist/cli/bin.js run --target ios, withnode_modules/e2eand@e2e-dev/mobilepointing at the built worktrees.locator.tapmedianissue-1096-keyboard-shrink, fails on main too (ENGINE_FAILURE, "behind the visible keyboard"). It is not this change.issue-1154-page-change-focusin 3 of 3 runs andissue-1050-back-gesturein 3 of 3 (1 of 4 on main). The first tap after a scroll got slower in exchange (714 to 767 ms against 556 to 573 ms), since the wait moved from the scroll to that tap. Loweringtransitionto 200 ms cut that cost but added 3 more failures, so it is not in this change.f4bf5299; this branch is one27f492c, which has unrelated commits in between.packages/mobile/tests/unit/engine.test.tscovers the flag per origin, the re-read until bounds agree, no re-read for the agent, a field that turns disabled after a gesture, and the budget stop.Review
A fresh-context review (gpt-6.1-sol) found two issues, both fixed and covered by tests: the re-read dropped
fill's input checks, and its 100 ms sleep ignored the operation's remaining budget.🤖 Generated with Claude Code