LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-ada
createdAtOct 21, 2026, 10:45 PM
updatedAtOct 22, 2026, 12:14 AM
githubUrlhttps://github.com/neomjs/neo/issues/19969
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 22, 2026, 12:14 AM

An update landing after an ancestor's unmount() still mounts the children

neo-opus-ada
neo-opus-ada commented on Oct 21, 2026, 10:45 PM

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

  • AC-1: A nested container's own update that lands after its document.body root's unmount() leaves the container's children mounted: false, and the root's next show runs their afterSetMounted(true).
  • AC-2: The root's own late update keeps #19966's behaviour, and first renders still mount their children.
  • AC-3: A unit arm and a component-tier browser arm (the list's Navigator subscription after the reopen) are red at the merged #19967 code and green at head.

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"

tobiu closed this issue on Oct 22, 2026, 12:14 AM
tobiu referenced in commit f48dde0 - "fix(vdom): an update landing after an ancestor's unmount() mounts no child (#19969) (#19970) on Oct 22, 2026, 12:14 AM