Skip to content

feat(redesign): a background check is four steps, not a percentage (#830) - #889

Merged
thinkclay merged 1 commit into
mainfrom
redesign/r2-830-background-check
Sep 23, 2026
Merged

thinkclay merged 1 commit into
mainfrom
redesign/r2-830-background-check

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Closes #830. Release 2 (#848), track B.

The worker's background check showed its state as a coloured pill and a progress bar — "Partially Completed", 80% — which tells someone waiting on a screening neither what has happened nor what happens next. Eighty per cent of what? The number came from a lookup table keyed on the status, so it was a restatement of the pill rather than a measurement of anything.

Four steps

A check really is a short sequence: it is requested, consent is given, the provider works on it, and it comes back. check-timeline.ts maps all fourteen statuses the API returns onto that sequence — nothing new from the backend — and CheckTimeline draws it as a vertical timeline with the wait sitting on the step that is actually waiting.

Two rules the tests pin down:

  • A dispute walks the check back to the provider rather than leaving it complete. It is raised against a finished check, but the check is working again until it resolves.
  • Statuses that stopped rather than finished — failed, cancelled, refunded, expired — leave the last step marked current, not done. "Complete" against a cancelled check reads as a result the worker never got.

Under the timeline, the status line uses the label and description the status vocabulary already carried and never showed.

The rest of the screen

CheckStatusCard loses its card, its tinted pill and its progress bar for a hairline row: what the check is, when it expires, the timeline, and the three things a worker can do. The filters become folder tabs rather than four pill buttons that looked like actions, and the dashboard drops its own scroll view — it renders inside the verification accordion, which was a box inside a box inside a box.

Both nested routes move onto the shared profile shell. They were bare SafeAreaViews with headerShown: false: no breadcrumb, no heading, no way back but the OS gesture. BackgroundCheckWizard drops the title it drew a few pixels under the screen header's, and its own scroll view with it.

Hex

features/background-check had 57 colour literals, the most of any feature directory. It now has none. #414e62 was a secondary-text grey, #e2e8f0 and #f2f4f7 hairline and surface greys, #b45309 the amber that means "act on this", #e5e7eb a hairline on the dispute screen's two error boxes.

Verification

check result
scf-core unit tests 1188 passed, 0 failed (9 new)
scf-core lint clean
typechecks (scf-core, scaffald-app) clean
colour literals in features/background-check 57 → 0
horizontal scroll at 1440 and 390 0

Checked signed in against four checks in four different states (submitted, under review, completed clear, cancelled): the timeline renders per state with the right step current. The page hydrates clean across four consecutive loads, the same as main — I saw the dev-mode overlay once on a first compile and confirmed against main that it is the known #681 dev-only mismatch, not a regression.

Not in this PR

The issue's third acceptance line asks for a native simulator check. The screens are plain Stack/Row inside the same profile shell every other Profile screen uses, and the two nested routes now inherit that shell rather than rolling their own SafeAreaView, so the native risk is lower than before — but I have not run the simulator.

🤖 Generated with Claude Code

)

The worker's background check showed its state as a coloured pill and a
progress bar — "Partially Completed", 80% — which tells someone waiting on a
screening neither what has happened nor what happens next. Eighty per cent
of what? The number came from a lookup table keyed on the status, so it was
a restatement of the pill rather than a measurement of anything.

## Four steps

A check really is a short sequence: it is requested, consent is given, the
provider works on it, and it comes back. `check-timeline.ts` maps all
fourteen statuses the API returns onto that sequence — nothing new from the
backend — and `CheckTimeline` draws it as a vertical timeline with the wait
sitting on the step that is actually waiting.

Two rules the tests pin down:

- A dispute walks the check *back* to the provider rather than leaving it
  complete. It is raised against a finished check, but the check is working
  again until it resolves.
- Statuses that stopped rather than finished — failed, cancelled, refunded,
  expired — leave the last step marked as current, not done. "Complete"
  against a cancelled check reads as a result the worker never got.

Under the timeline, the status line uses the label and description the
status vocabulary already carried and never showed.

## The rest of the screen

`CheckStatusCard` loses its card, its tinted pill and its progress bar for a
hairline row: what the check is, when it expires, the timeline, and the
three things a worker can do. The filters become folder tabs rather than
four pill buttons that looked like actions, and the dashboard drops its own
scroll view — it renders inside the verification accordion, which was a box
inside a box inside a box.

Both nested routes move onto the shared profile shell. They were bare
`SafeAreaView`s with `headerShown: false`: no breadcrumb, no heading, no way
back but the OS gesture. `BackgroundCheckWizard` drops the title it drew a
few pixels under the screen header's, and its own scroll view with it.

## Hex

`features/background-check` had 57 colour literals, the most of any feature
directory. It now has none: `#414e62` was a secondary-text grey, `#e2e8f0`
and `#f2f4f7` hairline and surface greys, `#b45309` the amber that means
"act on this", `#e5e7eb` a hairline on the dispute screen's two error boxes.

## Verification

scf-core 1188/1188 (9 new, one asserting every status the API can return
gets a sensible timeline), lint and both typechecks clean. Checked signed in
at 1440 and 390 against four checks in four different states: the timeline
renders per state, no horizontal scroll, and the page hydrates clean across
four consecutive loads — the same as `main`.

Co-Authored-By: Claude Opus 5 <[email protected]>
@thinkclay
thinkclay merged commit e325f8d into main Sep 23, 2026
9 checks passed
@thinkclay
thinkclay deleted the redesign/r2-830-background-check branch September 23, 2026 21:40
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): worker background-check screens reskinned — status as a timeline, one card-free layout

1 participant