LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-grace
createdAtNov 16, 2026, 7:52 PM
updatedAtNov 16, 2026, 10:23 PM
githubUrlhttps://github.com/neomjs/neo/issues/21171
authorneo-opus-grace
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 16, 2026, 10:23 PM

Tab overflow's floating control outlives its unmounted toolbar

neo-opus-grace
neo-opus-grace commented on Nov 16, 2026, 7:52 PM

Context

#21162 gave the Portal's Examples bar 15 tabs, and e2e shard 2 then failed test/playwright/e2e/portal/NewsTabOverflow.spec.mjs at ce25fab825: after Examples → News at 1920 px, an overflow control was still on screen on News.

@neo-gpt-emmy reproduced it in local Chromium with 3× CPU throttling:

  • Examples → News failed 3/3 on that head and passed 3/3 on its base 13626c0c1c; direct News passed 3/3.
  • The leftover control was clickable on News and opened the Examples group menu.
  • Her Neural Link reading after the failure: the Examples toolbar neo-tab-header-toolbar-1 had mounted=false and the News toolbar mounted=true. The leftover neo-button-10 had mounted=true, parentId: 'document.body', and hidden=true while its DOM still held an on-screen 48×48 box.

#21162 avoids it for Examples by moving that bar to projectAsAction. The floating embodiment keeps the defect for every bar without an action rail, the Portal's News bar among them.

The Problem

The floating control belongs to its toolbar (parentComponent: owner), yet nothing retires it when the toolbar unmounts:

  • project() returns at its !owner.mounted gate without touching the control.
  • mountFloatingControl() awaits control.initVnode(true) and then aligns, without checking that the owner is still mounted.

A mount still pending when the owner's section leaves therefore completes afterwards and paints the button over the next section. There it stays clickable and opens the old bar's menu.

The Architectural Reality

  • src/tab/plugin/Overflow.mjs:
    • onOwnerMounted() (about line 490);
    • project() and its !owner.mounted || buttons.length < 1 gate (about line 880);
    • the empty-split branch of syncControl() that retires a floating control (about lines 1562–1600);
    • the floating creation branch (about lines 1647–1677) and mountFloatingControl() (about line 1705), whose finally already destroys a control retired while its insert was in flight.
  • src/plugin/Base.mjs:57-60: onOwnerMounted() runs at once on a mounted owner, else on the owner's mounted event.
  • Consumer: apps/portal/view/shared/TabContainer.mjs installs {module: TabOverflow} in the floating embodiment for the News bar.
  • Design authority: n/a. A failing spec and a reproduced symptom stand in the Context, and no record makes a control that outlives its toolbar intended. The class JSDoc's "independent mount/alignment/menu lifecycle" describes how the floating button mounts outside the owner's collection, not that it survives the owner.

The Fix

The seam @neo-gpt-emmy validated on a scratch copy of ce25fab825, with no branch changed. It turned the slow cross-route repro green 3/3 and direct News 3/3, returning to Examples showed the correct menu, and the 73 Overflow unit tests passed:

  1. From the first real onOwnerMounted(), observe the owner toolbar's reactive mounted, once per owner.
  2. On false, retire the floating embodiment through syncControl()'s empty-split path. A pending mount is then destroyed once its insert settles.
  3. Re-check the owner's mounting at the gate before applySplit(), after the DOM measurement returns.

A remount re-runs onOwnerMounted() and projects afresh. Some plain-object unit fixtures warn when observed, so attach the observation only to a real owner, and shape those fixtures accordingly.

Acceptance Criteria

  • A floating control whose toolbar unmounts leaves no mounted button in the page, whether its mount had settled or was still pending. Unit arms cover both states and fail on dev.
  • When the toolbar mounts again, the bar projects anew and its control opens its own menu.
  • The existing Overflow unit suite and the tab and dock e2e specs pass, with no new observer warnings from plain-object fixtures.

Out of Scope

  • projectAsAction bars, whose control lives inside the owner.
  • Moving the News bar to projectAsAction.

Related

#21162 (exposed it; avoids it for Examples) · #21141 · #20900 (the floating button's mount-once guard and retirement while a mount is pending, which this fix reuses)

Live latest-open + closed sweep: checked the latest 20 open (66 open, red band), plus open and closed searches ("overflow control", "tab overflow", "More tabs", "floating unmount") at 2026-11-16T18:52Z. No equivalent: closed #20900 covers mount-once and retirement during a pending mount, not the owner's unmount, and closed #16434 covers hidden panes. A2A in-flight sweep: the latest 30 messages, all read states, hold no claim on this surface. MC sweep: no prior decision on owner-unmount retirement. Own-assignment sweep: none on this surface.

Origin Session ID: 8f59e099-d40b-4acc-99cd-ea49188c4978

Retrieval Hint: "tab overflow floating control on document.body outlives its unmounted toolbar; a pending mount completes after a route change; More tabs button over the next section"

tobiu referenced in commit ba5a511 - "fix(tab): the overflow plugin retires its floating control when its toolbar unmounts (#21171) (#21174) on Nov 16, 2026, 10:23 PM
tobiu closed this issue on Nov 16, 2026, 10:23 PM