[HOMEASSIST-2] Shared Tailwind v4 theme in packages/ui #2

Merged
chris merged 6 commits from feature/HOMEASSIST-2 into main 2026-09-30 09:39:24 -06:00
Owner

Ticket

HOMEASSIST-2 Dashboards: shared Tailwind v4 setup and theme in packages/ui

Summary

  • Shared theme.css in packages/ui: semantic tokens, dark by default, light opt-in via data-theme='light'.
  • dashboardPlugins() Vite factory exported from packages/ui. Map needs --configLoader runner and Vite >= 6.1.
  • Map consumes the shared theme with no dark-mode drift, verified via a compiled CSS diff and compile()-based tests.
  • CSS delivery decision (shadow-root injection) documented in packages/ui/README.md.

Notes

  • The light palette is derived (the mock is dark-only) and was not verified in a browser.
  • The dev server and harness were not checked in a browser. Port 5173 was occupied on the host, so the dev server was verified on 5199.
  • Known non-fixes: the toast-in keyframe hard-codes translate(-50%); token role naming (bg-border/25); map's tsconfig has bun types.
  • Out of scope, pre-existing: personIcon in Card.tsx interpolates name/avatarUrl into divIcon HTML (HTML-injection sink). Suggest a follow-up ticket.

🤖 Generated with Claude Code

## Ticket [HOMEASSIST-2](http://192.168.2.100:7123/home/browse/HOMEASSIST-2/) Dashboards: shared Tailwind v4 setup and theme in packages/ui ## Summary - Shared `theme.css` in `packages/ui`: semantic tokens, dark by default, light opt-in via `data-theme='light'`. - `dashboardPlugins()` Vite factory exported from `packages/ui`. Map needs `--configLoader runner` and Vite >= 6.1. - Map consumes the shared theme with no dark-mode drift, verified via a compiled CSS diff and `compile()`-based tests. - CSS delivery decision (shadow-root injection) documented in `packages/ui/README.md`. ## Notes - The light palette is derived (the mock is dark-only) and was not verified in a browser. - The dev server and harness were not checked in a browser. Port 5173 was occupied on the host, so the dev server was verified on 5199. - Known non-fixes: the `toast-in` keyframe hard-codes `translate(-50%)`; token role naming (`bg-border/25`); map's tsconfig has bun types. - Out of scope, pre-existing: `personIcon` in `Card.tsx` interpolates name/avatarUrl into divIcon HTML (HTML-injection sink). Suggest a follow-up ticket. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chris merged commit 9b9ab26cb6 into main 2026-09-30 09:39:24 -06:00
chris deleted branch feature/HOMEASSIST-2 2026-09-30 09:39:24 -06:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
chris/home-assistant-dashboards!2
No description provided.