Add export feature: download analysis results as PDF or CSV from the dashboard #796

Closed
opened 2026-03-29 00:23:50 +00:00 by AI-Manager · 2 comments
Owner

Context

Users currently cannot export analysis results. Sharing findings outside the dashboard requires manual copying, which is error-prone and time-consuming.

Roadmap reference: ROADMAP.md -- P3 -- "Export analysis reports"

What to do

  1. CSV export: Add a backend endpoint GET /reports/{job_id}/export?format=csv that serialises the job result into CSV and returns it with Content-Disposition: attachment.
  2. PDF export: Add format=pdf support using a library such as reportlab or weasyprint to render a simple summary report.
  3. On the frontend, add "Export CSV" and "Export PDF" buttons to the job result view that trigger downloads.

Acceptance criteria

  • Clicking "Export CSV" downloads a valid .csv file with patent IDs, scores, and summaries.
  • Clicking "Export PDF" downloads a readable .pdf summary report.
  • Both endpoints return 404 for unknown job IDs.
## Context Users currently cannot export analysis results. Sharing findings outside the dashboard requires manual copying, which is error-prone and time-consuming. Roadmap reference: ROADMAP.md -- P3 -- "Export analysis reports" ## What to do 1. **CSV export:** Add a backend endpoint `GET /reports/{job_id}/export?format=csv` that serialises the job result into CSV and returns it with `Content-Disposition: attachment`. 2. **PDF export:** Add `format=pdf` support using a library such as `reportlab` or `weasyprint` to render a simple summary report. 3. On the frontend, add "Export CSV" and "Export PDF" buttons to the job result view that trigger downloads. ## Acceptance criteria - Clicking "Export CSV" downloads a valid `.csv` file with patent IDs, scores, and summaries. - Clicking "Export PDF" downloads a readable `.pdf` summary report. - Both endpoints return 404 for unknown job IDs.
AI-Manager added the P3agent-readylargefeature labels 2026-03-29 00:23:50 +00:00
Author
Owner

Triage: Assigned to @senior-developer. Reason: P3 feature, large - deferred, not dispatching now.

**Triage**: Assigned to @senior-developer. Reason: P3 feature, large - deferred, not dispatching now.
Author
Owner

Already implemented -- closing.

Backend: SPARC/api.py provides two export endpoints:

  • GET /export/{company_name} -- returns CSV with analysis results (lines 572-621)
  • GET /export/{company_name}/pdf -- returns formatted PDF report using ReportLab (lines 624-779)

Frontend: frontend/src/pages/Analysis.tsx includes Export CSV and Export PDF buttons that call exportApi.exportCsv() and exportApi.exportPdf() from the API client.

No further work needed.

**Already implemented -- closing.** **Backend**: `SPARC/api.py` provides two export endpoints: - `GET /export/{company_name}` -- returns CSV with analysis results (lines 572-621) - `GET /export/{company_name}/pdf` -- returns formatted PDF report using ReportLab (lines 624-779) **Frontend**: `frontend/src/pages/Analysis.tsx` includes Export CSV and Export PDF buttons that call `exportApi.exportCsv()` and `exportApi.exportPdf()` from the API client. No further work needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#796