Operator's hand run, 2026-09-26 (with #19278): dragging a tab inside the main window and pressing Esc recovers the previous state. It does not when the popup proxy (a converted vessel) is active, or when the tab proxy stands inside a different window.
The Problem
The cancel itself already works across windows. DragCoordinator#onDragCancel leaves the remote target, resets the vessel conversion (sourceSortZone.resetVesselConversion) and clears the native-window drop candidates.
What fails is delivery. Escape is heard only by the main-thread DragDrop addon of the window where the gesture started:
onKeyDown fires only when event.key === 'Escape' && me.dragZoneId.
dragZoneId is set in that window's own onDragStart.
During a converted or cross-window drag, the keyboard focus is in another window, the vessel or the target popup. Its DragDrop has no dragZoneId, so Escape is dropped.
The Architectural Reality
src/main/addon/DragDrop.mjs: onKeyDown (a global capture listener, addGlobalEventListeners) holds the Escape guard. It sets dragCancelled, cancels a resize, and sends one drag:cancel carrying the zone id. Its remote API (remote.app) has no cancel entry.
src/manager/DomEvent.mjs: routes a drag:cancel to Neo.get(data.dragZoneId).onDragCancel, and ignores one without a zone. fire() receives the worker message; its windowId rides on the message (worker.Manager#sendMessage), not in data.
src/manager/DragCoordinator.mjs: activeSourceZone is set only when onDragMove enters an admitted target, and cleared on void (handleVoid). While a conversion is pending, the coordinator cannot name the gesture's owner (@neo-gpt's source read, confirmed).
The one authority valid in every phase is the window whose DragDrop holds dragZoneId.
The Fix
DragDrop gains a remote cancelDrag(). It runs the Escape guard's cancel branch for the gesture this window owns, and it is a no-op without one or when the gesture is already cancelled.
Escape in a window without a gesture of its own sends one drag:cancel marked crossWindow and carrying no zone id. The key's default stays with that window's UI.
DomEvent hands such a message, with the message's windowId, to DragCoordinator#cancelCrossWindowGesture. It asks every other app window to cancelDrag. It reads no gesture state, so a pending conversion cannot hide the owner.
From there the existing path runs unchanged: the owner's drag:cancel, TabSortZone#onDragCancel (which retires a converted or still-transitioning vessel), then DragCoordinator#onDragCancel.
Cancels the gesture this window owns: dragCancelled set, a resize cancelled, one drag:cancel with dragZoneId
No gesture, or already cancelled: sends nothing
JSDoc
AC-3
drag:cancel marked crossWindow (new payload)
this ticket
Sent by DragDrop#onKeyDown on Escape when this window owns no gesture; no preventDefault
Sent on every such Escape, drag or not: one message, plus one no-op cancelDrag per other window of a multi-window app; none in a single-window app
JSDoc
AC-1, AC-2
DragCoordinator#cancelCrossWindowGesture (new)
this ticket
Asks cancelDrag of every Neo.apps window except the one that heard Escape
A rejected remote call (e.g. a closing window) is swallowed
JSDoc
AC-2
Acceptance Criteria
AC-1 (unit, red first): DragDrop#onKeyDown without a local gesture sends one drag:cancel marked crossWindow, without preventDefault. The local-gesture path is unchanged.
AC-2 (unit, red first): a crossWindow cancel in the shape worker.Manager#sendMessage posts (the windowId on the message) asks cancelDrag of every other app window, and not of the window that heard Escape.
AC-3 (unit): DragDrop#cancelDrag cancels the owned gesture once, with one drag:cancel carrying the zone id. A second call, or a call without a gesture, sends nothing.
AC-4 (runtime): pressing Escape on the target window's page during a converted drag restores the pre-drag layout: the tab back at its source and no vessel left. It is measured headless, with #19288's screen flag, in the large-over-small journey.
AC-5 (unit, pin): a cancel while the conversion is still pending (transitioning, no target admitted) retires the vessel as a converted cancel does. The behaviour already exists; the arm pins it, and dropping transitioning from TabSortZone#onDragCancel fails it.
Post-Merge Validation
The operator's hand run: Esc during a vessel or cross-window tab proxy drag recovers the previous state.
Context
Operator's hand run, 2026-09-26 (with #19278): dragging a tab inside the main window and pressing Esc recovers the previous state. It does not when the popup proxy (a converted vessel) is active, or when the tab proxy stands inside a different window.
The Problem
The cancel itself already works across windows.
DragCoordinator#onDragCancelleaves the remote target, resets the vessel conversion (sourceSortZone.resetVesselConversion) and clears the native-window drop candidates.What fails is delivery. Escape is heard only by the main-thread
DragDropaddon of the window where the gesture started:onKeyDownfires only whenevent.key === 'Escape' && me.dragZoneId.dragZoneIdis set in that window's ownonDragStart.During a converted or cross-window drag, the keyboard focus is in another window, the vessel or the target popup. Its
DragDrophas nodragZoneId, so Escape is dropped.The Architectural Reality
src/main/addon/DragDrop.mjs:onKeyDown(a global capture listener,addGlobalEventListeners) holds the Escape guard. It setsdragCancelled, cancels a resize, and sends onedrag:cancelcarrying the zone id. Its remote API (remote.app) has no cancel entry.src/manager/DomEvent.mjs: routes adrag:canceltoNeo.get(data.dragZoneId).onDragCancel, and ignores one without a zone.fire()receives the worker message; itswindowIdrides on the message (worker.Manager#sendMessage), not indata.src/manager/DragCoordinator.mjs:activeSourceZoneis set only whenonDragMoveenters an admitted target, and cleared on void (handleVoid). While a conversion is pending, the coordinator cannot name the gesture's owner (@neo-gpt's source read, confirmed).DragDropholdsdragZoneId.The Fix
DragDropgains a remotecancelDrag(). It runs the Escape guard's cancel branch for the gesture this window owns, and it is a no-op without one or when the gesture is already cancelled.drag:cancelmarkedcrossWindowand carrying no zone id. The key's default stays with that window's UI.DomEventhands such a message, with the message'swindowId, toDragCoordinator#cancelCrossWindowGesture. It asks every other app window tocancelDrag. It reads no gesture state, so a pending conversion cannot hide the owner.From there the existing path runs unchanged: the owner's
drag:cancel,TabSortZone#onDragCancel(which retires a converted or still-transitioning vessel), thenDragCoordinator#onDragCancel.Contract Ledger
Neo.main.addon.DragDrop#cancelDrag(new,remote.app)dragCancelledset, a resize cancelled, onedrag:cancelwithdragZoneIddrag:cancelmarkedcrossWindow(new payload)DragDrop#onKeyDownon Escape when this window owns no gesture; nopreventDefaultcancelDragper other window of a multi-window app; none in a single-window appDragCoordinator#cancelCrossWindowGesture(new)cancelDragof everyNeo.appswindow except the one that heard EscapeAcceptance Criteria
DragDrop#onKeyDownwithout a local gesture sends onedrag:cancelmarkedcrossWindow, withoutpreventDefault. The local-gesture path is unchanged.crossWindowcancel in the shapeworker.Manager#sendMessageposts (thewindowIdon the message) askscancelDragof every other app window, and not of the window that heard Escape.DragDrop#cancelDragcancels the owned gesture once, with onedrag:cancelcarrying the zone id. A second call, or a call without a gesture, sends nothing.transitioning, no target admitted) retires the vessel as a converted cancel does. The behaviour already exists; the arm pins it, and droppingtransitioningfromTabSortZone#onDragCancelfails it.Post-Merge Validation
Out of Scope
Related
#19248, #19278 / #19289, #19297, #19298.
Sweeps:
Origin Session ID: 40558e40-aee4-4461-946d-a389266a3256 Retrieval Hint: "Escape cancel cross-window drag vessel DragDrop onKeyDown dragZoneId crossWindow cancelDrag"