Skip to content

fix(issues): align severity colours and typography with theme tokens - #30

Merged
hellodk merged 2 commits into
mainfrom
feat/issues-theme-tokens
Sep 5, 2026
Merged

hellodk merged 2 commits into
mainfrom
feat/issues-theme-tokens

Conversation

@hellodk

@hellodk hellodk commented Sep 5, 2026 •

Copy link
Copy Markdown
Owner

Aligns the /issues page (and the AI Insights feed) with Hetu's theme system —
both colour and typography.

Colours (Closes #27)

The page hardcoded bright Tailwind colours (red-500, orange-500, emerald-500,
raw #ef4444…) for severity, ignoring the active theme — a 0/100 security score rendered
in saturated red-500 instead of the muted --sev-crit.

  • tailwind.config.js — theme-aware sev (ok/info/warn/high/crit → --sev-*) and
    accent (→ --accent) colour families.
  • app/issues/page.tsx / components/AIInsightFeed.tsx — every hardcoded severity
    colour → sev-* tokens; health-ring inline hex → rgb(var(--sev-*)); decorative/link
    blues → accent.

Typography

The page imported and applied DM Serif / DM Mono / DM Sans and used them in ~30 inline
styles, so its ring number, counters and labels rendered in a different typeface than the
rest of Hetu and did not re-theme.

  • Point every font at the theme vars — var(--font-display) / var(--font-mono) /
    var(--font-body) (Fraunces / JetBrains Mono / Inter); drop the DM next/font imports.
  • text-white on the crit badge → text-cluster-bg so it stays readable on the lighter
    --sev-crit in dark themes.

Severity colour and type now follow all four themes (graphite, calm-signal, aurora, prism).

Testing

  • pnpm test:e2e theme-tokens → asserts the critical counter resolves to rgb(155, 28, 46)
    (--sev-crit) not rgb(239, 68, 68), the critical dot fills with --sev-crit, no element
    in <main> uses the bright Tailwind palette, and no element resolves to a DM font.
  • pnpm exec tsc --noEmit and pnpm exec eslint → clean.
  • Pre-existing suite failures (incident-command, navigation, version-display) reproduce on
    main and are unrelated — tracked in e2e: home-page CriticalBanner + version-display specs fail (empty SSE stream / flaky nav) #31.

Closes #27

The /issues page and AIInsightFeed hardcoded bright Tailwind colors
(red-500, orange-500, emerald-500, raw #ef4444) for severity, so they
ignored the active theme and clashed with the graphite paper surface —
a 0/100 security score rendered in saturated red-500 instead of the
muted --sev-crit.

Add theme-aware `sev` (ok/info/warn/high/crit -> --sev-*) and `accent`
(-> --accent) Tailwind color families and swap every hardcoded severity
color to them. Decorative/link blues move to accent; the health ring's
inline hex uses rgb(var(--sev-*)). Severity now follows all four themes.

Closes #27
The issues page imported and applied DM Serif/Mono/Sans and used them in
~30 inline styles, so its ring number, counters and labels rendered in a
different typeface than the rest of Hetu (Fraunces/Inter/JetBrains Mono)
and did not re-theme with the four-theme system. Point every font at the
theme vars (--font-display/-mono/-body), drop the DM next/font imports,
and swap text-white on the crit badge to text-cluster-bg so it stays
readable on the lighter --sev-crit in dark themes.
@hellodk hellodk changed the title fix(issues): route severity colors through graphite theme tokens fix(issues): align severity colours and typography with theme tokens Sep 5, 2026
@hellodk
hellodk merged commit 5aa7be6 into main Sep 5, 2026
2 checks passed
@hellodk
hellodk deleted the feat/issues-theme-tokens branch September 5, 2026 13:29
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.

Issues page & AI Insights ignore graphite theme tokens (hardcoded severity colors)

1 participant