oliver-zehentleitner / maity
web e2e: two_signatures_step is flaky (Sign the review detached / Locator.click timeout)
tsk-wp8hsgvha3n6 Done An agent
web-e2e failed in web/tools/e2e.py two_signatures_step on two PRs that change nothing near it (vuur 109856):
- #1635 at b5ef33cc: Locator.click timed out in that step. It went green on rerun.
- #1641 at e155b506 (a CLI-only PR): it failed at "Sign the review detached".
So it looks like a race in the test or the page on main, and every PR's CI pays for it.
What to do:
- Reproduce it on current main. Run the step in a loop under load if needed, within the shared machine's limits (run_slot.sh, pytest -n 2 at most). Name the wait or race that fails.
- Harden the step: wait on the state the click needs, not on time. If the page has a real race a person could hit, fix the page instead and say so.
- Show evidence: N loops green after the fix, and red before it if you managed to reproduce it.
Not in scope: rewriting the e2e step registry (tsk-pv5dbgabmr4m).
Notes
An agent · Nov 11, 2026, 11:54 UTC
Plan (unr9), branch claude/e2e-two-signatures from main. Written before any code.
Cause, from the failing log (#1641 e155b506, web-e2e job 130427527744) and the code:
- Playwright resolved
Sign the reviewin the card's status menu, then reported "element is not stable", then "element was detached from the DOM", and it never came back within 25 s. - The step creates, claims and reports a card through the API and loads the board. It opens the card's status menu (
.card-move .menu-button) and clicks the item. - The board draws as soon as the four open column groups have answered (tsk-a5pxwgkgr73e). The closed group (
status=done,cancelled&closed_after=…) answers later. Its answer, success or failure, runsdraw(true), the late draw, which rebuilds every card in the columns. M.menuButton(web/js/menu.js) keeps a menu's open state only in the DOM it built. A rebuilt card gets a new, closed status menu.focusSpotputs the focus back by position, but nothing reopens the menu. So the item the test (or a person) was about to click is gone.- When the closed read answers after the menu opened, the click loses. That is a race in the page, not only in the test: a person who opens a card's status or assign menu right after the board appears sees it snap shut.
- The same applies to the other redraw no action starts: the members' presence refresh every 30 s, which redraws while the "silent" filter is on.
Fix in the page (web/js/board.js, menu.js): a redraw the reader did not start carries an open card menu across. Before the draw it records the open
.menu-button[aria-expanded=true]in the columns, by itsdata-focuskey (move:<id>,assign:<id>), and the focused item's index. After the draw it reopens that card's menu and focuses the same item, if the card and the menu are still there. The menu is reopened through the menu's own open (exposed from M.menuButton), not a synthetic click. Applied to both late-draw branches and the silent-filter presence redraw. Redraws the reader starts (a move, a filter change) close the menu as before: they come from the reader's own action.Test, red before, green after:
- web/tools/smoke.js: hold the closed read (as the existing closed-read tests do), open a card's status menu, focus its second item, release the read. Expect the menu still open, its items present, and the focus on the same item. The same for the read failing.
- The e2e step itself needs no wait or retry once the page keeps the menu. If the fix holds, two_signatures_step stays as it is. I will run it in a loop under load where the shared machine allows (run_slot.sh, LANGUAGE=en_US) and report N runs.
Docs: web/context entry (why an unprompted redraw keeps an open menu, the rejected alternatives: a wait in the test, skipping the late draw while a menu is open), and a changelog fragment (Fixed, web).
- Playwright resolved
An agent · Nov 11, 2026, 12:24 UTC
Second flaky step, recorded on lotse's word (110775, 110807). Cause unknown, not part of this card's fix.
- Where: web/tools/e2e.py:3760,
account_tabs_layout, in the loop "the addresses before the tabs":page.goto("about:blank"),page.goto(f"{index}?lang=en#{old}"), wait for the redirect to#<new>, thenpage.go_back(). - Seen: main ci 43009349272 on fc9994e7 (the #1645 merge), web-e2e job 130486464005: "Page.go_back: Timeout 30000ms exceeded" while waiting for the load of about:blank. The screenshots stop at 272-fixtures-account-menu-2560. prju reported web-e2e red on #1647's head 6279b257 as well; I did not check that log.
- Not a regression: the loop comes from c2cc99c8b (#1409, 2026-11-05) and is unchanged since (
git log -L3750,3761). #1644/#1629 (dd5a81fb7) changes no history call in route.js or app.js, and #1645 changes no navigation (eyq5 110773). web-e2e was green on main e4ea222e (run 43016255165, job 130513527210), on #1640's run 43013252395, and on #1645's own head. - Local probe: the exact loop for every ACCOUNT_MOVED address at the four widths, 10 rounds, LANGUAGE=en_US, Chromium 1248 from file://. 400 go_back calls, 0 failed, median 30 ms, max 85 ms. Not reproduced.
- Open: why a Back from a file:// page to about:blank sometimes never reports its load on a runner. Not investigated further here; no retry or timeout bump.
- Where: web/tools/e2e.py:3760,
An agent · Nov 11, 2026, 14:32 UTC
#1654 merged as 3bbbc101c (head d61dc7c63). Approved by fmzu and ppge on the head, after 4hch's, fmzu's and gb8w's rounds.
Follow-up, in my next web PR (tsk-3s3eb6bsp15n PR 2) per vuur 111761 and lotse 111759: ppge's nit at web/tools/smoke.js, the twin-leave step. It finds the twin by data-key, so on old code it fails on the missing attribute before the behaviour; it will find the twin by its title so the step fails for the behavioural reason, with the data-key check kept separate.
The second flaky step (account_tabs_layout go_back) stays recorded here, cause unknown (nte-psmrhcm0566z).