Repository navigation
test(e2e): keep row B clear of the search dock before 17b's right-click - #18644
Conversation
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] 482845d Description read[DESCRIPTION-READ] ec3ba856561b1e07ff17d40d9c473f976f0eb20b9c2a472a58245287cc4ac18a That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. [UX-REVIEWED] 482845d Description read[DESCRIPTION-READ] bc3d1a2620988b676a16b62f726aeef12fd782fe8fc31401dd74f3561ba250d4 That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Problem / Motivation
Goal: The E2E spec
session-tags-e2e.spec.ts› 17b passes on its first attempt every time, so CI stops going red on PRs that never touched it.17b is the number one cause of red CI in this repo: 75 of the last 300 CI runs end with
1 spec(s) passed only on a retry, ceiling is 0: session-tags-e2e.spec.ts > E2E: sidebar tag columns > 17b…, and 5 more hard-fail on it, across 21 branches (#17941). The failing attempt stops atexpect(menu).toBeVisible(): the picker closed,__ctxistrue, no context menu opened, focus is onbody.Why it matters
Every PR pays for it: an unrelated change goes red, someone reruns the job, the flake ledger grows. Because the retry passes, nobody saw what the browser saw.
Not a goal
toPass, noMAX_FLAKY_SPECSchange.flaky-gestureannotation tooling of test(e2e): keep a trace on 17b's first failure, wait for row B #18529.What changed (motivation → approach → change)
The cause was read from the trace #18529 captured in run 37991140068: a hit test at the recorded click point in its DOM snapshots.
rowA.click({ button: 'right' })element is not stablethree timesscrollIntoView({ block: 'start' })on row A (its retry ladder: none →end→center→start)scroll-padding-top= 44 px (the dock's height)(box.x + 24, box.y + box.height / 2)= (269, 105)input, not row BcontextmenuthereWhy it flakes: how many "not stable" retries happen depends on the runner's speed. 0, 1 or 2 retries leave B visible (no scroll, A at the end, A centred). Exactly 3 puts B under the dock. Timing is consistent within one browser context, which is why every in-context reload in that run missed and only the new-worker retry passed.
The fix: before reading row B's box, the spec runs
rowB.scrollIntoView({ block: 'nearest', behavior: 'instant' }). Chromium honours the lane'sscroll-padding, so this is a no-op when B is already clear of the dock and brings B out from under it otherwise. One precondition is added next to the existing "not on the dialog" check: the element beneath the backdrop at the click point must be inside row B (the same walkelementBeneathinSlotTagPopoverdoes). A future dock, toast or overlay at that point then fails by name instead of as a missing menu.Backwards compatibility
Compatible: one Playwright spec changes; no product code.
Removes nothing: no test or assertion is deleted.
Tests
website/playwright/session-tags-e2e.spec.ts› 17b: the new precondition pins that the forwarded right-click can reach row B's trigger before the gesture is sent.Manual verification
e2e-playwright-failures) replayed in the trace viewer:elementsFromPoint(269, 105.1)under the backdrop →input/[data-testid=search-field-glass], then row B; lanescrollTop138 andscroll-padding-top44.14 px in all 20 snapshots; the row A click loggedretrying click actionthree times in all six in-context attempts.rowA.scrollIntoView({ block: 'start' })before the click (standing in for Playwright's fourth attempt): the unfixed spec fails 2/2 withexpect(menu).toBeVisible→element(s) not found, same geometry as CI (A y=129, B y=81). The fixed spec passes 5/5 under the same forced geometry (B moves to y=129, hit test lands in row B).--repeat-each 30 --retries 0→ 30/30 pass.Screenshots / video
N/A — Playwright spec only; no UI changes.
Related Issues
Fixes #17941. Overlaps #18529, whose stable-box wait on row B does not help here: B is stably under the dock.
Pattern harvest
Rule candidate: review-prompt
Pattern: a Playwright spec that drives
page.mousefrom aboundingBox()must hit-test that point (elementsFromPoint) first; an earlier locator click may have scrolled the container through Playwright's retry ladder (block: 'end' | 'center' | 'start'), and a floating or sticky overlay can cover the measured box.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)