Add a 5-minute Undo window for deleted clips - #88
Open
alvst wants to merge 1 commit into
Open
Conversation
- ClipDeletionLedger records the exact placement (index, predecessor, successor) of each deleted clip in whichever container it was removed from, keeping the payload separate from the small durable tombstone marker so a stale synced snapshot can't resurrect an intentional deletion. Payloads are dropped (but tombstones kept) five minutes after deletion. - Command-Z restores the most recent still-undoable deletion at its original position; repeated presses walk backward through independent deletions in order. An Undo button appears in the bar's top-right whenever a deletion is still recoverable, and the bulk-delete confirmation now correctly says so instead of "There is no undo." - Added a "Delete permanently" Settings toggle (off by default) for users who don't want deleted content sitting recoverable in store.json at all, plus a per-deletion Option-key override that bypasses Undo for just that one deletion regardless of the setting.
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.
Deleting a clip is currently final and one keystroke away. This gives a deleted clip five minutes in which ⌘Z puts it back exactly where it was, with an opt-out for users who don't want deleted content recoverable at all.
What changed
ClipDeletionLedgerrecords each deleted clip's exact placement (index, predecessor, successor) in whichever container it came from. The payload is kept separate from a small durable tombstone, so a stale synced snapshot can't resurrect an intentional deletion. Payloads are dropped after five minutes; tombstones stay.Screenshots
Before:

After:


Notes for review
store.jsonfor five minutes, which is exactly the retention users who reach for "Clear History" are trying to avoid, and a payload the ledger's per-deletion design isn't shaped for. Single-clip deletion is the frequent accidental one and is what this covers. Clear History keeps its existing confirmation; deleting a Pinboard keeps its existing behavior. Both are unchanged by this PR, not newly excepted by it — happy to add a confirm to Clear History in a follow-up if you'd rather.This feature should be bundled into v2.
Part of #80.