Filed from the second-wave repository audit (issue 64/100). See the audit summary for full category context.
- Location:
frontend/src/components/dashboard/ActivityHistory.tsx:34-63 vs. frontend/src/utils/csvExport.ts
- Problem:
ActivityHistory's exportToCSV builds rows via unescaped .join(","), duplicating the blob/anchor-click download mechanics that frontend/src/utils/csvExport.ts (convertArrayToCSV/downloadCSV) already implements correctly with proper cell escaping.
- Evidence: Two independent CSV-generation implementations in the codebase.
- Suggested implementation: Replace
ActivityHistory's ad-hoc export with calls to the shared csvExport.ts utility.
- Acceptance criteria: Exporting activity containing commas/quotes in any field produces a correctly escaped, spreadsheet-safe CSV.
- Difficulty: S
- Expected impact: Fixes real data-corruption-on-export risk while removing duplicated code.
frontend/src/components/dashboard/ActivityHistory.tsx:34-63vs.frontend/src/utils/csvExport.tsActivityHistory'sexportToCSVbuilds rows via unescaped.join(","), duplicating the blob/anchor-click download mechanics thatfrontend/src/utils/csvExport.ts(convertArrayToCSV/downloadCSV) already implements correctly with proper cell escaping.ActivityHistory's ad-hoc export with calls to the sharedcsvExport.tsutility.