Skip to content

fix: make paste deduplication name-aware#219

Merged
fuzzzerd merged 1 commit into
masterfrom
fuzzz/paste-dedup-name-aware
May 20, 2026
Merged

fix: make paste deduplication name-aware#219
fuzzzerd merged 1 commit into
masterfrom
fuzzz/paste-dedup-name-aware

Conversation

@fuzzzerd
Copy link
Copy Markdown
Owner

Summary

  • Dedup is now (name, folder) rather than XML-content alone. Pasting a clip whose name and content both already exist still skips silently; everything else gets an explicit decision.
  • New IClipCollisionPrompt modal (Replace / Keep both / Cancel) for same-name + different-content. "Apply to all remaining clips in this paste" keeps batch (group) pastes from re-prompting once the user has made a call.
  • Cancel aborts the rest of the batch and surfaces a status message naming how many clips were kept.
  • Different-name + same-content now lands as a variant — the previous content-only dedup blocked this case.
  • Headless / plugin contexts get the NullClipCollisionPrompt default, which returns Cancel so collisions never silently mutate existing clips.

Paste collisions used to be content-only: pasting a clip whose XML
matched any existing clip was silently skipped, regardless of name.
This broke variant tracking (paste, rename, repaste leaves the user
with only the renamed copy).

Dedup now keys on (name, folder). Same name + same content skips as
a true duplicate. Different name + same content lands as a variant.
Same name + different content prompts the user via a new
IClipCollisionPrompt with Replace / Keep both / Cancel choices and
an apply-to-all option for batch (group) pastes.
@github-actions
Copy link
Copy Markdown

Test Results

✔️ Tests 1423 / 1423 - passed in 16.2s
✔️ Coverage 79.43% - passed with 70% threshold
📏 15267 / 17689 lines covered 🌿 5192 / 8068 branches covered
🔍 click here for more details

✏️ updated for commit 0657d61

@fuzzzerd fuzzzerd merged commit a0bee31 into master May 20, 2026
6 checks passed
@fuzzzerd fuzzzerd deleted the fuzzz/paste-dedup-name-aware branch May 20, 2026 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant