Context
Found by #19174's first headless film replay (2026-09-24 15:23Z, WorkstationFilmTourNL.spec.mjs -g 'under autoGates', own bridge): the new resize cue, the first InteractionService#driveDrag of the film, ran right after the rail beat's clicks and was refused before any input:
film-resize[0] host step settlement failed: resize: the drive failed in phase 'busy': MOUSE_SENSOR_BUSY — the source window Mouse sensor is already engaged
No drag was in flight. The rail beat had clicked a tab button — a neo-draggable sort-zone item — and released it 60 ms later, before the sensor's 100 ms delay could arm anything. The sensor still reported a pressed element.
The Problem
Neo.main.draggable.sensor.Mouse#endGesture (src/main/draggable/sensor/Mouse.mjs:227-257) releases the physical gesture — the timers, the selection guard, the move/up listeners — but resets currentElement, dragging and startEvent only inside if (me.dragging). A press on a drag target that ends before the delay + distance threshold (every ordinary click on a tab, a card, a splitter) leaves currentElement and startEvent pointing at the released node until the next mousedown overwrites them. Neo.main.draggable.sensor.Touch#onTouchEnd (src/main/draggable/sensor/Touch.mjs:104-146) has the identical shape.
The sensor's own next press overwrites the stale fields, so the sensor itself does not misbehave. The consumer that reads them does: Neo.main.addon.EventSimulator#driveDrag (src/main/addon/EventSimulator.mjs:343) refuses with MOUSE_SENSOR_BUSY when sensor.currentElement || sensor.dragging — the right predicate for "engaged", answered by state the sensor never cleared. Every consumer of the drive inherits it: the Neural Link's drive_drag tool refuses after the user (or any prior synthetic click) pressed a draggable in that window; test/playwright/e2e/core/SplitterLiveResizeNL.spec.mjs passes only because nothing is clicked before its drive.
The Architectural Reality
- The Mouse sensor's press → release bracket is documented at
Mouse.mjs:148-171: the guard and the listeners bracket the PHYSICAL gesture, released in endGesture on mouseup or on the move stream observing the primary button gone. The pressed element belongs to that same bracket; it is the only field the release forgets.
sensor/Base.mjs:19 declares currentElement: null as the idle state; DragDrop reads no sensor field, EventSimulator#resolveMouseSensor (:239) hands the live sensor to the busy check.
- Witness surfaces:
test/playwright/unit/main/draggable/sensor/Mouse.spec.mjs drives trusted-shaped events through an EventTarget document per sensor (the selection-guard terminal contract, :129-240); test/playwright/unit/main/addon/EventSimulator.spec.mjs:278 pins the busy refusal on a sensor whose currentElement is set.
The Fix
endGesture (Mouse) and onTouchEnd (Touch) reset currentElement, startEvent and mouseDownTime/pageX/pageY for every release, keeping the dragging branch for the drag:end trigger and the drag-only listeners. Two unit arms in the sensor spec: a pre-threshold release leaves no pressed element (currentElement/startEvent null, and a following driveDrag busy predicate reads idle), and the mid-drag release keeps emitting exactly one drag:end (the existing arm stays green). The EventSimulator busy predicate is unchanged: it was reading truthfully.
Acceptance Criteria
Out of Scope
The busy predicate's shape, the sensor's delay and distance thresholds, and the neo-drag-active guard (#17883).
Related
#19174 (the drive that surfaced it) · #19126 · #17883 (the selection guard's terminal contract, the spec this extends) · #12807 (the drive-arming history)
Sweeps: live latest-open at 2026-09-24T15:25:18Z — none equivalent; gh search issues for the sensor's busy state — none; A2A (last 60 min) — no claim; Memory Core — no prior decision (the drive-arming history in #12807 and the guard's enumeration in #17883 are adjacent, not this).
Origin Session ID: a31cea94-2b9d-43cb-8a4e-3daf8706ce45
Retrieval Hint: query_raw_memories("Mouse sensor endGesture currentElement stale after click MOUSE_SENSOR_BUSY driveDrag")
🪢 Mnemosyne (Claude Fable 5.1 · Claude Code) · session a31cea94-2b9d-43cb-8a4e-3daf8706ce45
Context
Found by #19174's first headless film replay (2026-09-24 15:23Z,
WorkstationFilmTourNL.spec.mjs -g 'under autoGates', own bridge): the newresizecue, the firstInteractionService#driveDragof the film, ran right after the rail beat's clicks and was refused before any input:No drag was in flight. The rail beat had clicked a tab button — a
neo-draggablesort-zone item — and released it 60 ms later, before the sensor's 100 ms delay could arm anything. The sensor still reported a pressed element.The Problem
Neo.main.draggable.sensor.Mouse#endGesture(src/main/draggable/sensor/Mouse.mjs:227-257) releases the physical gesture — the timers, the selection guard, the move/up listeners — but resetscurrentElement,draggingandstartEventonly insideif (me.dragging). A press on a drag target that ends before the delay + distance threshold (every ordinary click on a tab, a card, a splitter) leavescurrentElementandstartEventpointing at the released node until the next mousedown overwrites them.Neo.main.draggable.sensor.Touch#onTouchEnd(src/main/draggable/sensor/Touch.mjs:104-146) has the identical shape.The sensor's own next press overwrites the stale fields, so the sensor itself does not misbehave. The consumer that reads them does:
Neo.main.addon.EventSimulator#driveDrag(src/main/addon/EventSimulator.mjs:343) refuses withMOUSE_SENSOR_BUSYwhensensor.currentElement || sensor.dragging— the right predicate for "engaged", answered by state the sensor never cleared. Every consumer of the drive inherits it: the Neural Link'sdrive_dragtool refuses after the user (or any prior synthetic click) pressed a draggable in that window;test/playwright/e2e/core/SplitterLiveResizeNL.spec.mjspasses only because nothing is clicked before its drive.The Architectural Reality
Mouse.mjs:148-171: the guard and the listeners bracket the PHYSICAL gesture, released inendGestureon mouseup or on the move stream observing the primary button gone. The pressed element belongs to that same bracket; it is the only field the release forgets.sensor/Base.mjs:19declarescurrentElement: nullas the idle state;DragDropreads no sensor field,EventSimulator#resolveMouseSensor(:239) hands the live sensor to the busy check.test/playwright/unit/main/draggable/sensor/Mouse.spec.mjsdrives trusted-shaped events through anEventTargetdocument per sensor (the selection-guard terminal contract,:129-240);test/playwright/unit/main/addon/EventSimulator.spec.mjs:278pins the busy refusal on a sensor whosecurrentElementis set.The Fix
endGesture(Mouse) andonTouchEnd(Touch) resetcurrentElement,startEventandmouseDownTime/pageX/pageYfor every release, keeping thedraggingbranch for thedrag:endtrigger and the drag-only listeners. Two unit arms in the sensor spec: a pre-threshold release leaves no pressed element (currentElement/startEventnull, and a followingdriveDragbusy predicate reads idle), and the mid-drag release keeps emitting exactly onedrag:end(the existing arm stays green). TheEventSimulatorbusy predicate is unchanged: it was reading truthfully.Acceptance Criteria
currentElement,startEventnull; the existing terminal-contract arms stay green.onTouchEndresets the same fields on every release.EventSimulator#driveDragafter such a click reports noMOUSE_SENSOR_BUSY— pinned by the sensor arm reading the busy predicate's inputs, and by #19174's film replay (the rail beat's clicks precede the resize drive) going green at its PR head with this fix merged.Out of Scope
The busy predicate's shape, the sensor's delay and distance thresholds, and the
neo-drag-activeguard (#17883).Related
#19174 (the drive that surfaced it) · #19126 · #17883 (the selection guard's terminal contract, the spec this extends) · #12807 (the drive-arming history)
Sweeps: live latest-open at 2026-09-24T15:25:18Z — none equivalent;
gh search issuesfor the sensor's busy state — none; A2A (last 60 min) — no claim; Memory Core — no prior decision (the drive-arming history in #12807 and the guard's enumeration in #17883 are adjacent, not this).Origin Session ID: a31cea94-2b9d-43cb-8a4e-3daf8706ce45 Retrieval Hint:
query_raw_memories("Mouse sensor endGesture currentElement stale after click MOUSE_SENSOR_BUSY driveDrag")🪢 Mnemosyne (Claude Fable 5.1 · Claude Code) · session a31cea94-2b9d-43cb-8a4e-3daf8706ce45