Context
@neo-gemini-maryam's review of #19967 (5605932699, Depth Floor) challenged its predicate. syncVnodeTree() mounts the children it finds while me.mounted || !me.vdom.removeDom, but a container nested inside an unmounted document.body root gets mounted = false from the container cascade and never gets removeDom. A unit arm confirms it at the merged code (0c7ccd5878, test/playwright/unit/component/MountFlight.spec.mjs). A nested container's own update, held across the root's unmount(), lands and marks its child mounted: true (expected false). The same arm with the root's own update passes.
The Problem
This is the defect class of #19966, one level down. When the late update belongs to a container inside the unmounted root, not to the root itself, syncVnodeTree() still marks that container's children mounted under a removed tree. The next show cascades mounted: true and finds nothing to change, so the children's mount hooks never run. For a list, that is its Navigator subscription (the #19966 symptom). The grid header menu is not exposed: its value list carries no child components. Only the unit arm is measured.
The Architectural Reality
- Only two paths reach
syncVnodeTree(). A first render goes through onInitVnode() โ me.vnode = vnode โ afterSetVnode() โ syncVnodeTree() with deltas null. An update landing goes through executeVdomUpdate(), which passes response.deltas || [].
updateVdom() starts no flight on an unmounted component, so a landing on one always left before an unmount: its own, or an ancestor's.
removeDom marks only the component whose hide() / unmount() ran. Container#afterSetMounted() cascades mounted to the items, not removeDom.
- Design authority:
syncVnodeTree()'s JSDoc as merged in #19967: "A flight that lands after this component's unmount() still hands out its vnodes, but mounts no child: their DOM is gone". An ancestor's unmount removes the same DOM.
The Fix
Key the gate on where the sync comes from instead of on removeDom. A render mounts its children; an update landing mounts them only while its component is mounted: mountsChildren = me.mounted || !deltas. The JSDoc names both unmount sources.
Acceptance Criteria
Out of Scope
- A non-container root's
unmount() cascading to child components embedded in its vdom (out of scope in #19966 too).
Related
#19966 ยท #19967
Live latest-open sweep: checked the latest 20 open issues at 2026-10-21T20:45:17Z; no equivalent found.
A2A sweep: the last 30 messages, all read-states; no overlapping claim.
MC sweep: one query on the symptom ("nested container children stay mounted after ancestor hidden, mount hooks skipped on reopen"), 5 results. They are Julia's notes on vnode persistence under removeDom and her #19921 cascade note; none rules on this predicate.
Own-assignment sweep: 6 open, none overlapping.
Origin Session ID: 7ae4513c-24be-4f11-864b-167a32b15bd1
Retrieval Hint: "nested container update landing after ancestor unmount, syncVnodeTree mountsChildren, first render deltas null"
Context
@neo-gemini-maryam's review of #19967 (5605932699, Depth Floor) challenged its predicate.
syncVnodeTree()mounts the children it finds whileme.mounted || !me.vdom.removeDom, but a container nested inside an unmounteddocument.bodyroot getsmounted = falsefrom the container cascade and never getsremoveDom. A unit arm confirms it at the merged code (0c7ccd5878,test/playwright/unit/component/MountFlight.spec.mjs). A nested container's own update, held across the root'sunmount(), lands and marks its childmounted: true(expectedfalse). The same arm with the root's own update passes.The Problem
This is the defect class of
#19966, one level down. When the late update belongs to a container inside the unmounted root, not to the root itself,syncVnodeTree()still marks that container's children mounted under a removed tree. The next show cascadesmounted: trueand finds nothing to change, so the children's mount hooks never run. For a list, that is its Navigator subscription (the#19966symptom). The grid header menu is not exposed: its value list carries no child components. Only the unit arm is measured.The Architectural Reality
syncVnodeTree(). A first render goes throughonInitVnode()โme.vnode = vnodeโafterSetVnode()โsyncVnodeTree()withdeltasnull. An update landing goes throughexecuteVdomUpdate(), which passesresponse.deltas || [].updateVdom()starts no flight on an unmounted component, so a landing on one always left before an unmount: its own, or an ancestor's.removeDommarks only the component whosehide()/unmount()ran.Container#afterSetMounted()cascadesmountedto the items, notremoveDom.syncVnodeTree()'s JSDoc as merged in #19967: "A flight that lands after this component'sunmount()still hands out its vnodes, but mounts no child: their DOM is gone". An ancestor's unmount removes the same DOM.The Fix
Key the gate on where the sync comes from instead of on
removeDom. A render mounts its children; an update landing mounts them only while its component is mounted:mountsChildren = me.mounted || !deltas. The JSDoc names both unmount sources.Acceptance Criteria
document.bodyroot'sunmount()leaves the container's childrenmounted: false, and the root's next show runs theirafterSetMounted(true).#19966's behaviour, and first renders still mount their children.#19967code and green at head.Out of Scope
unmount()cascading to child components embedded in its vdom (out of scope in#19966too).Related
#19966 ยท #19967
Live latest-open sweep: checked the latest 20 open issues at 2026-10-21T20:45:17Z; no equivalent found. A2A sweep: the last 30 messages, all read-states; no overlapping claim. MC sweep: one query on the symptom ("nested container children stay mounted after ancestor hidden, mount hooks skipped on reopen"), 5 results. They are Julia's notes on
vnodepersistence underremoveDomand her#19921cascade note; none rules on this predicate. Own-assignment sweep: 6 open, none overlapping.Origin Session ID: 7ae4513c-24be-4f11-864b-167a32b15bd1
Retrieval Hint: "nested container update landing after ancestor unmount, syncVnodeTree mountsChildren, first render deltas null"