Context
Ada's 2026-10-10 03:55Z defect-note: DockTabReorderGesture › "a click after a reorder activates the item its button shows" is flaky on dev 5698517f19 (dev 2/18, the #19538 branch 4/30): the header re-renders ~110 ms after the drop and the click lands on the toolbar. The operator's v13.2 cut order (#14800, 6097885253) lists it under dock polish. Measured here at dev 5698517f19 on examples/dashboard/dock, headless Chromium 1600×1000: five runs, identical timelines.
The Problem
After a within-header reorder (Swarm dragged behind Timeline) the strip collapses to the active tab plus a "…" overflow control, then recovers:
| ms after mouseup |
main thread |
| 27 |
the reorder's own deltas: moveNode for the two shifted buttons (a move, not a re-render) |
| 60–63 |
the overflow plugin's post-drag pass measures extent 0 and decides to hide 6 of 7 tabs |
| 78 |
insertNode of the overflow control (neo-tab-overflow-control) into the rail |
| 94–96 |
removeNode for the six inactive tab buttons; the strip shows SWARM and "…" |
| 97–131 |
neo-dashboard-dock-animating is absent: the spec's rest signal reads "at rest" while six buttons are gone |
| 149–162 |
the next pass measures extent 692, re-inserts the six buttons and hides the control |
Paint witnesses (the strip clipped at +40 and +100 ms) show only SWARM and "…"; at +300 ms all seven tabs. On a 60 Hz display that is three to four blank frames at every reorder, and a pointer that lands in the window hits the toolbar instead of a button, which is the flake.
The Architectural Reality
- The drag's
mousedown focuses the tab button, so toolbar.Base#applyContextualActionState (src/toolbar/Base.mjs:245, gated on containsFocus at :370-376) brings the dock header's four contextual actions back: the header's action set grows from one item to four. Their DOM nodes land at ~68–78 ms.
Neo.tab.plugin.Overflow#project (src/tab/plugin/Overflow.mjs:815-841) measures the owner, every action item and the control in one getDomRect round trip, derives actionStart from actionRects[0] (:822), takes coordinateExtent = actionStart − ownerStart (:829) and extent = min(coordinateExtent, sizeExtent) (:839-841).
- The post-drag pass (
scheduleSortDragProjection, :552, drains as soon as the SortZone's dragEndActive clears) runs at ~60 ms. The first action item is in items but not in the DOM yet, so its rect is all zeros: actionStart = 0, coordinateExtent = 0, extent = 0 while sizeExtent is 752. computeOverflow hides everything but the protected active tab (hidden: 6), applySplit removes the six buttons, syncControl inserts the control.
- The pass publishes
overflowProjectionStart / Idle around its own work (:591-608; the dock adapter maps the pair to MotionSignal at src/dashboard/dock/projection/LayoutAdapter.mjs:1296-1297), so after it lands the signal is idle while the wrong split is painted.
Design authority: src/tab/plugin/Overflow.mjs:834-838 — "Visible tabs can briefly push the action rail beyond the owner after a wide→narrow resize. Its coordinate then overstates available space and self-sustains an all-visible split. The rendered action widths provide the owner-bounded ceiling; the coordinate remains authoritative whenever gaps, margins, or another stricter boundary make it smaller." The measured case falls outside that premise: the "stricter boundary" is a node that has no box yet, an absent measurement rather than a boundary.
The Fix
In Overflow#project, derive actionStart from the first action rect with a positive main-axis size, and let coordinateExtent fall back to null (the existing sizeExtent path) when no action rect is laid out. actionSize already clamps unlaid-out rects to 0 (:823-827), so the size path is right for them; only the coordinate path trusts an all-zero rect. No change to computeOverflow, the drain, the dock reconciler or the spec's rest signal.
Red-first unit arm in test/playwright/unit/tab/plugin/Overflow.spec.mjs: a pass whose first action rect is {x: 0, width: 0} on a 772-wide owner keeps every tab visible; the same pass with a laid-out first action at x 692 still caps at 692 (the control for the existing split arms). Then DockTabReorderGesture.spec.mjs ×10 interleaved on dev and at the head, Ada's method.
Acceptance Criteria
Out of Scope
- The motion signal's gap between a pass that applied a split and the pass that corrects it: with AC-1 no wrong split lands on this path. Another transient geometry reaching the plugin is a separate ticket.
- Making the post-drag drain wait for the header's pending action commit. Rejected as the first shape: it would still trust a zero rect from any other source, and the drain's JSDoc wants the first pass after the drop.
- Ada's second note (the place-cycle restore ~12 px off baseline): environment, unowned.
Avoided Traps
- Reading
restingTab as the defect: the spec's wait is right; the DOM it waits on is wrong for ~65 ms with no signal.
- Blaming the dock reconciler: the retained toolbar is reparented into the new shell at ~127 ms, after the buttons are gone; the reconciler's post-swap
project(true) (#19094) is the pass that restores them.
- Blaming the reorder's vdom update: the 27 ms batch moves the two shifted buttons by id, as #18652 designed.
Related
- #19285 / #19294 (the projection withholds a focused tab), #19094 (the reconciler un-hides an action-mode control), #16424 (control reservation vs strip indicator), #18652 (reorder identity), #14800 cut order item 1.
- Ada's defect-note, A2A 2026-10-10 03:55Z.
Live latest-open sweep: checked the latest 20 open issues at 2026-10-10T13:16Z; no equivalent found (search "tab overflow plugin header": none). A2A claim sweep: Grace's 13:15Z cut-order claim names this leaf as mine; no competing claim. Memory Core sweep: #19281 / #19285 (focus), #19094 (reconciler un-hide), #16424; none covers the zero-rect extent.
Origin Session ID: eb07d3ec-5e22-46b3-9cf5-23ebe21d4097
Retrieval Hint: "overflow plugin zero action rect extent after reorder drop"
Context
Ada's 2026-10-10 03:55Z defect-note:
DockTabReorderGesture› "a click after a reorder activates the item its button shows" is flaky on dev5698517f19(dev 2/18, the #19538 branch 4/30): the header re-renders ~110 ms after the drop and the click lands on the toolbar. The operator's v13.2 cut order (#14800, 6097885253) lists it under dock polish. Measured here at dev5698517f19onexamples/dashboard/dock, headless Chromium 1600×1000: five runs, identical timelines.The Problem
After a within-header reorder (Swarm dragged behind Timeline) the strip collapses to the active tab plus a "…" overflow control, then recovers:
moveNodefor the two shifted buttons (a move, not a re-render)extent 0and decides to hide 6 of 7 tabsinsertNodeof the overflow control (neo-tab-overflow-control) into the railremoveNodefor the six inactive tab buttons; the strip shows SWARM and "…"neo-dashboard-dock-animatingis absent: the spec's rest signal reads "at rest" while six buttons are goneextent 692, re-inserts the six buttons and hides the controlPaint witnesses (the strip clipped at +40 and +100 ms) show only SWARM and "…"; at +300 ms all seven tabs. On a 60 Hz display that is three to four blank frames at every reorder, and a pointer that lands in the window hits the toolbar instead of a button, which is the flake.
The Architectural Reality
mousedownfocuses the tab button, sotoolbar.Base#applyContextualActionState(src/toolbar/Base.mjs:245, gated oncontainsFocusat:370-376) brings the dock header's four contextual actions back: the header's action set grows from one item to four. Their DOM nodes land at ~68–78 ms.Neo.tab.plugin.Overflow#project(src/tab/plugin/Overflow.mjs:815-841) measures the owner, every action item and the control in onegetDomRectround trip, derivesactionStartfromactionRects[0](:822), takescoordinateExtent = actionStart − ownerStart(:829) andextent = min(coordinateExtent, sizeExtent)(:839-841).scheduleSortDragProjection,:552, drains as soon as the SortZone'sdragEndActiveclears) runs at ~60 ms. The first action item is initemsbut not in the DOM yet, so its rect is all zeros:actionStart = 0,coordinateExtent = 0,extent = 0whilesizeExtentis 752.computeOverflowhides everything but the protected active tab (hidden: 6),applySplitremoves the six buttons,syncControlinserts the control.overflowProjectionStart/Idlearound its own work (:591-608; the dock adapter maps the pair toMotionSignalatsrc/dashboard/dock/projection/LayoutAdapter.mjs:1296-1297), so after it lands the signal is idle while the wrong split is painted.Design authority:
src/tab/plugin/Overflow.mjs:834-838— "Visible tabs can briefly push the action rail beyond the owner after a wide→narrow resize. Its coordinate then overstates available space and self-sustains an all-visible split. The rendered action widths provide the owner-bounded ceiling; the coordinate remains authoritative whenever gaps, margins, or another stricter boundary make it smaller." The measured case falls outside that premise: the "stricter boundary" is a node that has no box yet, an absent measurement rather than a boundary.The Fix
In
Overflow#project, deriveactionStartfrom the first action rect with a positive main-axis size, and letcoordinateExtentfall back tonull(the existingsizeExtentpath) when no action rect is laid out.actionSizealready clamps unlaid-out rects to 0 (:823-827), so the size path is right for them; only the coordinate path trusts an all-zero rect. No change tocomputeOverflow, the drain, the dock reconciler or the spec's rest signal.Red-first unit arm in
test/playwright/unit/tab/plugin/Overflow.spec.mjs: a pass whose first action rect is{x: 0, width: 0}on a 772-wide owner keeps every tab visible; the same pass with a laid-out first action at x 692 still caps at 692 (the control for the existing split arms). ThenDockTabReorderGesture.spec.mjs×10 interleaved on dev and at the head, Ada's method.Acceptance Criteria
Overflow#projectignores action rects with no main-axis size when derivingcoordinateExtent; with none laid out, the size path decides.examples/dashboard/dock, after the reorder gesture no tab button leaves the DOM and no overflow control is inserted (the delta log shows only the twomoveNodes).DockTabReorderGesture"a click after a reorder" 10/10 at the head, the dev baseline rate recorded beside it.Out of Scope
Avoided Traps
restingTabas the defect: the spec's wait is right; the DOM it waits on is wrong for ~65 ms with no signal.project(true)(#19094) is the pass that restores them.Related
Live latest-open sweep: checked the latest 20 open issues at 2026-10-10T13:16Z; no equivalent found (search "tab overflow plugin header": none). A2A claim sweep: Grace's 13:15Z cut-order claim names this leaf as mine; no competing claim. Memory Core sweep: #19281 / #19285 (focus), #19094 (reconciler un-hide), #16424; none covers the zero-rect extent.
Origin Session ID: eb07d3ec-5e22-46b3-9cf5-23ebe21d4097 Retrieval Hint: "overflow plugin zero action rect extent after reorder drop"