Skip to content

feat(scan): add bulk delete functionality for saved scans - #120

Open
DevOlabode wants to merge 4 commits into
mainfrom
feat/delete-all-scans
Open

DevOlabode wants to merge 4 commits into
mainfrom
feat/delete-all-scans

Conversation

@DevOlabode

@DevOlabode DevOlabode commented Aug 21, 2026 •

Copy link
Copy Markdown
Member

Bulk selection and deletion of saved scans on the dashboard.

  • Checkbox selection + select all, with a confirm step showing how many scans will be deleted.
  • Per-row delete is kept (from feat/deleteindividual-scans #113) next to each checkbox, for the common one-scan case.
  • DELETE /api/scans takes { ids } and deletes exactly those scan files in one GitHub commit, then refreshes scans/index.json and the manifest summary. It never wipes the whole scans/ folder, so scans saved from another device after the page loaded are kept. Ids whose files are already gone count as already deleted.
  • Partial and full selections both use that one call, so a failure deletes nothing and a retry works. The list resyncs from storage after a failed delete.
  • Per-row delete treats a 404 as already deleted and resyncs the list.
  • Docs updated: accountStorageContract.md, scanDeletion.md, TODO.md, the auth/storage guide, and backend/README.md.

Closes #119

@DevOlabode DevOlabode self-assigned this Aug 21, 2026

@ieliofficial ieliofficial left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@DevOlabode

Copy link
Copy Markdown
Member Author

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.

@ieliofficial

Copy link
Copy Markdown
Member

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 ieliofficial left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ieliofficial ieliofficial mentioned this pull request Sep 30, 2026
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.
@DevOlabode
DevOlabode force-pushed the feat/delete-all-scans branch from 2cd45b1 to 76b6f39 Compare September 30, 2026 21:56
@DevOlabode DevOlabode linked an issue Sep 30, 2026 that may be closed by this pull request

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bulk Scan Selection and Deletion

2 participants