Add soft-delete (trash/recycle bin) instead of permanent image deletion
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.
👋 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 :)
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 !!
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:
- A nullable
deleted_atcolumn on images with a migration, excluded from every gallery, album, face and search query. - Delete sets
deleted_atand keeps the embeddings; restore and purge endpoints; auto purge after N days on startup. - 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.