wacrm/src/lib/automations
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
..
admin-client.ts feat(automations): visual flow builder, engine, and logs viewer 2026-04-17 19:39:02 +03:00
engine.ts Merge pull request #40 from ArnasDon/fix/automations-atomic-execution-counter 2026-04-17 21:56:37 +03:00
meta-send.ts fix(automations): scope meta-send contact lookup by user_id 2026-04-17 21:39:33 +03:00
steps-tree.ts feat(automations): visual flow builder, engine, and logs viewer 2026-04-17 19:39:02 +03:00
templates.ts fix(automations): Welcome Message template uses first_inbound_message 2026-04-17 21:42:20 +03:00
trigger-meta.ts feat(theme): sweep remaining violet-* → primary across all surfaces 2026-05-22 17:00:32 +03:00
validate.test.ts test: foundational Vitest suite for security + critical pure logic 2026-05-18 16:06:02 +03:00
validate.ts fix(automations): reject activation of invalid step/trigger config 2026-04-17 21:50:13 +03:00