AOSSIE-Org / AOSSIE-Org/PictoPy

Feat: Image Deletion, Undo System & Trash(Recently deleted) and restore

Abierto
#795 8 comentarios 0 reacciones 0 asignados Ver en GitHub
needs-triage
Lenguaje dominante
Python
Estrellas
283
Forks
679
Merge medio
7 d 2 h
PR fusionados (30 d)
3

Descripción

### Describe the feature

Image

## Overview
PictoPy currently lacks a direct image-level deletion workflow and provides no
undo mechanism for destructive actions. This feature proposes a safe image
deletion system with undo support and lightweight action history tracking.

---

## Problem
Currently:
- No direct image delete option exists in the gallery UI
- Image removal is mostly handled indirectly via albums
- Database-level deletion performs irreversible hard deletes
- No undo or action history is available

This makes image management inconsistent and risky, especially for accidental
or bulk actions.

---

## Proposed Solution

### 🗑️ Image Deletion
- Introduce a **gallery-level image delete option**
- Support **single and bulk image deletion**
- Replace hard deletes with **soft delete** (`deleted_at` / `is_deleted`)
- Ensure deleted images are removed from albums and related metadata

### ↩️ Undo Support
- Allow users to undo recent destructive actions
- Initial scope:
- Image deletion
- Image removal from albums
- Undo can be limited to recent actions (time-based or count-based)

### 📚 Recently Deleted
All the deleted image store in trash and from here user can restore it or delete permanently .
else the image will deleted after 30 days automatically.

---

## Suggested API Design (Indicative)

DELETE /images/{image_id}
POST /images/bulk-delete
POST /images/{image_id}/restore
POST /actions/undo
GET /actions/history

### Willingness to Work
@rahulharpal1603 sir I would like to work on implementing this feature.

### Add ScreenShots

There is not undo support and deletion feature in the frontend or backend .

### Record

- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue

### Checklist before Submitting.

- [ ] Have you updated docs for it?.
- [ ] Have you added unit tests?.
- [ ] Have you made sure unit tests pass?
- [ ] Have you made sure code formatting is correct?
- [ ] Does it contain any style related issues?

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.