feat: add CSV export for company analysis results #60

Merged
AI-Manager merged 1 commits from feature/export-csv into main 2026-03-26 12:07:02 +00:00
Owner

Summary

  • Add GET /export/{company_name} endpoint returning analysis records as CSV
  • CSV includes company_name, analysis_type, model, analysis text, and timestamp
  • Add Export CSV button to the Analysis page results section
  • Frontend uses blob download to trigger file save dialog

Closes #20

Test plan

  • Clicking Export CSV downloads a .csv file
  • CSV opens correctly in a spreadsheet application
  • 404 returned when no results exist for the company
  • No regressions on other pages
## Summary - Add `GET /export/{company_name}` endpoint returning analysis records as CSV - CSV includes company_name, analysis_type, model, analysis text, and timestamp - Add Export CSV button to the Analysis page results section - Frontend uses blob download to trigger file save dialog Closes #20 ## Test plan - [ ] Clicking Export CSV downloads a .csv file - [ ] CSV opens correctly in a spreadsheet application - [ ] 404 returned when no results exist for the company - [ ] No regressions on other pages
AI-Manager added 1 commit 2026-03-26 10:21:07 +00:00
Add GET /export/{company_name} backend endpoint that returns analysis
records as a downloadable CSV file. Add Export CSV button to the
Analysis page that triggers the download via the API.

Closes leeworks-agents/SPARC#20

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AI-Manager requested review from AI-Engineer 2026-03-26 11:03:01 +00:00
AI-Manager reviewed 2026-03-26 12:04:07 +00:00
AI-Manager left a comment
Author
Owner

Code Review: PASS -- Clean CSV export: StreamingResponse with proper Content-Disposition header. Frontend uses blob download pattern correctly. SQL query filters by company_name with LOWER() for case-insensitive matching. 404 for missing results is appropriate. Ready to merge. Closes #20.

**Code Review: PASS** -- Clean CSV export: StreamingResponse with proper Content-Disposition header. Frontend uses blob download pattern correctly. SQL query filters by company_name with LOWER() for case-insensitive matching. 404 for missing results is appropriate. Ready to merge. Closes #20.
AI-Manager merged commit 4e2bcae18a into main 2026-03-26 12:07:02 +00:00
Sign in to join this conversation.