Repository navigation
feat(ats): a real filter flyout, and authenticated smoke testing - #624
Merged
Merged
Conversation
Phase 3 continued (#622). Closes §12 items #4 and #5 from #539, and closes the "two competing filter idioms" finding for this screen. #4 THE STAGE LIST WAS MISSING TWO STAGES. No `inquired` — which is a full column on the board, so an entire stage of the pipeline could not be filtered to — and no `withdrawn`. All eight are offered now. #5 THE MINIMUM-SCORE FILTER HAD NO CONTROL. `minScore` was in state and was sent to the API on every request, but nothing rendered it: permanently 0, with no way to change it. It has score bands now rather than a slider — an employer thinks in "80 and up", not one-point increments, and a band is far easier to operate by keyboard than a drag target. The filters also moved off the screen and into ListToolbar's flyout, so this screen presents filters the way every other list screen will. Applied filters appear as removable chips with a Clear all, so they can be dropped without reopening the flyout. No search field: the employer applications endpoint has no search parameter, and a box that does nothing is the bug being fixed. One case worth calling out: only OPEN jobs are offered as options, so a job closed after being selected would otherwise filter the pipeline invisibly with no way to clear it. Its chip renders as "Unknown job" rather than vanishing. SMOKE HARNESS — scripts/audit/smoke-authed.mjs. Every ATS screen sits behind auth and the office role, so none of this work could be seen rendering; three merged PRs went out on unit tests and Storybook alone. It mints a session the same way the repo's own Playwright auth setup does — programmatically through supabase-js against the local stack, injected into localStorage. No login form is driven. It strips Expo's dev-only error overlay, which is a sibling of #root and otherwise covers the screen being reviewed. That harness immediately earned itself: it caught the empty-stage density bug fixed in Scaffald/ui#19, which no unit test could have seen. Verified: typecheck clean across all three packages; lint clean; 19 new tests; /office/applications and /office/ats/metrics captured at 1440x900 and 375x812. Co-Authored-By: Claude Opus 5 <[email protected]>
This was referenced Aug 21, 2026
thinkclay
added a commit
that referenced
this pull request
Sep 1, 2026
…ound (#676) `pnpm test:unit` was red on scf-core. Working through the four failures found one stale test, one test asserting a contract I had already changed, and a schema defect that had been there since the table was created. **useApplicationStatusChange** — the test built its own query client, `{ invalidateQueries }` and nothing else. #648 taught the hook to patch the cached list optimistically, so it started calling `getQueriesData`, which the stand-in did not have. Swapped for a real QueryClient: the cache API is real, `invalidateQueries` is spied on the real method, and the optimistic patch and its rollback can be asserted against actual cache contents. Two tests added for exactly that, since neither was covered. The same test was also named "executes valid non-critical transitions immediately" and asserted the mutation had fired by the time `changeStatus` resolved. #648 deliberately stopped that — a non-critical move is held for UNDO_WINDOW_MS so Undo has something to cancel. I changed the behaviour and did not update the test; it kept "passing" only because it died earlier, on the stub. Now it pins both halves: nothing sent during the window, sent after. **ApplicationsFilters** — asserted a "Clear Filters" button. #624 moved clear-all out of the filter body and onto the chip strip, so no such button exists here any more. The assertion is still worth having, so it moves to filters.test.ts next to the module the screen's `onClearAll` actually calls, covering EMPTY_FILTERS and the `activeFilterCount > 0` gate. **office-role-access** — this one was not a stale test. It failed with PGRST116 on a `.single()`, because the local database held 26 duplicated (user, role, scope) pairs. The cause: UNIQUE (role_id, user_id, scope_org_id, scope_team_id) has never prevented a duplicate. Two NULLs are not equal in a default UNIQUE constraint, and the table's own CHECK guarantees every legal row has at least one NULL scope column — so no two rows ever compare as equal. Every seed's `ON CONFLICT ... DO NOTHING` on this table silently no-opped and appended another copy instead, and revoking a role by deleting "the" assignment would leave a duplicate behind and the user still holding it. Migration 348 collapses the duplicates (oldest wins, deterministic) and recreates the constraint as UNIQUE NULLS NOT DISTINCT, which is what it always meant. Verified locally: a duplicate insert is now rejected, and re-running the 002 seed insert reports INSERT 0 0 rather than appending. Filed as #675, whose acceptance list is deliberately unfinished — the migration deletes rows, and production has not had it applied. scf-core 1148/1148. Typecheck 12/12. Lint 10/10.
thinkclay
added a commit
that referenced
this pull request
Sep 22, 2026
…t screen (#866) * feat(redesign): every screen has a real heading, in one place, from one source 120 of the 200 screens captured by the route sweep matched no heading at all — not `h1`, not `aria-level`, not `role="heading"`. They were not blank; they showed a visible title set as styled `Text`, which reaches neither the accessibility tree nor a screen reader's heading navigation. Of the 39 that did have one, the title started in 22 distinct positions on desktop and 24 on mobile. `DashboardPage`'s `pageTitle` only ever set the browser tab. The four layouts now render a `ScreenHeader` and take the title from the route's own `titleKey`, so a screen gets a heading without remembering to draw one — and the nav label and the page title are the same string by construction, which is the drift the prototype's audit called out ("Find talent" opening a page titled "Worker search"). `OfficePageLayout` swaps its bare `<H2>` for the same component, with the create button in the actions slot: page-level primary actions live at header right, not inside the filter bar. Notifications was the one screen with no header treatment at all; its hand-rolled 20px bold title is gone and its Settings control moves to that same slot. The first-run rule, from the prototype's second audit: a screen opens expanded, and collapsing the tip is a choice it remembers per screen. `useScreenHeaderCollapse` holds that; an unreadable store means expanded, which is the first-visit answer anyway. Measured after, at 1440: /communities Communities (332,32) /jobs/saved Saved Jobs (332,32) /dashboard/notifications Notifications (332,32) /office/cms/jobs Jobs (314,120) /profile Profile (316,6) /assessments Assessments (316,6) 22 positions down to three — one per layout. Collapsing those three into one is #851, which is what that issue is for; the gutters and vertical rhythm differ between the layouts, not the header. Kickers and tips are wired through but no screen supplies copy yet: that is per-screen writing and lands with each screen in releases 2 and 3. `PageHeader` is untouched — despite #814's description it is a search and filter toolbar, not a title header, so it belongs to #815. Refs #814, #860 Co-Authored-By: Claude Opus 5 <[email protected]> * feat(redesign): one screen rhythm — every title starts at the same left edge The four layouts each invented their own spacing, and because three of them expressed it through the *named* padding scale the divergence did not look like divergence in the source: `'2xl'` is 16, `'lg'` is 10, `'sm'` is 6, so a 32px gutter and a 16px gutter both read as "the big one". Measured at 1440, the page title started at x=332 under DashboardLayout, x=316 under Profile and Assessments, x=314 under Office, and x=340 on the Office CMS screens, which paid the gutter twice — OfficePageLayout added its own 8px on top of the layout's. `SCREEN_RHYTHM` and `useScreenRhythm` hold the numbers once, as plain numbers, and all four layouts read them. The values follow DashboardLayout: it was already the most airy and the closest to the prototype, whose design system runs a 1.15x density scale and asks for room rather than tightness. The seven Office screens that render no layout at all set their own `padding="md"`, so they took the gutter from the same hook rather than from a token that happens to be 8. OfficeLayout also moves off `useWindowDimensions`, which `.radium/scaffald-ui.md` forbids: it registers a listener per component where `useResponsive` shares one subscription, and enough of them mounting at once is how "Maximum update depth exceeded" happens. It also carried its own `width > 800` threshold, so Office collapsed to one column at a different width than the rest of the app. Measured after, signed in, at 1440 and 390: route desktop mobile /communities x=332 y=32 x=16 y=68 /jobs/saved x=332 y=32 x=16 y=68 /dashboard/notifications x=332 y=32 x=16 y=68 /profile x=332 y=32 x=16 y=68 /assessments x=332 y=32 x=16 y=68 /office/applications x=332 y=56 x=16 y=92 /office/cms/jobs x=332 y=140 x=16 y=212 One left edge, everywhere, at both widths. The remaining y differences are content above the title — Office screens carry a breadcrumb and a secondary tab strip that other screens do not — rather than rhythm. `/office/storage` and `/office/violations` still have no heading: they render no layout and no ScreenHeader. #816 reaches them. Refs #851 Co-Authored-By: Claude Opus 5 <[email protected]> * feat(redesign): one search row — ListToolbar on every worker-side list screen The prototype's audit named two competing filter idioms: a search field with one "Filters & sort · n" flyout on some screens, and a loose row of inline pills on others, so a user who learned one screen could not predict the next. We had exactly that split — `/office/applications` moved onto the flyout in #624 while the discover screens kept `PageHeader`'s pills, and the count came in four phrasings. `PageHeader` was never a header. It rendered breadcrumbs, actions, a search input, filter pills and a result count, with no title in it at all; #814's description had it confused with `ScreenHeader`. It is deleted here along with `SortDropdown`, and its `FilterPillConfig` type moves to `components/toolbarFilters.tsx` — the description of a filter outlived its presentation. Each screen already described its filters as data, so rather than rewrite five screens' filter internals, `useToolbarFilters` stacks the same `popoverContent` inside the one flyout and surfaces the active filters as chips. Sort moves into the flyout on Jobs and Communities, which were the last screens keeping a separate control beside the search field. The result count is now the same template everywhere. Jobs and Workers had none at the screen level — their columns printed their own "11 Jobs Available" in a second grammar — so those columns report the number up through `onResultCount` and the toolbar renders it. Measured, signed in, at 1440: /jobs Filters & sort 11 jobs /workers Filters & sort 42 workers /employers Filters & sort 9 employers /communities Filters & sort 11 communities /workers/map Filters & sort 34 results Not here: `/jobs`'s right column still carries a separate "Filters" panel for the soft-skills threshold. That is a second filter surface but not a second search row, and folding it into the flyout changes what the screen shows rather than how it is framed. Refs #815 Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
thinkclay
added a commit
that referenced
this pull request
Sep 22, 2026
…ActionBar retired (#873) * feat(redesign): every screen has a real heading, in one place, from one source 120 of the 200 screens captured by the route sweep matched no heading at all — not `h1`, not `aria-level`, not `role="heading"`. They were not blank; they showed a visible title set as styled `Text`, which reaches neither the accessibility tree nor a screen reader's heading navigation. Of the 39 that did have one, the title started in 22 distinct positions on desktop and 24 on mobile. `DashboardPage`'s `pageTitle` only ever set the browser tab. The four layouts now render a `ScreenHeader` and take the title from the route's own `titleKey`, so a screen gets a heading without remembering to draw one — and the nav label and the page title are the same string by construction, which is the drift the prototype's audit called out ("Find talent" opening a page titled "Worker search"). `OfficePageLayout` swaps its bare `<H2>` for the same component, with the create button in the actions slot: page-level primary actions live at header right, not inside the filter bar. Notifications was the one screen with no header treatment at all; its hand-rolled 20px bold title is gone and its Settings control moves to that same slot. The first-run rule, from the prototype's second audit: a screen opens expanded, and collapsing the tip is a choice it remembers per screen. `useScreenHeaderCollapse` holds that; an unreadable store means expanded, which is the first-visit answer anyway. Measured after, at 1440: /communities Communities (332,32) /jobs/saved Saved Jobs (332,32) /dashboard/notifications Notifications (332,32) /office/cms/jobs Jobs (314,120) /profile Profile (316,6) /assessments Assessments (316,6) 22 positions down to three — one per layout. Collapsing those three into one is #851, which is what that issue is for; the gutters and vertical rhythm differ between the layouts, not the header. Kickers and tips are wired through but no screen supplies copy yet: that is per-screen writing and lands with each screen in releases 2 and 3. `PageHeader` is untouched — despite #814's description it is a search and filter toolbar, not a title header, so it belongs to #815. Refs #814, #860 Co-Authored-By: Claude Opus 5 <[email protected]> * feat(redesign): one screen rhythm — every title starts at the same left edge The four layouts each invented their own spacing, and because three of them expressed it through the *named* padding scale the divergence did not look like divergence in the source: `'2xl'` is 16, `'lg'` is 10, `'sm'` is 6, so a 32px gutter and a 16px gutter both read as "the big one". Measured at 1440, the page title started at x=332 under DashboardLayout, x=316 under Profile and Assessments, x=314 under Office, and x=340 on the Office CMS screens, which paid the gutter twice — OfficePageLayout added its own 8px on top of the layout's. `SCREEN_RHYTHM` and `useScreenRhythm` hold the numbers once, as plain numbers, and all four layouts read them. The values follow DashboardLayout: it was already the most airy and the closest to the prototype, whose design system runs a 1.15x density scale and asks for room rather than tightness. The seven Office screens that render no layout at all set their own `padding="md"`, so they took the gutter from the same hook rather than from a token that happens to be 8. OfficeLayout also moves off `useWindowDimensions`, which `.radium/scaffald-ui.md` forbids: it registers a listener per component where `useResponsive` shares one subscription, and enough of them mounting at once is how "Maximum update depth exceeded" happens. It also carried its own `width > 800` threshold, so Office collapsed to one column at a different width than the rest of the app. Measured after, signed in, at 1440 and 390: route desktop mobile /communities x=332 y=32 x=16 y=68 /jobs/saved x=332 y=32 x=16 y=68 /dashboard/notifications x=332 y=32 x=16 y=68 /profile x=332 y=32 x=16 y=68 /assessments x=332 y=32 x=16 y=68 /office/applications x=332 y=56 x=16 y=92 /office/cms/jobs x=332 y=140 x=16 y=212 One left edge, everywhere, at both widths. The remaining y differences are content above the title — Office screens carry a breadcrumb and a secondary tab strip that other screens do not — rather than rhythm. `/office/storage` and `/office/violations` still have no heading: they render no layout and no ScreenHeader. #816 reaches them. Refs #851 Co-Authored-By: Claude Opus 5 <[email protected]> * feat(redesign): one search row — ListToolbar on every worker-side list screen The prototype's audit named two competing filter idioms: a search field with one "Filters & sort · n" flyout on some screens, and a loose row of inline pills on others, so a user who learned one screen could not predict the next. We had exactly that split — `/office/applications` moved onto the flyout in #624 while the discover screens kept `PageHeader`'s pills, and the count came in four phrasings. `PageHeader` was never a header. It rendered breadcrumbs, actions, a search input, filter pills and a result count, with no title in it at all; #814's description had it confused with `ScreenHeader`. It is deleted here along with `SortDropdown`, and its `FilterPillConfig` type moves to `components/toolbarFilters.tsx` — the description of a filter outlived its presentation. Each screen already described its filters as data, so rather than rewrite five screens' filter internals, `useToolbarFilters` stacks the same `popoverContent` inside the one flyout and surfaces the active filters as chips. Sort moves into the flyout on Jobs and Communities, which were the last screens keeping a separate control beside the search field. The result count is now the same template everywhere. Jobs and Workers had none at the screen level — their columns printed their own "11 Jobs Available" in a second grammar — so those columns report the number up through `onResultCount` and the toolbar renders it. Measured, signed in, at 1440: /jobs Filters & sort 11 jobs /workers Filters & sort 42 workers /employers Filters & sort 9 employers /communities Filters & sort 11 communities /workers/map Filters & sort 34 results Not here: `/jobs`'s right column still carries a separate "Filters" panel for the soft-skills threshold. That is a second filter surface but not a second search row, and folding it into the flyout changes what the screen shows rather than how it is framed. Refs #815 Co-Authored-By: Claude Opus 5 <[email protected]> * feat(redesign): one search row in Office too — ListToolbar, and TableActionBar retired Office ran two of its own search idioms on top of the two #866 already merged: `OfficePageLayout` rendered a bare `<Input>` for most lists, and the two biggest — Jobs and Users — took a different branch entirely into `TableActionBar`, which carried its own search, its own add button and a "Show" control. Three grammars for one job, none of them the flyout the worker screens now use. `OfficePageLayout` owns the search for every Office list, so moving it onto `ListToolbar` moves all nine screens at once: search, a Filters & sort flyout where the screen has filters, the active filters as chips, and the result count at the right in the shared `{n} {noun}` template. Screens with no filters render no flyout rather than an empty one. Jobs and Users move off `actionBarConfig`: the add button was already duplicating the header's create action, the filters become the flyout's content, and the view toggle and column control become toolbar actions. With no callers left, `TableActionBar` and its config type are gone from this layout. Two details found by rendering rather than by reading: - The count must be `undefined` while loading, not `0`. "0 users" over a spinner asserts an empty list before anything is known — the same mistake #623 fixed on the pipeline. - The view toggle clipped its own labels to "Kan…" because the toolbar's action slot shrinks to whatever the search row leaves. It reads "List / Board" now — the prototype's word — with a floor so it cannot clip. Measured at 1440 and 390, no horizontal scroll at either: /office/cms/jobs Filters & sort 0 jobs /office/cms/workers — 50 users /office/cms/organizations — 9 organizations /office/cms/universities — 100 universities /office/cms/teams — 10 teams ("0 jobs" is #857, fixed on its own branch.) Refs #816 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.
Phase 3 continued (#622). Closes §12 #4 and #5 from #539, and closes
the "two competing filter idioms" audit finding for this screen.
Pairs with Scaffald/ui#19 (already merged) — the pointer bump is included.
The two filter bugs
#4 — the stage list was missing two stages. No
inquired, which is a fullcolumn on the board, so an entire stage of the pipeline could not be filtered
to. No
withdrawneither. All eight are offered now.#5 — the minimum-score filter had no control at all.
minScoresat instate and was sent to the API on every request, but nothing rendered it:
permanently
0, with no way to change it. It has score bands now rather than aslider — an employer thinks in "80 and up", not one-point increments, and a
band is far easier to operate by keyboard than a drag target.
The filters also moved off the screen body and into
ListToolbar's flyout, sothis screen now presents filters the way every other list screen will. Applied
filters render as removable chips with a Clear all.
No search field. The employer applications endpoint has no search
parameter, and a box that does nothing is precisely the class of bug this PR
is fixing.
One case worth calling out: only open jobs are offered as options, so a job
closed after being selected would otherwise filter the pipeline invisibly with
no way to clear it. Its chip renders as "Unknown job" rather than vanishing.
The bigger thing: authenticated smoke testing
scripts/audit/smoke-authed.mjs.Three merged PRs of redesign work had gone out without anyone — including me —
seeing a single authenticated screen render. Every ATS screen sits behind auth
and the
officerole. Storybook covered the primitives in isolation; nothingcovered a real screen against real data.
The harness mints a session the same way the repo's own Playwright auth setup
already does — programmatically through supabase-js against the local stack,
injected into localStorage under the key supabase-js actually reads. No login
form is driven. It also strips Expo's dev-only error overlay, which is a
sibling of
#rootand otherwise sits on top of the screen being reviewed.It earned itself on the first run. Seeing
/office/applicationsrendershowed that
LaneGroupgave an empty stage the same vertical spacing as apopulated one — ~190px desktop, ~320px mobile, for one sentence. Seven stages
turned an empty pipeline into roughly 2,200px of scroll on a phone before
the user reached anything. That is the worst case to get wrong: an empty board
is exactly when someone most needs to see the whole shape at once. Fixed in
Scaffald/ui#19; all seven stages now fit one screen.
No unit test could have caught that, and no amount of typechecking.
Also found, not fixed (pre-existing)
A hydration mismatch fires on
ScaffaldLogofor authenticated SSR routes. Thecomponent already uses
useId()— the #582 fix — so the ids themselves arestable; the divergence is upstream of that. The server renders the
logged-out tree (the session lives in localStorage, which the server cannot
see) and the client hydrates the logged-in one, so the trees differ and the
useIdcounters drift apart.I cannot fully separate "my session injection causes this" from "real auth
causes this" without a real login, but the mechanism is identical either way,
which suggests every authenticated user hits it on every SSR page load. Worth
its own issue rather than a drive-by fix here.
Verification
Typecheck clean across
@scaffald/ui,scf-core,scaffald-app; lint clean;19 new tests;
pnpm prepushgreen;/office/applicationsand/office/ats/metricscaptured at 1440×900 and 375×812.The captures are not committed — they are point-in-time artifacts of in-flight
work rather than a stable baseline, and the script regenerates them.
CI still cannot gate any of this (#375).
🤖 Generated with Claude Code