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

A component whose own flight renders it away stays mounted without a vnode

neo-opus-ada
neo-opus-ada commented on Oct 23, 2026, 10:54 AM

Context

Grace's defect-note MESSAGE:54abadd1 (2026-10-23) comes from the #20017 warm-reload trace on dev 9cad83b350. A dock host moved between windows mid-projection (WorkspaceController#onWindowConnect: a silent remove, then target.add). It ended up mounted: true with no vnode, and a promiseUpdate() asked on it never settled. #20017's fix (PR #20032) removes that trigger. Promoted from the cut steward's lane list on #20022.

Design authority: the operator's challenge on PR #20044 (2026-10-23): mounted: true and having a vnode mean the same, so this is a state that should not exist. The ticket's first version asked to settle the state. The second version asked to report it. With the report in place, CI then found a live producer (below), so this version also removes that producer.

The Problem

The engine pairs the two flags on most paths. Every path that drops a child's vnode sets mounted = false in the same step: a parent's unmountRemovedChildren pass, which hide() (removeDom) and focus-gated action withdrawal reach through their owner's update, and the SortZone cross-window handover. A mount assigns the vnode before it sets mounted.

One path did not. It is a component whose OWN flight renders it away. resolveVdomUpdate syncs the flight root's reply vnode, which is null when that root carries removeDom. syncVnodeTree(null) then nulled _vnode, and nothing unmounted the component.

The report found it in CI at PR #20044's head 01bad08d3c. It fired in two grid e2e flows: grid/HeaderMenuStateNL "native selection, final uncheck and Clear…" and grid/IssuesShowcase "a filtered locked column keeps its header marked while its menu is closed". A local probe named the components: the grid search toolbar's filter summary and its Clear button. Both hide themselves with set({hidden, disabled}). hide() stamps removeDom, and the other config runs the component's own flight.

On dev the state is transient. A later parent flight pairs the flags again, so the end state converges. But an update or a promiseUpdate() asked in the window parks silently, and nothing is logged.

The Architectural Reality

  • src/mixin/VdomLifecycle.mjs syncVnodeTree syncs a flight root's vnode, and unmountRemovedChildren handles the children a flight removes. Before the fix, the flight root itself was never unmounted when its own vnode came back null.
  • updateVdom starts a flight for a mounted, initialized component only when !isParentUpdating && !isChildUpdating && vnode. With no vnode, nothing ran and nothing was said.
  • isParentUpdating(parentId, resolve) registers a post-update on a colliding parent flight. That path still takes such an update first and must stay.
  • The parent's re-render sets mounted = true again for a child it re-inserts (syncVnodeTree's child pass), so unmounting on a self-removal is symmetric.

The Fix

  1. syncVnodeTree unmounts a component whose own flight left it without a vnode, as unmountRemovedChildren does for the children a parent's flight removes. A promise asked while it is away then waits as a not-yet-mounted one does, and the render that mounts it again settles it.
  2. Any remaining breach is reported. When a mounted component without a vnode asks for an update and neither a parent nor a child flight takes it, updateVdom logs one console.error naming the component.

Acceptance Criteria

  • AC-1: a unit arm with nothing in flight. From mounted: true, vnode: null, promiseUpdate() logs one console.error naming the component. Red on dev (nothing logged), green with the fix.
  • AC-2: controls. A same-window silent remove plus add still resolves, and the existing settle-timing contract arms stay green.
  • AC-3: unit arms for the producer.
    • A component whose own flight renders it away (vdom.removeDom + its own promiseUpdate()) ends mounted: false.
    • A promiseUpdate() asked while it is away settles when its parent shows it again.
    • Both are red on dev.
  • AC-4: the grid e2e flows the report caught at 01bad08d3c (grid/HeaderMenuStateNL, grid/IssuesShowcase) are green with the fix, so the report no longer fires there.

Out of Scope

  • Settling a breach through an ancestor's flight. See Avoided Traps.
  • Re-creating the cross-window trigger, which #20032 removed.
  • #18802's not-yet-mounted exception.

Avoided Traps

  • Settling the breach through the nearest rendered ancestor (the first version of PR #20044: register as its merged child and request its update). It made a state that should not exist work, at the cost of an ancestor walk in the engine. It would also have hidden the producer the report then found.
  • Settling it in syncVnodeTree by claiming parked callbacks. It is the same trade. The fix unmounts instead, which hands the promise to the existing not-yet-mounted contract.

Related

  • #20017 / PR #20032 (the cross-window trigger, removed), #18787 (the promiseUpdate contract), #18802 (the not-yet-mounted exception, kept), #20022 (lane list), PR #20044, Grace's defect-note MESSAGE:54abadd1

Live latest-open sweep: checked the latest 20 open issues at 2026-10-23T08:53:38Z; no equivalent. gh search issues "promiseUpdate never settles" finds only #18802 (closed, the not-yet-mounted case). A2A claim sweep (all read-states, last 30): no claim besides my lane-intent MESSAGE:b068530b. MC sweep: "promiseUpdate hangs never resolves on a mounted component whose vnode is null after moving between windows, callback unclaimed", 3 results. #18802's not-planned decision is the closest; it is a different state. Own-assignment sweep: 8 open, none overlapping.

Origin Session ID: d373d94f-3d91-4a15-a181-4309706acfb5 Retrieval Hint: "promiseUpdate mounted true vnode null own flight renders it away removeDom syncVnodeTree unmount grid search toolbar clear button"

tobiu referenced in commit eebd6b5 - "fix(vdom): a component whose own flight renders it away unmounts (#20043) (#20044) on Oct 23, 2026, 3:45 PM
tobiu closed this issue on Oct 23, 2026, 3:45 PM