Skip to content

fix(profiles): give the public résumé page its own light and dark palette - #272

Merged
willgriffin merged 2 commits into
mainfrom
claude/profile-dark-contrast-b0326b
Oct 29, 2026
Merged

willgriffin merged 2 commits into
mainfrom
claude/profile-dark-contrast-b0326b

Conversation

@willgriffin

Copy link
Copy Markdown
Owner

Closes #270

What changed

The public résumé page was unreadable under a dark colour scheme. The smrt-svelte ThemeProvider wrapper paints the dark studio surface on public routes but never defines the --smrt-color-* tokens there, so PublicProfileResume.svelte fell back to light-theme ink on a dark background.

  • apps/site/src/lib/components/PublicProfileResume.svelte: the résumé now owns a --profile-* palette (background, ink, soft ink, muted ink, rule, accent) on its root and paints its own background. A prefers-color-scheme: dark set switches it, the persisted html[data-color-scheme] toggle still wins over the OS preference, and print pins the light set.
  • apps/site/src/routes/people/[handle]/+page.svelte: the route wraps the résumé so the surface runs edge to edge and the download link uses the accent.
  • apps/site/src/lib/server/public-profile-render.ts: the standalone HTML/PDF document uses the same tokens with a dark media set; print pins light so PDFs are unchanged.
  • apps/site/src/lib/server/public-profile-render.spec.ts: asserts both token sets exist, body background and colour come from the tokens, and no colour is hard-coded.

Admin surfaces are untouched. The owner preview renders the same component, so it now previews the public palette.

Contrast (WCAG): light ink 17.0:1, muted 6.8:1, accent 7.2:1; dark ink 15.8:1, muted 7.3:1, accent 9.3:1.

Validation

  • pnpm format-check: pass
  • pnpm --filter @willgriffin/iolaus-site check: pass (0 errors)
  • public-profile-render.spec.ts and public-profile-route.spec.ts: 15 tests pass
  • Local dev server with dark and light scheme emulation: computed colours verified for headings, body, muted text, links, and background in both schemes.

Review outcome

Standard risk, one balanced reviewer (codex-sol, gpt family, gpt-6.1-sol, medium effort) via hv-review-dispatch, cycle iolaus-270-dark-contrast.

  • Round 1 (head 2df1c63): one P2 finding, accepted: the persisted dark toggle selector out-specified the print override, so a page printed under the dark toggle kept dark tokens. Fixed in 2273cc5 by repeating the toggle selector in the print rules.
  • Round 2 recall (head 2273cc5, same reviewer session): CLEAN.
  • Budget: 2 dispatches, 41,404 tokens of 30,000,000.

…ette

The public resume coloured text with --smrt-color-* tokens that the studio
ThemeProvider never defines on public routes, so a dark system scheme left
light-theme ink on the dark wrapper background. The resume component, the
public route wrapper, and the standalone HTML document now own a
--profile-* palette (background, ink, muted ink, rule, accent) with a
prefers-color-scheme: dark set that keeps every pair above WCAG AA, honour
the persisted html[data-color-scheme] toggle, and pin print to light.
The html[data-color-scheme=dark] selector out-specified the print override,
so a printed page under the dark toggle kept dark tokens. Repeat the toggle
selector in the print rules so they tie on specificity and win by order.
@willgriffin
willgriffin merged commit 8142c73 into main Oct 29, 2026
6 checks passed
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.

Public résumé page is unreadable in dark colour scheme

1 participant