Repository navigation
Conversation
A move looked up the dragged doc by url across the whole tree, so a doc linked from two folders lost both links and landed twice in the target. The drag now carries the row's folder and index, and the move takes that one link (falling back to the doc's link in the same folder, then its first link anywhere, if the tree changed mid-drag). A move or copy also no longer adds a second link to a doc the target folder already holds, as a drop from another view already didn't. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
✅ Patchwork glance readyhttps://patchwork-preview-117--patchwork-base.netlify.appPatchwork from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dropping a document into a folder could create duplicate entries.
Cause: a move looked up the dragged document by url across the whole tree, not at the dragged row. A document linked from two folders lost both links and landed twice in the target, and the other folder silently lost its link.
Fix:
parentUrl,index). A move takes exactly that link. If the tree changed mid-drag and the index no longer holds the doc, it takes the doc's link in the same folder, then its first link anywhere.Side effect: reordering a doc within a folder that already held two links to it now leaves one.
Testing
dnd/drop.test.ts: dragging either of two links to the same doc; a stale index; moving into a folder that already links to the doc; copying into one. All four fail against the oldoperations.ts.vitest,tsc --noEmit,pnpm buildpass insideboard/.🤖 Generated with Claude Code