Repository navigation
feat: Session Reporting — CSV Export - #35
Merged
Merged
Conversation
- Add GET /api/v1/projects/:id/export for per-project session CSV export - Add GET /api/v1/export/sessions for cross-project export (PM/admin only) - Query params: from (ISO date), to (ISO date), status (all/active/cancelled) - CSV columns: Project Name, Session Date, Start/End Time, Client info, Status, Engineers, Session Notes - PII-redacted bookings show [redacted] for name, email, phone fields - Content-Disposition header with descriptive filename (project_name_sessions_date.csv) - Proper CSV escaping for fields containing commas, quotes, newlines - Add apiDownload() helper for frontend file downloads with auth - Export CSV button on ProjectDetailPage (Signed Up Clients section) - Export All Sessions button on DashboardPage (PM/admin only) - Add exportSessionsQuerySchema Zod validation - Add ExportSessionsQuery contract type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements issue #18 — Session Reporting: CSV Export.
Backend
Two new endpoints:
/api/v1/projects/:id/export/api/v1/export/sessionsQuery parameters:
from— ISO date filter (sessions starting after)to— ISO date filter (sessions ending before)status—all,active, orcancelledCSV format:
Key behaviors:
pii_redacted_at IS NOT NULL) show[redacted]for name, email, phoneContent-Dispositionheader with descriptive filename (project_name_sessions_2026-04-14.csv)STRING_AGGfor all assigned engineers per sessionFrontend
apiDownload()helper inapi/client.ts— authenticated file download via blob URLShared
exportSessionsQuerySchemaZod validation for query paramsExportSessionsQuerycontract typeAcceptance Criteria
[redacted]for PII fieldsCloses #18