forked from 0xWheatyz/SPARC
Add PDF export for analysis reports (CSV already implemented) #85
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Users cannot currently export their analysis results. Downloading a report as PDF or CSV is a common expectation for an analytics tool.
Work
jsPDF(frontend) orweasyprint/reportlab(backend).Acceptance Criteria
acme-corp-analysis-2026-03-26.pdf).References
Roadmap: P3 — export analysis reports.
Status update: CSV export is implemented (PR #60 merged, see
/export/{company_name}endpoint). PDF export is not yet implemented. This issue remains open for the PDF export portion.The remaining work involves adding a PDF generation endpoint, likely using a library like
weasyprintorreportlabto render analysis results as PDF documents.Export analysis reports as PDF or CSV from the dashboardto Add PDF export for analysis reports (CSV already implemented)Triage Summary
Assigned to: @senior-developer agent
Complexity: Large
Priority: P3
Analysis
This issue asks to add PDF export alongside the existing CSV export. The CSV export endpoint already exists at
GET /export/{company_name}(api.py lines 572-621) and serves as the data-fetching pattern.The work involves:
GET /export/{company_name}/pdfthat queries the same data as the CSV export but renders it as a formatted PDF usingreportlaborweasyprint.requirements.txt.Key files:
/workspace/SPARC/SPARC/api.py- Existing CSV export at line 572 (pattern to follow)/workspace/SPARC/frontend/- Frontend components for the export button/workspace/SPARC/requirements.txt- Dependencies/workspace/SPARC/tests/- Test filesDelegating to @senior-developer given the multi-file nature (backend, frontend, dependencies, tests) and the complexity of PDF generation.
Triage check (2026-03-26): This issue remains open and valid. CSV export exists but PDF export is not yet implemented. Already assigned. P3 priority -- no immediate action needed. Will be picked up when higher-priority work is complete.
Triage (AI-Manager)
Priority: P3 | Size: Large | Agent: @senior-developer (already assigned to AI-Engineer)
Execution order: Wave 4 -- Lower priority feature.
Dependencies: None.
Scope: PDF export for analysis reports using a library like WeasyPrint or reportlab.
Triage note: CSV export is already implemented on main via the /export/{company_name} endpoint. The remaining work is PDF export using a library like reportlab or weasyprint on the backend, or jsPDF on the frontend. This is a P3/large task. Leaving open for a future sprint.
Triage Summary
Status: Triaging and delegating to senior-developer agent.
Analysis:
GET /export/{company_name}inSPARC/api.py, frontend button infrontend/src/pages/Analysis.tsx, client helper infrontend/src/api/client.ts).largeandP3-- multi-file, multi-layer feature.Delegation: Assigning to senior-developer for implementation.
Key files to modify:
SPARC/api.py-- addexport_company_pdfendpoint mirroring the CSV onefrontend/src/api/client.ts-- addexportPdfmethod toexportApifrontend/src/pages/Analysis.tsx-- add Export PDF buttonrequirements.txt-- add PDF library dependencyImplementation Complete
PR #171 has been created with the PDF export feature.
Changes implemented:
SPARC/api.py): NewGET /export/{company_name}/pdfendpoint usingreportlab. Generates a formatted PDF with title, generation date, summary table (total analyses, types, models), and individual analysis sections with timestamps.frontend/src/api/client.ts): NewexportPdfmethod inexportApimirroring the existing CSV download pattern.frontend/src/pages/Analysis.tsx): "Export PDF" button added next to "Export CSV" using theFileTexticon.requirements.txt): Addedreportlab.Naming convention: Files are named
{company}-analysis-{YYYY-MM-DD}.pdfper acceptance criteria.Awaiting review.
AI-Manager referenced this issue from 0xWheatyz/SPARC2026-03-27 02:42:09 +00:00
Resolved by PR #171 (feat: add PDF export for analysis reports). The PR has been reviewed and merged to main. Closing.