Proposed adr-003 · 2026-10-24

The Session View Is Drawn with daisyUI 5 Components as Standalone CSS, UnoCSS Utilities and htmx over Tera Macros, and Every Colour It Shows Is a Role of the Brand

Context

The session view (view/) gives the principal perspective over the sessions wuwei observes: what runs, what waits for their act, what stopped sending heartbeats, whether the floor holds. Its first pages drew every declared surface (ui/surfaces.ncl) through one generic table, every cell in a monospace font: the stack was in place (UnoCSS, daisyUI, htmx, Tera through stratum-ui) and used as a technical minimum, not as a presentation. The principal found it unusable for supervision (2026-10-24).

Its siblings in the constellation — ontoref-daemon, specdossier, opus-editorial — build their CSS with UnoCSS and unocss-preset-daisy, whose latest release (7.0.0) requires daisyUI ^3.0.0. daisyUI 3 lacks components the view needs (timeline among them), and daisyUI 4 and 5 are Tailwind plugins the preset does not follow. daisyUI 5 (5.7.50, measured 2026-10-24) ships its components as compiled, standalone CSS — daisyui.css, one file per component in components/, its themes apart — usable without Tailwind.

The view's colours come from the brand, never from the view: assets/branding/visual/style.ncl declares surfaces.view, `ontoref visual css --surface view` gives its roles, scripts/theme.nu turns them into the variables daisy reads, and `just theme-check` compares the result with the brand. That chain declares eight roles (base 100/200/300 and content, primary and its content, neutral and its content). Every other role daisy draws — secondary, accent, info, success, warning, error — was filled by daisy's stock theme: the state badges and alerts of the first pages showed daisy's colours, not wuwei's, and a ✓/✕ on the floor card showed exactly the verdict the brand forbids ("wuwei gives no verdicts", style.ncl _forbidden_meanings).

Decision

1. THREE LAYERS, EACH WITH ONE JOB. daisyUI 5's compiled component CSS draws the components (buttons, cards, badges, tables, menus, dialogs, stats, timeline). UnoCSS with presetWind4 generates the composition utilities the templates use (grid, flex, spacing, responsive, typography) and knows daisy's colours only as `var(--color-*)`. htmx carries the behaviour (partial redraws, the live notice). Tera renders every page on the server. No Tailwind, no client framework, no CDN: daisyUI is pinned in assets/css/package.json and only the component files the templates use are concatenated into the one stylesheet the view serves.

2. NO STOCK THEME. No daisy theme file is loaded. scripts/theme.nu writes every colour variable daisy 5 reads, for the light and the dark theme, each from a role of surfaces.view; a variable it does not write is an error, never a fallback to daisy's palette.

3. SESSION STATES ARE ROLES OF THE BRAND, NAMED FOR WHAT THEY ARE. The brand gains roles for the states the view must tell apart — a session live, one waiting for its principal, one without heartbeat, one delivered, one failed — declared in style.ncl with their legibility contracts, in both themes. They name states, never judgements: daisy's info, success, warning and error are only the carriers those roles are written into. A state without a role of its own (abandoned, registered) is drawn in neutral. Their values are the brand's decision; until the brand declares them the view draws states with the roles it has (primary, neutral, outline, ghost).

4. NO VERDICTS. No page shows ticks, crosses, approval or rejection: a state is said by its name and its role, an act is offered only where the lifecycle allows it, and the floor is said as sound or as what is down.

5. PAGES COMPOSE MACROS. A component the pages repeat (a cell, a stat, an empty state, a state badge, an act button) is a Tera macro in templates/macros/; pages call the macro and do not repeat daisy's classes. That set of macros is the view's component contract: changing how a component is drawn is one edit, and the pages stay bound to the macro, not to daisy.

Constraints

Alternatives considered