Repository navigation
feat: prototype-parity tokens and screen primitives - #18
Merged
Merged
Conversation
Phase 1 of the prototype-parity plan. Tokens only — no component or screen
work. Every token name survives; several now share a step, which is the point.
TYPE — six interface steps (11 / 12.5 / 14 / 17 / 22 / 30) plus one display
step (42), exposed as `fontScale`. The old scale was thirteen names over
thirteen sizes, which licensed thirteen more: the app carries 699 literal
`fontSize:` sites across 15 values, using 12 and 13 px interchangeably for
the same job. Line heights now key off role rather than size — body ~1.55,
headings ~1.15 — so the same 14 px is leaded differently as `md` than as `h5`.
RADIUS — three interface steps (2 / 4 / 7). ~350 literal `borderRadius:`
sites across a dozen values had neighbouring cards rounding differently. The
iOS-26 radii are left alone: they belong to native sheets and menus, where
the platform sets the shape, and are not drift.
ACCENT — teal stays the one primary; amber becomes the reserved "act on this"
role (overdue, over-SLA, stale in stage). `primary[600]/[700]` are retuned to
carry the weight the prototype's amber carries on its warm ground: measured
against bg `gray[50]`, the prototype's emphasis step is 6.28:1 and ours was
7.26:1, so 600 now lands at 6.34:1 and 700 at 8.00:1. The `warning` ramp is
replaced by the prototype's OKLCH amber so there is one amber, not two near-
identical ones — its old 500 and 600 were the same hex, a dead step.
Also fixes a dark-mode contrast bug the retune exposed: `fg.dark.active` and
`fg.dark.selected` were primary[500] on both themes, only 3.38:1 against
`bg.dark.default`, so the active/selected state failed AA in dark mode.
TYPEFACE — headings resolve to a display serif on web via an indirect family
name ('Scaffald Display'), declared in the app's global.css. Native stays on
Roboto: Cormorant Garamond is a display face and loses to Roboto at 11-14px
on a phone outdoors, which is the native app's whole context. A heading that
asks for `serif` now gets the display serif rather than Roboto Serif, so the
app does not carry two competing serifs with no rule about which is which.
Verified: typecheck clean; UI suite 634/655 passing, byte-identical to the
pre-change baseline (the 21 failures are pre-existing matchMedia/localStorage
environment gaps); computed styles confirmed in the browser.
Co-Authored-By: Claude Opus 5 <[email protected]>
The display face was declared as two @font-face rules under one family — the WOFF2 and a `local('Georgia')` fallback with an overlapping weight range. The second rule wins the match, so the real font was never even requested: `document.fonts.check` returned false and headings rendered as Georgia while looking perfectly serif in a screenshot. getFontFamily now emits the stack — 'Scaffald Display', then a separately named 'Scaffald Display Fallback' carrying the size-adjust, then Georgia — so CSS resolves the fallback by stack order instead of by face shadowing. Verified in the browser: fonts.check true, and Cormorant measures 119.9px against the Georgia fallback's 125.23px for the same string, so the loaded face is genuinely the real one rather than a metric-matched substitute. Co-Authored-By: Claude Opus 5 <[email protected]>
Phase 2 of the prototype-parity plan — the four primitives that actually land
the parity. Components only; screen migrations are almost all still to come.
ScreenHeader — kicker / title / collapse caret / tip / pager, with slots for
actions and a full-width region beneath. Everything but the title is optional.
The plan framed this as reconciling three competing headers; on inspection
that was wrong. SaaSSectionHeader and OfficePageHeader both have zero callers,
and PageHeader has no title at all — it is a search-and-filter toolbar. Our
screens render titles ad hoc (`<H2>Applications</H2>`), so this is a missing
piece rather than a merge.
ListToolbar — search + one "Filters & sort" flyout + a removable chip strip +
a result count on one "{n} {noun}" template. The prototype's audit found two
competing filter idioms; we have the same split between the discover screens'
MapFilterBar/SortDropdown pair and the ATS's ApplicationsFilters. The chip
strip is for filters already applied so they can be removed without reopening
the flyout — not a second place to set them.
MetricBlock / MetricRow — label above, figure below, delta beneath, hairline
divided, wrapping whole columns so a five-up row cannot orphan a sixth stat.
Delta tone is stated rather than inferred from direction: a rising ghost rate
is not good news.
Lane / LaneGroup — stage-grouped rows, the alternative to a board that does
not fit. Seven stages already overflow a laptop and NationSearch has twelve.
Rows lead with days-in-stage rather than days-since-applied, which is the
signal that says "act on this" and which the current board does not show at
all. Sits beside Kanban rather than replacing it.
Also fixes the ListToolbar trigger icon: `ListFilter` does not exist in this
lucide-react-native version and rendered as undefined. `Filter` is the funnel
glyph the prototype uses anyway.
15 tests covering the behavioural contracts rather than styling — the count
template and its irregular plurals, the caret's collapse rule, label-before-
figure ordering, age-before-name in a row, and empty-state selection.
Verified: typecheck and lint clean; UI suite 670 tests, 649 passing, the same
21 pre-existing environment failures as before this branch.
Co-Authored-By: Claude Opus 5 <[email protected]>
This was referenced Aug 19, 2026
Merged
Open
Storybook stories for the screen primitives, plus what rendering them actually surfaced. All three were invisible to typecheck and unit tests. 1. ScreenHeader let its actions area shrink, so a segmented control placed there was squeezed until its last segment read "Metr…". Controls hold their intrinsic width now; the title is the part that wraps. 2. MetricRow drew a left hairline on every cell after the first. That is correct on one line and wrong the moment the cells wrap — the first cell of the second line gets a rule hanging off the left edge, which is the exact orphan-divider artifact the prototype's audit flagged on the admin stat row. Below 640px the cells now stack full-width and separate with horizontal rules instead, which is what the prototype's own mobile layout does. 3. The story's view switch used three Buttons with the ACTIVE one set to `variant="outline"` and the rest left on the default filled variant — so the two views you were not looking at rendered as the primary action and the one you were on looked disabled. It is a SegmentedControl now. (The app screen carried the same inversion; fixed on its side.) Stories are composed rather than isolated: the four primitives are meant to stack into one screen header, and what needed reviewing was whether they read as one system. They do — the composed story is a close match for docs/plans/redesign/shots/desktop--employer--pipeline.png. Verified at 1440x900 and 375x812: labels intact, no stray dividers, metric row wraps without orphans, lane rows stack with the age still leading. Typecheck and lint clean; UI suite 649/670, the same 21 pre-existing environment failures. Co-Authored-By: Claude Opus 5 <[email protected]>
thinkclay
added a commit
to Scaffald/SaaS
that referenced
this pull request
Aug 20, 2026
The branch pointer would have referenced a commit that only exists on redesign/phase1-tokens; the squash merge rewrote it. This points at 8b27d54 on origin/main so a fresh clone can resolve the submodule. Typecheck clean across all three packages against the merged pointer. Co-Authored-By: Claude Opus 5 <[email protected]>
thinkclay
added a commit
to Scaffald/SaaS
that referenced
this pull request
Aug 20, 2026
…n primitives (#621) * feat(redesign): phase 1 tokens, prototype reference shots, and the parity plan Applies the SCF prototype (~/Development/SCF-Prototype) to the app. This is Phase 0 + Phase 1 of docs/plans/redesign/2026-08-19-prototype-parity-plan.md. PHASE 0 — the reference. 58 screenshots of the prototype, 29 screens across five roles at desktop 1440x900 and mobile 390x844, captured by driving the prototype's own state (capture-prototype.mjs re-runs it when the prototype moves). The plan doc records what the prototype decides that we have not, and measures the audit's findings against our code: 699 literal fontSize sites across 15 values, ~350 literal borderRadius across a dozen, 392 raw hex across 57 files, three separate page-header components. PHASE 1 — tokens, in the @scaffald/ui submodule (see its own commit). Teal stays the one primary; amber becomes the reserved attention role. App-side changes here: - global.css declares 'Scaffald Display' for headings, with a Georgia fallback so the serif intent survives until the Cormorant WOFF2 lands. The family name is indirect so swapping the display face later is a change to two rules rather than to every component. - login-screen.tsx: the title hard-coded `fontFamily: 'RobotoSerif_400Regular'` in an inline style, which overrode getFontFamily entirely and pinned the screen to the body serif — the token system could never reach it. Removed. It was also an H5 used as a card title; H5 is now the body-size step, so this is an H4, which preserves the shipped 17px exactly. Verified: typecheck clean across @scaffald/ui, scf-core and scaffald-app; UI suite 634/655, identical to the pre-change baseline; auth feature tests 44/46 with 0 failures; lint clean; computed styles and both themes confirmed in the browser on a cold Metro cache. Not included: the Cormorant Garamond WOFF2 files (downloading them needs sign-off), and the prototype push to Scaffald/Prototype@main. Co-Authored-By: Claude Opus 5 <[email protected]> * feat(fonts): self-host Cormorant Garamond as the display face Completes Phase 1. Headings now render in the prototype's actual face on web rather than falling back to Georgia. Cormorant Garamond is a variable font, so one 37 KB WOFF2 covers the whole weight axis — Google serves the same file for its 400 and 600 faces, which is why this is one file and not the two the plan assumed. The fallback moved to its own family name ('Scaffald Display Fallback') and into the stack that getFontFamily emits. Declared as a second @font-face under the same family it shadowed the real font entirely: the browser matched it and never requested the WOFF2, so headings rendered as Georgia while still looking serif in a screenshot. It keeps `size-adjust: 92%` to stop headings jumping size during the swap. Native is unchanged and still on Roboto — see getFontFamily for why. Verified: font served 200 (37776 bytes), document.fonts.check true, and Cormorant measures 119.9px against the fallback's 125.23px for the same string, confirming the real face is what loaded. Typecheck clean across all three packages; UI suite 634/655, identical to baseline. Co-Authored-By: Claude Opus 5 <[email protected]> * feat(redesign): phase 2 primitives, first caller, and two plan corrections Picks up the four screen primitives from the @scaffald/ui submodule (see its own commit) and proves them on one screen. MIGRATED — the ATS applications screen now uses ScreenHeader + ListToolbar. It gains the kicker and the tip the prototype gives it, a collapse caret, and moves its count out of an ad-hoc subtitle ("14 total applications") into the toolbar's result slot, which owns the one "{n} {noun}" template. This is the only screen migrated so far — the plan warns that a mechanical sweep produces a diff nobody can review, so the rest go per-screen in phase 3. DELETED — features/office/components/OfficePageHeader.tsx, which had zero callers. SaaSSectionHeader is also unused by the app but stays: it is a published export of the component library with stories and a docs page, so removing it is an API decision rather than dead-code cleanup. TWO CORRECTIONS to the plan, both from checking rather than assuming: 1. The prototype push is unnecessary. github.md's sync note claims Scaffald/Prototype@main still holds the 13 Aug build against 677 KB locally, and I repeated that as the one item with a real bus factor. After a fetch, local main and origin/main are the same commit and the file is 772,808 bytes on both. The note is stale; the reference was never laptop-only. 2. "Three competing page headers" overstated it. Two of the three are dead, and the third is a toolbar, not a header. Recorded in the ui commit. Verified: typecheck clean across all three packages; lint clean; UI suite 670 tests / 649 passing / the same 21 pre-existing environment failures. NOT verified: the migrated ATS screen has not been seen rendering. It sits behind auth and the office role, and reaching it means authenticating — which I do not do. The dev server is up on :8087 if you want to look. Co-Authored-By: Claude Opus 5 <[email protected]> * feat(ats): Lanes view for the pipeline, and a real days-in-stage clock Phase 3, screen 1 of the prototype-parity plan (#622). Closes five items from §12 of the ATS design brief in one screen. LANES — the pipeline as stage-grouped, full-width rows, now the default view with Board and Metrics alongside. Seven columns already overflow a laptop and the recruiter and NationSearch flows have eleven and twelve, so the board's answer to "more stages" is sideways scrolling that hides work. Rows also have room for the columns a card cannot carry. This answers open question #1 in the ATS brief. DAYS IN STAGE (§12 #7) — the board showed days since *applied*, which is a different and much less useful number: a candidate who applied 30 days ago and moved to Interview yesterday is not stale, and one who applied 8 days ago and has sat untouched in New is. `stage-timing.ts` derives the real figure from `stageHistory` — the transitions recorded in core.application_activity — by taking the most recent entry into the current status, so a candidate moved backwards gets a fresh clock. No history means the candidate has never moved, and their clock starts at appliedAt, which is correct rather than a fallback: entering the pipeline IS their entry into `new`. It returns null rather than 0 when timestamps do not parse, and clamps future timestamps to now — local Supabase has been observed running behind the host clock, which would otherwise render as "-2d in stage". Overdue is per-stage against the promises the public transparency stats are computed from, and every overdue row carries a reason ("Overdue — screening decision"), because an amber number alone says something is wrong without saying what. Terminal stages are never overdue: nobody is waiting on a hired candidate. ALSO CLOSED §12 #8 score, source, union status and assignee are on every row — these are the reasons an employer picks one candidate over another and none of them were on a card §12 #9 each stage gets its own empty state saying what would fill it, instead of "No applications" seven times §12 #17 Withdrawn reads as "Withdrawn by candidate" rather than a grey pill in a red column — the conflation the data model works to prevent §12 #6 the Interview column was error[50], the same red as rejected, so advancing a candidate moved them into a column that reads as a warning. It is a progress stage and now tints with the primary ramp Rows sort stalest-first within each stage, so the row that most needs acting on is the one at the top. TEST SEAM — scf-core resolves @scaffald/ui to a mock, so the four new primitives are added there. They mirror the real contracts rather than being stubbed: LaneGroup honours count/emptyState and Lane renders age first, since a stub that dropped those would make the screen logic under test unobservable. The change is additive — 171 insertions, zero deletions — so no existing consumer is affected. Verified: typecheck clean on scf-core and scaffald-app; lint clean; 17 new stage-timing tests and 11 new Lanes tests, all passing; an existing mock consumer (TeamMembersList) still passes. Not verified: the screen has not been seen rendering — it is behind auth and the office role. Note also that the full scf-core suite cannot be run locally: an unfiltered vitest run OOMs the worker, which is why prepush excludes it. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(ats): segmented control for the view switch, not three Buttons Picks up the layout fixes from the @scaffald/ui submodule and fixes the same inversion on the app side. The view switch gave the ACTIVE view `variant="outline"` and left the other two on the default filled variant — so Board and Metrics rendered as the primary action while the view you were actually on looked disabled. It reads as a segmented control now, which is what the prototype uses and what the control is for. It carries an explicit width: SegmentedControl's segments are `flex: 1` inside a container with no intrinsic width, so left to the header row it collapsed to 160px and clipped "Metrics" to "Metr…". Worth fixing centrally later — noted rather than done here, because the component has other callers and there is currently no automated gate that would catch a regression in them (#375, #469). Found by rendering the primitives in Storybook, which needs no auth and so is the first look any of this work has had at a real browser. Verified: typecheck clean across all three packages; lint clean; Lanes tests 11/11; UI suite 649/670 with the same 21 pre-existing failures. Co-Authored-By: Claude Opus 5 <[email protected]> * chore(ui): point the submodule at merged main (Scaffald/ui#18) The branch pointer would have referenced a commit that only exists on redesign/phase1-tokens; the squash merge rewrote it. This points at 8b27d54 on origin/main so a fresh clone can resolve the submodule. Typecheck clean across all three packages against the merged pointer. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
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.
Phases 1 and 2 of the SCF prototype-parity work. Tokens first, then the four
screen primitives built on them.
Tokens
Type — six interface steps (11 / 12.5 / 14 / 17 / 22 / 30) plus one display
step (42), exposed as
fontScale. The old scale was thirteen names overthirteen sizes, which licensed thirteen more: the app carries 699 literal
fontSize:sites across 15 values, using 12 and 13 px interchangeably for thesame job. Every token name survives; several now share a step, which is the
point. Line heights key off role rather than size — body ~1.55, headings ~1.15.
Radius — three interface steps (2 / 4 / 7), against ~350 literal
borderRadius:sites across a dozen values. The iOS-26 radii are untouched:they belong to native sheets and menus where the platform sets the shape.
Accent — teal stays the one primary; amber becomes the reserved
"act on this" role (overdue, over-SLA, stale in stage).
primary[600]/[700]retuned to carry the weight the prototype's amber carries on its warm ground —
measured against
gray[50], the prototype's emphasis step is 6.28:1 and ourswas 7.26:1, so 600 now lands at 6.34:1 and 700 at 8.00:1. The
warningramp isreplaced by the prototype's OKLCH amber so there is one amber, not two
near-identical ones; its old 500 and 600 were the same hex, a dead step.
Also fixes a dark-mode contrast bug the retune exposed:
fg.dark.activeandfg.dark.selectedwere primary[500] on both themes — only 3.38:1 againstbg.dark.default, so the active/selected state failed AA in dark mode.Typeface — headings resolve to a display serif on web via an indirect
family name. Native stays on Roboto: Cormorant Garamond is a display face and
loses to Roboto at 11–14px on a phone outdoors, which is the native app's whole
context.
Primitives
for actions and a full-width region. Everything but the title is optional.
strip + a count on one
{n} {noun}template.hairline divided, wrapping whole columns so a five-up row cannot orphan a
sixth stat. Delta tone is stated, not inferred: a rising ghost rate is not
good news.
does not fit (seven stages already overflow a laptop; NationSearch has
twelve). Rows lead with days-in-stage, the signal that says "act on this".
Sits beside Kanban rather than replacing it.
Two bugs found by verifying in a browser
@font-facerules under one family —the WOFF2 and a
local('Georgia')fallback. The second won the match, sothe real font was never requested: headings rendered as Georgia while
looking perfectly serif in a screenshot.
getFontFamilynow emits the fullstack instead.
ListFilterdoes not exist in this lucide-react-native version and renderedas
undefined. Swapped forFilter, the funnel glyph the prototype uses.Verification
failures are pre-existing environment gaps (
matchMedia,localStorage),byte-identical to a stashed baseline run on this branch.
confirmed loaded by glyph measurement (Cormorant 119.9px vs the Georgia
fallback's 125.23px for the same string).
Note for reviewers
packages/ui's ownvitest.config.tsincludespackages/scaffald-ui/src/**,but the package lives at
packages/ui/— sonx run @scaffald/ui:testmatcheszero files and has been passing vacuously. The 670 above were run through the
root config. Worth fixing separately.
🤖 Generated with Claude Code