e1d570992e
Drei zusammengehörige Teile in einem Repository: - homeassistant/ Das fertige, im Einsatz befindliche Home-Assistant-Panel (panel_custom Custom Element + pyscript-Backend). Echte Fahrzeug- und Personendaten (fahrzeugprofil.json, fahrten.jsonl, tankvorgaenge.jsonl, Tankbelege) bleiben per .gitignore außen vor; die anonymisierte Vorlage fahrzeugprofil.example.json ist mit dabei. - design-system/ Eigenständige React-Komponentenbibliothek (@audi-dash/ui), die die visuelle Sprache des Panels nachbildet - ohne Audi-Markenzeichen und ohne die lizenzierte Hausschrift. Dient als Grundlage für Claude Design. War bis hierher ein eigenes Repository und ist in dieses eingeschmolzen worden. - companion-app/ Datenschicht der neuen App DataMetric360 (iOS/Android via Capacitor, zusätzlich als Iframe im HA-Dashboard). Noch ohne Oberfläche: REST- und WebSocket-Zugriff auf Home Assistant plus Warteschlange für Änderungen ohne Netz. Ersetzt das eingespritzte hass-Objekt, das nur innerhalb des HA-Frontends existiert. Dazu die Projektdokumentation: SPECIFICATION.md (Ist-Stand des Panels), COMPANION_APP_ARCHITECTURE.md (Architekturentscheidungen der neuen App), AUDIT_2026-08-10.md, DESIGN_BRIEF_DATAMETRIC360.md und der ursprüngliche Bauauftrag. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
3.6 KiB
3.6 KiB
design-sync notes — @audi-dash/ui
Repo shape
- Package shape (no Storybook). Build:
npm run build(tsup) in the repo root producesdist/index.js(ESM),dist/index.cjs(CJS),dist/index.d.ts,dist/styles.css. The converter's--entrypoints atdist/index.js. - Converter deps are staged/installed under
.ds-sync/(isolated npm project, gitignored) — never mixed into the repo's ownpackage.json. - On Windows,
npm installneedsnpm approve-scripts esbuildonce per fresh.ds-sync//node_modules(npm 11's allow-scripts gate blocks esbuild's postinstall that downloads its platform binary).
Known render warns (triaged, safe to ignore on re-sync)
[RENDER_THIN]onIconButton: "mounts have no text and paint nothing" — false positive. IconButton is intentionally icon-only (no text content,aria-labelonly). Screenshot confirms both cells (Default, Disabled) render the icons correctly; the heuristic just measures text content, which is legitimately empty here.
cfg.overrides
Popup:cardMode: "single"— it's a fixed-position overlay component that portals todocument.body; grid mode collapsed/escaped its card.Accordion,Feld,TabBar,StatGrid:cardMode: "column"— one or more of their authored stories render wider than a grid cell (multi-field forms / full-width nav bars); column mode gives them the full card width instead of being cropped.
Preview authoring conventions
- Every preview wraps its composition in
<div className="ads-root" data-theme="nacht">(a localRoothelper duplicated per file) — the library only applies text color/background via.ads-root, and without it previews render with browser-default black-on-white instead of the app's actual dark theme. This is required for every future preview — the components' color tokens are on:root(theme-independent) butcolor/backgroundinheritance only kicks in under.ads-root. Popup's children portal todocument.body, escaping any local.ads-rootwrapper. This doesn't break styling becausePopup's own CSS (.ads-popup,.ads-popup-item) setsbackground/colordirectly fromvar(--tile-2)/var(--fg)rather than relying on inherited color — so it renders correctly even though the wrapper technically doesn't reach it.SwipeRow'sSwipedOpenstory shows content clipped at the left edge behind the revealed delete button — this is correct, faithful behavior (the row slides left to reveal the delete action), not a rendering defect.
Re-sync risks
- All 20 previews are hand-authored (no floor cards) — a future re-sync only needs to touch previews for components whose source or
.tsxactually changed; everything else carries forward via the grade cache +_ds_sync.jsonanchor. - The
Rootwrapper pattern (data-theme="nacht") is duplicated per preview file rather than imported from a shared module — if a preview is added later without it, it will silently render unthemed (black text, no background). Check fordata-theme="nacht"in any new preview before grading it. - Playwright/Chromium was freshly installed for this sync (
.ds-sync/node_modules/playwright, chromium cached at~/AppData/Local/ms-playwright) — not committed, machine-local. A re-sync on a different machine needs to reinstall it (package-validate.mjs will prompt if missing). - No
docsDir/docs were found in this repo (it's a fresh internal design system, no README-per-component docs yet) — all.prompt.mdfiles are synthesized from.d.ts+ the authored preview.tsx, not from hand-written docs. If per-component docs are added later, setcfg.docsDirto pick them up.