Skip to content

Trash for annotations: soft delete with restore and purge #144

Description

@saad-mhmd

Deleting a Graph annotation is permanent the moment it commits. Any logged-in user can delete non-editorial annotations from the viewer, and the nightly whole-DB dump cannot recover one wrongly deleted row without discarding a day of everyone's work.

Add a trash for Graph:

  • Viewer/backoffice deletes set deleted_at/deleted_by instead of destroying the row; trashed rows disappear from all public reads, counts, and the next search reindex.
  • New backoffice page Admin → Trash: list, restore, and purge (permanent, superuser-only). Nothing is purged automatically.
  • Purge is a real delete, so the corresp-strip signal and the deleted audit event fire; a restored TEXT graph gets its text↔image link back intact.

Scope: Graph only (v1). ImageText and the ItemImage/ItemPart/HistoricalItem spine are a follow-up pending review.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions