Context
test/playwright/component/menu/SpawnAnimation.spec.mjs "a dismissed and reopened instance is cleaned up and re-arms" flakes the components (3/3) shard. The reopened menu stays unaligned: the node is present but has no neo-aligned-* class for 5 s. It failed on #19964 (job 119302098063) and #19970 (job 119479884524), and components (3/3) failed in 3 of the 6 dev runs before 0c7ccd5878. Locally it reproduces 1/30 serially, and 3/60 under 6 workers with a probe that replays the arm.
The probe timelines (App worker clock, Neo.menu.List#afterSetMounted / alignTo hooks plus the update batches):
- Passing: the hide's viewport batch removes the menu node. A deferred
List.unmount() (src/menu/List.mjs) then sets mounted: false about 68 ms later. On the reopen batch, the viewport's landing mounts the menu again → afterSetMounted(true) → alignTo() → DomAccess.align with the node present.
- Failing: the reopen batch follows the hide's 9 ms later, before the deferred unmount. The menu still reads
mounted: true, so the reopen is no transition: no afterSetMounted(true), no alignTo(), and the new node never aligns.
The Problem
The arm's menu is a floating ITEM of the viewport container (parentId: 'component-test-viewport'), rendered inside the viewport's node. Hiding it runs Component#hide()'s non-body branch (vdom.removeDom = true + parent.update()). The parent's landing removes the node, but VdomLifecycle#unmountRemovedChildren skips floating children, so the menu keeps mounted: true with no DOM until something else unmounts it. During that window it breaks the engine's contract: a component without DOM reports mounted. Its updates can still fly and produce deltas for a missing node, and a show inside the window gets no mount hooks (alignment, focusOnMount, the outside-pointer listener). The same holds for any floating component hidden inside a parent, not just menus (inferred from the code path; measured only for the menu).
The Architectural Reality
src/mixin/VdomLifecycle.mjs unmountRemovedChildren() unmounts children absent from the synced tree, except child.floating. Its JSDoc gives the reason: "Floating children (dialogs, popups) render outside their parent's node and are never tested."
- That reason does not hold for a floating child added as an item: it renders inside its parent's node, and its own
removeDom is what took the node out.
component.Base#hide() for a parent other than document.body never calls unmount(). #18290 recorded this ("mounted stays TRUE for a hidden floating menu") and keyed its focus guard on hidden instead.
- Design authority: the same JSDoc says "
mounted is state tracking, not a DOM operation: the node is already gone, this records it." A floating child whose own vdom.removeDom removed it is exactly such a gone node.
The Fix
In unmountRemovedChildren(), test a floating child too when its own vdom carries removeDom: !child.floating || child.vdom.removeDom. A hidden floating child is then unmounted by the landing that removed it, and its next show mounts it again with every mount hook. Floating children that render elsewhere and are not hidden stay untested, as before. The JSDoc names the exception.
Acceptance Criteria
Post-Merge Validation
Out of Scope
HeaderCellRectSync.spec.mjs:99 (defect-note 9d6ebee41034cd70): a different flake, with its own ticket if it recurs.
Related
#18290 · #19964 · #19970
Live latest-open sweep: checked the latest 20 open issues at 2026-10-21T21:42:07Z; no equivalent (#19969 is mine, about syncVnodeTree's mount pass).
A2A sweep: the last 12 messages, all read-states; no overlapping claim.
MC sweep: one query on the symptom ("reopened floating menu unaligned, hidden floating child stays mounted"), 5 results. #18290's note records the fact and designs around it; no ruling keeps the skip intentional.
Own-assignment sweep: 7 open; #19969 touches the same file but another function.
Origin Session ID: 17bb8277-9137-4774-9a4d-7d98db9779a6
Retrieval Hint: "hidden floating child stays mounted, unmountRemovedChildren floating skip, SpawnAnimation reopened menu unaligned"
Context
test/playwright/component/menu/SpawnAnimation.spec.mjs"a dismissed and reopened instance is cleaned up and re-arms" flakes thecomponents (3/3)shard. The reopened menu staysunaligned: the node is present but has noneo-aligned-*class for 5 s. It failed on#19964(job 119302098063) and#19970(job 119479884524), andcomponents (3/3)failed in 3 of the 6devruns before0c7ccd5878. Locally it reproduces 1/30 serially, and 3/60 under 6 workers with a probe that replays the arm.The probe timelines (App worker clock,
Neo.menu.List#afterSetMounted/alignTohooks plus the update batches):List.unmount()(src/menu/List.mjs) then setsmounted: falseabout 68 ms later. On the reopen batch, the viewport's landing mounts the menu again →afterSetMounted(true)→alignTo()→DomAccess.alignwith the node present.mounted: true, so the reopen is no transition: noafterSetMounted(true), noalignTo(), and the new node never aligns.The Problem
The arm's menu is a floating ITEM of the viewport container (
parentId: 'component-test-viewport'), rendered inside the viewport's node. Hiding it runsComponent#hide()'s non-body branch (vdom.removeDom = true+parent.update()). The parent's landing removes the node, butVdomLifecycle#unmountRemovedChildrenskips floating children, so the menu keepsmounted: truewith no DOM until something else unmounts it. During that window it breaks the engine's contract: a component without DOM reports mounted. Its updates can still fly and produce deltas for a missing node, and a show inside the window gets no mount hooks (alignment,focusOnMount, the outside-pointer listener). The same holds for any floating component hidden inside a parent, not just menus (inferred from the code path; measured only for the menu).The Architectural Reality
src/mixin/VdomLifecycle.mjsunmountRemovedChildren()unmounts children absent from the synced tree, exceptchild.floating. Its JSDoc gives the reason: "Floating children (dialogs, popups) render outside their parent's node and are never tested."removeDomis what took the node out.component.Base#hide()for a parent other thandocument.bodynever callsunmount().#18290recorded this ("mounted stays TRUE for a hidden floating menu") and keyed its focus guard onhiddeninstead.mountedis state tracking, not a DOM operation: the node is already gone, this records it." A floating child whose ownvdom.removeDomremoved it is exactly such a gone node.The Fix
In
unmountRemovedChildren(), test a floating child too when its own vdom carriesremoveDom:!child.floating || child.vdom.removeDom. A hidden floating child is then unmounted by the landing that removed it, and its next show mounts it again with every mount hook. Floating children that render elsewhere and are not hidden stay untested, as before. The JSDoc names the exception.Acceptance Criteria
removeDom) through its parent's update ismounted: falseonce that update lands, and showing it again runs itsafterSetMounted(true).neo-aligned-*).SpawnAnimation.spec.mjs"a dismissed and reopened instance is cleaned up and re-arms" passes every run at head (240 runs). This is an outside-CI receipt.0c7ccd5878. The natural failure is observed in CI (#19970, job 119479884524) and was reproduced locally only on the pre-#19967engine (1/30 serial, 3/60 in the probe). AC-2's deterministic arm carries the red-on-base proof.Post-Merge Validation
components (3/3)ondevshows noSpawnAnimation.spec.mjs"unaligned" failure over the next 10 runs.Out of Scope
HeaderCellRectSync.spec.mjs:99(defect-note 9d6ebee41034cd70): a different flake, with its own ticket if it recurs.Related
#18290 · #19964 · #19970
Live latest-open sweep: checked the latest 20 open issues at 2026-10-21T21:42:07Z; no equivalent (
#19969is mine, aboutsyncVnodeTree's mount pass). A2A sweep: the last 12 messages, all read-states; no overlapping claim. MC sweep: one query on the symptom ("reopened floating menu unaligned, hidden floating child stays mounted"), 5 results.#18290's note records the fact and designs around it; no ruling keeps the skip intentional. Own-assignment sweep: 7 open;#19969touches the same file but another function.Origin Session ID: 17bb8277-9137-4774-9a4d-7d98db9779a6
Retrieval Hint: "hidden floating child stays mounted, unmountRemovedChildren floating skip, SpawnAnimation reopened menu unaligned"