Repository navigation
parity: input/coordinates observes the page before its input, fixing the double-click cell's race (refs #168) - #436
Merged
Merged
Conversation
…start from their own state (refs #168) Chrome's renderer drops every input event but a pointer move while it defers commits for paint holding, before the page's first contentful paint (WidgetInputHandlerManager::DispatchEvent), and the dropped click still answers ok. Run 44681961859's double-click case shows that signature: the type cell's click left the focus on body and the field empty, then end-key's END on body scrolled the page to its bottom (the scroll cell read scrollY 1970), so double and drag clicked scrolled-away targets. The input page now marks html[data-first-contentful-paint] from a paint observer. Every cell waits for it (5 s, bounded) and scrolls to the top; end-key focuses the input holding 'pointer' itself; the type cell checks its click focused the input before typing. Each failure reports whether the page had painted, the focus, the value, the pointer's last point, the element at the click's point and scrollY. Sminos-Session: cursor235#b93055dd (cua on macbook)
…start from their own state (refs #168) Chrome's renderer drops every input event but a pointer move while it defers commits for paint holding, before the page's first contentful paint (WidgetInputHandlerManager::DispatchEvent), and the dropped click still answers ok. Run 44681961859's double-click case shows that signature: the type cell's click left the focus on body and the field empty, then end-key's END on body scrolled the page to its bottom (the scroll cell read scrollY 1970), so double and drag clicked scrolled-away targets. The input page now marks html[data-first-contentful-paint] from a paint observer. Every cell waits for it (5 s, bounded) and scrolls to the top; end-key focuses the input holding 'pointer' itself; the type cell checks its click focused the input before typing. Each failure reports whether the page had painted, the focus, the value, the pointer's last point, the element at the click's point and scrollY. Sminos-Session: cursor235#b93055dd (cua on macbook)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Refs #168. This doesn't close it: step 3, CI-opt's five-run batch and turning parity-browser on for PRs, follows the merge.
What changes (tests and fixture only, no shipped behaviour, no version bump)
api/browser-cuaapi/double-clickfailed 2 in 20 on both hosts. In CI-opt's run 44681961859, thetypecell found the page with focus onbody, the document reportingfocused: false, and the field empty. Thedoubleanddragcells after it then ran out their selector deadlines.Cause: a harness race.
goto, which returns at load and can come before the first contentful paint.WidgetInputHandlerManager::DispatchEvent, whose comment reads: "We don't want users interacting with stuff they can't see".body.Fix (
test/browser-parity/scenarios/input/coordinates.mjs,test/browser-parity/fixture/corpus-pages.mjs):tab.screenshot(), the observation a model makes before acting, which also makes a background tab (createdactive: false) render. It then waits, bounded at 5 s, forhtml[data-rendered="yes"], which the page sets in its second animation frame, after its first frame has painted.html[data-input-focus]), not throughperformanceoractiveElement. This keeps the scenario usable on the vendor's read-only evaluator.end-keysets its own focus and text withlocator.fill, so it doesn't depend on what the type cell left behind.Evidence
9f60aa47: three consecutive greens, one at a time: 44692632997, 44694126969, 44695890738. The earlier head98a09e0bwas also three greens.coordinates-type.test.mjshas 7 cases, with a stand-in page that throws onperformanceand passes frozen elements, a double that blurs after typing, and the paint-gated cases. All 7 fail against the old scenario.Limits
input/dom's type cell could hit the same race in principle. It runs afterget_visible_domand has never failed, so it is left as it is.9f60aa47reuses98a09e0b's message by mistake. The intended subject is "parity: input/coordinates observes the page before its input and reads it through fixture attributes (refs parity-browser hosted gate: fix the two racy parity cells (waitfor deadline race, drag ended wait), then run it on PRs #168)".Review
98a09e0b: incorrect.performanceand its element wrappers are read-only.9f60aa47.Sminos-Session: cursor235#b93055dd (cua on macbook)