LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-grace
createdAtSep 3, 2026, 10:39 AM
updatedAtSep 3, 2026, 11:37 AM
githubUrlhttps://github.com/neomjs/neo/issues/18173
authorneo-opus-grace
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtSep 3, 2026, 11:37 AM

The hold-to-drop timer never restarts, so a popup commits to whichever zone it entered first

Closed v13.2.0/archive-v13-2-0-chunk-18 bugaiarchitecturedashboard
neo-opus-grace
neo-opus-grace commented on Sep 3, 2026, 10:39 AM

Context

Operator report from a live customer demo (2026-09-03), against apps/workstation:

inside apps workstation, dragging a popup triggers the 1.2s re-integration timer. This one does NOT yet reset, as soon as the drop zone changes. This is a problem we need to fix, since dragging over a main window always has a valid drop area, and then users have to fight the initial timer. the timer reset is crucial.

The hold-to-drop gesture landed in #18115 ("the hold is the gesture"). This is its missing half: the hold starts, and then nothing re-starts it while the user is still choosing where to drop.

The Problem

Neo.manager.DragCoordinator#onWindowPositionChange carries the dwell clock forward whenever the sort zone and the dragged item are unchanged:

firstSeenAt = current?.targetSortZone === candidate.targetSortZone &&
    current?.draggedItem === candidate.draggedItem
        ? current.firstSeenAt
        : now;

A sort zone is the whole dock host, not a drop zone. One main window is exactly one targetSortZone, so every zone inside it — every split child, every edge band, every tab strip — carries the same clock. The condition only re-arms when the popup crosses into a different window.

The consequence is the operator's, precisely: a main window always has a valid drop area, so the clock arms the moment the popup enters and never restarts. By the time the user has travelled to the zone they actually want, the 1200 ms is long spent, and the commit fires on the first zone that happens to resolve under the anchor. The user is racing a timer that started before they had chosen anything — "users have to fight the initial timer".

It is worst exactly where the feature is most useful: a rich layout with many zones, which is the demo case.

The Architectural Reality

  • src/manager/DragCoordinator.mjs — nativeWindowDropDwellMs: 1200; onWindowPositionChange computes firstSeenAt, schedules commitNativeWindowDrop from dwellRemaining, and hands the same clock to the target through updateNativeHover so the hold animation and the commit share one start.
  • src/dashboard/dock/window/DragTarget.mjs — onRemoteDragMove(payload) returns the owner-computed preview, which the coordinator currently discards.
  • src/dashboard/dock/interaction/PreviewProducer.mjs — that preview carries previewId: preview:${subjectId}:${nodeId}:${kind}, a stable identity for the resolved zone and placement kind. This is the missing key: it changes exactly when the drop zone changes, including a placement change within one node (tab-into vs split-left), which is also a different drop.
  • src/dashboard/dock/interaction/Preview.mjs — paints the hold from {armedAt, durationMs}, so a re-arm must reach the target or the ring keeps draining while the commit has been rescheduled.
  • src/dashboard/dock/interaction/DragAffordances.mjs:280 already compares zone?.nodeId frame to frame for the indicator tier — the target knows when the zone changes; the coordinator is the one that does not.

The Fix

Key the dwell on the resolved drop preview, not only on the sort zone:

  1. updateNativeHover returns the preview onRemoteDragMove produced.
  2. onWindowPositionChange stores its previewId on the candidate.
  3. When this frame's previewId differs from the previous candidate's, firstSeenAt is re-armed to now and the hover frame is re-sent so the target repaints the hold from its new start. The commit timeout is then scheduled from the re-armed clock.

Re-sending only happens on an actual zone change, not per frame.

A null preview is not a zone change. A frame that resolves no preview while the sort zone still accepts the drag must not re-arm, or a momentary gap between zones would restart a hold the user is legitimately completing.

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
DragCoordinator#updateNativeHover src/manager/DragCoordinator.mjs returns the target's preview instead of undefined unchanged when no target claims (returns null) JSDoc unit arm reading the return
DragCoordinator#onWindowPositionChange same re-arms firstSeenAt when the resolved previewId changes same sort zone + same preview → clock carries over exactly as today JSDoc red-first arm below
candidate dropPreviewId same new internal field on the native drop candidate absent on the first frame → no re-arm JSDoc asserted through behaviour, not directly

Decision Record impact

aligned-with ADR 0029 — §2.8.1's remote-preview contract is unchanged; this makes the dwell obey the same zone identity the preview tier already resolves.

Acceptance Criteria

  • AC-1 — moving the popup from one drop zone to another within the same window re-arms the dwell: the scheduled commit is pushed out by the full duration from the moment of the change.
  • AC-2 (red-first) — the same witness fails at the current head, committing on the original clock.
  • AC-3 — a placement change within one node (e.g. tab-into → split-left) re-arms too, because it is a different drop.
  • AC-4 — staying still does not re-arm: consecutive frames resolving the same previewId keep one clock, and the commit fires at armedAt + durationMs, asserted on the scheduled delay rather than by waiting.
  • AC-5 — the target's painted hold agrees with the rescheduled commit: the dwell.armedAt delivered through onRemoteDragMove equals the value the timeout was computed from, on the re-arming frame as well.
  • AC-6 — a frame that resolves no preview does not re-arm a live hold.
  • AC-7 — crossing into a different window still re-arms, unchanged.
  • AC-8 — exact-head unit + component suites green.

Out of Scope

  • The dwell duration; 1200 ms stays as tuned in #18115.
  • Same-window pointer drags, which have their own indicator path and no dwell.
  • The commit/settle sequence after the hold completes.

Avoided Traps

  • Keying on targetSortZone alone. That is the current bug: it is one object per window, so it cannot see the zone change the user just made.
  • Keying on coordinates. Re-arming on movement would restart the hold whenever the popup jitters inside one zone, which is the opposite complaint — the hold would become unfinishable.
  • Re-arming without repainting. The target renders the ring from armedAt; rescheduling the commit without re-sending the clock leaves a full ring committing late, or an empty ring that has not fired.
  • Treating a null preview as a change. A momentary resolve gap is not a new zone.

Related

  • #18115 — the hold gesture this completes.
  • #18151 / #18153 — the vessel seam the popup rides in on.
  • ADR 0029 §2.8.1 — the remote-preview contract.

Live latest-open sweep: checked the 20 latest open issues at 2026-09-03T08:39Z; no equivalent found. Duplicate sweep over dwell / native drop timer returned #18115 (closed, the gesture itself) — this is its missing reset half, not a re-file.

Origin Session ID: 8d936ec9-b816-4ded-a91e-6e91ef6a3325

Retrieval Hint: "native window drop dwell timer does not reset when the drop zone changes firstSeenAt targetSortZone previewId"