Problem
apps/web/app/[locale]/history/page.tsx allows deleting entries one by one but has no bulk "Clear All" action. Users with long scan histories have to click delete dozens of times to reset, which is a frustrating UX gap.
Files to Touch
apps/web/app/[locale]/history/page.tsx
apps/web/lib/db/scanHistory.ts (may need a clearAllHistory() function)
How to Solve
- Check if
clearAllHistory() exists in apps/web/lib/db/scanHistory.ts. If not, add it — it should delete all entries for the current user from IndexedDB/localStorage.
- In
history/page.tsx, add a "Clear All" button in the header controls area (next to the existing Download and Sync buttons), styled with a danger/red tone.
- On click, show an inline confirmation (a simple boolean state toggle showing "Are you sure?" + Confirm/Cancel buttons) before clearing — avoid
window.confirm() as it blocks the main thread and is inaccessible.
- After confirmation, call
clearAllHistory() then loadHistory() to refresh the UI.
- The button should only be visible when
history.length > 0.
Acceptance Criteria
⚠️ Contributor Instructions (Please Read Carefully)
- Do NOT spam "/assign" or "Please assign me".
- To claim this task, you MUST reply with a brief proposed implementation plan/approach. What files will you touch? How will you solve it?
- Once your approach is reviewed and approved by a maintainer, you will be officially assigned.
- Any PR opened without prior assignment and approach approval will be closed.
Problem
apps/web/app/[locale]/history/page.tsxallows deleting entries one by one but has no bulk "Clear All" action. Users with long scan histories have to click delete dozens of times to reset, which is a frustrating UX gap.Files to Touch
apps/web/app/[locale]/history/page.tsxapps/web/lib/db/scanHistory.ts(may need aclearAllHistory()function)How to Solve
clearAllHistory()exists inapps/web/lib/db/scanHistory.ts. If not, add it — it should delete all entries for the current user from IndexedDB/localStorage.history/page.tsx, add a "Clear All" button in the header controls area (next to the existing Download and Sync buttons), styled with a danger/red tone.window.confirm()as it blocks the main thread and is inaccessible.clearAllHistory()thenloadHistory()to refresh the UI.history.length > 0.Acceptance Criteria
window.confirm()).aria-label, keyboard focusable).