Skip to content

Two flaky browser tests: Share's team list, and Connections' tile read mid-search - #2829

Merged
davidmckayv merged 1 commit into
mainfrom
fix/share-team-flake
Dec 3, 2026
Merged

davidmckayv merged 1 commit into
mainfrom
fix/share-team-flake

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

Two browser tests knocked pull requests out of the merge queue today. Both run in Chromium inside the WebKit job, where eight files share a runner, and both were test races, not product bugs.

Share dialog: "Finance" never appeared (artifacts-screens.test.tsx, "Share: audience, …")

Failed in merge-group runs 47001874461 and 46993891875, and on #2797.

The dialog greys out its controls while a change saves. The test picked Viewer for Sam and pressed "Add a team" straight away. On a loaded runner, Playwright found the button enabled, the save then greyed it out, and the press landed on a disabled button. A disabled button takes no mouse events, so the list never opened and the test waited 30 seconds for "Finance".

Reproduced on demand by pressing the button just after the save greyed it out. That gives the CI failure exactly: a pointerdown on the disabled button, no mousedown or click, the list never opens, and the test times out waiting for "Finance".

The fix: wait until Sam's role reads Viewer. That happens only once the server's answer is drawn, so after it the controls can only turn back on, and Playwright waits for that. A probe confirmed it over 8 runs, 3 of them with the page's CPU slowed 6x: after the new wait, "Add a team" was never greyed out again and was enabled when pressed. The other Share steps already wait for the server's answer before their next press, and the policy-off Share test saves nothing.

Connections: Linear's tile read opacity 0 (team-connections-directory-layout.test.tsx, "apps locked down, a member finds an app and asks an admin for it in one press, …")

Failed in merge-group run 47003968874, on #2810's PR run and in #2811's queue run.

It was not a fade. search() returned as soon as it typed, but the directory reads the box 250ms after the last key and lists the popular apps until then, Linear and Slack among them. So the test found the popular Linear tile and pressed it. On a loaded runner the search's results then replaced the list, and the tile pressed was off the page by the time its opacity was read. A detached element's opacity is "", and Number("") is 0.

A probe on main showed it: when "Requested" appeared, the heading still read "Popular apps", and 500ms later the pressed tile was detached with opacity "". With the fix, search() waits for the "Search results" heading. Probed again, the heading read "Search results" every time and the pressed tile stayed on the page at opacity 1. Every test in the file searches through this helper, so the same race is closed for Slack's tile too.

Changelog

none

Testing

  • Share tests (both): 10 of 10 passed before the fix and 30 of 30 after, serial, one browser at a time (the race needs CI load; the probe above reproduces it directly).
  • Connections file, every test in Chromium and WebKit: 5 runs of 24 tests each, all passed, serial.
  • biome check on both files, bun run typecheck.

…ead mid-search

Share dialog (artifacts-screens): the test pressed "Add a team" straight after
choosing Viewer for Sam. The dialog greys its controls out while that change
saves, and on a loaded runner the press landed just after they greyed out: a
disabled button takes no mouse events, so the list never opened and "Finance"
was waited for in vain. It now waits for Sam's role to read Viewer, the
server's answer drawn, after which the controls only turn back on.

Connections (team-connections-directory-layout): search() returned before the
directory had read the box (250ms after the last key). Until then the popular
apps are listed, Linear and Slack among them, so the test pressed the popular
tile; the search's results then replaced it, and its opacity, read off a
detached element, was "" (Number: 0). search() now waits for "Search results".
@davidmckayv
davidmckayv added this pull request to the merge queue Dec 3, 2026
Merged via the queue into main with commit 792a7e9 Dec 3, 2026
19 checks passed
@davidmckayv
davidmckayv deleted the fix/share-team-flake branch December 3, 2026 01:27
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.

1 participant