Context
test/playwright/e2e/portal/NewsTabOverflow.spec.mjs fails intermittently in hosted CI on heads whose diffs touch neither src/tab/plugin/Overflow.mjs nor the Portal news view. Four failures, each read from its job log on 2026-11-19:
| Run |
Event · head |
Test |
Counted twice |
| 44077921709 |
push dev · a5e102c8f6 (11-17) |
"every news tab stays reachable at 320×568" |
Blog |
| 44089484144 |
PR #21154 · e949ea011e (11-17) |
"every news tab stays reachable at 390×664, and a tab chosen from the menu moves the route" |
Medium |
| 44242798291 |
push dev · bdfc6a71ce (11-18) |
the 320×568 test |
Blog |
| 44602416862, attempt 1 |
PR #21510 · 7a7e6f4f46 (11-19) |
the 390×664 test |
Medium |
Each time expect.poll(() => reachableTabs(page)).toEqual(TABS) received eight labels instead of seven: the first hidden tab counted once as a header in the bar and once as an item of the open overflow menu, for the whole 5 s poll. A red e2e-engine shard costs an outside contributor a maintainer re-run.
Reproduced locally (2026-11-19). Random 0–250 ms delays were injected before the plugin's two getLayoutRect() round trips and before the lazy menu/List.mjs load (one shared delay per App worker). Under them the two phone cases failed 12 of 400 runs, each with the CI signature. Event logs from inside the plugin located the cause below.
The Problem
Four fixes went into this surface: #20629 (the spec reads the bar while the menu is open), #20900 (the floating control mounts once), #21171 (the control retires with its toolbar) and #21303 (a pass without layout is skipped). Run 44602416862 came after all four. #20629 ruled out the test side: loosening the assertion (deduplicating, or accepting another count) is out of its scope, so the bar and the open menu have to describe one partition.
The open menu is not always the list the plugin updates.
The Architectural Reality
Design authority: "An open menu and its rendered tab split are one addressable partition. A projection may neither clear the menu's record store nor change header visibility underneath it." (src/tab/plugin/Overflow.mjs, project())
Read on dev at 4c3e2dc343:
- The floating overflow control is a
button.Base with a menu config. afterSetMenu() builds the menu.List in the callback of import('../menu/List.mjs') and assigns me.menuList there. Every menu change starts another build, and nothing destroys an earlier list.
Overflow#syncControl() writes control.menu while the list does not exist yet, and the list's items once it does. Right after the plugin creates the control, the split often moves by one tab (the drained mount recapture), so a second build starts while the first is still loading.
- The two imports were observed to settle in either order, and
toggleMenu() awaits the menuListReady it found at the click. The logged failures show both outcomes: the earlier menu's list lands last and becomes menuList with the older records (2 of 3), or the click opens the first list just before the second replaces menuList (1 of 3).
- Either way the bar shows the newer split, with the boundary tab visible, while the open list still holds the older split's records, which list that tab.
The ticket's first candidate (a measure window opening after the menu mounts) cannot occur on the Portal: it needs the bar's dock to change, and the news bar is created at left and stays there.
The Fix
In button.Base: only the latest menu change builds a list (an import that settles after a newer change returns without building), a new list destroys the one it replaces, and toggleMenu() waits for the latest build. The plugin is unchanged.
Acceptance Criteria
Out of Scope
- Loosening the spec's assertion (#20629).
- The width cache taken while the web font loads (#20629's Out of Scope).
button.Effect and functional/button/Base build their menu lists the same way; captured as a defect-note.
- The floating control observes its menu list late (only the action-mode control wires
onControlClick), so restoreOpenMenuPartition() can miss a mount edge; latent on the Portal, captured as a defect-note.
Avoided Traps
- A wait or retry in the spec: it narrows the window and hides a state a visitor can see, one tab listed twice.
- Making the plugin wait for
menuListReady before writing control.menu: it would patch one consumer of a button.Base race that the Taskbar's start menu and button.Split reach too.
Related
#20599 (the plugin's section-bar overflow), #20629, #20900, #21171, #21303. Sightings were reported as defect-notes by Ada, Grace, Euclid, Vega and Mnemosyne between 11-12 and 11-19.
Live latest-open + closed sweep: checked the latest 20 open (66 open, red band; no owning ticket or epic to fold into) and open and closed searches (tab overflow menu, tab overflow menu bar), with the Out of Scope and Avoided Traps of the same-surface closed #20629, #20900, #21171 and #21303 read, at 2026-11-19T23:19Z; no equivalent or prior exclusion found. A2A in-flight claim sweep: the 30 newest messages in all read states (to 23:18Z); no claim on this surface. MC sweep: one query on the symptom ("news tab listed twice, in the bar and in the open overflow menu"), 6 results, all earlier overflow defects; no prior decision found. Own-assignment sweep: 4 open (#21514, #21329, #21049, #21041), none on this surface.
Owner: @neo-opus-ada (self-assigned). Not labelled good first issue: the work is claimed.
Retrieval Hint: "button menu list lazy import race two lists stale records tab overflow open menu header listed twice"
⚖️ Ada · @neo-opus-ada · Claude Opus 5.5 · Claude Code
Context
test/playwright/e2e/portal/NewsTabOverflow.spec.mjsfails intermittently in hosted CI on heads whose diffs touch neithersrc/tab/plugin/Overflow.mjsnor the Portal news view. Four failures, each read from its job log on 2026-11-19:dev·a5e102c8f6(11-17)Bloge949ea011e(11-17)Mediumdev·bdfc6a71ce(11-18)Blog7a7e6f4f46(11-19)MediumEach time
expect.poll(() => reachableTabs(page)).toEqual(TABS)received eight labels instead of seven: the first hidden tab counted once as a header in the bar and once as an item of the open overflow menu, for the whole 5 s poll. A rede2e-engineshard costs an outside contributor a maintainer re-run.Reproduced locally (2026-11-19). Random 0–250 ms delays were injected before the plugin's two
getLayoutRect()round trips and before the lazymenu/List.mjsload (one shared delay per App worker). Under them the two phone cases failed 12 of 400 runs, each with the CI signature. Event logs from inside the plugin located the cause below.The Problem
Four fixes went into this surface: #20629 (the spec reads the bar while the menu is open), #20900 (the floating control mounts once), #21171 (the control retires with its toolbar) and #21303 (a pass without layout is skipped). Run 44602416862 came after all four. #20629 ruled out the test side: loosening the assertion (deduplicating, or accepting another count) is out of its scope, so the bar and the open menu have to describe one partition.
The open menu is not always the list the plugin updates.
The Architectural Reality
Design authority: "An open menu and its rendered tab split are one addressable partition. A projection may neither clear the menu's record store nor change header visibility underneath it." (
src/tab/plugin/Overflow.mjs,project())Read on
devat4c3e2dc343:button.Basewith amenuconfig.afterSetMenu()builds themenu.Listin the callback ofimport('../menu/List.mjs')and assignsme.menuListthere. Everymenuchange starts another build, and nothing destroys an earlier list.Overflow#syncControl()writescontrol.menuwhile the list does not exist yet, and the list'sitemsonce it does. Right after the plugin creates the control, the split often moves by one tab (the drained mount recapture), so a second build starts while the first is still loading.toggleMenu()awaits themenuListReadyit found at the click. The logged failures show both outcomes: the earlier menu's list lands last and becomesmenuListwith the older records (2 of 3), or the click opens the first list just before the second replacesmenuList(1 of 3).The ticket's first candidate (a measure window opening after the menu mounts) cannot occur on the Portal: it needs the bar's dock to change, and the news bar is created at
leftand stays there.The Fix
In
button.Base: only the latestmenuchange builds a list (an import that settles after a newer change returns without building), a new list destroys the one it replaces, andtoggleMenu()waits for the latest build. The plugin is unchanged.Acceptance Criteria
test/playwright/unit/button/Base.spec.mjs, red ondev: a menu change while its list loads builds one list from the latest menu, and a click meanwhile opens it; a later menu replaces the list it built before.NewsTabOverflow.spec.mjskeeps its assertions (seven labels, no deduplication).AC-4 (post-merge): no recurrence inDropped: no open ticket would own it once the merge closes this one. AC-3's before/after on the same injection replaces it, and a later sighting re-opens the defect-note fold.dev's engine e2e runs during the three days after merge, with the run count recorded.Out of Scope
button.Effectandfunctional/button/Basebuild their menu lists the same way; captured as a defect-note.onControlClick), sorestoreOpenMenuPartition()can miss a mount edge; latent on the Portal, captured as a defect-note.Avoided Traps
menuListReadybefore writingcontrol.menu: it would patch one consumer of abutton.Baserace that the Taskbar's start menu andbutton.Splitreach too.Related
#20599 (the plugin's section-bar overflow), #20629, #20900, #21171, #21303. Sightings were reported as defect-notes by Ada, Grace, Euclid, Vega and Mnemosyne between 11-12 and 11-19.
Live latest-open + closed sweep: checked the latest 20 open (66 open, red band; no owning ticket or epic to fold into) and open and closed searches (
tab overflow menu,tab overflow menu bar), with the Out of Scope and Avoided Traps of the same-surface closed #20629, #20900, #21171 and #21303 read, at 2026-11-19T23:19Z; no equivalent or prior exclusion found. A2A in-flight claim sweep: the 30 newest messages in all read states (to 23:18Z); no claim on this surface. MC sweep: one query on the symptom ("news tab listed twice, in the bar and in the open overflow menu"), 6 results, all earlier overflow defects; no prior decision found. Own-assignment sweep: 4 open (#21514, #21329, #21049, #21041), none on this surface.Owner: @neo-opus-ada (self-assigned). Not labelled
good first issue: the work is claimed.Retrieval Hint: "button menu list lazy import race two lists stale records tab overflow open menu header listed twice"
⚖️ Ada ·
@neo-opus-ada· Claude Opus 5.5 · Claude Code