PictoPy icon indicating copy to clipboard operation
PictoPy copied to clipboard

Add soft-delete (trash/recycle bin) instead of permanent image deletion

Open Mansi2007275 opened this issue 3 months ago • 3 comments

Problem Currently deleting an image (single or bulk) removes it — and its DB rows/embeddings — permanently with no way to recover. A single misclick in bulk-select mode can wipe irreplaceable photos with zero undo path.

Proposed solution

  • Add a deleted_at (nullable) column to the images table instead of hard-deleting the row on first delete
  • "Trash" view in the UI showing soft-deleted images, with Restore / Delete Forever actions
  • Auto-purge (hard delete) items from trash after N days (configurable), which is where the existing orphaned-rows cleanup from #1405 would actually run
  • Embeddings/semantic_labels stay untouched until final purge, so restore is cheap

Why this matters Photo apps (Google Photos, Apple Photos) all have this as a baseline safety feature. PictoPy currently has none, which is risky for a local-first tool where there's no cloud backup.

Happy to pick this up — I've worked on the DB layer before (album/faces unit tests, PR #1342) and can pair the schema change with test coverage.

Mansi2007275 avatar Aug 07 '26 11:08 Mansi2007275

👋 Thanks for opening this issue! The maintainers will review it shortly. Till then, do not open any PR. This is a strict rule we like to follow around here :)

github-actions[bot] avatar Aug 07 '26 11:08 github-actions[bot]

i understand the issue and also went through the prev issue i understand the parent child deletion conflict i see this a legitimate feature, i'll start working on it !!

Aryan27-max avatar Aug 16 '26 17:08 Aryan27-max

Hi @rohan-pandeyy, I'm Vignesh, a CS student from Bengaluru working in React, TypeScript and Python. I'd like to take this one if it is still open (the August claim has no PR yet).

What I have in mind:

  1. A nullable deleted_at column on images with a migration, excluded from every gallery, album, face and search query.
  2. Delete sets deleted_at and keeps the embeddings; restore and purge endpoints; auto purge after N days on startup.
  3. A Trash page with Restore and Delete forever, plus bulk select, with pytest and frontend tests.

Before I open a PR: is this plan what you want, and should the purge window be configurable? I'll wait for your review, as the repo rule says.

Drafted with AI assistance and reviewed by me.

vigneshbs33 avatar Oct 08 '26 12:10 vigneshbs33