Repository navigation
Conversation
Every tap the suite sends through Playwright's `Locator.tap` or `Touchscreen.tap` now waits until half a second has passed since the page's previous tap (`render_harness.fresh_taps`, installed by the session's Playwright fixture). Chromium counts a touch tap within about 25 px and 400 ms of the previous one as the next press in a run (click `detail` 2 and a `dblclick`), and the floating panel presses nothing for such a press on a control it drew since (`runOfClicks`), so a test that tapped faster than a person passed only on a slow host. #5806 spaced `press_visible`'s taps; about 30 raw `locator.tap()` calls stayed unspaced. Wrapping Playwright's two tap routes covers every call site with none changed, needs no source check against raw taps, and removes `press_visible`'s own copy. On the 60 tests/browser tests that tap, Chromium counted 26 touch runs on main and 2 with this change, both from finger holds sent as raw CDP events. The waits add 64 s of sleep across those tests. Waiting only when the target's box lay near the previous tap's cut that to 33 s, but Playwright doesn't report where a locator's tap lands, and two double taps passed that check: a target that moved after its tap, and one that slid in. So the wait ignores distance. Spaced taps exposed a shift_watch.js gap that back-to-back taps hid: a control a tap shows under the finger takes `:active` and lets go on Chromium's timer, unheard. The watch now also asks the element at the release point; test_a_tap_s_press_letting_go_is_heard gains that case, which fails on the old watch.
leaf-agent
approved these changes
Nov 12, 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.
Every tap the suite sends through Playwright now waits until half a second has passed since the page's previous tap, so Chromium never counts it as the next press in a run. Chromium counts a touch tap within about 25 px and 400 ms of the previous one as a double tap (click
detail2 and adblclick), and the floating panel presses nothing for such a press on a control it drew since (runOfClicks). A test that tapped faster than a person therefore passed only on a slow host. #5806 spacedpress_visible's taps, and about 30 rawlocator.tap()calls stayed unspaced. Instead of routing them through a helper guarded by a source check,fresh_taps(tests/render_harness.py) wraps Playwright'sLocator.tapandTouchscreen.tap, the suite's only tap routes. No call site changes, andpress_visibleloses its own copy.On the 60
tests/browsertests that tap, Chromium counted 26 touch runs on main and 2 with this change, both from finger holds sent as raw CDP events. The waits add 64 s of sleep, which uses no CPU, across those tests. The worst is 11 s in the playground focus test, spread over its 22 subtests. Waiting only when a tap's target box lay near the previous one cut that to 33 s. A review then reproduced two double taps that passed that check, from a target that moves after its tap and from one that slides in, because Playwright doesn't report where a locator's tap lands. So the wait ignores distance.Spaced taps exposed a
shift_watch.jsgap that back-to-back taps had hidden: a control that a tap shows under the finger takes:activeand lets go on Chromium's timer, and the watch didn't notice. The watch now also checks the element at the release point, andtest_a_tap_s_press_letting_go_is_heardgains that case, which fails on the old watch.Requested by max-sixty after #5806. Tests: the 60 tap tests in
tests/browserand the tapping tests intests/journeys, the shift-watch press, tap and verdict tests, andtest_suite_source. Two failures are inherited and also fail with spacing off:test_a_root_summary_keeps_thread_actions_outside_its_fold[1400-True-10]andtest_a_finger_reaches_the_page_commands_its_keys_reach.