Repository navigation
feat(ats): per-application detail route - #569
Merged
Merged
Conversation
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.
Contributor
📊 Performance Benchmark Results |
2 of 15 tasks
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.
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.DETAILdeclared/office/ats/:idwith no file behind it. The real route lands at/office/applications/:applicationId, beside the existing/inquirychild 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 shapelistForOrganizationdoes, stage history included. 404 rather than 403 outside the caller's organisations, so it cannot be used to probe which application ids exist.toATSApplicationextracted fromoffice-applications-screenintoapplications/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.CandidateDetailContentextracted fromCandidateDetailModal; 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 anopenflag to stay idle: mounting is the gate.Verification
withdrawnintorejected(fix(ats): withdrawn applications are displayed as rejected, corrupting funnel and EEO counts #533), reading a flatcurrent_locationinstead ofscreening_answers, and readingapplication_scoreinstead ofscore_totaleach 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.deno lintanddeno fmt --checkclean; 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. TheApplicationsListItemtype already existed inhooks/useApplications.ts— I briefly duplicated it in the new module and removed the duplicate rather than leave two.MockApplicationis still the shared domain type. Renaming it is #536, and this PR deliberately does not start that.