Skip to content

CSV/JSON export of the current swap interface view with safe escaping #730

Description

@mikewheeleer

Summary

Users can't get swap interface data out of the app. Add a client-side export of the currently-filtered view as CSV and JSON with correct escaping (including formula-injection safety).

Why this matters

Export is table stakes for a data tool, and naive CSV is a formula-injection risk. Correct escaping makes it safe and useful.

Requirements

  • Export the currently-filtered swap interface as CSV and JSON.
  • Escape correctly: quotes, commas, newlines, and leading = + - @ (CSV formula-injection).
  • Respect the active filters/sort; export what the user sees.
  • Trigger a client download; accessible control.

Technical guidance

  • Neutralize formula-triggering leading characters in CSV cells.
  • Stream/generate without blocking the UI for large views.

Edge cases — each must have a test

  • export respects the active filter
  • cells with commas/quotes/newlines -> valid CSV
  • cell starting with = -> neutralized
  • empty view -> valid empty export
  • JSON export round-trips

Acceptance criteria

  • All requirements and every edge case above implemented and covered by tests
  • New unit and integration tests; existing tests still pass and no regressions
  • Structured, typed errors (no leaked internals; stable codes)
  • npm run lint, npm test, and npm run build all pass locally
  • Code follows the repo's existing conventions; no duplication or dead code
  • Short docs/comments explaining the design and any non-obvious decisions
  • PR description explains the approach and includes Closes #<issue>

Out of scope

  • Server-side/large-dataset export
  • XLSX format

Rewards

Part of the GrantFox OSS / Official Campaign (FWC26) — this task may be rewarded. PR quality is assessed by AI: depth, correctness under edge cases, meaningful tests, and clean design are what earn the reward. Shallow changes (typos, formatting, trivial docs) do not qualify.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions