Skip to content

fix(theme): remaining two-sided blue-ramp ternaries become theme tokens — accentRamp 331 → 113 (#1028) - #1072

Merged
thinkclay merged 1 commit into
mainfrom
fix/accent-ramps-2
Oct 7, 2026
Merged

thinkclay merged 1 commit into
mainfrom
fix/accent-ramps-2

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Refs #1028 (second pass; the issue stays open). The accentRamp ratchet goes from 331 to 113.

Why a second pass

The first codemod (#1068) matched only === 'dark' with single quotes. Every theme === "light" ? colors.blue[700] : colors.blue[300] was missed, and that double-quoted form is what the whole application flow, the job previews and the inquiry badges use. This pass handles both quote styles and both condition orders, and maps each light/dark pair by its role:

Light / dark pair Becomes Used for
700 / 300 text[t].emphasis accent text, icons
50 / 900 bg[t].selected tinted grounds
500 / 400 fg[t].active selected dots, slider tracks
300 / 700 border[t].active on a border property, otherwise text[t].emphasis outlines

That's 114 replacements in 37 files. Each keeps its light and dark behaviour, and the accent becomes the product's teal.

A correction to #1068: four JSX borderColor={…} props had been given a text token, because the role check only recognised the key: form. Two of them came from #1068 (NarrativeView). All four are border tokens now, and a repo-wide grep finds no other border or background property fed a text token.

The remaining 113 are single shades and categorical palettes: personality-trait colours, chart series, the violet worker palette in components/ui/styles.ts. Those are choices, not mistakes, and want a decision each, not a codemod.

Verification

  • tsc passes on scf-core and the app; nx run scf-core:test passes 1300/1300; pnpm prepush passes, with 176/176 gated API tests.
  • Sweep: /office, /profile, /assessments, /jobs and /dashboard in light and dark at 1440 and 390, 292 captures. Every page was ready, matched its theme, and had no page errors. The only clip is the hidden input on cms/projects/create, which main already has.
  • Apply flow: walked in Playwright as Marcus in both themes and both widths, with no page errors. Step 1 (Screening, CustomQuestionsStep) is shown below. Not captured: the Documents step (AttachmentsStep, 20 of the changes) sits behind required screening answers that the walker doesn't fill in. Worth a look on dev.
Apply, step 1, 1440 dark
Apply, step 1, 390 light
Profile, dark
Job browse, dark

The formatter reflowed the touched files, so GitHub's "hide whitespace" view makes the diff readable.

🤖 Generated with Claude Code

…tokens — accentRamp 331 → 113 (#1028)

Second pass. The first codemod matched only `=== 'dark'` with single
quotes, so every `theme === "light" ? blue[700] : blue[300]` (the apply
flow, job previews, inquiry badges, …) was missed. This one takes both
quote styles and both orders, and maps by role:

  light 700 / dark 300 → text[t].emphasis (accent text, icons)
  light 50 / dark 900  → bg[t].selected   (tinted grounds)
  light 500 / dark 400 → fg[t].active     (selected dots, tracks)
  light 300 / dark 700 → border[t].active on a border, else text emphasis

114 replacements in 37 files. Four JSX `borderColor={…}` props, two of
them from the first pass, had been given a text token; they are border
tokens now. What remains (113) is single shades and categorical palettes
(personality traits, chart series), which want a decision each.

Refs #1028

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@thinkclay
thinkclay merged commit e532fe2 into main Oct 7, 2026
10 checks passed
@thinkclay
thinkclay deleted the fix/accent-ramps-2 branch October 7, 2026 20:01
thinkclay added a commit that referenced this pull request Oct 7, 2026
…commit (#1028) (#1073)

#1072's codemod also rewrote this file (selected story title:
theme === 'dark' ? blue[300] : blue[700] -> text[theme].emphasis), but only
packages/scf-core was staged, so the change never reached main.

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

1 participant