Context
Found while proving #19866 (PR #19867), on the v13.3 cut day. In apps/workstation, a pane returned by its OS title bar right after another one can stay in its popup. WorkstationPopupReturnNL.spec.mjs ("a second popped-out pane docks back by its OS titlebar after the first one did") fails 1 of 3 runs when the 1.5 s pause between the two returns is removed. The failing assertion is dwelling over the main window docks alerts home. The merged arm keeps the pause, a human's pace; a fast hand does not.
The Problem
DragCoordinator#commitNativeWindowDrop (src/manager/DragCoordinator.mjs, the embodyNativeHover === true && !preview branch) asks the target for one preview after the park, and a null answer clears the candidate and ends the gesture. While main still projects the first return, it cannot preview yet, so the second drop is abandoned on its first answer: no second ask, no receipt.
The Architectural Reality
- Design authority: ADR 0029 §2.3 (Cross-Window Drag) and §2.8.6 (in-gesture vessel conversion and park), and the same-target preview→commit contract: a drop commits what its target previewed.
DragTarget#answerWhenPreviewable (src/dashboard/dock/window/DragTarget.mjs) covers this gap on the hover path: a frame that got no preview is asked again once awaitPreviewable resolves, while that frame is still current. The committed-drop path does not use it.
- Precedent for the class: #18054 turned the strict park's first refusal from a terminal into a bounded retry ("a window under a live OS drag" refuses at first); a transient "not yet" is not a verdict.
The Fix
On a null preview, await the target's previewability once through the seam answerWhenPreviewable uses, then ask again while the candidate is still current. Abandon only when that answer is null too.
Contract Ledger
| Surface |
Authority |
Behavior |
Fallback |
Docs |
Evidence |
DragTarget#answerWhenPreviewable(frame) → Promise<preview|null> |
ADR 0029 §2.3, §2.8.6 |
Every waiter for that exact frame shares its pending or current answer; DragCoordinator#commitNativeWindowDrop consumes it once after a null native preview |
A stale, left, destroyed, refused or rejected readiness answers null; a coordinator cancellation or replacement prevents the commit |
JSDoc |
CrossWindowDragTarget.spec.mjs and DragCoordinator.spec.mjs arms; the no-pause WorkstationPopupReturnNL arm |
Acceptance Criteria
Out of Scope
- Pointer (tab-drag) returns: #19866.
Related
#18054, #19866, #19867
Live latest-open sweep: the 25 latest open issues at 15:50Z and open PRs at 15:58Z, no equivalent. A2A claim sweep: the 20 latest messages, none on the dock. MC sweep: "commitNativeWindowDrop null preview abandon", no decision that the abandon is deliberate; #18054 fixed the same class on the park.
Origin Session ID: 89fbb599-fb07-489d-a8ac-b016affdeab0
Retrieval Hint: "second titlebar return while main settles the first is abandoned on a null preview; commitNativeWindowDrop answerWhenPreviewable"
Context
Found while proving #19866 (PR #19867), on the v13.3 cut day. In
apps/workstation, a pane returned by its OS title bar right after another one can stay in its popup.WorkstationPopupReturnNL.spec.mjs("a second popped-out pane docks back by its OS titlebar after the first one did") fails 1 of 3 runs when the 1.5 s pause between the two returns is removed. The failing assertion isdwelling over the main window docks alerts home. The merged arm keeps the pause, a human's pace; a fast hand does not.The Problem
DragCoordinator#commitNativeWindowDrop(src/manager/DragCoordinator.mjs, theembodyNativeHover === true && !previewbranch) asks the target for one preview after the park, and a null answer clears the candidate and ends the gesture. While main still projects the first return, it cannot preview yet, so the second drop is abandoned on its first answer: no second ask, no receipt.The Architectural Reality
DragTarget#answerWhenPreviewable(src/dashboard/dock/window/DragTarget.mjs) covers this gap on the hover path: a frame that got no preview is asked again onceawaitPreviewableresolves, while that frame is still current. The committed-drop path does not use it.The Fix
On a null preview, await the target's previewability once through the seam
answerWhenPreviewableuses, then ask again while the candidate is still current. Abandon only when that answer is null too.Contract Ledger
DragTarget#answerWhenPreviewable(frame)→Promise<preview|null>DragCoordinator#commitNativeWindowDropconsumes it once after a null native previewCrossWindowDragTarget.spec.mjsandDragCoordinator.spec.mjsarms; the no-pauseWorkstationPopupReturnNLarmAcceptance Criteria
DragCoordinator: a null first answer is asked again once the target is previewable.Out of Scope
Related
#18054,#19866,#19867Live latest-open sweep: the 25 latest open issues at 15:50Z and open PRs at 15:58Z, no equivalent. A2A claim sweep: the 20 latest messages, none on the dock. MC sweep: "commitNativeWindowDrop null preview abandon", no decision that the abandon is deliberate; #18054 fixed the same class on the park.
Origin Session ID: 89fbb599-fb07-489d-a8ac-b016affdeab0 Retrieval Hint: "second titlebar return while main settles the first is abandoned on a null preview; commitNativeWindowDrop answerWhenPreviewable"