Context
This came out of #19288's red arm, WorkstationDragAffordancesNL › "the ordinary body-mounted tab proxy has a theme-owned surface in both modes", which fails under the 1920×1080 headless screen. The second (light) pass presses the Audit tab header and moves 17 px. On failing runs:
- the main-thread Mouse sensor holds
currentElement: neo-tab-header-button-17, dragging: true;
Neo.main.addon.DragDrop holds dragZoneId: null, dragElementRootId: null;
- the App's tab SortZone never logs an
onDragStart, and no proxy appears;
- the page throws
event.target.getBoundingClientRect is not a function at DragDrop.onDragStart (DragDrop.mjs:654). The stack runs Mouse.startDrag ← onDistanceChange ← the start-delay timeout (Mouse.mjs:179).
The same arm passes when a settle separates the preceding theme switch from the press. Measured on the #19288 branch, 2026-09-26, with App-worker logs read back through Neural Link.
The Problem
sensor/Base#trigger dispatches a sensor event on document when the pressed node is no longer connected. Its JSDoc explains why: a gesture's own side effects can remove or replace the source node, and a detached node swallows the event. It also states the contract: consumers read event.detail, never the dispatch target. That fallback came with #15282.
DragDrop#onDragStart still reads the dispatch target:
event.target.getBoundingClientRect(): document has no such method, so the handler throws before it resolves the zone or sends drag:start;
event.path || event.composedPath(): from a document dispatch that is [document, window], so even without the throw, the zone could not be resolved from the path.
getEventData builds the App payload's path the same way. Every other drag event reaches the App by dragZoneId (manager/DomEvent#fire). drag:start is the one routed through component listeners, by path.
So when the pressed node is replaced between mousedown and the start threshold, the gesture dies silently. The sensor believes it is dragging, while no zone and no App session exist. A tab header re-rendered by a theme switch or an Overflow projection inside the 100 ms start delay is enough.
The Architectural Reality
src/main/draggable/sensor/Mouse.mjs#startDrag already puts the press's own path (path: startEvent.path, captured at mousedown) and the pressed element into detail.
src/main/addon/DragDrop.mjs#onDragStart resolves dragZoneId from the path against zoneRegistrations, which are keyed by drag element root id. It records dragProxyRect / offsetX / offsetY from the pressed node's rect. getEventData serializes the path for the App.
- A replaced node keeps its id: the vdom re-renders the same component. The press's path therefore still names the right ids, and the replacement node with that id has the live geometry.
The Fix
DragDrop reads the sensor's detail, as Base#trigger documents:
onDragStart and getEventData take the path from detail.path, falling back to the dispatch path only when detail carries none.
onDragStart measures the pressed element from detail.element, or from the connected node with its id when it was replaced, instead of from event.target.
Acceptance Criteria
AC-3 amended 2026-09-26 by the author, after measuring the fix. The original AC-3 asked the whole arm to pass. With the fix, the start is delivered on every run. The arm then meets a second layer: the press re-renders the header, and on some runs no connected successor exists at the start, so the proxy is sized from an empty rect (2 px against 48). That layer is not this defect: it is #19285's focused-tab churn (the Overflow projection withholding the focused tab), fixed by #19294 (merged as a50ae57ce8). With #19294's Overflow diff applied on top of this fix, the arm went 8/8 isolated and 2/2 whole-file (2026-09-26). Corrected 2026-09-27: this line first named #19288, which carries only the screen flag.
Out of Scope
- Why the header node is replaced right after a theme switch. A re-render there is legitimate; the drag must survive it.
- Pointer Events migration (#17889).
Related
Blocks #19288. Regression from #15282. Touches the same file as open PR #19301 (Escape across windows; different methods).
Live latest-open sweep: the latest 20 open neo issues at 2026-09-26T21:35Z hold no equivalent (newest #19300, Escape delivery across windows, which is a different path). Exact-error search getBoundingClientRect is not a function: no issue. A2A in-flight sweep: no claim on DragDrop's start path; Ada's #19301 changes the Escape guard and adds a remote cancel. Memory Core problem-noun sweep: no prior decision. Own assignments: #19288 (blocked by this), #17889 (pointer migration, not this).
Origin Session ID: 6408fcd4-3571-4ec2-8009-b4dae5d18917
Retrieval Hint: "DragDrop onDragStart detached pressed node document dispatch getBoundingClientRect"
Context
This came out of #19288's red arm,
WorkstationDragAffordancesNL› "the ordinary body-mounted tab proxy has a theme-owned surface in both modes", which fails under the 1920×1080 headless screen. The second (light) pass presses the Audit tab header and moves 17 px. On failing runs:currentElement: neo-tab-header-button-17, dragging: true;Neo.main.addon.DragDropholdsdragZoneId: null, dragElementRootId: null;onDragStart, and no proxy appears;event.target.getBoundingClientRect is not a function at DragDrop.onDragStart (DragDrop.mjs:654). The stack runsMouse.startDrag←onDistanceChange← the start-delay timeout (Mouse.mjs:179).The same arm passes when a settle separates the preceding theme switch from the press. Measured on the #19288 branch, 2026-09-26, with App-worker logs read back through Neural Link.
The Problem
sensor/Base#triggerdispatches a sensor event ondocumentwhen the pressed node is no longer connected. Its JSDoc explains why: a gesture's own side effects can remove or replace the source node, and a detached node swallows the event. It also states the contract: consumers readevent.detail, never the dispatch target. That fallback came with#15282.DragDrop#onDragStartstill reads the dispatch target:event.target.getBoundingClientRect():documenthas no such method, so the handler throws before it resolves the zone or sendsdrag:start;event.path || event.composedPath(): from adocumentdispatch that is[document, window], so even without the throw, the zone could not be resolved from the path.getEventDatabuilds the App payload'spaththe same way. Every other drag event reaches the App bydragZoneId(manager/DomEvent#fire).drag:startis the one routed through component listeners, by path.So when the pressed node is replaced between mousedown and the start threshold, the gesture dies silently. The sensor believes it is dragging, while no zone and no App session exist. A tab header re-rendered by a theme switch or an Overflow projection inside the 100 ms start delay is enough.
The Architectural Reality
src/main/draggable/sensor/Mouse.mjs#startDragalready puts the press's own path (path: startEvent.path, captured at mousedown) and the pressedelementintodetail.src/main/addon/DragDrop.mjs#onDragStartresolvesdragZoneIdfrom the path againstzoneRegistrations, which are keyed by drag element root id. It recordsdragProxyRect/offsetX/offsetYfrom the pressed node's rect.getEventDataserializes the path for the App.The Fix
DragDropreads the sensor'sdetail, asBase#triggerdocuments:onDragStartandgetEventDatatake the path fromdetail.path, falling back to the dispatch path only whendetailcarries none.onDragStartmeasures the pressed element fromdetail.element, or from the connected node with its id when it was replaced, instead of fromevent.target.Acceptance Criteria
drag:startfromdocumentwith a pressed element that was replaced by a same-id node.onDragStartdoes not throw, resolves the owningdragZoneIdfrom the press's path, measures the replacement node, and sendsdrag:startwhosepathnames the pressed element's ids.getBoundingClientRectpage error, and the tab SortZone opens a session.AC-3 amended 2026-09-26 by the author, after measuring the fix. The original AC-3 asked the whole arm to pass. With the fix, the start is delivered on every run. The arm then meets a second layer: the press re-renders the header, and on some runs no connected successor exists at the start, so the proxy is sized from an empty rect (2 px against 48). That layer is not this defect: it is #19285's focused-tab churn (the Overflow projection withholding the focused tab), fixed by #19294 (merged as a50ae57ce8). With #19294's Overflow diff applied on top of this fix, the arm went 8/8 isolated and 2/2 whole-file (2026-09-26). Corrected 2026-09-27: this line first named #19288, which carries only the screen flag.
Out of Scope
Related
Blocks #19288. Regression from
#15282. Touches the same file as open PR#19301(Escape across windows; different methods).Live latest-open sweep: the latest 20 open neo issues at 2026-09-26T21:35Z hold no equivalent (newest #19300, Escape delivery across windows, which is a different path). Exact-error search
getBoundingClientRect is not a function: no issue. A2A in-flight sweep: no claim on DragDrop's start path; Ada's#19301changes the Escape guard and adds a remote cancel. Memory Core problem-noun sweep: no prior decision. Own assignments: #19288 (blocked by this), #17889 (pointer migration, not this).Origin Session ID: 6408fcd4-3571-4ec2-8009-b4dae5d18917 Retrieval Hint: "DragDrop onDragStart detached pressed node document dispatch getBoundingClientRect"