From 52af8c0cece6ec71a7cb715641f0f579b1de53ca Mon Sep 17 00:00:00 2001 From: Till JS Date: Wed, 22 Apr 2026 17:19:53 +0200 Subject: [PATCH] refactor(theming): migrate who semantic colours to theme tokens MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PlayView used Tailwind palette classes for game-status feedback: bg-emerald-500/10 + text-emerald-300 (won) → bg-success/10 + text-success bg-amber-500/10 + text-amber-300 (lost) → bg-warning/10 + text-warning border-red-500/20 + bg-red-500/10 + text-red-300 (error) → border-error/20 + bg-error/10 + text-error placeholder-white/30 focus:border-purple-400/50 → placeholder:text-muted-foreground/60 focus:border-primary/50 Semantic status now tracks the theme (errors are red in dark, darker red in light, etc.) instead of being fixed hex ramps. The `bg-purple-500` / `bg-purple-500/30` / `hover:bg-purple-600` classes on the user's chat bubble and submit buttons STAY — purple is the who module's primary identity colour (historical-deck accent `#a855f7` is semantically the same hue). Documented in brand-literals.md §who. Also harden two validators against mid-rename states where git ls-files returns paths that aren't on disk yet — both now skip unreadable files instead of crashing the pre-commit hook (caught while migrating who). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../web/src/lib/modules/who/views/PlayView.svelte | 14 +++++++------- packages/shared-tailwind/brand-literals.md | 7 ++++--- scripts/validate-theme-parity.mjs | 10 +++++++++- scripts/validate-theme-utilities.mjs | 9 ++++++++- 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/apps/mana/apps/web/src/lib/modules/who/views/PlayView.svelte b/apps/mana/apps/web/src/lib/modules/who/views/PlayView.svelte index dfceef804..41fe5d73a 100644 --- a/apps/mana/apps/web/src/lib/modules/who/views/PlayView.svelte +++ b/apps/mana/apps/web/src/lib/modules/who/views/PlayView.svelte @@ -163,18 +163,18 @@ {#if game && game.status !== 'playing'}
{#if game.status === 'won'} -

+

Erraten in {game.messageCount} Nachrichten!

Das war {game.revealedName}.

{:else} -

Spiel beendet — aufgegeben.

+

Spiel beendet — aufgegeben.

{/if}
{/if} @@ -214,7 +214,7 @@ {#if error} -
+
{error}
{/if} @@ -228,7 +228,7 @@ onkeydown={onInputKeydown} placeholder="Frag mich etwas…" rows="1" - class="flex-1 resize-none rounded-lg border border-border/10 bg-muted/5 px-3 py-2 text-sm text-foreground placeholder-white/30 focus:border-purple-400/50 focus:outline-none" + class="flex-1 resize-none rounded-lg border border-border/10 bg-muted/5 px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-primary/50 focus:outline-none" disabled={sending} >