Labels / Complexity: dx, ci · Trivial — 2 pts
Summary
The frontend includes a codegen script in package.json that generates TypeScript types from the backend's OpenAPI spec. However, this step is not run in CI, allowing the generated types in src/types/api.generated.ts to drift from the actual backend API. This can cause type mismatches that only surface at runtime.
Proposal
- Add a GitHub Actions workflow step that runs
npm run codegen
- Compare the generated output with the committed
src/types/api.generated.ts
- Fail the build if the generated types differ from committed (indicating drift)
Acceptance criteria
Out of scope
Automatically committing the updated types (require manual update).
Getting started
Files in scope:
.github/workflows/api-codegen-check.yml (new file)
package.json (existing codegen script)
Build/test commands:
npm run codegen
git diff src/types/api.generated.ts
Good first files to read: package.json for codegen script, .github/workflows/ for existing CI patterns.
Labels / Complexity: dx, ci · Trivial — 2 pts
Summary
The frontend includes a
codegenscript inpackage.jsonthat generates TypeScript types from the backend's OpenAPI spec. However, this step is not run in CI, allowing the generated types insrc/types/api.generated.tsto drift from the actual backend API. This can cause type mismatches that only surface at runtime.Proposal
npm run codegensrc/types/api.generated.tsAcceptance criteria
.github/workflows/api-codegen-check.ymlOut of scope
Automatically committing the updated types (require manual update).
Getting started
Files in scope:
.github/workflows/api-codegen-check.yml(new file)package.json(existing codegen script)Build/test commands:
Good first files to read:
package.jsonfor codegen script,.github/workflows/for existing CI patterns.