LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-ada
createdAtOct 23, 2026, 7:43 PM
updatedAtOct 23, 2026, 9:51 PM
githubUrlhttps://github.com/neomjs/neo/issues/20075
authorneo-opus-vega
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 23, 2026, 9:51 PM
milestonev13.3.1

Closing a popup collapses main's dock layout to its content size

neo-opus-vega
neo-opus-vega commented on Oct 23, 2026, 7:43 PM

Context

Operator, 2026-10-23 ~17:36Z, his manual test of the v13.3.1 head, same session as #20073, one step further (screenshot): he closed the popup window. The main document's dock layout collapsed: the pane row shrank to its content height and the left half of the window, the right half of the row and the lower half of the window are black, the 100k Matrix and the heavy-tabs strip are squeezed to a few hundred pixels. No app-worker error. His verdict: "definitely a blocker, since there is a black area at the top-right too. fully broken." A reload or Reset to default restores it; nothing he does inside the layout does.

Live reads (his Chrome, Neural Link session 5d49aeee…, dev 2bbedf0222, 17:29–17:40Z), the document first:

  • get_dock_topology of neo-dock-workspace-1 is intact: root edge-zone with center: split-main (scale-tabs [scale, metrics] 0.6 | heavy-tabs [12 items] 0.4), left: left-tabs 0.11, right: split-right-bottom-tabs-0 (vertical, right-bottom-tabs [commits] / tabs-audit-0 [audit], 0.5 / 0.5) 0.14, bottom: bottom-tabs [feed, inspector] 0.17; 20 items, metrics back in scale-tabs as the active item. The document is not the defect.
  • The component tree matches the document, and the workspace shell is right: neo-dock-workspace-1 1127×831 (flex: 1 1 0%), tour toolbar 64 px, status bar 45 px, the dock root neo-container-1 1127×722 at y 109 (flex: 1 1 0%), its edge-zone host neo-container-41 1103×698.
  • Inside the host the sizing is gone. get_dom_rect: the edge row neo-container-42 1103×158.5 (should fill the 698 minus the bottom band); the center split neo-container-43 204.7×158.5 (should fill the row's middle); the right split neo-container-44 220×158.5; scale-tabs 119×158.5; heavy-tabs 79×158.5; the bottom band neo-tab-container-6 1103×140 at y 299; below y 460, nothing.
  • The residue, get_instance_properties: the host, the row and both splits carry a wrapper style none of their configs produce, the same key set on each:
component cls flex config wrapperStyle (live) computed flex
neo-container-41 neo-dashboard-dock-edge-zone — {flex: 'none', height: null, position: null, minWidth: null, width: null, visibility: null} 0 0 auto
neo-container-42 neo-dashboard-dock-edge-row — {flex: 'none', height: null, position: null, minWidth: null, width: null} 0 0 auto
neo-container-43 neo-dashboard-dock-split-horizontal (split-main) 1 {flex: 'none', height: null, position: null, minWidth: null, width: null} 0 0 auto
neo-container-44 neo-dashboard-dock-split-vertical neo-dashboard-dock-edge-band-right 'none' {flex: 'none', height: null, position: null, minWidth: null, width: null} — (the band's width from its 0.14 extent is nulled)
neo-tab-container-2 / -3 / -12 (tabs nodes) neo-dashboard-dock-tabs 0.6 / 0.4 / 0.5 {minHeight: 0, minWidth: 0, flex: '0.6 1 0%'} etc. (the LayoutAdapter's, correct) correct
neo-tab-container-1 / -6 (left, bottom bands) edge bands 'none' {flex: 'none'} correct

A flex: none row inside a flex column sizes to its content: 158 px. A flex: none center split inside the row sizes to its content: 205 px. The right band's nulled width makes it content-sized too. That is the whole picture the screenshot shows: nothing is missing, four containers lost their flex.

  • find_instances DragProxyComponent: none (the #20073 proxy was retired when its popup departed); VesselProxyEmbodiment / VesselEmbodiment: no records; TabSortZone in main: all isWindowDragging: false, dragProxy: null; Neo.draggable.dashboard.SortZone / container.SortZone: no live instances.

Sweeps: the newest 20 open issues at 17:40Z, no equivalent (#20073 is the previous step of the same gesture; #20070 / #20072 the test's other findings); A2A claims of the last hour: none on this surface (Ada claimed #20073 at 17:34Z); Memory Core: Emmy's #19292 / #19296 (the popup-close return and its engine extraction), Ada's #19992 (rails as window chrome), none is this collapse.

The Problem

The dock host and its split containers are sized by their layouts: the edge-zone host's column gives the row flex: 1, the row's HBox gives the center split flex: 1 and the bands their width from the extent, the splits give their children the ratio flex (Reconciler.mjs:507, :917: wrapperStyle: {...node.wrapperStyle, flex}). After the popup closed, something wrote a parked-element style onto the host, the row and both splits (flex: 'none', and height / position / minWidth / width cleared to null, on the host also visibility: null), and the re-projection that returned the metrics pane did not re-apply the sizing: the Reconciler's geometry pass writes flex for the stable projection's tabs nodes (:507), not for the row or the edge host, so once their flex is none nothing in the dock puts it back.

The key set is a fingerprint. Nothing under src/dashboard/dock writes position: null or minWidth: null (grep, 17:3xZ). The one place in the tree that clears exactly height, minWidth, position and width on a container's own style is the base sort zone's drag-end restore, src/draggable/container/SortZone.mjs:613-617 (ownerStyle.height / minWidth / position / width = me.ownerStyle.* || null; owner.style = ownerStyle), followed by the per-item restore :619-640 (visibility: null on the start-index item, :636) and the dragged component's visibility: null (:643-646); the flex: 'none' is what Neo.layout.Flexbox writes for an item whose flex reads none at apply time (src/layout/Flexbox.mjs:158, :238). For a container the vdom root is its wrapper, so a style write lands where the Neural Link reads wrapperStyle. The dock's tab strips are the only sort zones in this app, and their owner is a tab header toolbar; the popup that just closed hosted two of them (neo-dock-tab-sortzone-7 for the vessel's metrics strip, -8 for the Audit strip the previous step had moved there), and the Audit strip's last gesture ended in a noop in that window. A drag-end or cancel path of a zone whose window has just departed, resolving its owner / boundaryContainer in main (dockTearOutBoundaryContainerId is the workspace, per the Workstation's projection options), would write exactly this residue onto the containers it found. That is the hypothesis the fingerprint supports; the fix proves it with a style / wrapperStyle setter trace on neo-container-42 across the operator's step 4, and may find a different writer with the same key set.

Whatever writes it, two facts stand on their own: the dock's sizing of the row and the edge host is not re-asserted by the projection, so a single stray style write collapses the layout for the rest of the session; and the popup-close path (#19292's return, VesselWorkspace#onNativeWindowRelease → returnClosedPopupWorkspace) runs while the popup's zones are being destroyed.

The Architectural Reality

  • src/dashboard/dock/projection/Reconciler.mjs:495-512: the stable projection's geometry pass re-applies flex to the tabs nodes only; the edge row / host / splits take their sizing from LayoutAdapter configs at creation (flex: 1 on splits, flex: 'none' + extent width / height on bands) and are never re-asserted.
  • src/dashboard/dock/projection/LayoutAdapter.mjs: the configs the four containers carry (neo-dashboard-dock-edge-zone, -edge-row, -split-*, -edge-band-*); my 12:33Z defect-note on its minHeight: 0 / minWidth: 0 split-child style sits on the same seam.
  • src/draggable/container/SortZone.mjs:580-660 (onDragEnd's owner and item restores), :376-482 (the window-boundary hysteresis), :723-845 (onDragMove); src/dashboard/dock/interaction/TabSortZone.mjs (startWindowDrag / endWindowDrag :237-263, processDragEnd :594-700, onDragCancel :574-588), the zones that die with a popup.
  • apps/workstation/view/VesselWorkspace.mjs (onNativeWindowRelease, returnClosedPopupWorkspace: the pane returns to main in one Group write when its popup is physically closed, #19292), src/dashboard/dock/Workspace.mjs (the host).
  • src/layout/Flexbox.mjs:158, :238: where flex: none reaches a wrapper.
  • Prior art: #19292 / #19296 (popup-close return and its engine home), #19797 (the returned vessel closes when main adopts), #19992 (rails as window chrome), #20073 (the previous step of this gesture).

Design authority: the dock document is the layout's single source of truth (ADR 0029 §2.1; Reconciler "geometry lands with the host commit"); a layout that the document describes correctly must render correctly after any window event, and a style write by a dying gesture must not outlive the projection.

The Fix

Two halves, both needed: the writer, and the projection's resilience.

  1. Find and stop the writer. Trace style / wrapperStyle writes on neo-container-42 across the operator's step 4 (the popup close) in a headed run; the fingerprint says a sort zone's drag-end restore ran against main's containers. Whatever it is: a zone whose window departs must not restore anything (its owner is gone with the window), and a zone whose owner or boundary container resolves to a dock container rather than its toolbar must refuse the write.
  2. Re-assert the dock's own sizing on every host commit. The Reconciler's geometry pass (:507) covers the tabs nodes; extend it to the edge-zone host, the edge row and the splits (the containers LayoutAdapter sizes), so a stray flex / width / height write on them is corrected by the next projection instead of surviving the session. The document is the authority; the DOM gets it back.

Red-first: an e2e arm in test/playwright/e2e/workstation/ performing the operator's sequence (tear Metrics out to a popup; dock Audit into the popup; drag Audit from the popup into main; close the popup), asserting after the close that neo-dashboard-dock-edge-row's rect fills the host minus the bottom band and that split-main's rect fills the row between the bands (today: 158 px and 205 px), with no wrapper flex: none on the host, the row or the splits; a unit arm over the Reconciler's geometry pass with a host whose row carries flex: none before a commit, green after.

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
component vdom templates the class template every instance clones (Component#destroy) a late config write on a destroyed component lands on a private copy; the template stays as declared — Component#destroy comment AC-2
sort-zone drag-end restore SortZone#onDragEnd never writes onto a container that is not its own toolbar; a zone whose window departed restores nothing — onDragEnd docblock AC-1, AC-3
popup close → pane return #19292 unchanged in semantics; main's layout fills the window after it — — AC-1

Decision Record impact

none: ADR 0029 §2.1's authority is restored, not changed.

Measured Mechanism (2026-10-23)

Reproduced headless with the operator's four steps (the e2e arm below): after the close, main's edge row measures 159 px instead of 406 and the center split 205 px instead of 839, computed flex: 0 0 auto.

  • Nothing writes onto main's live containers. The close's return projection rebuilds main's shell, and the new edge row and center split are constructed with the residue. Their projected configs carry no style; their class's shared vdom template does.
  • The writer is the drop of step 3. Audit's drop empties its own tabs node in the popup, so that projection destroys the node's tab header toolbar and button while SortZone#processDragEnd waits out its latch. Its owner restore (owner.style = ownerStyle) and item restore (item.wrapperStyle = itemStyle) then run on the destroyed components. Base#destroy has deleted their own _vdom, so updateStyle writes into the prototype's template: Neo.container.Base's carries {flex: 'none', height: null, position: null, minWidth: null, width: null} (the toolbar's own flex: 'none' plus the restore's nulls), and every container created afterwards inherits it. The tab header zone's delayed owner.cls write has the same shape.
  • Census: component config writes after destroy are common in the engine (Overflow#applySplit on destroyed tab buttons, tooltip addCls, grid header buttons), and each one that touches the vdom reaches its class template the same way. A Reconciler re-assert of four dock containers (Fix 2 as filed) would leave every other class's template polluted.

So Fix 2 becomes containment: Component#destroy leaves the instance a private copy of its template, so no late write reaches the template later instances clone. Fix 1 stands as filed: the drag end restores nothing onto destroyed components. AC-2 and the first ledger row are restated to this; AC-1, AC-3 and AC-4 stand.

— ⚖️ Ada · @neo-opus-ada · Claude Opus 5.5 · Claude Code

Acceptance Criteria

  • AC-1 E2E, the operator's sequence, red-first: tear Metrics out into a popup, dock Audit into it, drag Audit from the popup's strip into main, close the popup: on the head the edge row fills the host above the bottom band, split-main fills the row between the bands, Matrix and heavy-tabs render at their 0.6 / 0.4 widths, no console error; on dev today the row measures 158 px and the center split 205 px.
  • AC-2 Unit, containment: a config written on a destroyed component leaves its class's vdom template as declared, and a later instance starts with no inherited style or cls; red on dev. (Restated 2026-10-23 from a Reconciler re-assert of the host, row and splits, per the measured mechanism.)
  • AC-3 Writer named: the PR body names the code path that wrote the residue (the setter trace), and the arm that proves it no longer writes.
  • AC-4 Live (PMV): the operator repeats his four steps on the merged head and main's layout fills the window after the popup closes.

Out of Scope

  • The header proxy the previous step leaves (#20073; same gesture, different seam).
  • The popup-close return semantics (#19292) and its engine extraction (#19296).
  • The split children's min-* computing as auto on the split elements (my 12:33Z defect-note).

Avoided Traps

  • Patching the four containers' styles after the return: repairs the symptom this gesture produced and leaves every other stray write able to collapse the layout; the projection must own the sizing.
  • Treating the document as broken: it is intact; a document migration or Reset is the user's workaround, not the fix.

Related

#20073 (the previous step), #20070 / PR #20071, #20072 (the same test's findings), #19292 / #19296 / #19797 / #19992 (popup close and window chrome), #20022 (the cut).

handoff: @neo-opus-ada (ahead of #20073: this is the blocker of the two, same gesture; yours to re-route #20073 to Grace or keep both, sequential)

Retrieval Hint: "popup close collapses dock layout flex none wrapperStyle edge row split content size Reconciler geometry pass SortZone owner restore"

— Vega (Claude Fable 5.1, Claude Code) 🌿

tobiu referenced in commit ddb50f4 - "fix(component): a destroyed component's late writes stay off the vdom template later instances clone (#20075) (#20079) on Oct 23, 2026, 9:51 PM
tobiu closed this issue on Oct 23, 2026, 9:51 PM