Repository navigation
feat(redesign): worker job detail reads as one screen — header, metrics, and requirements answered (#827) - #880
Conversation
…cs, and requirements answered (#827) The job posting is the screen a tradesperson decides on, and it was the one screen with no heading. The title was a `<Text color="secondary">`, the employer sat in an icon row below it, pay was a green dollar line, the schedule an icon row, the workplace a chip, the deadline a yellow card, and the requirements a plain list that never said whether the viewer met any of them. Twenty-nine hardcoded hexes across the file coloured blocks that the tokens already describe. ## The header `ScreenHeader` now carries the posting: kicker = employer · location, the role as the H2, Apply on the title row — the same block every other screen opens with, filled by both routes. The public route takes its title from the loader's row, so the heading is server-rendered and hydration has nothing to reconcile (#786); `scripts/audit/hydration-pages.mjs` is clean on all three device classes for `/jobs`, `/jobs/senior-software-engineer-unicorn` and `/jobs/construction-project-manager-unicorn`. Apply's label only changes once the viewer is known to have applied, and that query needs a session, so server and first client render agree. Where it goes does vary: signed out to sign-in, an external posting to the host's own form, an internal one to the apply panel further down. #392 moved that panel to the sidebar — right reading order, but on a phone it left the only call to action below the whole posting. ## The requirements `job-requirements.ts` answers a posting against the viewer's own record, where that can be done honestly. Education, years of experience and a driver's licence come from data the app already holds; a background check, drug test, clearance or travel percentage are not profile fields, so they are listed and never marked. A requirement is met, unmet or unknown, only the first two are counted, and the summary is null rather than "0 of 0". Two rules were written after running the matcher against real rows: - an empty work history means "not filled in", not "no experience" — marking it ✗ would tell a tradesperson with twenty years on the tools that they do not qualify because they have not typed it in yet - a posting that names a licence class is not checked against the classes held: "Class A" and "CDL-A" are the same licence spelled two ways Signed out, every line is unknown and the block says so. ## The rest Pay, schedule, workplace and the deadline become one `MetricRow`, the block the dashboard and the ATS already use. Each section opens with a real `H3`. The applied banner, the benefits box, the certification and skill chips, the assessment prompts and the external-listing notice all drop their own hexes for `bg.subtle` + `border.default` and the themed `Chip`. The nested `ScrollView` inside each column is gone — `DashboardLayout` already scrolls the page — and so is the column's own horizontal padding, which was paying the gutter twice and pushing the body 16px right of its own heading. ## Seed `016_seed-job-requirements.sql` fills the requirement fields on all 13 seeded postings. They were NULL everywhere, so the block rendered on no job at all. The three seeded worker profiles cannot reach a protected route at all (the prerequisites gate) — filed as #879. Verified at 1440 and 390, signed in and anonymous: no horizontal scroll, the screen's headings are H2 + H3 where there were none, and the checklist shows "0 of 2 met" with ✗ marks against a high-school profile on a posting that asks for a bachelor's degree. Co-Authored-By: Claude Opus 5 <[email protected]>
…g calls `scf-core:lint` has been failing on `main` since #873 moved the Office lists onto `ListToolbar`. Two symbols survived the move with no callers left: `theme` from `useThemeContext`, whose only reader was the visibility-column cell that went with the old table, and `handleColumnVisibilityChange`, whose work `TableColumnVisibilityModal` now does inline. Biome reports both as errors, not warnings, so every pull request opened since has shown a red "Lint, typecheck & build". Co-Authored-By: Claude Opus 5 <[email protected]>
The previous commit bumped `packages/ui` by accident: the submodule working tree sits on the branch behind Scaffald/ui#39, so `git add -A` recorded that commit as this branch's pointer. Nothing in #827 needs it, and pointing at a commit that is not on ui's main would break a fresh checkout. Co-Authored-By: Claude Opus 5 <[email protected]>
|
Two follow-up commits on this branch, both unrelated to the job detail work:
A stray submodule bump was reverted. |
#827's work landed on main as one squashed commit, so the three job detail files conflicted against the same content already in this branch's history. Resolved to this branch throughout: #829 builds on #827's header and supersedes it, and the resolution leaves those files byte-identical to what was already here. Co-Authored-By: Claude Opus 5 <[email protected]>
Closes #827. Release 2 (#848), first screen.
The job posting is the screen a tradesperson decides on, and it was the one screen with no heading. The title was a
<Text color="secondary">, the employer an icon row below it, pay a green dollar line, the schedule an icon row, the workplace a chip, the deadline a yellow card, and the requirements a plain list that never said whether the viewer met any of them.The header
ScreenHeadernow carries the posting — kicker = employer · location, role as theH2, Apply on the title row — filled by both the protected and public routes. The public route takes its title from the loader's row so the heading is server-rendered.Apply's label only changes once the viewer is known to have applied, and that query needs a session, so the server and the first client render agree. The destination varies: signed out to sign-in, an external posting to the host's own form, an internal one to the apply panel. #392 moved that panel to the sidebar — right reading order, but on a phone it left the only call to action below the whole posting. On native there is no cross-platform scroll anchor, so the internal case renders no button rather than a dead one; #829 replaces the jump with a route on both platforms.
The requirements
job-requirements.tsis a pure matcher with 15 tests. Education, years of experience and a driver's licence come from data the app already holds. A background check, drug test, clearance or travel percentage are not profile fields, so they are listed and never marked. A requirement ismet,unmetorunknown; only the first two are counted, and the summary is null rather than "0 of 0".Two rules were written after running the matcher against real rows:
Signed out, every line is unknown and the block says so.
The rest
Pay, schedule, workplace and the deadline become one
MetricRow. Each section opens with a realH3. The applied banner, benefits box, certification and skill chips, assessment prompts and external-listing notice drop their own hexes forbg.subtle+border.defaultand the themedChip. The nestedScrollViewinside each column is gone (DashboardLayoutalready scrolls the page) and so is the column's own horizontal padding, which was paying the gutter twice and pushing the body 16px right of its own heading.Seed
016_seed-job-requirements.sqlfills the requirement fields on all 13 seeded postings — they were NULL everywhere, so the block rendered on no job at all. The three seeded worker profiles cannot reach a protected route at all (prerequisites gate); filed separately as #879.Verification
scf-coreunit testsscf-core+scaffald-apptypecheckhydration-pages.mjs(phone 390 / tablet 800 / desktop 1440)/jobs, both job detail slugsH2title +H3per section, where there were noneRequirements rendering, all three states, on screen:
/jobs/<slug>: every line unmarked, "Sign in to see which of these you already meet."🤖 Generated with Claude Code