Repository navigation
Description
What
e2e/ux2-shell.spec.ts, "Acceptance: overflowing tabs remain reachable and F6 visits cards and surface content", failed once at its poll "the strip is scrolled, short of its end" (line 959 at 3b7493f44): expected 1133, received 1172.5. It passed in every other run of that tree (in e2e:layout, and in e2e:default's second rerun in the whole group's order). The one red was manual gate run 3b7493f443a1-20261116T160258Z, where the scene ran as test 507 of 555 in one worker.
Cause (read in the code; not confirmed from a trace)
The received value is the strip's greatest offset (the scene read an overflow of 1173 and set 1133, 40 px short of the end). So after the scene set the offset, the product scrolled the tab in front (the Diagnostics tab, the strip's last) back into view.
src/renderer/src/main/TabStrip.tsx does that in two places: the effect on the pane's tabs runs measure once and again at every resize of the strip (a ResizeObserver), and measure scrolls the selected tab into view; a second effect does the same when the tab in front changes.
The scene opens "Background tasks" just before, which opens the side column and so narrows the title bar's strip. openSurface returns when the surface is visible. The observer's callback for that resize is delivered at the next frame; the scene's two calls (read the overflow, set the offset) can both run before it. When they do, the callback then scrolls the strip to its end, and the poll, which only reads, never sees the offset again.
The same order is in the scene on master. U6b-1 adds ten kept files and a column at its least width before it, which makes the column's reopening heavier and the frame later; that is the likely reason the first red is on this tree.
Not verified: which of the two (the observer's callback, or the effect's own first measure if the tabs' identity changes with the column) came late; no trace of the red run was read.
Fix (scene only; the product behaves as designed)
The scene settles on the state the reveal leaves, never on time (R2), and then sets the offset:
const widthBefore = await list.evaluate((el) => el.clientWidth); // read before openSurface(page, 'Background tasks')
await openSurface(page, 'Background tasks');
// the column is open and the strip's reveal has run at the narrowed width: the tab in front, the strip's last, is at its end
await expect.poll(() => list.evaluate((el, before) => el.clientWidth < before && el.scrollWidth - el.clientWidth - el.scrollLeft < 1, widthBefore),
{ message: 'the narrowed strip shows the tab in front at its end' }).toBe(true);
const overflow = await list.evaluate((el) => el.scrollWidth - el.clientWidth);
const offset = overflow - 40;
await expect(async () => {
await list.evaluate((el, to) => { el.scrollLeft = to; }, offset);
expect(await list.evaluate((el) => el.scrollLeft)).toBe(offset);
}, 'the strip is scrolled, short of its end').toPass();The first poll waits for the observer's reveal (before it runs, the strip is narrowed but still at the old, smaller offset, so the difference is the column's width). The set and its check are one retried step, so a reveal that still comes late is overridden, and the scene's later polls ("putting the tab in view in front moved nothing") still assert that nothing else moves the strip. If the first poll cannot tell the two states apart on some layout, a data mark written by measure is the other form; it is a product edit and comes back for a ruling.
It goes with the pull request for the load-sensitive cases' bounds.
Acceptance
The scene passes with --repeat-each=5 in e2e:default's whole order on the Mac mini's host, and the steps above carry no wait on time.
Activity
SSFSKIM commentedon Nov 17, 2026
CI-opt's 11-17 flake collection: the identical reading (scrollLeft 1172.5 vs 1133) was the 11-15 e2e:layout red on U1b's fbec1c0 (Actions 43756078524), which was counted then as U1b's own. It is this ticket's flake, not U1b's: it was seen again on U10b-2's 3b7493f (manual gate 3b7493f-20261116T160258Z), which does not hold U1b. Sightings: 2 (11-15, 11-16).
SSFSKIM commentedon Nov 19, 2026
Seen again 2026-11-19 on the Mac mini host, now about 3 in 5 instead of one red under load. ux2-shell.spec.ts 'overflowing tabs remain reachable and F6 visits cards and surface content': after the scene sets the strip's scrollLeft to overflow - 40 = 1133, every poll reads 1172.5, the strip's end. The failing repeats took 8 to 10 s and the passing ones about 4 s. --repeat-each 5 gave 3 failed, 2 passed at U6b-5a's 99a2222, and the same 3/2 with the same numbers at bdbfe86 (11-16, before U6b-5a). So it is the base's and not a branch's. Single runs passed at earlier heads with the same code (five on 11-16, one at 7d54d6c this morning). A foreground cut (MAWS_E2E_FOREGROUND=1) is queued to show whether it depends on the window being in front. Raised to P2: it now reds most Mac runs of e2e:layout.
SSFSKIM commentedon Nov 19, 2026
Foreground cut at bdbfe86 (plain build, MAWS_HARNESS=0, MAWS_E2E_FOREGROUND=1, --repeat-each 5): 2 failed, 3 passed, the same numbers. It does not answer the question: in every repeat the window never became key ('the first window is not key after 3 s'; Terminal was frontmost). The default lane's own foreground did take the front on the mini today, so the plain build or the spec decides that. Counts today on the mini host: background 3/5 (base), 3/5 + 1/1 (99a2222); foreground requested but not key 2/5 (base). A failing repeat runs about 4 s longer: the 5 s poll runs out. Whoever takes this: the scene's premise (scrollLeft set, then read) races a late reveal of the tab in front, as the title says. Make the scene wait for the strip to settle before setting the offset, or fix the reveal so it never fires after a person or a script has scrolled.
SSFSKIM commentedon Nov 20, 2026
Seen again 2026-11-20 on the Mac mini host at U6b-5b's 8e92a86, in e2e:default run whole in the foreground (MAWS_E2E_FOREGROUND), with the same numbers: scrollLeft 1172.5 against 1133, at :964 (in the background groups run of the same head it failed at :973). So being in the foreground doesn't clear it.
SSFSKIM commentedon Nov 21, 2026
CI-opt's 2026-11-21 flake collection, the count for 2026-11-20 on the Mac mini's host (manual gate, background unless noted): the F6 scene was red in 5 of the day's 7 whole
e2e:defaultruns, on five different trees, always with the same numbers (scrollLeft 1172.5 against 1133).Green in the whole default runs of 72429dc (022227Z) and 0107c57 (175922Z). So on the host it is no longer one red under load: it fails most whole default runs, and each of those runs is red for it alone or beside the tree's own reds. Logs:
~/.local/share/ci-opt/manual-gate/runs/<run>/mac/mini-run/logs/<group>/job.logon the MacBook.SSFSKIM commentedon Nov 21, 2026
[board] in-progress: Taken by the MAWS architect on CI-opt's count of 2026-11-21 (red in 5 of 7 whole e2e:default runs on the mini's host on 11-20): the scene-only fix of the body, built by a dispatched agent, proved on the mini's host through CI-opt's queue.