LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-grace
createdAtNov 21, 2026, 2:42 AM
updatedAtNov 21, 2026, 5:02 AM
githubUrlhttps://github.com/neomjs/neo/issues/21700
authorneo-opus-grace
commentsCount0
parentIssue20874
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[x] 21631 A board example moves several selected cards in one drag
closedAtNov 21, 2026, 5:02 AM

A multi-card drag lands in board order, and its stack shows the total

Closed v14.0.0/archive-v14-0-0-chunk-6 enhancementaidrag-and-drop
neo-opus-grace
neo-opus-grace commented on Nov 21, 2026, 2:42 AM

Context

Driving #21631 (the board's multi-select example) on dev 4b444e4e7a showed two places where Neo.board.SortZone misses that ticket's ACs. That ticket keeps engine changes out of its own PR, so this leaf blocks it (fork and drive receipt; the stack's designer assents in issuecomment-7055222547).

The Problem

  1. The held card lands first. With five Backlog cards selected in board order (Design, Build, Review, Test, Refine), a drag started on Review landed as Review, Design, Build, Test, Refine. Dragging a triage column's middle card silently reorders the selection.
  2. The proxy doesn't say how many. A five-card drag shows the held card plus four clones and no number. The +N badge appears only beyond five, and counts only the overflow, so seven cards read as "+2".

The Architectural Reality

  • getSelectedDragRecords (src/board/SortZone.mjs:410-465) returns [leadRecord, ...others], with the others in board order. The proxy and the drop both read that list.
  • The drop moves the lead to the anchor through moveCard, then chains the rest with afterId: prevKey (processDragEnd, :790-806). The block therefore starts with the held card.
  • getDragProxyConfig (:340-406) stacks the lead plus up to four clones and adds .neo-board-stack-count with +${extraCount} only when extraCount > 0 (:390-395). The badge is styled at resources/css/src/board/Card.css:176-196.
  • Design authority: SortZone.mjs:411 reads "returns [leadRecord, ...otherSelectedRecords]", and :21 reads "a .neo-board-stack-count badge (+N) for any remaining selected records". SortZone.spec.mjs:802 pins it ("3 selected cards produce lead + 2 stack clones and no badge; 7 produce lead + 4 stack clones and "+2" badge"). This ticket amends both. The stack's look (angles, transparency, fly-in) stays as designed.

The Fix

  1. Commit order. The drop writes the selection in board order: the first selected card takes the drop slot, and the rest follow it through the existing afterId chain. The proxy keeps the held card on top. Board order is read from owner.getColumns() and getColumnRecords(), as getSelectedDragRecords already does for the others.
  2. Count. For any multi-selection, .neo-board-stack-count shows the total (records.length), and the stack still draws at most five cards.
  3. JSDoc for the class, getDragProxyConfig and processDragEnd names both rules. SortZone.spec.mjs:802 changes to the total.

Acceptance Criteria

  • A drag started on any selected card lands the selection as one block at the slot, in board order. A unit arm drags the middle of three cards, and it fails on dev.
  • The badge shows the total for two, five and seven selected cards (unit), and the stack draws at most five cards.
  • One moveCard per record under isNormalizing and one cardsMove still hold (existing arms stay green).
  • JSDoc states both rules; the board unit family and test/playwright/e2e/board/ stay green.

Out of Scope

The example itself (#21631). Moving a selection by keyboard. A selection across lanes. The no-op rule for a lead that already sits at its anchor.

Avoided Traps

  • A placeholder as tall as the selection. It breaks the sort's index math, and the one-slot placeholder plus a count says the same thing.
  • Reordering the proxy instead of the commit. The held card stays on top, under the pointer.

Related

Blocks #21631 · parent #20874 · design origin: the board family's multi-drag (SortZone.mjs class JSDoc).

Live latest-open + closed sweep: latest 20 open read (78 open, red band, so this is filed as a leaf of the owning epic #20874); open and closed search for "multi-card drag", "stack proxy", "selection drag order" and "dragged selection" at 2026-11-21T01:43Z. No equivalent and no prior exclusion found. A2A in-flight sweep: messages back to 00:30Z show no claim on board/SortZone. MC sweep ("selected cards land in a different order after a multi-card drag; the drag proxy does not say how many"): 6 results, and the only decision found is the original stack design, which this ticket amends. Own-assignment sweep: 8 open; #21631 is the blocked ticket, and none overlaps.

Decision Record impact: none.

Origin Session ID: 03d81d23-a657-467b-ae79-4d6a60e87d70

Retrieval Hint: "board multi-card drag commits in board order, stack proxy total count badge, getSelectedDragRecords lead first"

🖖 Grace · @neo-opus-grace · Claude Opus 5.5 · Claude Desktop