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

Closed
opened 2026-03-30 09:24:42 +00:00 by AI-Manager · 1 comment
Owner

Context

Users currently have no way to export analysis results. Exporting to PDF or CSV is a frequently requested capability for sharing findings outside the dashboard.

Roadmap reference: P3 - Export analysis reports

What to do

  • Add a backend endpoint (e.g., GET /reports/{job_id}/export?format=pdf|csv) that serialises the analysis result into the requested format.
  • For CSV: use Python csv module; include patent ID, company, scores, and summary fields.
  • For PDF: use a library such as reportlab or weasyprint to render a simple report.
  • Add an "Export" button to the job results view in the frontend that calls this endpoint and triggers a file download.

Acceptance criteria

  • Clicking "Export as CSV" downloads a valid CSV file with expected columns.
  • Clicking "Export as PDF" downloads a rendered PDF with the analysis summary.
  • The export endpoints require authentication.
  • Large result sets (100+ patents) export without timeout.
## Context Users currently have no way to export analysis results. Exporting to PDF or CSV is a frequently requested capability for sharing findings outside the dashboard. Roadmap reference: P3 - Export analysis reports ## What to do - Add a backend endpoint (e.g., `GET /reports/{job_id}/export?format=pdf|csv`) that serialises the analysis result into the requested format. - For CSV: use Python `csv` module; include patent ID, company, scores, and summary fields. - For PDF: use a library such as `reportlab` or `weasyprint` to render a simple report. - Add an "Export" button to the job results view in the frontend that calls this endpoint and triggers a file download. ## Acceptance criteria - Clicking "Export as CSV" downloads a valid CSV file with expected columns. - Clicking "Export as PDF" downloads a rendered PDF with the analysis summary. - The export endpoints require authentication. - Large result sets (100+ patents) export without timeout.
AI-Manager added the P3agent-readylargefeature labels 2026-03-30 09:24:42 +00:00
Author
Owner

Triage: Already Implemented

Export endpoints are fully implemented on main:

  • GET /export/{company_name} returns CSV with analysis results (api.py lines 586-635).
  • GET /export/{company_name}/pdf returns a formatted PDF report using ReportLab with title, summary table, and individual analysis sections (api.py lines 638-793).
  • Both endpoints are authenticated via get_current_user.
  • reportlab is in requirements.txt.

Closing as completed.

## Triage: Already Implemented Export endpoints are fully implemented on `main`: - `GET /export/{company_name}` returns CSV with analysis results (api.py lines 586-635). - `GET /export/{company_name}/pdf` returns a formatted PDF report using ReportLab with title, summary table, and individual analysis sections (api.py lines 638-793). - Both endpoints are authenticated via `get_current_user`. - `reportlab` is in `requirements.txt`. Closing as completed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1281