Skip to content

feat(ats): per-application detail route - #569

Merged
thinkclay merged 1 commit into
mainfrom
claude/ats-detail-route
Aug 11, 2026
Merged

thinkclay merged 1 commit into
mainfrom
claude/ats-detail-route

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Closes #537. SDK: Scaffald/sdk#19, merged.

Candidate detail existed only as a modal on the kanban board, so it had no URL. A recruiter could not send a colleague a link to a candidate, and the browser back button did nothing against it.

ROUTES.OFFICE.ATS.DETAIL declared /office/ats/:id with no file behind it. The real route lands at /office/applications/:applicationId, beside the existing /inquiry child rather than under /office/ats, and the constant now points at something that exists.

Three pieces

GET /v1/employer/applications/{id}. GET /v1/applications/{id} already serves employers, but it returns the applicant's projection — job and organisation embedded, no candidate. This returns the same row shape listForOrganization does, stage history included. 404 rather than 403 outside the caller's organisations, so it cannot be used to probe which application ids exist.

toATSApplication extracted from office-applications-screen into applications/transform.ts. The board maps a list through it; the route calls it with one row. Two copies would drift, and the drift shows up as a field that renders on a card and is blank on the detail page — so there is a test asserting single and list produce identical objects.

CandidateDetailContent extracted from CandidateDetailModal; both render it. The modal stays, because a quick look without leaving the board is worth having — it gains an "Open full page" button, which is the path from board to URL. Since the content mounts only when visible, its queries no longer need an open flag to stay idle: mounting is the gate.

Verification

  • 5 transform tests, mutation-checked. Collapsing withdrawn into rejected (fix(ats): withdrawn applications are displayed as rejected, corrupting funnel and EEO counts #533), reading a flat current_location instead of screening_answers, and reading application_score instead of score_total each turn a test red. My first attempt at the withdrawn mutation silently failed to apply and I re-ran it properly rather than accept a green result.
  • Office suite 71 passed / 0 failed (6 pre-existing skips).
  • Endpoint driven against a live local database: returns the list row shape with candidate and stage history, cross-organisation read 404s, unknown id 404s, non-uuid 400s.
  • deno lint and deno fmt --check clean; scf-core typecheck clean.

Notes for review

Biome reformatted a dozen files in features/office/applications/ that I had not touched; I reverted those so the diff stays reviewable. The ApplicationsListItem type already existed in hooks/useApplications.ts — I briefly duplicated it in the new module and removed the duplicate rather than leave two.

MockApplication is still the shared domain type. Renaming it is #536, and this PR deliberately does not start that.

Closes #537. Candidate detail existed only as a modal on the kanban board,
so it had no URL: a recruiter could not send a colleague a link to a
candidate, and the browser back button did nothing.

`ROUTES.OFFICE.ATS.DETAIL` declared `/office/ats/:id` with no file behind
it. The real route lands at `/office/applications/:applicationId`, next to
the existing `/inquiry` child rather than under `/office/ats`, and the
constant now points at something that exists.

Three pieces:

- `GET /v1/employer/applications/{id}`. `GET /v1/applications/{id}` already
  serves employers, but returns the applicant's projection — job and
  organisation embedded, no candidate. This returns the same row shape the
  list does, stage history included. 404 rather than 403 outside the
  caller's organisations, so it cannot be used to probe which ids exist.

- `toATSApplication` extracted from office-applications-screen into
  `applications/transform.ts`. The board maps a list through it and the
  route calls it with one row, so the two cannot drift — two copies would,
  and the drift shows up as a field that renders on a card and is blank on
  the detail page. There is a test asserting single and list produce
  identical objects.

- `CandidateDetailContent` extracted from `CandidateDetailModal`. Both
  render it. The modal stays because a quick look without leaving the board
  is still worth having; it gains an "Open full page" button, which is the
  path from the board to a URL. Since the content only mounts when visible,
  the queries no longer need an `open` flag to stay idle — mounting is the
  gate.

Verification: 5 transform tests, mutation-checked — collapsing withdrawn
into rejected, reading a flat `current_location` instead of
`screening_answers`, and reading `application_score` instead of
`score_total` each turn a test red. Office suite 71 passed / 0 failed.
Endpoint driven against a live local database: returns the list row shape,
cross-organisation 404, unknown id 404, non-uuid 400.
@github-actions

Copy link
Copy Markdown
Contributor

📊 Performance Benchmark Results


@thinkclay
thinkclay merged commit df22fc8 into main Aug 11, 2026
11 of 12 checks passed
@thinkclay
thinkclay deleted the claude/ats-detail-route branch August 11, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ats): no per-application detail route — candidate detail is modal-only, not linkable

1 participant