LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-ada
createdAtOct 23, 2026, 2:31 AM
updatedAtOct 23, 2026, 9:09 AM
githubUrlhttps://github.com/neomjs/neo/issues/20029
authorneo-gemini-julia
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 23, 2026, 9:09 AM
milestonev13.3.1

Staged dock projection strips neo-dock-maximized before overflow partition

Closed v13.3.1/archive-v13-3-1-chunk-1 bugaitestingdashboard
neo-gemini-julia
neo-gemini-julia commented on Oct 23, 2026, 2:31 AM

Context

Surfaced during the #20022 AC-1 v13.3.1 release-gate audit of the two single-test hosted CI reds seen on dev this week (run 39852869392, commit 998f35a3bf, shard e2e-brain (8/10) — WorkstationMaximizeTabReorderNL.spec.mjs:168, "switches active tab via click and reorders overflowed tabs via drag while maximized"). Full Playwright trace diagnosis (1-trace.trace DOM snapshots + test.trace call timeline) is recorded on #20022 (#20022#issuecomment-6354226190) with lead disposition in #20022#issuecomment-6354251452 placing this ticket in milestone v13.3.1 as a candidate whose blocking status the operator's walk decides.

The Problem

In test/playwright/e2e/workstation/WorkstationMaximizeTabReorderNL.spec.mjs:168-225, while the heavy-tabs dock node (#neo-tab-container-3, 8 tabs) is maximized:

  1. The test clicks #neo-tab-header-button-5 (activity, line 191, ts = 31289.49 ms).
  2. Workspace#onDockActiveIndexChange (src/dashboard/dock/Workspace.mjs:1972-1976) commits {operation: 'setActiveItem', tabsNodeId: 'heavy-tabs', itemId: 'activity'}. Because Operations.changeClassFor('setActiveItem') is 'topology' (src/dashboard/dock/model/Operations.mjs:89), Workspace#getRefreshOptions (Workspace.mjs:2122-2138) returns {} and refreshDockWorkspace() runs a full staged shell replacement (neo-container-2 → neo-container-16) rather than reconcileStableTopology.
  3. Part A — Product transient in Reconciler.moveRetainedTabChrome (src/dashboard/dock/projection/Reconciler.mjs:711, 908-918):
    • Maximize#onBeforeDockZoneDocumentChange (src/dashboard/dock/plugin/Maximize.mjs:242-249) rightly classifies setActiveItem on the maximized node as a neutral in-pane operation (isNeutralChange === true) and keeps maximizedNodeId = 'heavy-tabs'.
    • However, during the staged shell swap (Snapshot 203, ts = 31530.00 ms), Reconciler.moveRetainedTabChrome (Reconciler.mjs:908-918) overwrites tab.cls with [...(plan.config.cls || []), ...Reconciler.configDerivedClasses(tab)], stripping 'neo-dock-maximized' from #neo-tab-container-3 while leaving the four inline rect keys in tab.wrapperStyle.
    • Without 'neo-dock-maximized' (position: fixed), #neo-tab-container-3 drops back into flow layout at its docked split ratio (flex: 0.4 1 0%).
    • Still inside Reconciler.reconcileProjection (Reconciler.mjs:711) — before Workspace#refreshDockWorkspace (Workspace.mjs:2621-2628) calls Maximize#syncDockProjection() (Maximize.mjs:855-868) — the reconciler executes await Promise.all(overflowPlugins.map(plugin => plugin.project(true))).
    • Overflow#project(true) measures #neo-tab-header-toolbar-4 at the narrow un-maximized docked width and overflows 7 of the 8 tab buttons (removeDom: true) — including #neo-tab-header-button-10 (console) — leaving only #neo-tab-header-button-5 (activity) mounted in the strip (Snapshots 224–261, ts = 31703.71–32029.82 ms). When Maximize#syncDockProjection() subsequently calls applyPresentation('heavy-tabs', {animate: false}) (Maximize.mjs:868), it restores 'neo-dock-maximized' without re-projecting Overflow, leaving the maximized strip collapsed to 1 visible tab and 7 overflowed tabs (and evicting #neo-tab-header-button-10 mid-drag).
  4. Part B — Premature post-click settle gate in WorkstationMaximizeTabReorderNL.spec.mjs:192-199:
    • dockModel.nodes['heavy-tabs'].activeItemId updates synchronously at commit time (31377 ms) while refreshDockWorkspace() is still awaiting flip?.captureFirst() (Workspace.mjs:2533).
    • Because me.animationSuppressedBars is [] until onProjectionStaged runs inside Reconciler.reconcileProjection (Reconciler.mjs:561, Snapshot 184 at ts = 31454.36 ms), the spec's expect.poll (activeItemId === 'activity' && animationSuppressedBars.length === 0) resolves at 31384.62 ms (70 ms before onProjectionStaged adds neo-no-animation), and not.toHaveClass(/neo-no-animation/) (31426.73 ms), waitOverflowIdle (31431.02 ms), and flipSettled (31441.95 ms) all complete before the staged shell replacement even starts.

The Architectural Reality

Design authority: src/dashboard/dock/plugin/Maximize.mjs:21-28, 231-237 ("Input contract while a node is maximized: in-strip tab reordering stays live... operations confined to the node itself (activating one of its tabs; closing, reordering or adding an item within it) defer to the re-projection rule instead, which re-applies onto the surviving node") and #19986 / #19996 (maximized strip overflow capacity).

  • src/dashboard/dock/projection/Reconciler.mjs:66-69, 908-918: configDerivedClasses intentionally avoids a blind union with tab.cls so a cleared maximize cannot stick, because Maximize#afterSetMaximizedNodeId (Maximize.mjs:277-278) chains clearPresentation asynchronously on transitionTail. However, for a surviving maximized node (Maximize#onBeforeDockZoneDocumentChange kept maximizedNodeId === nodeId, or Maximize#resetPresentation runs synchronously on instant clear), stripping 'neo-dock-maximized' in moveRetainedTabChrome causes Reconciler.mjs:711 (overflowPlugins.map(plugin => plugin.project(true))) to measure and partition the strip at its un-maximized docked width.
  • test/playwright/e2e/workstation/WorkstationMaximizeTabReorderNL.spec.mjs:192-199: must await the workspace's refreshPromise / projectionCycle (and settled overflow partition, per #20020 / PR #20021) before starting dragTabHorizontally.

The Fix

  1. Preserve or sync 'neo-dock-maximized' across staged projection before Overflow#project(true) runs (src/dashboard/dock/projection/Reconciler.mjs / src/dashboard/dock/plugin/Maximize.mjs):
    • Ensure that when a maximized tabs node survives a neutral operation (maximizedNodeId === nodeId), 'neo-dock-maximized' is retained on tab.cls through Reconciler.moveRetainedTabChrome (while Maximize#onBeforeDockZoneDocumentChange synchronously strips 'neo-dock-maximized' via resetPresentation({animate: false}) when maximizedNodeId is cleared before reconciliation), OR ensure collaborator projection sync (syncDockProjection + tabContainer.promiseUpdate()) completes before overflowPlugins.map(plugin => plugin.project(true)) partitions the strip.
  2. Tighten the post-click settle gate in test/playwright/e2e/workstation/WorkstationMaximizeTabReorderNL.spec.mjs:192-199:
    • Include !ws.refreshPromise && !ws.projectionCycle (and settled maximized-strip overflow count overflowCount === 0) in the post-click expect.poll gate so dragTabHorizontally never begins while the setActiveItem('activity') projection is still staging.

Contract Ledger

Target Surface Source of Authority Proposed Behavior Fallback / Edge Docs Evidence
Maximize#getDockProjectionOptions & LayoutAdapter.project (src/dashboard/dock/plugin/Maximize.mjs, src/dashboard/dock/projection/LayoutAdapter.mjs) Maximize.mjs:21-28, 231-249, Reconciler.mjs:66-69 & #19986 / #19996 Maximize#getDockProjectionOptions() contributes dockMaximizedNodeId: this.maximizedNodeId; LayoutAdapter.project projects 'neo-dock-maximized' on nodeId === context.dockMaximizedNodeId so Reconciler.moveRetainedTabChrome retains the class across staged swaps without a ~50 ms docked-size drop; non-neutral operations still clear maximizedNodeId before projection Terminal clear on non-neutral operations remains non-sticky; projection is unchanged when dockMaximizedNodeId is null JSDoc on Maximize#getDockProjectionOptions & LayoutAdapter.project test/playwright/unit/dashboard/DockMaximizePlugin.spec.mjs + test/playwright/e2e/workstation/WorkstationMaximizeTabReorderNL.spec.mjs
WorkstationMaximizeTabReorderNL.spec.mjs #20020 / WorkstationMaximizeTabReorderNL.spec.mjs Post-click settle gate awaits a new projectionCycle.id (!== cycleBefore) with Boolean(projectionCycle.timing?.settledAt) and samples every animation frame via watchFrames before starting tab drag Fails loudly on timeout or if any frame drops neo-dock-maximized or its 8 headers JSDoc on watchFrames + inline test comment WorkstationMaximizeTabReorderNL.spec.mjs 3/3 pass

Decision Record impact: none

Acceptance Criteria

  • Activating, reordering, adding, or closing a tab inside a maximized dock tabs node (Maximize#isNeutralChange === true) never causes Overflow#project(true) during Reconciler.reconcileProjection to partition the strip at its un-maximized docked width or evict visible headers into the overflow menu.
  • Non-neutral dock operations that clear maximizedNodeId before reconciliation continue to remove 'neo-dock-maximized' terminally without sticking across moveRetainedTabChrome.
  • WorkstationMaximizeTabReorderNL.spec.mjs awaits the activation's settled projectionCycle (projectionCycle.id !== cycleBefore && Boolean(projectionCycle.timing?.settledAt)) after clicking activity before starting dragTabHorizontally.
  • Unit coverage (test/playwright/unit/dashboard/DockMaximizePlugin.spec.mjs) and test/playwright/e2e/workstation/WorkstationMaximizeTabReorderNL.spec.mjs (3/3) pass.

Out of Scope

  • Changing Operations.changeClassFor('setActiveItem') globally outside the maximize/reconciler continuity seam unless verified safe across all dock consumers.

Avoided Traps

  • Fixing only the spec's post-click settle gate (WorkstationMaximizeTabReorderNL.spec.mjs:192-199) would still fail if Reconciler.moveRetainedTabChrome strips 'neo-dock-maximized' and Reconciler.mjs:711 overflows 7 of the 8 tabs into removeDom: true before Maximize#syncDockProjection() runs. Both halves are required.

Related

unowned-rationale: Filed as a milestone v13.3.1 candidate per lead disposition on #20022 (#20022#issuecomment-6354251452) so the operator's walk can decide whether it blocks v13.3.1 or ships in v13.3.2.

Live latest-open sweep: checked latest 20 open issues in neomjs/neo at 2026-10-23T00:26:37Z; no equivalent found. A2A in-flight claim sweep: checked latest 30 messages (status: 'all') at 2026-10-23T00:26:26Z; no competing claim. MC sweep: neomjs/neo WorkstationMaximizeTabReorderNL moveRetainedTabChrome neo-dock-maximized animationSuppressedBars, 5 results, no prior ticket or decline found. Own-assignment sweep: 0 open in neomjs/neo, none overlapping.

Origin Session ID: 2ebc6210-9d88-4eb6-a97b-ee57663be8e2 Retrieval Hint: "WorkstationMaximizeTabReorderNL moveRetainedTabChrome neo-dock-maximized overflowPlugins 39852869392"

tobiu referenced in commit 3317a12 - "fix(dock): a maximized pane stays maximized through a staged refresh (#20029) (#20031) on Oct 23, 2026, 9:09 AM
tobiu closed this issue on Oct 23, 2026, 9:09 AM