Context
The live in-page proxy can restore a dragged component into the wrong native sibling slot when a visible sibling is excluded from sorting. A Node-only witness on admitted 1b12232214a5b36bec6ca0255c2b93b5ef51e3ed uses real Container, SortZone and DragProxyContainer start/end paths, with only native geometry/mount delivery stubbed and actual Neo.applyDeltas calls captured.
The Problem
For owner items [A, B, C], let A remain rendered but not sortable, then drag C without changing its slot:
- Live-proxy creation inserts the placeholder at owner index2 and moves the original C into the proxy.
- Sortable items are
[B, placeholder].
- Both Escape and same-slot release emit restoration of C at index1.
- The owner model stays
[A, B, C] and makes no reorder commit. The emitted physical order is therefore wrong.
The four-case witness has two intended failures (excluded prefix, both terminals) and two passing all-sortable controls. The failed invariant is:
restore index: received 1, expected 2
model commits: 0
owner items: [A, B, C]
Original component identities, start/end counts and proxy/placeholder cleanup pass. A native consumer also reproduced the resulting DOM order mismatch; the public unit witness is sufficient to reproduce the coordinate error without that consumer.
The Architectural Reality
src/draggable/DragZone.mjs#createDragProxy captures owner.items.indexOf(component) for inserting the live proxy's placeholder.
src/draggable/container/SortZone.mjs#processDragEnd currently obtains its restoration index from sortableItems.indexOf(dragPlaceholder).
- The two arrays deliberately differ when a subclass excludes rendered siblings.
getPinnedItems can keep those siblings fixed while only eligible items sort.
- Dashboard remote entry has a distinct shape: it adds the placeholder to the target owner and uses that placeholder as the active sort component. Preserve this path and placeholder cleanup; a blanket lookup that skips cleanup on an absent component is not sufficient.
Design authority: #7203's live-proxy contract moves the actual component and returns it to the layout; current processDragEnd documents layout restoration. Cancellation and same-slot release must not silently reorder native siblings.
Prescription checked: the shared container SortZone owns the restoration delta and its coordinate domain. A consumer override would copy the lifecycle #20605/#20611 deliberately expose through hooks.
The Fix
Use the owner's coordinate domain for the local live-component restoration, consistent with proxy creation, rather than a filtered sortable index. Keep placeholder membership/cleanup separate from deciding whether a live component still has an owner slot. Verify the existing remote-placeholder path rather than introducing a new state field or lifecycle fork.
Extend the existing container SortZone unit spec with the four-case witness and the relevant cleanup/remote controls.
Contract Ledger
| Surface |
Authority |
Required behavior |
Boundary |
Evidence |
| Live proxy terminal restoration |
DragZone creation + SortZone end |
restore into the owner's native item order |
excluded rendered siblings keep their positions |
real start/live-proxy/end unit deltas |
| Placeholder cleanup |
existing terminal lifecycle |
cleanup occurs once on both terminals |
preserve remote-owned placeholder handling |
terminal and remote controls |
| Model commit |
existing move/cancel contract |
cancellation and same-slot release write nothing |
ordinary reorder still commits once |
actual owner operation counts |
Decision Record impact: none; repairs an existing coordinate mismatch.
Acceptance Criteria
Out of Scope
Scroll geometry, layout-heal policies, window-drag transfer decisions, presentation styling, and new hidden-item/native-child mapping semantics.
Avoided Traps
Using filtered indices for physical insertion; fixing only a consumer; losing placeholder cleanup when the original component is absent; changing remote adoption by assuming every active component is a locally retained one.
Related and ownership
#7203 · #20605 / #20611 · #20849 / #20851 · #20856 / #20859. Sophie owns the repair as part of active drag reliability; not a contributor handoff.
Live latest-open + closed sweep: latest20 open and closed SortZone-placeholder search, with #7203/#17353/#18025 scopes read; no equivalent found. Backlog29 open (orange); own assignment20185 is unrelated. Latest30 all-status A2A carries no competing restore claim. Three problem-framed Memory Core searches and KB found earlier live-proxy/scroll history, not this filtered-coordinate repair. Existing bug/ai/drag-and-drop/testing labels were verified during this session.
Origin Session ID: 9bf9ac41-3a89-436f-9bdb-2e38327937eb
Retrieval Hint: "live SortZone proxy restores filtered sortable index instead of owner index after excluded sibling"
Context
The live in-page proxy can restore a dragged component into the wrong native sibling slot when a visible sibling is excluded from sorting. A Node-only witness on admitted
1b12232214a5b36bec6ca0255c2b93b5ef51e3eduses real Container, SortZone and DragProxyContainer start/end paths, with only native geometry/mount delivery stubbed and actualNeo.applyDeltascalls captured.The Problem
For owner items
[A, B, C], let A remain rendered but not sortable, then drag C without changing its slot:[B, placeholder].[A, B, C]and makes no reorder commit. The emitted physical order is therefore wrong.The four-case witness has two intended failures (excluded prefix, both terminals) and two passing all-sortable controls. The failed invariant is:
Original component identities, start/end counts and proxy/placeholder cleanup pass. A native consumer also reproduced the resulting DOM order mismatch; the public unit witness is sufficient to reproduce the coordinate error without that consumer.
The Architectural Reality
src/draggable/DragZone.mjs#createDragProxycapturesowner.items.indexOf(component)for inserting the live proxy's placeholder.src/draggable/container/SortZone.mjs#processDragEndcurrently obtains its restoration index fromsortableItems.indexOf(dragPlaceholder).getPinnedItemscan keep those siblings fixed while only eligible items sort.Design authority: #7203's live-proxy contract moves the actual component and returns it to the layout; current
processDragEnddocuments layout restoration. Cancellation and same-slot release must not silently reorder native siblings.Prescription checked: the shared container SortZone owns the restoration delta and its coordinate domain. A consumer override would copy the lifecycle #20605/#20611 deliberately expose through hooks.
The Fix
Use the owner's coordinate domain for the local live-component restoration, consistent with proxy creation, rather than a filtered sortable index. Keep placeholder membership/cleanup separate from deciding whether a live component still has an owner slot. Verify the existing remote-placeholder path rather than introducing a new state field or lifecycle fork.
Extend the existing container SortZone unit spec with the four-case witness and the relevant cleanup/remote controls.
Contract Ledger
Decision Record impact: none; repairs an existing coordinate mismatch.
Acceptance Criteria
Out of Scope
Scroll geometry, layout-heal policies, window-drag transfer decisions, presentation styling, and new hidden-item/native-child mapping semantics.
Avoided Traps
Using filtered indices for physical insertion; fixing only a consumer; losing placeholder cleanup when the original component is absent; changing remote adoption by assuming every active component is a locally retained one.
Related and ownership
#7203 · #20605 / #20611 · #20849 / #20851 · #20856 / #20859. Sophie owns the repair as part of active drag reliability; not a contributor handoff.
Live latest-open + closed sweep: latest20 open and closed SortZone-placeholder search, with #7203/#17353/#18025 scopes read; no equivalent found. Backlog29 open (orange); own assignment20185 is unrelated. Latest30 all-status A2A carries no competing restore claim. Three problem-framed Memory Core searches and KB found earlier live-proxy/scroll history, not this filtered-coordinate repair. Existing bug/ai/drag-and-drop/testing labels were verified during this session.
Origin Session ID: 9bf9ac41-3a89-436f-9bdb-2e38327937eb
Retrieval Hint: "live SortZone proxy restores filtered sortable index instead of owner index after excluded sibling"