Problem
src/app/api/admin/jobs/[id]/pipeline/route.ts groups applicants by stage.name.toUpperCase() matched against the ApplicationStatus enum (NEW, REVIEWING, SHORTLISTED, INTERVIEW, OFFERED, REJECTED, WITHDRAWN). User-defined stage names that don't match an enum value silently produce empty columns. The seed stages (New / Screening / Interview / Offer / Hired) only match NEW and INTERVIEW — the rest render empty.
Fix
Decouple display stages from the status enum. Options (pick in implementation):
- Store an explicit
status mapping on each PipelineStage, OR
- Persist applicant→stage by stage id rather than deriving from name→enum.
- Backfill existing data; ensure no applicants are dropped from view.
Acceptance
Notes
Documented in .claude/rules/scoutlane-architecture.md and CLAUDE.md as a known coupling.
Problem
src/app/api/admin/jobs/[id]/pipeline/route.tsgroups applicants bystage.name.toUpperCase()matched against theApplicationStatusenum (NEW, REVIEWING, SHORTLISTED, INTERVIEW, OFFERED, REJECTED, WITHDRAWN). User-defined stage names that don't match an enum value silently produce empty columns. The seed stages (New / Screening / Interview / Offer / Hired) only matchNEWandINTERVIEW— the rest render empty.Fix
Decouple display stages from the status enum. Options (pick in implementation):
statusmapping on eachPipelineStage, ORAcceptance
Notes
Documented in
.claude/rules/scoutlane-architecture.mdand CLAUDE.md as a known coupling.