Repository navigation
feat: add periodic report generation interface - #60
Merged
marcvergees merged 2 commits intoNov 7, 2026
Merged
marcvergees merged 2 commits into
marcvergees merged 2 commits into
Conversation
13 of 14 tasks
marcvergees
approved these changes
Nov 7, 2026
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.
Description
Adds a Reports tab for the periodic report API from fireform-core/fireform-backend#737 (
POST /api/v1/reports/generateandGET /api/v1/reports/{report_id}).FUTURE_PERIODrule. The backend's error still shows if one comes back.202, the tab pollsGET /reports/{report_id}, waiting theretry_after_secondsthe API returns each time. It shows elapsed time and the next check. Polling stops after 10 minutes with a "check the worker" message.422(validation andFUTURE_PERIOD),503 QUEUE_UNAVAILABLE,404 REPORT_NOT_FOUND,500 REPORT_FAILED,PDF_NOT_FOUND, and an unreachable backend each get a clear message, with Check again / Start over where they make sense.Files:
src/renderer/lib/api.ts: typedgenerateReport/fetchReportResult, matchingcontracts/schemas/reporting.yaml, plus aReportApiErrorthat keepserror_code.src/renderer/features/reports/:Reports.tsx(UI) andhooks.ts(polling hook, plus period labels and file names that match the backend's).src/renderer/store/index.ts:activeReportstate.src/renderer/App.tsx: nav item and route.Notes for reviewers
format: "both", butGET /reports/{id}then returns only the JSON, so the PDF can't be downloaded. I can follow up on the backend if you'd likeboth.Content-Disposition, so the renderer usually can't read the server's filename. The frontend names the file the same way the backend does (e.g.FireForm_Quarterly_2026-Q3.pdf).Depends on fireform-core/fireform-backend#737.
Fixes #58
Type of change
How Has This Been Tested?
npm run typecheck: passesnpm run lint: 0 errors. The 33 existing warnings are the same as onmain; this PR adds none (eslint src/renderer/features/reports --max-warnings 0passes).npm run build: passesapi.tsandhooks.tscode against a mock of the two endpoints (bundled with esbuild, run in Node). The mock answers202twice before the result. 26/26 checks passed:202responses honouringretry_after_seconds, then the PDF blob.PeriodicReportparsed correctly.quarterormonthonly for the matching period type.422 FUTURE_PERIOD,422 validation_errors,503 QUEUE_UNAVAILABLE,404 REPORT_NOT_FOUND,500 REPORT_FAILED.npm run dev, open Reports, and generate a PDF report and a JSON report.Test Configuration:
Checklist: