Skip to content

polish: add useUndoDelete hook for optimistic undo on entry deletes - #76

Open
Sadullaev217 wants to merge 1 commit into
TemaDeveloper:mainfrom
Sadullaev217:fix/undo-delete-issue-56
Open

polish: add useUndoDelete hook for optimistic undo on entry deletes#76
Sadullaev217 wants to merge 1 commit into
TemaDeveloper:mainfrom
Sadullaev217:fix/undo-delete-issue-56

Conversation

@Sadullaev217

Copy link
Copy Markdown

Replaces the confirm-dialog pattern with an optimistic undo toast:

  • Remove item from UI immediately
  • Show "Deleted — Undo" toast for 4s with action button
  • If Undo clicked: restore item, cancel API call
  • If timer expires: fire the DELETE request
  • If DELETE fails: show error toast and restore item

Closes #56

What does this PR do?

Related issue

How to test

Screenshots (if UI change)

Replaces the confirm-dialog pattern with an optimistic undo toast:
- Remove item from UI immediately
- Show "Deleted — Undo" toast for 4s with action button
- If Undo clicked: restore item, cancel API call
- If timer expires: fire the DELETE request
- If DELETE fails: show error toast and restore item

Closes TemaDeveloper#56

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Artemii's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

feat: Undo for destructive entry deletes

1 participant