wacrm/src/lib
Arnas Donauskas 32022c13fe
feat(theme): sweep remaining violet-* → primary across all surfaces
PR #132 (color themes) only tokenized the high-visibility chrome.
Inbox / contacts / pipelines / broadcasts / automations / auth /
settings sub-forms still had ~150 hard-coded `violet-*` classes
across ~32 files, so picking a non-violet theme felt half-broken —
sidebar and header changed colour, but message bubbles, deal cards,
and the broadcast wizard all stayed violet.

This is the mechanical follow-up: replace every `violet-N(/N)?`
with `primary(/N)?` so the theme picker themes the whole app.

Two non-trivial swaps inside the pass:
- `text-white` on a `bg-primary` button → `text-primary-foreground`.
  Emerald and Amber define a *dark* `--primary-foreground` because
  their primaries are bright; `text-white` over those would tank
  contrast.
- `bg-primary hover:bg-primary` (hover identical to base — original
  code had this latent bug from `hover:bg-violet-500`) → adds `/90`
  on hover so the lift is visible.

Test update:
- `broadcast-status.test.ts` asserted shade numbers (`bg-X-N/10`).
  Relaxed the regex to also accept token form (`bg-X/10`) since
  brand-accent status badges now ride the active theme.

Files touched: 49. Lint clean (existing warnings only), 173/173
tests, typecheck + build green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 17:00:32 +03:00
..
automations feat(theme): sweep remaining violet-* → primary across all surfaces 2026-05-22 17:00:32 +03:00
dashboard test: foundational Vitest suite for security + critical pure logic 2026-05-18 16:06:02 +03:00
flows Merge remote-tracking branch 'origin/main' into feat/flows-drop-reread-and-limit 2026-05-22 15:56:39 +03:00
supabase fix: make Supabase browser client a singleton 2026-04-16 19:39:24 +03:00
whatsapp feat(flows): foundation for interactive WhatsApp messages (PR 1/4) 2026-05-22 13:12:27 +03:00
broadcast-status.test.ts feat(theme): sweep remaining violet-* → primary across all surfaces 2026-05-22 17:00:32 +03:00
broadcast-status.ts feat(theme): sweep remaining violet-* → primary across all surfaces 2026-05-22 17:00:32 +03:00
rate-limit.test.ts test: foundational Vitest suite for security + critical pure logic 2026-05-18 16:06:02 +03:00
rate-limit.ts feat(inbox): reactions, reply-to, and copy on chat messages 2026-05-19 16:17:26 +03:00
themes.ts feat(settings): color theme picker (5 themes) 2026-05-22 16:48:40 +03:00
utils.ts feat: initial commit 2026-04-16 17:53:27 +03:00