Repository navigation
feat(scan): add bulk delete functionality for saved scans - #120
DevOlabode wants to merge 4 commits into
Conversation
ieliofficial
left a comment
There was a problem hiding this comment.
Backend is right, DELETE /api/scans, the storageService half, the tests. Keep all of it.
The frontend I don't. A Delete all button in Account deletes things you can't see from where you're standing. #119 is the shape: checkboxes on the Dashboard list, select all at the top, same confirm. That also gives partial delete, which people ask for more often.
Move the UI to DashboardView and point this at #119. I'll close #110 as covered.
|
Just to confirm based on the recent discussion: are we planning to completely remove the "Delete all scans" functionality on the account page and replace it with the checkbox-based bulk deletion from #119? I want to make sure I understand the intended direction before making any further changes. |
|
Yes, exactly that. The Delete all button in Account goes, and the replacement is the #119 flow in Dashboard: checkboxes on the list, select all at the top, same confirm you already use for a single scan. Keep the backend from this PR as is, DELETE /api/scans and the storageService half are both right. Just repoint the PR at #119 and move the UI. |
ieliofficial
left a comment
There was a problem hiding this comment.
The checkbox flow looks good. The per-row delete from #113 is gone though, please bring it back next to the checkboxes since deleting one scan is the most common case. Select all currently calls DELETE /api/scans, which removes everything in the repo folder, including scans another device saved after the page loaded, so the confirm can say 10 and delete 11. Send the ids you actually showed instead. Deleting a partial selection goes one by one, and if one fails, the ones already deleted stay on screen and a retry fails straight away with Scan not found. Treating a 404 as already deleted and refreshing the list afterwards would fix both. Also point the PR at #119, #110 is already closed. It'll need a rebase too, App.jsx conflicts with #122 and #129.
Implement a new API endpoint `DELETE /api/scans` to remove all saved scan reports while retaining the account storage. Update the ScanController and storageService to handle the deletion logic, including necessary authentication checks and error handling. Enhance the frontend with a confirmation dialog for users to delete all scans, ensuring a smooth user experience. Update documentation to reflect the new functionality.
…with confirmation and error handling
…tion of saved scans
2cd45b1 to
76b6f39
Compare
Bulk selection and deletion of saved scans on the dashboard.
DELETE /api/scanstakes{ ids }and deletes exactly those scan files in one GitHub commit, then refreshesscans/index.jsonand the manifest summary. It never wipes the wholescans/folder, so scans saved from another device after the page loaded are kept. Ids whose files are already gone count as already deleted.accountStorageContract.md,scanDeletion.md,TODO.md, the auth/storage guide, andbackend/README.md.Closes #119