Skip to content

test(browser): fix two main CI timing failures - #1567

Open
loganj wants to merge 1 commit into
mainfrom
larry/main-ci-flakes-1022
Open

loganj wants to merge 1 commit into
mainfrom
larry/main-ci-flakes-1022

Conversation

@loganj

@loganj loganj commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

🤖

Summary

  • Fixes two browser tests that failed on main (run 39844079930). Both were test timing problems. App code is unchanged.
  • WebKit, "simultaneous row shrink above and growth below preserve bottom follow": the test looked for a loaded row above the visible area too early. When the list scrolls to the bottom, the list library (Virtua) loads rows only below the scroll direction until it reports idle (150 ms after the last scroll). The test's short geometry wait could finish before that, so no row above the viewport existed yet and rows was null. The test now uses the file's existing virtuaIdle wait.
  • Chromium, "standalone message gallery hosts clipboard success and failure toasts": the test clicked "Copy message" with the pointer while the menu was still taking its first position. The menu's modal backdrop took the click. Playwright then retried with different scroll alignments, which moved the page under the open menu, and the last click did not reach the item. The test now activates the item with Enter. This test checks that the standalone gallery shows copy toasts. It does not check pointer hit-testing, which other message-menu specs cover. message-actions-floating.spec.mjs already activates menu items this way.

Details

  • The Virtua cause was confirmed locally. A probe showed 5 mounted rows (2 above the viewport) when the list was idle, and 3 rows (0 above) while it was still scrolling. The CI trace shows the same scrolling state: 3 rows, all near the bottom.
  • The reactions cause comes from the CI traces of two failures: this run, and run 39703372164 (where the first copy failed). Both show the same sequence: "element is not stable", then "inert backdrop intercepts pointer events", then a page scroll on each retry. I could not reproduce it locally, including with 4× and 8× CPU throttling. So the evidence is the traces, not a local failure.
  • Verification: layout test 20/20 locally and 20/20 in the CI Playwright 1.63.0 container. Reactions test 30/30 locally (Chromium and WebKit, --repeat-each=15).

layout.spec "simultaneous row shrink above and growth below": wait for
Virtua's idle instead of a short geometry settle. Bottom follow ends in
a downward scroll, and while Virtua is still scrolling it mounts only
rows ahead of that direction, so no row above the viewport existed yet
(WebKit, run 39844079930).

reactions.spec "standalone message gallery hosts clipboard success and
failure toasts": activate Copy message with Enter. The pointer click
raced the popup's first placement; the inert backdrop took the hit, and
Playwright's alternating scroll retries moved the page under the open
menu until the click no longer reached the item (Chromium, runs
39844079930 and 39703372164). The test covers toast hosting, not
pointer hit-testing.

Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Signed-off-by: Logan Johnson <loganj@squareup.com>
@loganj
loganj marked this pull request as ready for review October 22, 2026 23:36
@loganj
loganj requested a review from a team as a code owner October 22, 2026 23:36

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Star Lord’s automated source review via Wes’s account, integrating independent Rocket (systems/lifecycle), Mantis (correctness/concurrency), and Groot (product/accessibility) reviews.

No actionable findings. Source assessment: 9/10 for minimalness, clarity, and correctness.

Reviewed head a465dcf29d9104eba2087c3dcb23b626b6a8e2fc against base d92bfb2c4dd89fc5ae6e7a1445f38ad1e8ab7060. The layout change reuses the existing observable idle barrier while preserving simultaneous shrink/growth and the <4px bottom-follow assertion. Gallery keyboard activation retains both clipboard failure and recovery toast checks; main-app pointer selection remains covered in tests/browser/message-actions.spec.mjs:238–246,316–319. Browser cases added/removed: 0/0. The existing browser-only layout and standalone-root integration purposes remain appropriate.

Validation: source-only review; no tests, builds, or app execution by this review team. Hosted run 39852700644 has successful CI required; its logs show the affected layout case passing in Chromium/WebKit (2.3s/5.9s) and gallery case passing (5.3s/9.4s). The 21 functional shards report 1,692 passed cases, approximately 254.4 summed test minutes and 166.4 summed job minutes across a 12m44s job span; the slowest logged case is the unrelated WebKit settings-layout case at 78s. These are one hosted snapshot, not a before/after cost comparison or proof that all flakes are eliminated. Author-reported local repeats and original failure traces were not independently reproduced. Native behavior, rendered accessibility and human acceptance remain unverified. Windows native and Vitest flake checks were skipped in this snapshot.

Public PR description and commit metadata inspected; no attached images or evident disclosure found. This COMMENT review is non-blocking and does not approve merging.

@ngoodger-block ngoodger-block left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks correct, and PR feedback didn't find any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants