Skip to content

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

Merged
TemaDeveloper merged 1 commit into
TemaDeveloper:mainfrom
Sadullaev217:fix/undo-delete-issue-56
Aug 25, 2026
Merged

polish: add useUndoDelete hook for optimistic undo on entry deletes#76
TemaDeveloper merged 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.

@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
personal-planner Ready Ready Preview Aug 25, 2026 5:24pm

@TemaDeveloper TemaDeveloper left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@TemaDeveloper
TemaDeveloper merged commit 4dc1f79 into TemaDeveloper:main Aug 25, 2026
4 of 5 checks passed
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

2 participants