Skip to content

feat(redesign): applying is a screen, not a sidebar (#829) - #882

Merged
thinkclay merged 7 commits into
mainfrom
redesign/r2-829-apply-screen
Sep 23, 2026
Merged

thinkclay merged 7 commits into
mainfrom
redesign/r2-829-apply-screen

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Closes #829. Release 2 (#848). Stacked on #880 — retarget to main before merging that one, or this closes unreopenably.

Needs Scaffald/ui#39 (the submodule pointer here points at that branch; re-point it at the squashed commit before merge).

Clay: "we should switch to screens vs modals in some areas so we have more real estate." The application form had the least of any screen in the app: four steps — screening questions, the employer's own questions, an upload picker, a review pass — inside job detail's 38% sidebar, or in a modal for postings with no custom questions. On a phone that column is the whole width; on a desktop it was narrower than a phone.

The route

/jobs/view/:id/apply, one column, full width, under the posting it belongs to. The URL is the other half of the point: the form already auto-saves, and an interrupted application can be returned to at the same address.

The screen header carries the identity — kicker = employer, title = "Apply · role", breadcrumb back to the posting — so ApplicationWizard drops its own title block, its own ScrollView, and a cancel-confirmation overlay that nothing could open (setShowCancelConfirm(true) was never called, so onCancel had never fired).

Apply reaches the same screen from every direction now: the header action on job detail, the panel beside it, and the map preview, which had one button doing two jobs ("View Full Details & Apply") and now offers both.

The panel that is left

Job detail's sidebar becomes a short card: what applying involves, and the button.

Its state is worded carefully. A saved draft and a submitted application are the same row with the same status, because is_complete is a request flag the insert drops — filed as #881. The old copy guessed, and said "You've Applied" to anyone who had typed one answer into the screening step. The card now says "Your application" and offers both continuing the form and checking where it stands. Without that, moving the form to its own screen would have stranded every half-finished draft with no way back in.

QuickApplyModal and getApplicationFlow are deleted with their tests — nothing referenced them once both flows went to the screen, and two apply implementations drift.

Glitches fixed on the way

  • "No" was pre-selected on both required yes/no questions. !answers.field is true before anyone answers, so the form showed an answer it had not been given, on a question it then called required.
  • Every forward action rendered as an outline button — Continue, Continue to Review, Submit. Button has defaulted to outline since the surfaces pass; these call sites were never updated. They are the one thing each step leads with.
  • The two selects rendered as near-black filled pills among white inputs. Fixed in fix(ResponsiveSelect): a select is a field, not a dark pill ui#39, which also cleans up the Office toolbars.
  • The success screen keeps its copy but loses its green-on-green badge and blue reference line for tokens, and states its heading as a heading.

ROUTES.JOBS.APPLICATIONS.DETAIL is added alongside: the worker's own application detail has had a route file since the inquiry flow landed, but no constant pointed at it.

Deliberate deviation from the issue

The issue asks for "Submit as the header action on desktop and a sticky bottom action on the phone". Each step already ends with its own forward action, so hoisting only the final Submit would put the same kind of control in two different places depending on which step you are on. It stays inline, at the end of the thing it confirms. At 390 the form scrolls and the button is reachable; nothing clips.

Verification

check result
scf-core unit tests 1163 passed, 0 failed
scaffald-app unit tests 98 passed, 0 failed
ui unit tests 709 passed, 0 failed
typechecks (scf-core, scaffald-app, ui) clean
hydration-pages.mjs, both public job pages, 3 device classes clean
horizontal scroll at 1440 and 390 0
anonymous applications/me 401s per job page view 2 → 0

🤖 Generated with Claude Code

thinkclay and others added 6 commits September 23, 2026 12:04
…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]>
Clay: "we should switch to screens vs modals in some areas so we have more
real estate." The application form had the least of any screen in the app:
a four-step flow — screening questions, the employer's own questions, an
upload picker and a review pass — rendered inside job detail's 38% sidebar,
or in a modal for postings with no custom questions. On a phone that column
is the whole width; on a desktop it was narrower than a phone.

## The route

`/jobs/view/:id/apply`, one column, full width, under the posting it belongs
to. The URL is the other half of the point: the form already auto-saves, and
an interrupted application can now be returned to by going back to the same
address instead of re-opening the job and finding the sidebar again.

The screen header carries it — kicker = employer, title = "Apply · role",
breadcrumb back to the posting — so `ApplicationWizard` drops its own title
block, which repeated the role and employer a few pixels below the ones the
screen already showed. It also drops its own `ScrollView` (the page scrolls)
and the cancel-confirmation overlay, which nothing could open: nothing ever
called `setShowCancelConfirm(true)`, so `onCancel` had never fired.

Apply now reaches the same screen from every direction: the header action on
job detail, the panel beside it, and the map preview, which had one button
doing two jobs ("View Full Details & Apply") and now offers both.

## The panel that is left

Job detail's sidebar becomes a short card — what applying involves, and the
button. The application's own state is stated carefully: a saved draft and a
submitted application are the same row with the same status, because
`is_complete` is a request flag the insert drops (#881). The old copy
guessed — "You've Applied" to anyone who had typed one answer into the
screening step — so the card says "Your application", and offers both
continuing the form and checking where it stands. Without that, moving the
form to its own screen would have stranded every half-finished draft.

`QuickApplyModal` and `getApplicationFlow` are deleted, with their tests.
Nothing referenced them once both flows went to the screen, and two apply
implementations drift.

## Glitches fixed on the way

- "No" was pre-selected on both required yes/no questions. `!answers.field`
  is true before anyone answers, so the form showed an answer it had not
  been given, on a question it then called required. Both sides now test the
  value itself, and the chosen one is filled rather than merely un-outlined.
- Every forward action in the form — Continue, Continue to Review, Submit —
  rendered as an outline button, because `Button` defaults to outline since
  the surfaces pass and these call sites were never updated. They are the
  one thing each step leads with.
- The two selects rendered as near-black filled pills among white inputs
  (Scaffald/ui#39 makes a select look like a field).
- The success screen keeps its copy but loses its green-on-green badge and
  blue reference line for tokens, and states its heading as a heading.

`ROUTES.JOBS.APPLICATIONS.DETAIL` is added alongside: the worker's own
application detail has had a route file since the inquiry flow landed, but
no constant pointed at it, so nothing could link there without a literal.

## Verification

scf-core 1163/1163, scaffald-app 98/98, ui 709/709, both typechecks clean.
`hydration-pages.mjs` clean on both public job pages at phone 390, tablet
800 and desktop 1440. No horizontal scroll at 1440 or 390; at 390 the form
scrolls and the filled Continue button is reachable. The anonymous public
job page no longer fires two 401s per view against `applications/me`.

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]>
@thinkclay
thinkclay changed the base branch from redesign/r2-827-job-detail to main September 23, 2026 16:55
#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]>
@thinkclay

Copy link
Copy Markdown
Contributor Author

Retargeted to main: #880 is merged, and main has been merged back in here. The three job detail files conflicted because #827 landed as a squash — resolved to this branch throughout, which left them byte-identical to what was already here. The packages/ui pointer now points at the squashed Scaffald/ui#39 on ui's main, so it is safe to merge.

@thinkclay
thinkclay merged commit c2a421a into main Sep 23, 2026
9 checks passed
@thinkclay
thinkclay deleted the redesign/r2-829-apply-screen branch September 23, 2026 17:13
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(redesign): the apply flow as a screen, not a modal

1 participant