Deferred actions with an undo window: actions apply optimistically and commit only after a countdown that pauses on hover, focus or a hidden tab, with Ctrl/⌘+Z, a commit on page close (pagehide), and a rollback notice if the commit fails.
npx shadcn@latest add @bollard/undo-toastundo-toast