Skip to content

Soft delete with undo #11

Description

@byteofhoney

Goal:

Make deleting a snippet reversible for a short window instead of permanent.

User story:

As a user, I want an undo option after deleting so that I don't lose a snippet by mistake.

Tasks

  • Replace hard delete with a deleted: true flag on the snippet document
  • Update index() query to exclude deleted: true snippets by default
  • Flash message includes an "Undo" action for a short window after deletion
  • Undo action clears the deleted flag and restores the snippet

Acceptance Criteria

  • Deleting a snippet removes it from the grid immediately
  • Clicking "Undo" within the time window restores it fully, unchanged
  • After the window expires, the snippet stays hidden (permanent cleanup can be a separate feature)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions