AddThisFeature

Undo Actions

Let people take it back, instead of asking them if they're sure.

involved User Experience

What it adds

An undo affordance for destructive actions — usually a better answer than a confirmation dialog.

What your agent is told to do

4
  1. 1

    Find destructive actions currently gated behind a confirmation dialog. Where the action can be made reversible, replace the dialog with undo.

  2. 2

    Implement undo as a REAL reversal: soft-delete with a restore path, or a deferred commit. Do not fake it by hiding the row while the delete has already committed server-side.

  3. 3

    Surface undo in a toast that lasts long enough to use — roughly 8–10 seconds, longer for bulk actions.

  4. 4

    Support Cmd/Ctrl+Z for the most recent undoable action.

Edge cases it handles

5
  • The user navigates away before undoing — the action must still commit correctly.
  • Several undoable actions in quick succession — each needs its own undo, or a stack.
  • The undo window expires while the toast is still visible — disable the button rather than failing silently.
  • Undo fails server-side — say so; never pretend it worked.
  • Cascading deletes are often irreversible. Do not offer undo where you cannot deliver it.

Definition of done

7
  • Undo genuinely restores state — verified server-side and after a refresh.
  • The undo window is long enough to actually use.
  • Cmd/Ctrl+Z triggers the last undo.
  • Actions that cannot be reversed still use a confirmation dialog.
  • A failed undo is reported, not swallowed.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.