refactor(desktop): consolidate type ramp to 6 prose sizes + 1 mono
Summary
Consolidates the desktop app's 13 in-use text sizes into a single 7-step type ramp — 6 prose sizes + 1 mono — by remapping the size tokens in desktop/tailwind.config.js. Existing class names compile onto the new steps, so no component files are touched.
Proposed and evidenced by @jmarr with before/after captures of the running app: buzz-typeramp-diffs.zip (13 settings screens + 5 daily-driver surfaces, captured through the Playwright e2e harness at commit 4253688 with the token remap as the only variable).
The ramp
| Role | px | Token | Replaces (old px) |
|---|---|---|---|
| Display | 40 | text-title (+ text-4xl/text-5xl aliases) |
36, 40, 48 |
| Key (mono) | 36 | text-nsec-key |
unchanged |
| Page | 30 | text-3xl |
30 |
| Section | 24 | text-2xl |
24 |
| Title | 18 | text-lg (+ text-xl alias) |
18, 20 |
| Body | 14 | text-sm (+ text-base alias) |
14, 16 |
| Meta | 12 | text-xs (+ text-2xs/text-3xs/text-badge aliases) |
8, 10, 11, 12 |
The net visible change is two moves:
- 16→14 — descriptions and small semibold card/section titles fold down to Body, sitting one clean step below their 18px headers.
- sub-12→12 — the meta band (timestamps, labels, count badges) lifts to Meta 12.
Body 14 and Meta 12 carry ~95% of all text (987 text-sm + 597 text-xs call sites), so most screens barely move. Every remaining prose step is ≥1.17×, most ≥1.25×.
Why remap tokens instead of rewriting call sites
One file, one owner, zero churn across ~1,800 call sites. Legacy names (text-2xs, text-badge, text-base, text-xl, text-4xl, text-5xl) become documented aliases of their ramp step; call sites can migrate to canonical names incrementally without any visual change.
Verification
pnpm build(tsc + vite) ✅pnpm typecheck✅pnpm check(biome + file-sizes + px-text guard + pubkey-truncation) ✅pnpm test— 3835/3835 pass ✅- Compiled CSS inspected:
.text-2xs/.text-3xs/.text-badge→ 0.75rem,.text-base→ 0.875rem,.text-xl→ 1.125rem,.text-4xl/.text-5xl→ 2.5rem, and rem-based sizing preserved so Cmd +/- zoom still scales everything.
Screenshots in the linked zip are light theme; dark theme uses identical sizes so the deltas are the same.