Skip to content

fix(dashboard,widget): align design tokens with the editorial system - #81

Merged
DamienBattistella merged 1 commit into
mainfrom
claude/design-system-discrepancies-8adc9h
Jul 22, 2026
Merged

fix(dashboard,widget): align design tokens with the editorial system#81
DamienBattistella merged 1 commit into
mainfrom
claude/design-system-discrepancies-8adc9h

Conversation

@DamienBattistella

Copy link
Copy Markdown
Collaborator

Contexte

Analyse du design system Koe (widget + dashboard) et correction des écarts entre l'intention de design déclarée et l'implémentation.

L'intention de design est explicite : type monospace, coins carrés, filets fins neutres, palette monochrome sans accent primaire lourd. C'est écrit en toutes lettres dans l'en-tête CSS du widget, et confirmé côté dashboard par components.json ("baseColor": "neutral"), l'anneau de focus gris neutre, et les primitives shadcn toutes passées en rounded-none + type mono.

Le dashboard trahissait pourtant cette intention en gardant les tokens bleus shadcn par défaut (--primary, --chart-*, --sidebar-primary), colorant chaque CTA, badge, case cochée, point « fresh » du heartbeat et barre de sélection de l'inbox. Le widget avait de son côté des options de thème documentées mais inertes ou boguées.

Discrepancies relevées et corrigées

Dashboard

  • Palette bleue résiduelle → neutre. --primary/--primary-foreground passent en noir-sur-blanc (clair) / blanc-sur-noir (sombre), à l'image du bouton primaire monochrome du widget.
  • Rampe --chart-* toute bleue → rampe de gris neutre (tokens sans consommateur actuel mais hors-langage).
  • --sidebar-primary(-foreground) neutralisés (tokens morts : l'état actif de la sidebar utilise sidebar-accent).
  • 5 coins arrondis parasites (rounded-sm/rounded-md dans Overview/Onboarding) → rounded-none, pour coller aux primitives entièrement carrées.

Widget

  • theme.radius rendu fonctionnel. Toutes les surfaces du chrome (panel, launcher, boutons, champs, votes) lisent désormais --koe-radius via koe-rounded-koe, avec un défaut à 0 (carré). L'option était typée et documentée mais consommée nulle part.
  • Contrat accentColor honoré. Les anneaux de focus se teintent maintenant de l'accent hôte, avec repli sur le premier plan neutre quand il n'est pas défini.
  • Bug mode sombre corrigé. Le lien roadmap (koe-text-koe-accent) retombait sur #0a0a0a — invisible sur le fond sombre — faute d'accent défini ; le token accent retombe désormais sur --koe-text.
  • Docs alignées sur l'implémentation (accentColor/radius dans le type partagé + en-tête CSS du widget).

Vérifications

  • pnpm typecheck : 5/5 packages OK
  • pnpm test : 90/90 tests API OK
  • Build widget (double build ESM lib + IIFE standalone) et dashboard : OK
  • CSS générée vérifiée : tokens dashboard tous en chroma 0 (aucun bleu résiduel), koe-rounded-koe{border-radius:var(--koe-radius, 0)} et repli accent présents dans le bundle widget

Aucun changement de comportement par défaut : le widget reste carré (radius 0) et monochrome (accent → foreground) tant que l'hôte ne configure rien.

🤖 Generated with Claude Code


Generated by Claude Code

The dashboard is declared `baseColor: neutral`, uses a neutral gray focus
ring, and squares off every shadcn primitive (`rounded-none`) with mono
type — an editorial, monochrome language the widget explicitly says it
mirrors ("neutral palette, no heavy primary accents"). But the dashboard
still carried stock shadcn-blue `--primary`, `--chart-*`, and
`--sidebar-primary` tokens, painting every CTA, badge, checked box,
"fresh" heartbeat dot and inbox selection bar blue.

Dashboard:
- Neutralize `--primary`/`--primary-foreground` to black-on-white
  (light) / white-on-black (dark), mirroring the widget's monochrome
  primary button.
- Replace the all-blue `--chart-*` ramp with a neutral grayscale ramp
  (the tokens had no consumer yet but were off-language).
- Neutralize the unused `--sidebar-primary(-foreground)` tokens.
- Square the five stray `rounded-sm`/`rounded-md` elements in
  Overview/Onboarding to match the fully-square primitives.

Widget:
- Make the documented `theme.radius` knob actually work: every chrome
  surface (panel, launcher, buttons, fields, vote controls) now reads
  `--koe-radius` via `koe-rounded-koe`, defaulting to 0 (square).
- Honor the documented `accentColor` contract: focus rings now tint to
  the host accent, falling back to the neutral foreground when unset.
- Fix a dark-mode bug where the roadmap link (`koe-text-koe-accent`) fell
  back to `#0a0a0a` — invisible on the dark background — by defaulting
  the accent token to `--koe-text`.
- Correct the `accentColor`/`radius` doc comments (shared type + widget
  CSS) to match the implementation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AtRMjyJkW3M3RvkmCYM5NU
@DamienBattistella
DamienBattistella marked this pull request as ready for review July 22, 2026 22:21
@DamienBattistella
DamienBattistella merged commit 64dccd3 into main Jul 22, 2026
1 check passed
@DamienBattistella
DamienBattistella deleted the claude/design-system-discrepancies-8adc9h branch July 22, 2026 22:22
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.

2 participants