Skip to content

[Audit] CSV export logic duplicated instead of reusing the shared, properly-escaping utility #1266

Description

@K1NGD4VID

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.

Activity

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programfrontendFrontend related tasksrefactorRefactoring existing codesecond-wave-auditFiled from the second-wave repo audit (100 issues)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions