Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

design(D-T03..D-T11): die Tokensprache bekommt Stufen, die man auch nimmt

David39d15432d54b
diff --git a/src/components/__tests__/die-typo-leiter-und-ihre-umgehung.test.ts b/src/components/__tests__/die-typo-leiter-und-ihre-umgehung.test.ts
new file mode 100644
index 00000000..8d3fd1bd
--- /dev/null
+++ b/src/components/__tests__/die-typo-leiter-und-ihre-umgehung.test.ts
@@ -0,0 +1,259 @@
+/**
+ * Die Typo-Leiter, ihre Umgehung und die Anzeigeschrift — Design-Audit §5,
+ * D-T04 und D-T03.
+ *
+ * ── Der Befund, am 01.09.2026 nachgezaehlt ──
+ *
+ * `src/` (ohne `__tests__`) enthielt 1026 Fundstellen einer arbitraeren
+ * Schriftgroesse `text-[…]` gegen 143 Nutzungen der `.t-*`-Klassen. Das
+ * System existiert und wird umgangen.
+ *
+ * Interessant ist nicht die Zahl der Fundstellen, sondern die Zahl der
+ * WERTE: 30 (28 Groessen + 2 Farben). Und ihre Verteilung:
+ *
+ * 947 von 1026 (92,3 %) liegen zwischen 8 und 11,99 px, also UNTER
+ * --text-body (13)
+ * 65 von 1026 ( 6,3 %) sitzen exakt auf einer Stufe
+ *
+ * Unter 13px hatte die Leiter drei Stufen und keine davon war schlichter
+ * Text: --text-label (10) erzwingt uppercase und Laufweite, --text-mono
+ * (11) wechselt die Schriftfamilie, --text-control (12) setzt
+ * line-height 1. Von den 947 Bandstellen tragen 38 uppercase/tracking; die
+ * anderen 909 wollten schlichten Kleintext, und dafuer gab es keinen Namen.
+ *
+ * Die Luecke war also keine fehlende ZAHL — der haeufigste Umgehungswert
+ * (0.6rem = 9,6px) und der gewichtete Mittelwert des Bandes (9,75px) liegen
+ * beide einen Viertelpixel neben der 10, die schon da war. Deshalb bekommt
+ * `.t-micro` keine eigene Zahl, sondern `var(--text-label)`.
+ *
+ * ── Was dieser Test ist ──
+ *
+ * Eine Sperrklinke nach dem Vorbild von `icon-leiter.test.ts`: die Schranken
+ * stehen auf dem GEMESSENEN Ist-Wert nach dieser Aenderung, nicht auf einem
+ * Wunschwert. Sie duerfen sinken, nicht steigen. Eine Schranke, die sofort
+ * rot ist, waere kein Gate.
+ *
+ * ── Was hier NICHT geprueft werden kann ──
+ *
+ * • ob 10px die richtige Groesse ist. Das ist eine Entscheidung und steht
+ * als solche im `.t-micro`-Kommentar von index.css.
+ * • wie Space Grotesk aussieht. Geprueft wird, dass die Datei da ist, dass
+ * sie referenziert wird und dass die Gewichte stimmen — nicht, ob die
+ * Buchstaben gefallen.
+ * • ob die Schrift im Fenster wirklich laedt. Das braucht ein Fenster;
+ * die Messung steht im Kommentar bei --font-display (document.fonts,
+ * Chromium 149, inklusive Breitenvergleich gegen den Rueckfall).
+ *
+ * Run: npx vitest run src/components/__tests__/die-typo-leiter-und-ihre-umgehung.test.ts
+ */
+import { describe, it, expect } from 'vitest'
+import { readFileSync, readdirSync, existsSync } from 'node:fs'
+import { resolve, dirname } from 'node:path'
+
+const ROOT = resolve(__dirname, '..', '..', '..')
+const SRC = resolve(ROOT, 'src')
+const CSS = readFileSync(resolve(SRC, 'index.css'), 'utf8')
+
+/** Kommentare raus — sonst zaehlt jede Erklaerung als Fundstelle. */
+const nurCode = (s: string) =>
+ s.replace(/\/\*[\s\S]*?\*\//g, '').replace(/(^|[^:])\/\/.*$/gm, '$1')
+const CSS_CODE = nurCode(CSS)
+
+/** Alle .ts/.tsx unter src/, rekursiv, ohne __tests__. Die App, nicht die Pruefung. */
+function appDateien(dir = SRC): Array<[string, string]> {
+ const out: Array<[string, string]> = []
+ for (const e of readdirSync(dir, { withFileTypes: true })) {
+ if (e.name === '__tests__') continue
+ const p = resolve(dir, e.name)
+ if (e.isDirectory()) out.push(...appDateien(p))
+ else if (/\.tsx?$/.test(e.name)) out.push([p.slice(SRC.length + 1), readFileSync(p, 'utf8')])
+ }
+ return out
+}
+const DATEIEN = appDateien()
+
+/** Jede arbitraere Schriftgroesse, mit ihrer Fundstellenzahl. */
+function arbitraereGroessen(): Map<string, number> {
+ const m = new Map<string, number>()
+ for (const [, src] of DATEIEN) {
+ for (const t of src.matchAll(/(?<![\w-])(?:[a-z-]+:)*text-\[([^\]]+)\]/g)) {
+ m.set(t[1], (m.get(t[1]) ?? 0) + 1)
+ }
+ }
+ return m
+}
+const WERTE = arbitraereGroessen()
+const FUNDSTELLEN = [...WERTE.values()].reduce((a, b) => a + b, 0)
+
+// ── Die Sperrklinke ────────────────────────────────────────────────────
+//
+// Ist-Werte am 01.09.2026 NACH dieser Aenderung, gemessen mit genau dem
+// Zaehler oben:
+//
+// vorher 30 Werte / 1026 Fundstellen
+// nachher 25 Werte / 1009 Fundstellen
+//
+// Verschwunden sind: `#7c3aed` und `#a78bfa` (jetzt Tokens, siehe
+// zwei-akzente-und-eine-leinwand.test.ts), `8px` (identisch zu 0.5rem),
+// `0.75rem` (identisch zu 12px) und `0.63rem` (die einzige Fundstelle
+// eines Wertes, den niemand entschieden hatte).
+const SCHRANKE_WERTE = 25
+const SCHRANKE_FUNDSTELLEN = 1009
+
+describe('die Umgehung ist gedeckelt und darf nur schrumpfen', () => {
+ it(`hoechstens ${SCHRANKE_WERTE} verschiedene arbitraere Schriftgroessen`, () => {
+ // Wer eine SECHSUNDZWANZIGSTE erfindet, faellt hier durch und nimmt
+ // eine Stufe. Wer eine abbaut, senkt die Zahl hier mit.
+ expect(WERTE.size).toBeLessThanOrEqual(SCHRANKE_WERTE)
+ })
+
+ it(`hoechstens ${SCHRANKE_FUNDSTELLEN} Fundstellen`, () => {
+ expect(FUNDSTELLEN).toBeLessThanOrEqual(SCHRANKE_FUNDSTELLEN)
+ })
+
+ it('die fuenf abgebauten Werte sind wirklich weg', () => {
+ for (const weg of ['text-[8px]', 'text-[0.75rem]', 'text-[0.63rem]', 'text-[#7c3aed]', 'text-[#a78bfa]']) {
+ const treffer = DATEIEN.filter(([, s]) => s.includes(weg)).map(([n]) => n)
+ expect(treffer, weg).toEqual([])
+ }
+ })
+
+ it('die zweite Umgehung — lokal umdefinierte Tokens — ist mitgezaehlt', () => {
+ // `text-[…]` ist nicht der einzige Weg an der Leiter vorbei. Zwei
+ // Create-Call-Sites setzen die Tokens SELBST neu (auf 9px, 8px, 7px,
+ // 18px, 6px). Diese Dateien gehoeren in diesem Durchgang einem anderen
+ // Agenten, also wird hier nur gedeckelt, nicht geaendert.
+ const orte: string[] = []
+ for (const [name, src] of DATEIEN) {
+ for (const t of src.matchAll(/\[--(?:text|control-h|radius)-[a-z-]+:[^\]]+\]/g)) {
+ orte.push(`${name}: ${t[0]}`)
+ }
+ }
+ expect(orte.length).toBeLessThanOrEqual(5)
+ })
+})
+
+describe('die neue Stufe ist keine neue Zahl', () => {
+ it('--text-micro ist var(--text-label), nicht 10px noch einmal', () => {
+ expect(CSS_CODE).toMatch(/--text-micro:\s*var\(--text-label\)\s*;/)
+ // Und die Leiter selbst hat keine siebte Zahl bekommen.
+ const stufen = [...CSS_CODE.matchAll(/--text-(display|title|body|control|label|mono):\s*(\d+)px/g)]
+ expect(stufen.map((m) => Number(m[2])).sort((a, b) => a - b)).toEqual([10, 11, 12, 13, 15, 20])
+ })
+
+ it('`.t-micro` setzt GENAU EINE Eigenschaft', () => {
+ // Der Grund steht im Kommentar daneben und ist im Browser gemessen: die
+ // sechs alten `.t-*` stehen ungeschichtet und fressen jedes
+ // `font-semibold`/`leading-*` der Call-Site. Ein Rezept, das die
+ // Entscheidungen des Aufrufers ueberschreibt, ist selbst ein Grund zur
+ // Umgehung. Deshalb hier nur die Groesse — und deshalb ist der Tausch
+ // gegen `text-[10px]` beweisbar folgenlos.
+ const regel = CSS_CODE.match(/\.t-micro\s*\{([^}]*)\}/)?.[1] ?? ''
+ expect(regel, 'es gibt keine .t-micro-Regel').not.toBe('')
+ const deklarationen = regel.split(';').map((s) => s.trim()).filter(Boolean)
+ expect(deklarationen).toEqual(['font-size: var(--text-micro)'])
+ })
+
+ it('und sie wird wirklich benutzt, nicht nur definiert', () => {
+ const n = DATEIEN.reduce(
+ (a, [, s]) => a + (s.match(/(?<![\w-])t-micro(?![\w-])/g) ?? []).length,
+ 0,
+ )
+ expect(n).toBeGreaterThanOrEqual(9)
+ })
+
+ it('die drei alten Kleinstufen sind wirklich keine schlichten Stufen', () => {
+ // Das ist der BEFUND, nicht der Fix: er darf sich nicht heimlich
+ // aufloesen, sonst waere `.t-micro` doppelt.
+ const t = (n: string) => CSS_CODE.match(new RegExp(`\\.${n}\\s*\\{([^}]*)\\}`))?.[1] ?? ''
+ expect(t('t-label')).toContain('text-transform: uppercase')
+ expect(t('t-label')).toContain('letter-spacing')
+ expect(t('t-mono')).toContain('font-family')
+ expect(t('t-control')).toContain('var(--text-control-lh)')
+ expect(CSS_CODE).toMatch(/--text-control-lh:\s*1\s*;/)
+ })
+})
+
+// ── D-T03: die Anzeigeschrift war die ganze Zeit im Haus ───────────────
+
+const FONT_CSS_PFAD = resolve(ROOT, 'public', 'fonts', 'lu-fonts.css')
+
+describe('die Displaystufe traegt die Markenschrift, die schon ausgeliefert wird', () => {
+ const fontCss = readFileSync(FONT_CSS_PFAD, 'utf8')
+
+ it('lu-fonts.css enthaelt Space Grotesk — der Audit sagte, sie enthalte nur Inter', () => {
+ const familien = new Map<string, number>()
+ for (const m of fontCss.matchAll(/font-family:\s*'([^']+)'/g)) {
+ familien.set(m[1], (familien.get(m[1]) ?? 0) + 1)
+ }
+ expect([...familien.keys()].sort()).toEqual(['Inter', 'JetBrains Mono', 'Space Grotesk'])
+ expect(familien.get('Space Grotesk')).toBe(6)
+ })
+
+ it('und die Schriftdateien liegen wirklich da — keine tote Referenz', () => {
+ const bloecke = fontCss.split('@font-face').filter((b) => /Space Grotesk/.test(b))
+ expect(bloecke.length).toBe(6)
+ const dateien = new Set<string>()
+ for (const b of bloecke) {
+ const u = b.match(/url\(([^)]+)\)/)?.[1]
+ expect(u, 'Block ohne url()').toBeTruthy()
+ dateien.add(u as string)
+ }
+ for (const d of dateien) {
+ expect(existsSync(resolve(dirname(FONT_CSS_PFAD), d)), `fehlt: ${d}`).toBe(true)
+ }
+ // Drei Dateien fuer sechs Bloecke: 500 und 700 teilen sich je
+ // latin / latin-ext / vietnamese.
+ expect(dateien.size).toBe(3)
+ })
+
+ it('genau die Gewichte, die es gibt: 500 und 700', () => {
+ const gewichte = new Set<string>()
+ for (const b of fontCss.split('@font-face').filter((x) => /Space Grotesk/.test(x))) {
+ const w = b.match(/font-weight:\s*(\d+)/)?.[1]
+ if (w) gewichte.add(w)
+ }
+ expect([...gewichte].sort()).toEqual(['500', '700'])
+ })
+
+ it('index.html laedt die Datei — nichts wird nachgeladen', () => {
+ const html = readFileSync(resolve(ROOT, 'index.html'), 'utf8')
+ expect(html).toContain('/fonts/lu-fonts.css')
+ })
+
+ it('--font-display nennt Space Grotesk zuerst und hat einen echten Rueckfall', () => {
+ const wert = CSS_CODE.match(/--font-display:\s*([^;]+);/)?.[1] ?? ''
+ expect(wert).not.toBe('')
+ const stack = wert.split(',').map((s) => s.trim().replace(/^'|'$/g, ''))
+ expect(stack[0]).toBe('Space Grotesk')
+ expect(stack).toContain('Inter')
+ expect(stack[stack.length - 1]).toBe('sans-serif')
+ })
+
+ it('`.t-display` nimmt das Token — und keine zweite Schriftliste', () => {
+ const regel = CSS_CODE.match(/\.t-display\s*\{([^}]*)\}/)?.[1] ?? ''
+ // Genau eine Schriftangabe, und sie zeigt aufs Token statt eine zweite
+ // Liste zu fuehren.
+ const familien = regel.match(/font-family:[^;]*/g) ?? []
+ expect(familien).toEqual(['font-family: var(--font-display)'])
+ })
+
+ it('das Displaygewicht ist 500 — ein Schnitt, den die Datei wirklich hat', () => {
+ // Bei 600 waehlt Chromium nach der CSS-Font-Matching-Regel den
+ // naechsthoeheren echten Schnitt, also 700; im Fenster nachgemessen an
+ // der Textbreite (600 ergab exakt den 700er-Wert). Die Displaystufe
+ // haette still fett gerendert.
+ expect(CSS_CODE).toMatch(/--text-display-fw:\s*500\s*;/)
+ const gewichte = new Set<string>()
+ for (const b of fontCss.split('@font-face').filter((x) => /Space Grotesk/.test(x))) {
+ const w = b.match(/font-weight:\s*(\d+)/)?.[1]
+ if (w) gewichte.add(w)
+ }
+ expect(gewichte.has('500')).toBe(true)
+ })
+
+ it('die eine Call-Site der Displaystufe steht noch', () => {
+ const view = DATEIEN.find(([n]) => n === 'components/chat/ChatView.tsx')?.[1] ?? ''
+ expect(view).toMatch(/className="t-display/)
+ })
+})
diff --git a/src/components/__tests__/radius-schatten-hoehe-und-bewegung.test.ts b/src/components/__tests__/radius-schatten-hoehe-und-bewegung.test.ts
new file mode 100644
index 00000000..8e0a2328
--- /dev/null
+++ b/src/components/__tests__/radius-schatten-hoehe-und-bewegung.test.ts
@@ -0,0 +1,278 @@
+/**
+ * Vier Token-Zeilen, die nichts miteinander zu tun haben ausser der Krankheit:
+ * D-T08 (zwei Radiussysteme), D-T09 (ein Hellmodus-Schatten im Dunkeln),
+ * D-T07 (eine Controlhoehe neben der Leiter), D-T11 (`transition-all`).
+ *
+ * Sie stehen zusammen, weil jede fuer sich zwei Pruefungen braucht und vier
+ * Dateien mit je zwei Pruefungen schwerer zu lesen waeren als eine mit acht.
+ *
+ * ── D-T08: die Radiusleiter, am 01.09.2026 im Fenster nachgemessen ──
+ *
+ * rounded 4px rounded-lg 8px
+ * rounded-sm 4px rounded-xl 8px ← dieselbe Zahl wie lg
+ * rounded-md 6px rounded-2xl 10px
+ *
+ * `rounded-lg` und `rounded-xl` waren derselbe Wert. Wer eine Stufe ueber
+ * 8px meinte, musste in eckige Klammern: `rounded-[10px]` (3x),
+ * `rounded-[8px]` (8x), `rounded-[6px]` (4x), `rounded-[5px]` (20x). Und die
+ * sichtbarste Folge stand nebeneinander auf dem Bildschirm: die Hauptpane
+ * (`rounded-xl`, 8px) neben der Sidebar (`rounded-[10px]`, 10px) — zwei
+ * Flaechen einer Familie mit verschiedenen Ecken, gemessen mit
+ * getComputedStyle.
+ *
+ * Jetzt sind die px-Tokens des Hauses die Quelle und keine zwei Namen
+ * teilen sich einen Wert. Nachgemessen nach der Aenderung: Hauptpane 10px,
+ * Sidebar 10px.
+ *
+ * ── D-T09: ein Schatten kann im Dunkeln nichts heben ──
+ *
+ * Nicht „shadow-sm ist zu schwach eingestellt", sondern: ein Schatten kann
+ * nur abdunkeln, ist also nach unten durch Schwarz begrenzt. Diese Datei
+ * rechnet die Obergrenze nach.
+ *
+ * ── Was hier NICHT geprueft werden kann ──
+ *
+ * • ob 10px die richtige Ecke ist. Entscheidung, steht im Kommentar.
+ * • ob die Reiter in der Kopfzeile mit 32px besser aussehen. Der Grund
+ * fuer GENAU diese Stufe steht an der Call-Site; hier wird nur
+ * festgenagelt, dass es diese ist und keine andere.
+ * • ob die 42 verbliebenen `transition-all` alle noetig sind. Sie sind
+ * gezaehlt, nicht geprueft; die Analyse steht im Bericht.
+ *
+ * Run: npx vitest run src/components/__tests__/radius-schatten-hoehe-und-bewegung.test.ts
+ */
+import { describe, it, expect } from 'vitest'
+import { readFileSync, readdirSync } from 'node:fs'
+import { resolve } from 'node:path'
+import { contrast, over } from './wcag-contrast'
+
+const ROOT = resolve(__dirname, '..', '..', '..')
+const SRC = resolve(ROOT, 'src')
+const CSS = readFileSync(resolve(SRC, 'index.css'), 'utf8')
+const nurCode = (s: string) =>
+ s.replace(/\/\*[\s\S]*?\*\//g, '').replace(/(^|[^:])\/\/.*$/gm, '$1')
+const CSS_CODE = nurCode(CSS)
+
+function appDateien(dir = SRC): Array<[string, string]> {
+ const out: Array<[string, string]> = []
+ for (const e of readdirSync(dir, { withFileTypes: true })) {
+ if (e.name === '__tests__') continue
+ const p = resolve(dir, e.name)
+ if (e.isDirectory()) out.push(...appDateien(p))
+ else if (/\.tsx?$/.test(e.name)) out.push([p.slice(SRC.length + 1), readFileSync(p, 'utf8')])
+ }
+ return out
+}
+const DATEIEN = appDateien()
+const ALL = DATEIEN.map(([, s]) => s).join('\n')
+
+// ── Die Radiusleiter, aufgeloest wie der Browser sie aufloest ──────────
+
+/** Das Wurzelmass. Steht in index.css, wird nicht angenommen. */
+const WURZEL_PX = Number(CSS_CODE.match(/html\s*\{[^}]*font-size:\s*(\d+)px/)?.[1])
+
+/**
+ * Tailwinds eigene Radiusleiter, GELESEN statt angenommen — genauso, wie
+ * `icon-leiter.test.ts` lucides Formel aus dem Paket liest. Aendert ein
+ * Tailwind-Update die Werkseinstellung, faellt dieser Test und nicht erst
+ * der Blick ins Fenster.
+ */
+function tailwindRadien(): Map<string, string> {
+ const theme = readFileSync(resolve(ROOT, 'node_modules', 'tailwindcss', 'theme.css'), 'utf8')
+ const m = new Map<string, string>()
+ for (const t of theme.matchAll(/--radius-([a-z0-9]+):\s*([^;]+);/g)) m.set(t[1], t[2].trim())
+ return m
+}
+
+/** Unsere Ueberschreibungen aus dem @theme-Block. */
+function hausRadien(): Map<string, string> {
+ const block = CSS_CODE.match(/@theme\s*\{([\s\S]*?)\n\}/)?.[1] ?? ''
+ const m = new Map<string, string>()
+ for (const t of block.matchAll(/--radius-([a-z0-9]+):\s*([^;]+);/g)) m.set(t[1], t[2].trim())
+ return m
+}
+
+/** Die px-Tokens aus dem :root-Block. */
+function pxTokens(): Map<string, number> {
+ const m = new Map<string, number>()
+ for (const t of CSS_CODE.matchAll(/--radius-(control|panel|pill):\s*(\d+)px/g)) {
+ m.set(t[1], Number(t[2]))
+ }
+ return m
+}
+
+const PX = pxTokens()
+
+/** `0.5rem` / `10px` / `var(--radius-control)` → Zahl in CSS-Pixeln. */
+function aufloesen(wert: string): number {
+ const v = wert.trim()
+ const varRef = v.match(/^var\(--radius-(control|panel|pill)\)$/)
+ if (varRef) {
+ const n = PX.get(varRef[1])
+ if (n === undefined) throw new Error(`unbekanntes Token: ${v}`)
+ return n
+ }
+ if (v.endsWith('rem')) return parseFloat(v) * WURZEL_PX
+ if (v.endsWith('px')) return parseFloat(v)
+ throw new Error(`nicht aufloesbar: ${v}`)
+}
+
+/** Die Stufen, die die App wirklich schreibt. `rounded-full` ist keine Stufe. */
+const GENUTZTE_STUFEN = ['sm', 'md', 'lg', 'xl', '2xl'] as const
+
+function effektiveLeiter(): Map<string, number> {
+ const tw = tailwindRadien()
+ const haus = hausRadien()
+ const out = new Map<string, number>()
+ for (const name of GENUTZTE_STUFEN) {
+ const roh = haus.get(name) ?? tw.get(name)
+ if (roh === undefined) throw new Error(`keine Definition fuer --radius-${name}`)
+ out.set(name, aufloesen(roh))
+ }
+ return out
+}
+
+describe('EINE Radiusleiter, und keine zwei Namen auf derselben Zahl', () => {
+ it('das Wurzelmass ist 16px — sonst meinen rem und px nicht dasselbe', () => {
+ expect(WURZEL_PX).toBe(16)
+ })
+
+ it('jede genutzte Stufe hat genau einen Wert, und keine teilt ihn', () => {
+ const leiter = effektiveLeiter()
+ const werte = [...leiter.values()]
+ // DAS war der Befund: lg und xl standen beide auf 8.
+ expect(new Set(werte).size, `Kollision in ${JSON.stringify([...leiter])}`).toBe(werte.length)
+ })
+
+ it('und die Leiter steigt wirklich — sm < md < lg < xl < 2xl', () => {
+ const leiter = effektiveLeiter()
+ const werte = GENUTZTE_STUFEN.map((n) => leiter.get(n) as number)
+ for (let i = 1; i < werte.length; i++) {
+ expect(werte[i], `${GENUTZTE_STUFEN[i]} nicht groesser als ${GENUTZTE_STUFEN[i - 1]}`)
+ .toBeGreaterThan(werte[i - 1])
+ }
+ })
+
+ it('die px-Tokens des Hauses SIND die Leiter, nicht ein zweites System daneben', () => {
+ const haus = hausRadien()
+ // Nicht „zufaellig derselbe Zahlenwert", sondern woertlich dasselbe Token:
+ // wer --radius-control aendert, verschiebt rounded-lg mit.
+ expect(haus.get('lg')).toBe('var(--radius-control)')
+ expect(haus.get('2xl')).toBe('var(--radius-panel)')
+ const leiter = effektiveLeiter()
+ expect(leiter.get('lg')).toBe(PX.get('control'))
+ expect(leiter.get('2xl')).toBe(PX.get('panel'))
+ })
+
+ it('--radius-3xl ist weg, weil es niemand aufruft', () => {
+ // Es stand auf 0.75rem, hatte 0 Fundstellen und ergab im Browser als
+ // leere Variable 0px — eine Stufe, die beim ersten Gebrauch falsch
+ // gewesen waere.
+ expect(hausRadien().has('3xl')).toBe(false)
+ expect(ALL).not.toMatch(/(?<![\w-])rounded(?:-[a-z]+)?-3xl(?![\w-])/)
+ })
+
+ it('die Hauptpane und die Sidebar tragen dieselbe Ecke', () => {
+ // Der sichtbare Teil des Befunds. Die Sidebar gehoert in diesem
+ // Durchgang einem anderen Agenten, also wird sie hier GELESEN: ihre
+ // 10px sind der Massstab, an den die Pane geht.
+ const side = DATEIEN.find(([n]) => n === 'components/layout/Sidebar.tsx')?.[1] ?? ''
+ expect(side).toContain('rounded-[10px]')
+ const shell = DATEIEN.find(([n]) => n === 'components/layout/AppShell.tsx')?.[1] ?? ''
+ expect(shell).toMatch(/<main className="[^"]*rounded-xl/)
+ expect(effektiveLeiter().get('xl')).toBe(10)
+ })
+})
+
+// ── D-T09: der Schatten ist ein Hellmodus-Rezept ───────────────────────
+
+describe('ein Schatten kann im Dunkeln nichts heben — die Rechnung', () => {
+ /** Tailwinds `shadow-sm`: zwei Lagen a 10 % Schwarz; uebereinander 19 %. */
+ const ZWEI_LAGEN = 1 - (1 - 0.1) ** 2
+
+ it('shadow-sm traegt im Hellmodus und traegt im Dunkelmodus nicht', () => {
+ const sichtbarkeit = (grund: string, alpha: number) =>
+ contrast(over('#000000', grund, alpha), grund)
+
+ // hell: eine echte Stufe
+ expect(sichtbarkeit('#ffffff', ZWEI_LAGEN)).toBeGreaterThan(1.5)
+ expect(sichtbarkeit('#e5e7eb', ZWEI_LAGEN)).toBeGreaterThan(1.5)
+
+ // dunkel: unter dem, was dieses Haus schon einmal als „Rauschen"
+ // verworfen hat (die Pane-Kante im Hellmodus stand bei 1,008:1 und
+ // wurde in D-S42 genau deshalb ersetzt).
+ expect(sichtbarkeit('#141414', ZWEI_LAGEN)).toBeLessThan(1.05)
+ expect(sichtbarkeit('#1e1e1e', ZWEI_LAGEN)).toBeLessThan(1.07)
+ expect(sichtbarkeit('#363636', ZWEI_LAGEN)).toBeLessThan(1.16)
+ })
+
+ it('und es hilft nicht, ihn dunkler zu stellen: schwarz ist die Obergrenze', () => {
+ // Das ist der Kern und der Grund, warum hier kein „dunkler Schatten"
+ // erfunden wird, so wie bei --shadow-lg/xl/2xl.
+ expect(contrast('#000000', '#141414')).toBeLessThan(1.15)
+ expect(contrast('#000000', '#1e1e1e')).toBeLessThan(1.27)
+ // Zum Vergleich dieselbe Rechnung im Hellmodus.
+ expect(contrast('#000000', '#ffffff')).toBeGreaterThan(20)
+ // Eine Kante schafft dort mehr als jeder Schatten koennte.
+ expect(contrast(over('#ffffff', '#1e1e1e', 0.15), '#1e1e1e')).toBeGreaterThan(1.5)
+ })
+
+ it('die Regel schaltet GENAU den Schatten ab, nicht die Ringe daneben', () => {
+ // Tailwind 4 baut `box-shadow` aus fuenf Variablen zusammen.
+ // `box-shadow: none` haette jeden `ring-*` auf demselben Element
+ // mitgeloescht; im Fenster nachgemessen ueberlebt der Ring so.
+ const regel = CSS_CODE.match(/\.dark\s+\.shadow-sm\s*\{([^}]*)\}/)?.[1] ?? ''
+ expect(regel, 'es gibt keine .dark .shadow-sm-Regel').not.toBe('')
+ const deklarationen = regel.split(';').map((s) => s.trim()).filter(Boolean)
+ expect(deklarationen).toEqual(['--tw-shadow: 0 0 #0000'])
+ expect(regel).not.toContain('box-shadow')
+ })
+
+ it('im Hellmodus wird nichts abgeschaltet', () => {
+ expect(CSS_CODE).not.toMatch(/\.light\s+\.shadow-sm/)
+ })
+})
+
+// ── D-T07: eine Hoehe, und zwar genau diese ────────────────────────────
+
+describe('die Reiter der Kopfzeile stehen auf einer benannten Stufe', () => {
+ const header = DATEIEN.find(([n]) => n === 'components/layout/Header.tsx')?.[1] ?? ''
+
+ it('das Nav-Rezept nimmt --control-h-md — und nur sie', () => {
+ const rezept = header.match(/const NAV_BASE = '([^']*)'/)?.[1] ?? ''
+ expect(rezept, 'kein NAV_BASE gefunden').not.toBe('')
+ expect(rezept).toContain('h-[var(--control-h-md)]')
+ // Nicht bloss „keine rohe Hoehe", sondern die EXAKTE Stufe: mit sm
+ // oder lg faellt dieser Test genauso.
+ expect(rezept).not.toContain('--control-h-sm')
+ expect(rezept).not.toContain('--control-h-lg')
+ expect(rezept).not.toMatch(/(?<![\w-])h-\d/)
+ })
+
+ it('die Stufe ist wirklich 32px und nicht heimlich verschoben', () => {
+ expect(CSS_CODE).toMatch(/--control-h-md:\s*32px/)
+ })
+})
+
+// ── D-T11: transition-all ist gezaehlt und gedeckelt ───────────────────
+
+describe('transition-all darf nur schrumpfen', () => {
+ // Gemessen am 01.09.2026: 54 Fundstellen vorher, 42 nachher. Migriert
+ // wurden nur die, deren Zustandswechsel BEWEISBAR ausschliesslich
+ // Farbwerte betrifft (Rand immer vorhanden, nur Farbe wechselt).
+ // Ausdruecklich NICHT migriert: Stellen mit ring-Wechsel (box-shadow),
+ // mit Randbreite 0→1, mit opacity, und `.lu-primary`, dessen
+ // :disabled-Zustand `filter` und `opacity` animiert.
+ const SCHRANKE = 42
+
+ it(`hoechstens ${SCHRANKE} Fundstellen`, () => {
+ const n = (ALL.match(/(?<![\w-])transition-all(?![\w-])/g) ?? []).length
+ expect(n).toBeLessThanOrEqual(SCHRANKE)
+ })
+
+ it('die Motion-Leiter ist da, an die die naechste Stelle gehen kann', () => {
+ for (const t of ['--motion-fast', '--motion-base', '--motion-slow', '--motion-ease']) {
+ expect(CSS_CODE).toContain(t)
+ }
+ })
+})
diff --git a/src/components/__tests__/zwei-akzente-und-eine-leinwand.test.ts b/src/components/__tests__/zwei-akzente-und-eine-leinwand.test.ts
new file mode 100644
index 00000000..ea77de40
--- /dev/null
+++ b/src/components/__tests__/zwei-akzente-und-eine-leinwand.test.ts
@@ -0,0 +1,223 @@
+/**
+ * D-T05 (zwei Akzente nebeneinander) und D-T06 (die Shell malt Literale).
+ *
+ * ── D-T05: der Audit hatte recht in der Beobachtung und unrecht im Schluss ──
+ *
+ * Beobachtung, am 01.09.2026 nachgezaehlt: `--color-lu-accent` ist #a094f8,
+ * #7c3aed stand an 20 Stellen in drei Dateien als Literal, und das
+ * Brand-Kit-Violett #8b5cf6 kommt in `src/` 0x vor. Der naheliegende
+ * Schluss — auf EINEN Hex zusammenfallen — ist nachgerechnet falsch.
+ *
+ * Es sind keine zwei Marken, es sind zwei ROLLEN. #7c3aed steht
+ * ausschliesslich an der Cloud, und Cloud ist in dieser App ein
+ * Geldzustand. Und es ist die einzige Farbe der vier Kandidaten, die an
+ * ihren eigenen Call-Sites AA haelt. Dieser Test rechnet alle vier nach,
+ * damit die Ablehnung eine Zahl hat und keine Meinung ist.
+ *
+ * Geaendert wurde deshalb nicht die Farbe, sondern ihre Herkunft: aus
+ * zwanzig Literalen wird eine Definition.
+ *
+ * ── D-T06: EIN Token dazu, und begruendet KEINE gespiegelte Leiter ──
+ *
+ * Die Flaechenleiter hiess an ihrer untersten Stufe „app canvas", aber die
+ * Leinwand der App ist #141414 und nicht #202020. Gezaehlt:
+ *
+ * #141414 9 Fundstellen kein Token ← die meistbenutzte Flaeche
+ * #1e1e1e 5 Fundstellen kein Token
+ * --color-lu-base #202020 2 Fundstellen (zwei Modale)
+ * --color-lu-raised #2d2d2d 0 Fundstellen — im Fenster als LEERE
+ * Variable gemessen
+ *
+ * Ein Token dazu (`--color-lu-canvas`), und die Migration betrifft
+ * ausschliesslich die DUNKLE Seite: das helle Gegenstueck jeder Call-Site
+ * bleibt Zeichen fuer Zeichen stehen, der Tausch ist damit in beiden Modi
+ * folgenlos.
+ *
+ * ── Was hier NICHT geprueft werden kann ──
+ *
+ * • ob Violett die richtige Cloud-Farbe ist. Geprueft wird nur, dass sie
+ * lesbar ist und aus einer Quelle kommt.
+ * • ob #1e1e1e ein Token bekommen sollte. Es teilt seinen Wert mit der
+ * Sidebar, und die gehoert in diesem Durchgang einem anderen Agenten.
+ * • ob die drei verbliebenen #141414-Literale falsch sind. Sie stehen in
+ * Dateien, die dieser Durchgang nur lesen darf; sie sind hier gezaehlt.
+ *
+ * Run: npx vitest run src/components/__tests__/zwei-akzente-und-eine-leinwand.test.ts
+ */
+import { describe, it, expect } from 'vitest'
+import { readFileSync, readdirSync } from 'node:fs'
+import { resolve } from 'node:path'
+import { contrast, over } from './wcag-contrast'
+
+const SRC = resolve(__dirname, '..', '..')
+const CSS = readFileSync(resolve(SRC, 'index.css'), 'utf8')
+const nurCode = (s: string) =>
+ s.replace(/\/\*[\s\S]*?\*\//g, '').replace(/(^|[^:])\/\/.*$/gm, '$1')
+const CSS_CODE = nurCode(CSS)
+
+function appDateien(dir = SRC): Array<[string, string]> {
+ const out: Array<[string, string]> = []
+ for (const e of readdirSync(dir, { withFileTypes: true })) {
+ if (e.name === '__tests__') continue
+ const p = resolve(dir, e.name)
+ if (e.isDirectory()) out.push(...appDateien(p))
+ else if (/\.tsx?$/.test(e.name)) out.push([p.slice(SRC.length + 1), readFileSync(p, 'utf8')])
+ }
+ return out
+}
+const DATEIEN = appDateien()
+const ALL = DATEIEN.map(([, s]) => s).join('\n')
+
+/** Ein Farbtoken aus index.css lesen — nicht aus dem Gedaechtnis. */
+function token(name: string): string {
+ const v = CSS_CODE.match(new RegExp(`--color-${name}:\\s*(#[0-9a-fA-F]{6})`))?.[1]
+ if (!v) throw new Error(`kein Token --color-${name}`)
+ return v.toLowerCase()
+}
+
+// ── D-T05 ──────────────────────────────────────────────────────────────
+
+describe('der Cloud-Akzent ist eine Rolle, keine zweite Marke', () => {
+ const CLOUD = token('lu-cloud')
+ const LIFT = token('lu-cloud-lift')
+ const HAUS = token('lu-accent')
+ const KANTE = token('lu-accent-edge')
+ const BRANDKIT = '#8b5cf6'
+
+ /** Die sechs Textstellen der Cloud, mit ihren echten Deckungen. */
+ const stellen = (hell: string, dunkel: string) => [
+ contrast(hell, over(hell, '#ffffff', 0.15)), // Abzeichen ueber dem Eingabefeld
+ contrast(dunkel, over(dunkel, '#1e1e1e', 0.15)),
+ contrast(hell, over(hell, '#ffffff', 0.10)), // Cloud-Schalter
+ contrast(dunkel, over(dunkel, '#1e1e1e', 0.10)),
+ contrast(hell, over(hell, '#ffffff', 0.05)), // Kachel im Gate-Dialog
+ contrast(dunkel, over(dunkel, '#1e1e1e', 0.05)),
+ ]
+ const minimum = (hell: string, dunkel: string) => Math.min(...stellen(hell, dunkel))
+
+ it('das heutige Paar haelt AA an jeder seiner Stellen', () => {
+ expect(minimum(CLOUD, LIFT)).toBeGreaterThanOrEqual(4.5)
+ })
+
+ it('und jeder Kollaps auf EINE Farbe faellt durch — mit Zahlen', () => {
+ // A: nur der Haus-Akzent. B: das Brand-Kit-Violett. C: das Haus-PAAR.
+ // Alle drei liegen unter 4,5:1, alle drei kosten gegenueber heute.
+ const heute = minimum(CLOUD, LIFT)
+ const a = minimum(HAUS, HAUS)
+ const b = minimum(BRANDKIT, BRANDKIT)
+ const c = minimum(KANTE, HAUS)
+ for (const [name, wert] of [['A #a094f8', a], ['B #8b5cf6', b], ['C Hauspaar', c]] as const) {
+ expect(wert, `${name} haelt AA — dann waere die Ablehnung falsch`).toBeLessThan(4.5)
+ expect(wert, `${name} ist nicht schlechter als heute`).toBeLessThan(heute)
+ }
+ })
+
+ it('die gefuellte Cloud-Flaeche traegt weissen Text in BEIDEN Modi', () => {
+ // Sie hat bewusst kein dark:-Gegenstueck; deshalb muss die eine Farbe
+ // fuer beide reichen.
+ expect(contrast('#ffffff', CLOUD)).toBeGreaterThanOrEqual(4.5)
+ // Mit dem Haus-Akzent waere genau das nicht mehr wahr.
+ expect(contrast('#ffffff', HAUS)).toBeLessThan(3)
+ })
+
+ it('kein einziges Cloud-Literal ist uebrig', () => {
+ const orte: string[] = []
+ for (const [name, src] of DATEIEN) {
+ for (const m of src.matchAll(/#(?:7c3aed|a78bfa)/gi)) orte.push(`${name}: ${m[0]}`)
+ }
+ expect(orte).toEqual([])
+ })
+
+ it('und die Tokens werden wirklich aufgerufen', () => {
+ expect((ALL.match(/(?<![\w-])(?:[a-z-]+:)*(?:bg|text|border|ring)-lu-cloud(?![\w-])/g) ?? []).length)
+ .toBeGreaterThanOrEqual(10)
+ expect(ALL).toContain('dark:text-lu-cloud-lift')
+ })
+
+ it('das Brand-Kit-Violett kommt weiterhin nirgends vor', () => {
+ // Der Audit fuehrte es als „die eigentliche Wahrheit". Es hat in
+ // dieser App nie eine Call-Site gehabt, und es bekommt hier keine.
+ expect(ALL.toLowerCase()).not.toContain(BRANDKIT)
+ expect(CSS_CODE.toLowerCase()).not.toContain(BRANDKIT)
+ })
+})
+
+// ── D-T06 ──────────────────────────────────────────────────────────────
+
+describe('die Leinwand hat einen Namen bekommen', () => {
+ it('--color-lu-canvas ist genau der Wert, der vorher als Literal dastand', () => {
+ expect(token('lu-canvas')).toBe('#141414')
+ })
+
+ it('die sechs erreichbaren Call-Sites nehmen das Token', () => {
+ const erwartet = [
+ 'components/layout/AppShell.tsx',
+ 'components/layout/Header.tsx',
+ 'components/layout/Titlebar.tsx',
+ 'components/layout/ViewSkeletons.tsx',
+ 'components/ui/ContextMenu.tsx',
+ ]
+ for (const f of erwartet) {
+ const src = DATEIEN.find(([n]) => n === f)?.[1] ?? ''
+ expect(src, f).not.toBe('')
+ expect(src, `${f} nimmt das Token nicht`).toContain('dark:bg-lu-canvas')
+ expect(src, `${f} hat noch ein Literal`).not.toContain('dark:bg-[#141414]')
+ }
+ // Titlebar zeichnet zwei Varianten desselben Balkens.
+ const tb = DATEIEN.find(([n]) => n === 'components/layout/Titlebar.tsx')?.[1] ?? ''
+ expect((tb.match(/dark:bg-lu-canvas/g) ?? []).length).toBe(2)
+ })
+
+ it('jede Call-Site behaelt ihr eigenes Hell-Gegenstueck — der Tausch ist folgenlos', () => {
+ // DAS ist der Grund, warum der Tausch keine Farbe bewegt: die dunkle
+ // Seite wechselt die Schreibweise, die helle bleibt unangetastet.
+ for (const [, src] of DATEIEN) {
+ for (const m of src.matchAll(/[\w-/[\].]*\bdark:bg-lu-canvas\b/g)) {
+ const zeile = src.split('\n').find((z) => z.includes(m[0])) ?? ''
+ expect(zeile, `ohne Hell-Gegenstueck: ${zeile.trim().slice(0, 90)}`)
+ .toMatch(/(?<![\w-:])bg-(white|gray-200)(?![\w-])/)
+ }
+ }
+ })
+
+ it('die drei unerreichbaren Literale sind gezaehlt, nicht uebersehen', () => {
+ // Sidebar und die beiden Create-Dateien gehoeren in diesem Durchgang
+ // anderen Agenten. Die Zahl darf sinken, nicht steigen.
+ const rest = DATEIEN
+ .filter(([, s]) => s.includes('dark:bg-[#141414]'))
+ .map(([n]) => n)
+ .sort()
+ expect(rest).toEqual([
+ 'components/create/experimental/CreateExperimental.tsx',
+ 'components/create/experimental/MaskEditor.tsx',
+ 'components/layout/Sidebar.tsx',
+ ])
+ })
+
+ it('es gibt bewusst KEINE gespiegelte Hell-Leiter', () => {
+ // Der Vorschlag lautete, `--color-lu-*` im `.light`-Block zu spiegeln.
+ // Nachgezaehlt zerfaellt #141414 im Hellmodus in zwei Rollen — die
+ // Fundstellen tragen `bg-gray-200` ODER `bg-white` als Gegenstueck —,
+ // eine Spiegelung muesste also eine der beiden falsch faerben.
+ const gegenstuecke = new Set<string>()
+ for (const [, src] of DATEIEN) {
+ for (const zeile of src.split('\n')) {
+ if (!zeile.includes('dark:bg-lu-canvas')) continue
+ const m = zeile.match(/(?<![\w-:])bg-(white|gray-200)(?![\w-])/)
+ if (m) gegenstuecke.add(m[1])
+ }
+ }
+ expect([...gegenstuecke].sort()).toEqual(['gray-200', 'white'])
+ expect(CSS_CODE).not.toMatch(/\.light\s*\{[^}]*--color-lu-(canvas|base|panel|raised|overlay)/)
+ })
+
+ it('das tote Token steht als tot da', () => {
+ // --color-lu-raised hat 0 Call-Sites. Es zu entfernen waere eine
+ // eigene Entscheidung; es unbeschriftet stehen zu lassen war der
+ // Zustand, aus dem der Befund entstand.
+ expect(ALL).not.toMatch(/(?<![\w-])(?:[a-z-]+:)*(?:bg|text|border|ring)-lu-raised(?![\w-])/)
+ const zeile = CSS.split('\n').find((z) => /^\s*--color-lu-raised:/.test(z)) ?? ''
+ expect(zeile, 'keine Deklarationszeile gefunden').not.toBe('')
+ expect(zeile).toContain('0 Call-Sites')
+ })
+})
diff --git a/src/components/agents/AgentLog.tsx b/src/components/agents/AgentLog.tsx
index 73b0abc7..72aeba77 100644
--- a/src/components/agents/AgentLog.tsx
+++ b/src/components/agents/AgentLog.tsx
@@ -41,7 +41,7 @@ export function AgentLog({ entries, onApprove, onReject }: Props) {
return (
<div className="flex flex-col h-full min-h-0">
- <div className="flex items-center gap-1.5 text-[0.75rem] text-gray-400 mb-2 font-medium flex-shrink-0">
+ <div className="flex items-center gap-1.5 text-[12px] text-gray-400 mb-2 font-medium flex-shrink-0">
<ScrollText size={13} />
Agent Log ({entries.length})
</div>
@@ -67,7 +67,7 @@ export function AgentLog({ entries, onApprove, onReject }: Props) {
</div>
<div
className={`text-[0.8rem] leading-relaxed whitespace-pre-wrap break-words ${
- entry.type === 'observation' ? 'font-mono text-[0.75rem]' : ''
+ entry.type === 'observation' ? 'font-mono text-[12px]' : ''
} ${style.text}`}
>
{entry.content}
diff --git a/src/components/agents/TaskBreakdown.tsx b/src/components/agents/TaskBreakdown.tsx
index 140b6bd3..76a73361 100644
--- a/src/components/agents/TaskBreakdown.tsx
+++ b/src/components/agents/TaskBreakdown.tsx
@@ -39,7 +39,7 @@ export function TaskBreakdown({ tasks }: Props) {
if (tasks.length === 0) {
return (
- <div className="text-[0.75rem] text-gray-500 py-2">
+ <div className="text-[12px] text-gray-500 py-2">
<div className="flex items-center gap-1.5 text-gray-400 mb-2 font-medium">
<Wrench size={13} />
Tasks
@@ -51,7 +51,7 @@ export function TaskBreakdown({ tasks }: Props) {
return (
<div>
- <div className="flex items-center gap-1.5 text-[0.75rem] text-gray-400 mb-2 font-medium">
+ <div className="flex items-center gap-1.5 text-[12px] text-gray-400 mb-2 font-medium">
<Wrench size={13} />
Tasks ({tasks.filter((t) => t.status === 'completed').length}/{tasks.length})
</div>
diff --git a/src/components/agents/WorkflowBuilder.tsx b/src/components/agents/WorkflowBuilder.tsx
index 783db215..3b6581f2 100644
--- a/src/components/agents/WorkflowBuilder.tsx
+++ b/src/components/agents/WorkflowBuilder.tsx
@@ -101,7 +101,7 @@ export function WorkflowBuilder({ workflowId, onSave, onCancel }: WorkflowBuilde
<button onClick={onCancel} className="p-1 rounded hover:bg-white/10 text-gray-400">
<ArrowLeft size={14} />
</button>
- <h3 className="text-[0.75rem] font-semibold text-white">
+ <h3 className="text-[12px] font-semibold text-white">
{workflowId ? 'Edit Workflow' : 'New Workflow'}
</h3>
</div>
diff --git a/src/components/agents/WorkflowList.tsx b/src/components/agents/WorkflowList.tsx
index 5bf53c52..ca4d7b81 100644
--- a/src/components/agents/WorkflowList.tsx
+++ b/src/components/agents/WorkflowList.tsx
@@ -36,7 +36,7 @@ export function WorkflowList({ onRun, onEdit, onCreate }: WorkflowListProps) {
return (
<div
key={workflow.id}
- className="flex items-center gap-2.5 px-2.5 py-2 rounded-lg hover:bg-white/[0.03] group border border-transparent hover:border-white/5 transition-all"
+ className="flex items-center gap-2.5 px-2.5 py-2 rounded-lg hover:bg-white/[0.03] group border border-transparent hover:border-white/5 transition-colors"
>
<div className="w-7 h-7 rounded-lg bg-white/5 flex items-center justify-center shrink-0">
<Icon size={13} className="text-gray-400" />
diff --git a/src/components/chat/AgentModeToggle.tsx b/src/components/chat/AgentModeToggle.tsx
index ffe55a28..116a2e2f 100644
--- a/src/components/chat/AgentModeToggle.tsx
+++ b/src/components/chat/AgentModeToggle.tsx
@@ -169,7 +169,7 @@ export function AgentModeToggle() {
</div>
<h3 className="text-base font-semibold text-white">New Chat Required</h3>
- <p className="text-[0.75rem] text-gray-400 leading-relaxed">
+ <p className="text-[12px] text-gray-400 leading-relaxed">
Agent Mode needs to be active from the start of a conversation to work properly. Start a new chat with Agent Mode enabled.
</p>
</motion.div>
diff --git a/src/components/chat/AgentWorkspaceDialog.tsx b/src/components/chat/AgentWorkspaceDialog.tsx
index 57e0660d..0d7c52a2 100644
--- a/src/components/chat/AgentWorkspaceDialog.tsx
+++ b/src/components/chat/AgentWorkspaceDialog.tsx
@@ -272,7 +272,7 @@ function WorkspaceOption({ icon, title, body, monoBody, onClick, disabled }: Opt
>
<span className="mt-0.5 shrink-0">{icon}</span>
<span className="flex-1 min-w-0">
- <span className="block text-[0.75rem] font-medium text-gray-900 dark:text-white">
+ <span className="block text-[12px] font-medium text-gray-900 dark:text-white">
{title}
</span>
<span
diff --git a/src/components/chat/ChatInput.tsx b/src/components/chat/ChatInput.tsx
index ad2a260b..cb0e2825 100644
--- a/src/components/chat/ChatInput.tsx
+++ b/src/components/chat/ChatInput.tsx
@@ -284,7 +284,7 @@ export function ChatInput({ onSend, onStop, isGenerating, pendingApproval, onApp
isDragOver
? 'bg-blue-500/5 border-blue-500/30'
: cloudMode
- ? 'bg-[#7c3aed]/[0.04] border-[#7c3aed]/40 focus-within:border-[#7c3aed]/70'
+ ? 'bg-lu-cloud/[0.04] border-lu-cloud/40 focus-within:border-lu-cloud/70'
: 'bg-gray-50 dark:bg-white/[0.03] border-gray-200 dark:border-white/[0.06] focus-within:border-gray-400 dark:focus-within:border-white/15'
}`}
onDragOver={handleDragOver}
@@ -399,7 +399,7 @@ export function ChatInput({ onSend, onStop, isGenerating, pendingApproval, onApp
placeholder={disabled ? "Unavailable" : isDragOver ? "Drop images here..." : isTranscribing ? "Transcribing..." : isVoiceRecording ? "Recording..." : "Message..."}
disabled={disabled}
rows={1}
- className="w-full bg-transparent resize-none text-gray-800 dark:text-gray-200 placeholder-gray-400 dark:placeholder-gray-600 focus:outline-none text-[0.75rem] leading-relaxed max-h-[200px] disabled:opacity-50 scrollbar-thin"
+ className="w-full bg-transparent resize-none text-gray-800 dark:text-gray-200 placeholder-gray-400 dark:placeholder-gray-600 focus:outline-none text-[12px] leading-relaxed max-h-[200px] disabled:opacity-50 scrollbar-thin"
/>
</div>
@@ -486,7 +486,7 @@ export function ChatInput({ onSend, onStop, isGenerating, pendingApproval, onApp
<span
data-testid="composer-cloud-state"
title="Cloud mode: this message runs on LU's hosted GPUs and is billed to your lu-labs.ai credits. The Cloud switch up in the header turns it off."
- className="flex items-center gap-1 px-1.5 py-1.5 rounded-md shrink-0 text-[0.6rem] font-medium bg-[#7c3aed]/15 text-[#7c3aed] dark:text-[#a78bfa] border border-[#7c3aed]/30"
+ className="flex items-center gap-1 px-1.5 py-1.5 rounded-md shrink-0 text-[0.6rem] font-medium bg-lu-cloud/15 text-lu-cloud dark:text-lu-cloud-lift border border-lu-cloud/30"
>
<img
src={MONOGRAM}
diff --git a/src/components/chat/ChatView.tsx b/src/components/chat/ChatView.tsx
index 9d21ded7..11fa1b73 100644
--- a/src/components/chat/ChatView.tsx
+++ b/src/components/chat/ChatView.tsx
@@ -454,7 +454,7 @@ export function ChatView() {
<button
onClick={remoteClearError}
title="Dismiss error"
- className="p-0.5 rounded text-red-400/70 hover:text-red-300 hover:bg-red-500/15 transition-all"
+ className="p-0.5 rounded text-red-400/70 hover:text-red-300 hover:bg-red-500/15 transition-colors"
>
<X size={9} />
</button>
diff --git a/src/components/chat/CodexConfirmDialog.tsx b/src/components/chat/CodexConfirmDialog.tsx
index 69464319..807b75e7 100644
--- a/src/components/chat/CodexConfirmDialog.tsx
+++ b/src/components/chat/CodexConfirmDialog.tsx
@@ -40,7 +40,7 @@ export function CodexConfirmDialog() {
<span className="text-gray-500">needs your ok</span>
</div>
- <pre className="mt-1 max-h-20 overflow-auto rounded bg-black/5 dark:bg-black/30 px-1.5 py-1 text-[0.63rem] font-mono text-gray-800 dark:text-gray-200 whitespace-pre-wrap break-all">
+ <pre className="mt-1 max-h-20 overflow-auto rounded bg-black/5 dark:bg-black/30 px-1.5 py-1 t-micro font-mono text-gray-800 dark:text-gray-200 whitespace-pre-wrap break-all">
{pending.command || '(no command preview)'}
</pre>
diff --git a/src/components/chat/CodexView.tsx b/src/components/chat/CodexView.tsx
index 90fb45cb..5a9c73f4 100644
--- a/src/components/chat/CodexView.tsx
+++ b/src/components/chat/CodexView.tsx
@@ -367,7 +367,7 @@ export function CodexView() {
if (!answer || skippedAnswers.has(block.id)) return null
return (
<div key={block.id} className="px-1 py-0.5">
- <div className="text-[0.75rem] leading-relaxed">
+ <div className="text-[12px] leading-relaxed">
<MarkdownRenderer content={answer} />
</div>
</div>
@@ -399,7 +399,7 @@ export function CodexView() {
? 'rounded-lg px-2.5 py-1.5 bg-gray-100 dark:bg-white/[0.06] border border-gray-200 dark:border-white/[0.08]'
: 'px-1 py-0.5'
}>
- <div className="text-[0.75rem] leading-relaxed">
+ <div className="text-[12px] leading-relaxed">
{msg.role === 'user' ? (
<p className="text-gray-800 dark:text-gray-200 whitespace-pre-wrap">{cleanContent}</p>
) : (
@@ -455,7 +455,7 @@ export function CodexView() {
if (prev && stripChannelTags(prev.content) === answer) return null
return (
<div key={block.id} className="px-1 py-0.5">
- <div className="text-[0.75rem] leading-relaxed">
+ <div className="text-[12px] leading-relaxed">
<MarkdownRenderer content={answer} />
</div>
</div>
@@ -467,7 +467,7 @@ export function CodexView() {
)}
{finalAnswerText && (
<div className="px-1 py-0.5">
- <div className="text-[0.75rem] leading-relaxed">
+ <div className="text-[12px] leading-relaxed">
<MarkdownRenderer content={finalAnswerText} />
</div>
</div>
diff --git a/src/components/cloud/CloudGateModal.tsx b/src/components/cloud/CloudGateModal.tsx
index 33157f6f..894b7da7 100644
--- a/src/components/cloud/CloudGateModal.tsx
+++ b/src/components/cloud/CloudGateModal.tsx
@@ -37,9 +37,9 @@ function PlanGrid() {
<button
key={p.anchor}
onClick={() => void openExternal(`${CLOUD_BASE}/pricing#${p.anchor}`)}
- className="flex flex-col items-center gap-0.5 px-2 py-3 rounded-lg border border-[#7c3aed]/40 bg-[#7c3aed]/5 hover:bg-[#7c3aed]/15 transition-colors"
+ className="flex flex-col items-center gap-0.5 px-2 py-3 rounded-lg border border-lu-cloud/40 bg-lu-cloud/5 hover:bg-lu-cloud/15 transition-colors"
>
- <span className="text-[0.8rem] font-semibold text-[#7c3aed] dark:text-[#a78bfa]">{p.name}</span>
+ <span className="text-[0.8rem] font-semibold text-lu-cloud dark:text-lu-cloud-lift">{p.name}</span>
<span className="text-[0.62rem] font-medium text-gray-500 dark:text-gray-400">
{p.price}<span className="text-gray-400 dark:text-gray-500">/mo</span>
</span>
@@ -78,7 +78,7 @@ function CloudHero({ subtitle }: { subtitle?: string }) {
/>
<h2 className="text-xl font-semibold text-gray-900 dark:text-white">LU Cloud</h2>
{subtitle && (
- <p className="text-[0.75rem] leading-relaxed text-gray-600 dark:text-gray-400 max-w-xs">{subtitle}</p>
+ <p className="text-[12px] leading-relaxed text-gray-600 dark:text-gray-400 max-w-xs">{subtitle}</p>
)}
</div>
)
@@ -153,7 +153,7 @@ export function CloudGateModal() {
}, [open, refresh])
const primaryBtn =
- 'w-full flex items-center justify-center gap-1.5 px-3 py-2 rounded-lg text-[0.72rem] font-medium bg-[#7c3aed] text-white hover:opacity-90 transition-opacity'
+ 'w-full flex items-center justify-center gap-1.5 px-3 py-2 rounded-lg text-[0.72rem] font-medium bg-lu-cloud text-white hover:opacity-90 transition-opacity'
const ghostBtn =
'w-full flex items-center justify-center gap-1.5 px-3 py-2 rounded-lg text-[0.72rem] font-medium border border-gray-200 dark:border-white/10 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-white/5 transition-colors'
const linkRow =
diff --git a/src/components/cloud/CloudSwitch.tsx b/src/components/cloud/CloudSwitch.tsx
index 7364a17d..981a45dd 100644
--- a/src/components/cloud/CloudSwitch.tsx
+++ b/src/components/cloud/CloudSwitch.tsx
@@ -81,9 +81,9 @@ export function CloudSwitch() {
className={cn(
'flex items-center gap-1.5 pl-2 pr-1.5 py-[3px] rounded-full border transition-colors',
on
- ? 'border-[#7c3aed] bg-[#7c3aed]/10 text-[#7c3aed] dark:text-[#a78bfa]'
+ ? 'border-lu-cloud bg-lu-cloud/10 text-lu-cloud dark:text-lu-cloud-lift'
: armed
- ? 'border-[#7c3aed] bg-[#7c3aed]/10 text-[#7c3aed] dark:text-[#a78bfa] ring-1 ring-[#7c3aed]/40'
+ ? 'border-lu-cloud bg-lu-cloud/10 text-lu-cloud dark:text-lu-cloud-lift ring-1 ring-lu-cloud/40'
: 'border-gray-200 dark:border-white/10 text-gray-500 hover:text-gray-800 dark:hover:text-gray-200 hover:border-gray-300 dark:hover:border-white/20',
)}
>
@@ -112,7 +112,7 @@ export function CloudSwitch() {
aria-hidden
className={cn(
'relative w-[22px] h-[12px] rounded-full transition-colors shrink-0',
- on ? 'bg-[#7c3aed]' : armed ? 'bg-[#7c3aed]/50' : 'bg-gray-300 dark:bg-white/15',
+ on ? 'bg-lu-cloud' : armed ? 'bg-lu-cloud/50' : 'bg-gray-300 dark:bg-white/15',
)}
>
<span
diff --git a/src/components/layout/AppShell.tsx b/src/components/layout/AppShell.tsx
index 988c11a3..16e09e78 100644
--- a/src/components/layout/AppShell.tsx
+++ b/src/components/layout/AppShell.tsx
@@ -961,14 +961,26 @@ function AppShellTree() {
anderen Agenten — eine Kante nur an der Pane zu schaerfen haette zwei
Raender aus einer Familie auseinanderlaufen lassen.
- Was hier NICHT passiert und warum: die Literale wurden NICHT durch
- `bg-lu-*` ersetzt. Die vier Flaechentokens in `index.css:21-24` sind
- reine DUNKEL-Werte ohne `.light`-Gegenstueck; `bg-lu-base` wuerde im
- Hellmodus #202020 malen. Und die beiden Familien lassen sich auch dunkel
- nicht sauber migrieren: fuer #141414 (Leinwand + Header + Titlebar) gibt
- es gar kein Token, und #1e1e1e (Pane) teilt sich die Pane mit der
- Sidebar. Die fehlenden Zeilen stehen im Bericht. */
- <div className="h-screen w-screen overflow-hidden bg-gray-200 dark:bg-[#141414] text-gray-900 dark:text-gray-100">
+ NACHTRAG D-T06 (01.09.2026): hier stand, die Literale liessen sich
+ nicht durch ein Token ersetzen, weil es fuer die Leinwand keins gab.
+ Der zweite Halbsatz stimmte, der erste nicht. Es gibt jetzt eins —
+ `--color-lu-canvas` in index.css, mit genau dem Wert, der hier stand.
+ Ersetzt ist ausschliesslich die DUNKLE Seite; das helle
+ `bg-gray-200` bleibt Zeichen fuer Zeichen stehen. Der Tausch ist
+ damit im Browser folgenlos, in beiden Modi.
+
+ Was weiterhin NICHT passiert: eine `.light`-Spiegelung der Leiter.
+ Nachgezaehlt zerfaellt #141414 im Hellmodus in ZWEI Rollen —
+ Fensterrahmen (`bg-gray-200`: hier, Titlebar, Header) und Vollflaeche
+ (`bg-white`: ViewSkeletons, Kontextmenues, die Create-Wurzel). Eine
+ gespiegelte Leiter muesste eine der beiden falsch faerben. Die
+ Begruendung steht ausfuehrlich am Token selbst.
+
+ Und #1e1e1e (die Pane, eine Zeile tiefer) bleibt Literal: sie teilt
+ ihren Wert mit der Sidebar, und die gehoert in diesem Durchgang einem
+ anderen Agenten. Ein halb migriertes Paar waere schlechter als ein
+ ganzes Literal. */
+ <div className="h-screen w-screen overflow-hidden bg-gray-200 dark:bg-lu-canvas text-gray-900 dark:text-gray-100">
<div className="h-full flex flex-col">
<Titlebar />
<Header />
diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsx
index f4f087f3..809658b0 100644
--- a/src/components/layout/Header.tsx
+++ b/src/components/layout/Header.tsx
@@ -171,12 +171,31 @@ export function Header() {
}
// ONE recipe for every nav item, in the bar and in the overflow menu alike:
- // h-7 so each one is a real click target instead of a 9px word, a filled
- // rounded-md for the active view so "where am I" survives a glance, and the
- // idle/hover pair as the only other state. Bare colour-only labels gave the
- // active tab no hit area and no boundary, which is why the row read as
- // running text rather than as navigation.
- const NAV_BASE = 'flex items-center h-7 px-2 rounded-md text-[0.68rem] font-medium transition-colors'
+ // a real click target instead of a 9px word, a filled rounded-md for the
+ // active view so "where am I" survives a glance, and the idle/hover pair as
+ // the only other state. Bare colour-only labels gave the active tab no hit
+ // area and no boundary, which is why the row read as running text rather
+ // than as navigation.
+ //
+ // D-T07: die Hoehe war 28px und stand damit neben, nicht auf der Leiter
+ // (26/32/40). Gemessen am laufenden Fenster hatte diese Leiste fuenf
+ // verschiedene Control-Hoehen nebeneinander — 19,73 / 20 / 21,98 / 22,99
+ // und diese 28 —, keine einzige davon benannt. Die Reiter nehmen jetzt
+ // --control-h-md, die Stufe, die index.css woertlich "default control
+ // height" nennt.
+ //
+ // Zuordnung nach BEDEUTUNG, nicht nach naechstem Zahlenwert — genau wie
+ // in der Sidebar (287903aa): --control-h-sm (26) ist das Mass der
+ // Composer-Werkzeugleiste, und dass 26 naeher an 28 liegt als 32, ist
+ // kein Argument. Dies ist die oberste Navigation der App in einer
+ // 40px-Leiste; sie nimmt die Standardstufe und laesst 4px Luft nach oben
+ // und unten.
+ //
+ // Die vier kleineren Hoehen dieser Leiste bleiben ungeaendert: es sind
+ // reine Icon-Knoepfe, die ihre Hoehe aus dem Innenabstand ziehen, und
+ // eine Leiter fuer Icon-Flaechen ist eine eigene Entscheidung — der
+ // Befund steht im Bericht, nicht als halbe Aenderung hier.
+ const NAV_BASE = 'flex items-center h-[var(--control-h-md)] px-2 rounded-md text-[0.68rem] font-medium transition-colors'
// Aktiv = eine FLAECHE, in beiden Modi (D-A6 wollte das, hell hatte es nie).
// Gemessen am laufenden Fenster: die aktive Pille war hell `bg-gray-100` auf
// einer `bg-gray-100`-Leiste — derselbe Farbwert, Kontrast 1,000:1. Der
@@ -284,7 +303,7 @@ export function Header() {
Nebeneffekt, gemessen: die aktive Nav-Pille und die Hover-Flaeche der
Fensterknoepfe waren beide `gray-100` auf `gray-100` und damit
unsichtbar; sie haben jetzt Grund unter sich. */
- <header className="h-10 grid grid-cols-[auto_1fr_auto] items-center px-3 bg-gray-200 dark:bg-[#141414] z-40 gap-4">
+ <header className="h-10 grid grid-cols-[auto_1fr_auto] items-center px-3 bg-gray-200 dark:bg-lu-canvas z-40 gap-4">
{/* Left: Sidebar + Logo */}
<div className="flex items-center gap-2 min-w-0">
<button
diff --git a/src/components/layout/Titlebar.tsx b/src/components/layout/Titlebar.tsx
index 3320940a..2a116eb7 100644
--- a/src/components/layout/Titlebar.tsx
+++ b/src/components/layout/Titlebar.tsx
@@ -81,7 +81,7 @@ export function Titlebar() {
return (
<div
data-tauri-drag-region
- className="h-8 flex items-center justify-end bg-gray-200 dark:bg-[#141414] select-none pl-[80px] pr-3"
+ className="h-8 flex items-center justify-end bg-gray-200 dark:bg-lu-canvas select-none pl-[80px] pr-3"
>
<img src={MONOGRAM} alt="" width={18} height={18} className="pointer-events-none dark:invert-0 invert opacity-80" />
</div>
@@ -91,7 +91,7 @@ export function Titlebar() {
return (
<div
data-tauri-drag-region
- className="h-8 flex items-center justify-between bg-gray-200 dark:bg-[#141414] select-none"
+ className="h-8 flex items-center justify-between bg-gray-200 dark:bg-lu-canvas select-none"
>
{/* Left: App icon + title */}
<div data-tauri-drag-region className="flex items-center gap-1.5 pl-3">
diff --git a/src/components/layout/ViewSkeletons.tsx b/src/components/layout/ViewSkeletons.tsx
index ebcbf6de..3a5ffa9b 100644
--- a/src/components/layout/ViewSkeletons.tsx
+++ b/src/components/layout/ViewSkeletons.tsx
@@ -143,7 +143,7 @@ export function BenchmarkSkeleton() {
export function CreateSkeleton() {
return (
<Shell label="Loading create">
- <div className="relative h-full w-full flex flex-col bg-white dark:bg-[#141414] overflow-hidden">
+ <div className="relative h-full w-full flex flex-col bg-white dark:bg-lu-canvas overflow-hidden">
<div className="shrink-0 flex items-center gap-2 px-4 py-2.5 border-b border-gray-200 dark:border-white/[0.06]">
{[56, 56, 56, 56].map((w, i) => (
<div key={i} style={{ width: w }}><Bar className="h-6 rounded-md" /></div>
diff --git a/src/components/layout/__tests__/hellmodus-hat-ebenen.test.ts b/src/components/layout/__tests__/hellmodus-hat-ebenen.test.ts
index 48cfa64e..2f949e16 100644
--- a/src/components/layout/__tests__/hellmodus-hat-ebenen.test.ts
+++ b/src/components/layout/__tests__/hellmodus-hat-ebenen.test.ts
@@ -36,6 +36,15 @@ const LAYOUT = resolve(__dirname, '..')
const SHELL = readFileSync(resolve(LAYOUT, 'AppShell.tsx'), 'utf-8')
const HEADER = readFileSync(resolve(LAYOUT, 'Header.tsx'), 'utf-8')
const TITLEBAR = readFileSync(resolve(LAYOUT, 'Titlebar.tsx'), 'utf-8')
+const CSS = readFileSync(resolve(LAYOUT, '..', '..', 'index.css'), 'utf-8')
+
+/** '#141414' -> [20, 20, 20]. Damit die Farbe des Tokens hier nachgerechnet
+ * und nicht abgeschrieben wird. */
+const hex = (s: string): readonly [number, number, number] => [
+ parseInt(s.slice(1, 3), 16),
+ parseInt(s.slice(3, 5), 16),
+ parseInt(s.slice(5, 7), 16),
+]
/* ── WCAG 2.1, relative Luminanz und Kontrastverhaeltnis ─────────────────── */
type RGB = readonly [number, number, number]
@@ -93,7 +102,14 @@ describe('so steht es jetzt', () => {
})
it('der Wert steht wirklich an der Leinwand', () => {
- expect(SHELL).toMatch(/className="h-screen w-screen overflow-hidden bg-gray-200 dark:bg-\[#141414\]/)
+ // Die dunkle Haelfte heisst seit D-T06 `dark:bg-lu-canvas` statt
+ // `dark:bg-[#141414]`. Der WERT ist derselbe — das Token ist in
+ // index.css auf #141414 definiert und wird dort gegengeprueft
+ // (components/__tests__/zwei-akzente-und-eine-leinwand.test.ts). Die
+ // helle Haelfte, um die es in diesem Befund geht, ist unangetastet.
+ expect(SHELL).toMatch(/className="h-screen w-screen overflow-hidden bg-gray-200 dark:bg-lu-canvas/)
+ expect(DARK_CANVAS).toEqual(hex('#141414'))
+ expect(CSS).toMatch(/--color-lu-canvas:\s*#141414/)
})
it('die Pane und der Ring sind NICHT angefasst', () => {
@@ -104,17 +120,20 @@ describe('so steht es jetzt', () => {
})
describe('Kopfzeile und Fensterbalken gehoeren zur Leinwand, in beiden Modi', () => {
- it('dunkel teilen sie sich seit jeher #141414', () => {
- expect(SHELL).toContain('dark:bg-[#141414]')
- expect(HEADER).toContain('dark:bg-[#141414]')
- expect(TITLEBAR).toContain('dark:bg-[#141414]')
+ it('dunkel teilen sie sich seit jeher #141414 — jetzt unter einem Namen', () => {
+ // Vorher stand die Zahl dreimal da und niemand konnte sagen, ob die drei
+ // Vorkommen zusammengehoeren. Jetzt sagt der Name es.
+ expect(SHELL).toContain('dark:bg-lu-canvas')
+ expect(HEADER).toContain('dark:bg-lu-canvas')
+ expect(TITLEBAR).toContain('dark:bg-lu-canvas')
+ for (const src of [SHELL, HEADER, TITLEBAR]) expect(src).not.toContain('dark:bg-[#141414]')
})
it('hell tun sie es jetzt auch', () => {
// Vorher: Leinwand gray-100, Kopfzeile gray-100 — gleich, aber beide zu
// hell. Jetzt beide gray-200, also weiterhin eine Familie, nur tiefer.
- expect(HEADER).toMatch(/bg-gray-200 dark:bg-\[#141414\]/)
- expect([...TITLEBAR.matchAll(/bg-gray-200 dark:bg-\[#141414\]/g)]).toHaveLength(2)
+ expect(HEADER).toMatch(/bg-gray-200 dark:bg-lu-canvas/)
+ expect([...TITLEBAR.matchAll(/bg-gray-200 dark:bg-lu-canvas/g)]).toHaveLength(2)
})
it('und der aktive Reiter ist dadurch hell ueberhaupt erst eine Flaeche', () => {
diff --git a/src/components/models/BenchmarkView.tsx b/src/components/models/BenchmarkView.tsx
index e62079c2..a244b968 100644
--- a/src/components/models/BenchmarkView.tsx
+++ b/src/components/models/BenchmarkView.tsx
@@ -230,7 +230,7 @@ export function BenchmarkView() {
return (
<div
key={model.name}
- className="flex items-center justify-between px-3 py-2 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.03] border border-transparent hover:border-gray-200 dark:hover:border-white/5 transition-all"
+ className="flex items-center justify-between px-3 py-2 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.03] border border-transparent hover:border-gray-200 dark:hover:border-white/5 transition-colors"
>
<div className="flex items-center gap-2 min-w-0">
<span className="text-[0.7rem] text-gray-800 dark:text-gray-200 truncate">{model.name}</span>
diff --git a/src/components/models/DiscoverModels.tsx b/src/components/models/DiscoverModels.tsx
index 493b1c0c..749d915f 100644
--- a/src/components/models/DiscoverModels.tsx
+++ b/src/components/models/DiscoverModels.tsx
@@ -977,7 +977,7 @@ export function DiscoverModels({ category, search = '', searchSubmitToken = 0 }:
<div className="flex items-center justify-between gap-2">
<h3 className="text-sm font-semibold text-gray-900 dark:text-white">Search CivitAI</h3>
{/* Mirror toggle (#53) — civitai.red for regions where .com is blocked. */}
- <div className="flex items-center gap-1 text-[10px]">
+ <div className="flex items-center gap-1 t-micro">
<span className="text-gray-400 dark:text-gray-500 mr-0.5">mirror</span>
{(['civitai.com', 'civitai.red'] as const).map((h) => (
<button
@@ -1030,13 +1030,13 @@ export function DiscoverModels({ category, search = '', searchSubmitToken = 0 }:
<div className="flex-1 min-w-0">
<div className="flex items-center gap-2">
<span className="text-sm font-medium text-gray-900 dark:text-white truncate">{model.name}</span>
- {model.sizeGB && <span className="text-[10px] text-gray-400 flex-shrink-0">{model.sizeGB} GB</span>}
+ {model.sizeGB && <span className="t-micro text-gray-400 flex-shrink-0">{model.sizeGB} GB</span>}
</div>
{model.description && <p className="text-[11px] text-gray-500 line-clamp-1 mt-0.5">{model.description}</p>}
{isDl && dlState && dlState.total > 0 && (
<div className="mt-1.5">
<ProgressBar progress={(dlState.progress / dlState.total) * 100} />
- <span className="text-[10px] text-gray-400">{formatBytes(dlState.progress)} / {formatBytes(dlState.total)}</span>
+ <span className="t-micro text-gray-400">{formatBytes(dlState.progress)} / {formatBytes(dlState.total)}</span>
</div>
)}
</div>
@@ -1046,11 +1046,11 @@ export function DiscoverModels({ category, search = '', searchSubmitToken = 0 }:
) : isDl ? (
<Loader2 size={16} className="animate-spin text-gray-400" />
) : model.downloadUrl ? (
- <button onClick={() => handleCivitaiDownload(model)} className="p-2 rounded-lg bg-green-100 dark:bg-green-500/15 hover:bg-green-200 dark:hover:bg-green-500/25 text-green-700 dark:text-green-400 transition-all" title="Download" aria-label="Download">
+ <button onClick={() => handleCivitaiDownload(model)} className="p-2 rounded-lg bg-green-100 dark:bg-green-500/15 hover:bg-green-200 dark:hover:bg-green-500/25 text-green-700 dark:text-green-400 transition-colors" title="Download" aria-label="Download">
<Download size={14} />
</button>
) : null}
- <button onClick={() => openExternal(model.sourceUrl)} className="p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-white/10 text-gray-500 transition-all" title="View on CivitAI" aria-label="View on CivitAI">
+ <button onClick={() => openExternal(model.sourceUrl)} className="p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-white/10 text-gray-500 transition-colors" title="View on CivitAI" aria-label="View on CivitAI">
<ExternalLink size={14} />
</button>
</div>
@@ -1192,11 +1192,11 @@ export function DiscoverModels({ category, search = '', searchSubmitToken = 0 }:
<p className="text-[0.72rem] text-gray-700 dark:text-gray-200 leading-relaxed">{infoModel.description}</p>
<div className="flex items-center gap-1.5 flex-wrap">
{infoModel.tags.map(t => (
- <span key={t} className="text-[10px] px-1.5 py-0.5 rounded bg-gray-100 dark:bg-white/5 text-gray-600 dark:text-gray-400">{t}</span>
+ <span key={t} className="t-micro px-1.5 py-0.5 rounded bg-gray-100 dark:bg-white/5 text-gray-600 dark:text-gray-400">{t}</span>
))}
- {infoModel.sizeGB && <span className="text-[10px] text-gray-400">{infoModel.sizeGB} GB</span>}
- {infoModel.pulls && <span className="text-[10px] text-gray-400">{infoModel.pulls} pulls</span>}
- {infoModel.released && <span className="text-[10px] text-gray-400">released {infoModel.released}</span>}
+ {infoModel.sizeGB && <span className="t-micro text-gray-400">{infoModel.sizeGB} GB</span>}
+ {infoModel.pulls && <span className="t-micro text-gray-400">{infoModel.pulls} pulls</span>}
+ {infoModel.released && <span className="t-micro text-gray-400">released {infoModel.released}</span>}
</div>
{infoRepoUrl(infoModel) && (
<button
@@ -1213,7 +1213,7 @@ export function DiscoverModels({ category, search = '', searchSubmitToken = 0 }:
<Modal open={!!confirmDownload} onClose={() => setConfirmDownload(null)} title="Download split model">
{confirmDownload && (
<div className="space-y-3">
- <p className="text-[0.75rem] text-gray-700 dark:text-gray-200">
+ <p className="text-[12px] text-gray-700 dark:text-gray-200">
<span className="font-semibold text-gray-900 dark:text-white">{confirmDownload.name}</span> is split into{' '}
<span className="font-semibold text-gray-900 dark:text-white">{confirmDownload.files.length} files</span>{' '}
totalling <span className="font-semibold text-gray-900 dark:text-white">{confirmDownload.totalGB} GB</span>.
diff --git a/src/components/models/ModelManager.tsx b/src/components/models/ModelManager.tsx
index a185b0eb..fd3677c0 100644
--- a/src/components/models/ModelManager.tsx
+++ b/src/components/models/ModelManager.tsx
@@ -333,7 +333,7 @@ export function ModelManager() {
{mode === 'video' ? <VideoIcon size={22} className="text-gray-400 dark:text-gray-500" /> : <ImageIcon size={22} className="text-gray-400 dark:text-gray-500" />}
</div>
<div className="space-y-1">
- <p className="text-[0.75rem] font-medium text-gray-800 dark:text-gray-200">Start ComfyUI to see your {mode} models</p>
+ <p className="text-[12px] font-medium text-gray-800 dark:text-gray-200">Start ComfyUI to see your {mode} models</p>
<p className="text-[0.6rem] text-gray-500 max-w-[300px] leading-relaxed">
{mode === 'image' ? 'Image' : 'Video'} models are served by ComfyUI, which isn't running right now, so the ones you've downloaded can't be listed yet. Open Settings, go to AI Backends, and press Start under ComfyUI (Image &amp; Video), then come back.
</p>
@@ -357,7 +357,7 @@ export function ModelManager() {
<PackageOpen size={22} className="text-gray-400 dark:text-gray-500" />
</div>
<div className="space-y-1">
- <p className="text-[0.75rem] font-medium text-gray-800 dark:text-gray-200">No models installed yet</p>
+ <p className="text-[12px] font-medium text-gray-800 dark:text-gray-200">No models installed yet</p>
<p className="text-[0.6rem] text-gray-500 max-w-[280px] leading-relaxed">
Browse curated chat, image and video models and install them with one click.
</p>
diff --git a/src/components/models/ModelSelector.tsx b/src/components/models/ModelSelector.tsx
index 5b76c199..d31bbb17 100644
--- a/src/components/models/ModelSelector.tsx
+++ b/src/components/models/ModelSelector.tsx
@@ -75,7 +75,7 @@ function CloudTeaserSection({ onOpen }: { onOpen: () => void }) {
<span className="text-[0.68rem] text-gray-400 truncate">
{('displayName' in m && m.displayName) || displayModelName(m.name)}
</span>
- <span className="ml-auto text-[8px] text-violet-500 dark:text-violet-200">Cloud</span>
+ <span className="ml-auto text-[0.5rem] text-violet-500 dark:text-violet-200">Cloud</span>
</button>
))}
{cloudChat.length > 0 && cloudMore > 0 && (
@@ -99,7 +99,7 @@ function CloudTeaserSection({ onOpen }: { onOpen: () => void }) {
<span className="text-[0.68rem] text-gray-400">
Frontier chat models, no GPU needed
</span>
- <span className="ml-auto text-[8px] text-violet-500 dark:text-violet-200">Cloud</span>
+ <span className="ml-auto text-[0.5rem] text-violet-500 dark:text-violet-200">Cloud</span>
</button>
)}
</div>
@@ -472,7 +472,7 @@ function LoadToggle({ loaded, busy, disabled, onClick }: {
title={loaded
? 'Loaded in VRAM. Click to unload (Off)'
: 'Not loaded. Click to load into VRAM (On)'}
- className={`flex items-center gap-0.5 pl-1 pr-1.5 py-0.5 rounded text-[8px] font-semibold uppercase tracking-wide transition-colors disabled:opacity-40 ${
+ className={`flex items-center gap-0.5 pl-1 pr-1.5 py-0.5 rounded text-[0.5rem] font-semibold uppercase tracking-wide transition-colors disabled:opacity-40 ${
loaded
? 'text-emerald-400 bg-emerald-500/[0.12] hover:bg-emerald-500/20'
: 'text-gray-500 hover:text-gray-300 hover:bg-white/[0.06]'
@@ -987,12 +987,12 @@ export function ModelSelector({ openUpward = false, surface = 'chat' }: ModelSel
{/* Subtle meta */}
{model.type !== 'text' && (
- <span className={`text-[8px] uppercase font-medium tracking-wide ${TYPE_COLOR[model.type] || 'text-gray-500'} opacity-60`}>
+ <span className={`text-[0.5rem] uppercase font-medium tracking-wide ${TYPE_COLOR[model.type] || 'text-gray-500'} opacity-60`}>
{TYPE_LABEL[model.type] || model.type}
</span>
)}
{modelProvider !== 'ollama' && (
- <span className={`text-[8px] ${providerBadge.color}`}>
+ <span className={`text-[0.5rem] ${providerBadge.color}`}>
{providerBadge.label}
</span>
)}
@@ -1045,7 +1045,7 @@ export function ModelSelector({ openUpward = false, surface = 'chat' }: ModelSel
{/* §18 — inline load state while we auto-load this
LM Studio model on the way to selecting it. */}
{isSelectingThis && (
- <span className="inline-flex items-center gap-0.5 text-[8px] text-blue-400">
+ <span className="inline-flex items-center gap-0.5 text-[0.5rem] text-blue-400">
<Loader2 size={8} className="animate-spin" />
loading…
</span>
@@ -1055,7 +1055,7 @@ export function ModelSelector({ openUpward = false, surface = 'chat' }: ModelSel
{/* Details on right */}
<div className="flex items-center gap-1 shrink-0">
{model.type === 'text' && 'details' in model && (model as any).details && (
- <span className="text-[8px] text-gray-600">
+ <span className="text-[0.5rem] text-gray-600">
{(model as any).details.parameter_size}
</span>
)}
diff --git a/src/components/onboarding/BackendSelector.tsx b/src/components/onboarding/BackendSelector.tsx
index 866e8a8b..df59ee6d 100644
--- a/src/components/onboarding/BackendSelector.tsx
+++ b/src/components/onboarding/BackendSelector.tsx
@@ -99,7 +99,7 @@ export function BackendSelector({ open, backends, onClose }: Props) {
<h3 className="text-base font-semibold text-white text-center">
{backends.length} local backend{backends.length > 1 ? 's' : ''} detected
</h3>
- <p className="text-[0.75rem] text-gray-400 text-center leading-relaxed">
+ <p className="text-[12px] text-gray-400 text-center leading-relaxed">
{backends.length === 1
? `${backends[0].name} is running on your system.`
: 'Multiple backends running. Select your primary backend.'}
diff --git a/src/components/onboarding/Onboarding.tsx b/src/components/onboarding/Onboarding.tsx
index f9312093..6eba9393 100644
--- a/src/components/onboarding/Onboarding.tsx
+++ b/src/components/onboarding/Onboarding.tsx
@@ -765,7 +765,7 @@ export function Onboarding() {
// Onboarding nur nie erreicht; AUDIT-COVERAGE fuehrt das unter D-A8 als
// ausdruecklichen Rest. Kein eigenes Rezept hier, sondern jenes.
const primaryBtn = 'lu-primary mx-auto flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[0.7rem] transition-all'
- const secondaryBtn = `mx-auto flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[0.7rem] font-medium transition-all ${
+ const secondaryBtn = `mx-auto flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[0.7rem] font-medium transition-colors ${
isDark ? 'bg-white/10 text-white hover:bg-white/15' : 'bg-gray-100 text-gray-700 hover:bg-gray-200'
}`
@@ -838,9 +838,9 @@ export function Onboarding() {
Der Zusatz „by LU Labs" bleibt eine Stufe kleiner, damit die
Groesse dem Namen gehoert und nicht der ganzen Zeile. */}
<h1 className="text-[1.5rem] leading-[1.21] font-semibold tracking-tight">
- LU <span className="text-[0.75rem] font-normal opacity-60 align-middle">by LU Labs</span>
+ LU <span className="text-[12px] font-normal opacity-60 align-middle">by LU Labs</span>
</h1>
- <p className={`text-[0.75rem] leading-relaxed ${isDark ? 'text-gray-400' : 'text-gray-500'}`}>
+ <p className={`text-[12px] leading-relaxed ${isDark ? 'text-gray-400' : 'text-gray-500'}`}>
Private, local AI chat that works right away. No extra software to install. No servers, no tracking, everything stays on your machine.
</p>
<button
@@ -888,7 +888,7 @@ export function Onboarding() {
<button
onClick={() => setSelectedBackend(BUILTIN_BACKEND_ID)}
- className={`w-full flex items-center gap-2.5 px-2.5 py-2.5 rounded-lg border text-left transition-all ${
+ className={`w-full flex items-center gap-2.5 px-2.5 py-2.5 rounded-lg border text-left transition-colors ${
selectedBackend === BUILTIN_BACKEND_ID
? isDark ? 'bg-white/10 border-white/20' : 'bg-gray-100 border-gray-900'
: isDark ? 'border-white/10 hover:border-white/20' : 'border-gray-200 hover:border-gray-400'
@@ -933,7 +933,7 @@ export function Onboarding() {
<button
key={b.id}
onClick={() => setSelectedBackend(b.id)}
- className={`w-full flex items-center gap-2.5 px-2.5 py-2 rounded-lg border text-left transition-all ${
+ className={`w-full flex items-center gap-2.5 px-2.5 py-2 rounded-lg border text-left transition-colors ${
selectedBackend === b.id
? isDark ? 'bg-white/10 border-white/20' : 'bg-gray-100 border-gray-900'
: isDark ? 'border-white/10 hover:border-white/20' : 'border-gray-200 hover:border-gray-400'
@@ -1227,7 +1227,7 @@ export function Onboarding() {
<button
key={b.id}
onClick={() => openExternal(b.url)}
- className={`w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg border transition-all group text-left ${
+ className={`w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg border transition-colors group text-left ${
isDark
? 'border-white/[0.06] hover:border-white/15 hover:bg-white/[0.03]'
: 'border-gray-200 hover:border-gray-400 hover:bg-gray-50'
@@ -1734,7 +1734,7 @@ export function Onboarding() {
key={model.name}
onClick={() => !pulled && !isDownloading && toggleModel(model.name)}
disabled={pulled || isDownloading}
- className={`text-left p-2.5 rounded-lg border transition-all ${
+ className={`text-left p-2.5 rounded-lg border transition-colors ${
pulled
? isDark ? 'bg-green-500/10 border-green-500/30' : 'bg-green-50 border-green-300'
: selected
@@ -1887,7 +1887,7 @@ export function Onboarding() {
>
<div className="w-3 h-3 rounded-full bg-green-400 mx-auto" />
<h2 className="text-base font-semibold">You're all set!</h2>
- <p className={`text-[0.75rem] ${isDark ? 'text-gray-400' : 'text-gray-500'}`}>
+ <p className={`text-[12px] ${isDark ? 'text-gray-400' : 'text-gray-500'}`}>
{pulledModels.length > 0
? `${pulledModels.length} model${pulledModels.length > 1 ? 's' : ''} installed. You're ready to go.`
: selectedBackend === BUILTIN_BACKEND_ID
diff --git a/src/components/personas/PersonaCard.tsx b/src/components/personas/PersonaCard.tsx
index 1e709a19..123ee9ed 100644
--- a/src/components/personas/PersonaCard.tsx
+++ b/src/components/personas/PersonaCard.tsx
@@ -32,7 +32,7 @@ export function PersonaCard({ name, icon, isActive, onClick }: Props) {
<div className={`w-8 h-8 rounded-lg flex items-center justify-center shrink-0 ${isActive ? 'bg-gray-300 dark:bg-white/10' : 'bg-gray-100 dark:bg-white/5'}`}>
<Icon size={16} className={isActive ? 'text-gray-700 dark:text-gray-300' : 'text-gray-400'} />
</div>
- <span className={`text-[10px] font-medium leading-tight text-center line-clamp-2 px-1 ${isActive ? 'text-gray-800 dark:text-white' : 'text-gray-500 dark:text-gray-400'}`}>
+ <span className={`t-micro font-medium leading-tight text-center line-clamp-2 px-1 ${isActive ? 'text-gray-800 dark:text-white' : 'text-gray-500 dark:text-gray-400'}`}>
{name}
</span>
</button>
diff --git a/src/components/personas/PersonaPanel.tsx b/src/components/personas/PersonaPanel.tsx
index 7a061384..61e98abb 100644
--- a/src/components/personas/PersonaPanel.tsx
+++ b/src/components/personas/PersonaPanel.tsx
@@ -84,7 +84,7 @@ export function PersonaPanel() {
))}
<button
onClick={() => { setShowEditor(!showEditor); setEditingId(null) }}
- className="flex flex-col items-center gap-2 p-4 rounded-xl bg-gray-50 dark:bg-white/[0.02] border border-gray-300 dark:border-white/10 hover:border-gray-400 dark:hover:border-white/15 transition-all cursor-pointer"
+ className="flex flex-col items-center gap-2 p-4 rounded-xl bg-gray-50 dark:bg-white/[0.02] border border-gray-300 dark:border-white/10 hover:border-gray-400 dark:hover:border-white/15 transition-colors cursor-pointer"
>
<div className="w-10 h-10 rounded-lg flex items-center justify-center bg-gray-100 dark:bg-white/5">
<Plus size={20} className="text-gray-500" />
diff --git a/src/components/settings/MCPServerSettings.tsx b/src/components/settings/MCPServerSettings.tsx
index dffbc12e..c2360a67 100644
--- a/src/components/settings/MCPServerSettings.tsx
+++ b/src/components/settings/MCPServerSettings.tsx
@@ -221,7 +221,7 @@ export function MCPServerSettings() {
) : (
<button
onClick={() => setShowAddForm(true)}
- className="flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[0.65rem] text-gray-500 hover:text-gray-300 bg-white/[0.03] hover:bg-white/5 border border-white/10 hover:border-white/20 transition-all w-full justify-center"
+ className="flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[0.65rem] text-gray-500 hover:text-gray-300 bg-white/[0.03] hover:bg-white/5 border border-white/10 hover:border-white/20 transition-colors w-full justify-center"
>
<Plus size={12} />
Add MCP Server
diff --git a/src/components/settings/ProviderConfig.tsx b/src/components/settings/ProviderConfig.tsx
index 0219b42b..57a4dd45 100644
--- a/src/components/settings/ProviderConfig.tsx
+++ b/src/components/settings/ProviderConfig.tsx
@@ -755,10 +755,10 @@ export function ProviderSettings() {
<Modal open={showCloudWarning} onClose={() => { setShowCloudWarning(false); setPendingPreset(null) }} title="">
<div className="space-y-4 text-center">
<h3 className="text-base font-semibold text-white">Enable Cloud Provider</h3>
- <p className="text-[0.75rem] text-gray-400 leading-relaxed">
+ <p className="text-[12px] text-gray-400 leading-relaxed">
Cloud providers send your data to external servers. Your conversations will no longer be fully private or offline.
</p>
- <p className="text-[0.75rem] text-gray-400 leading-relaxed">
+ <p className="text-[12px] text-gray-400 leading-relaxed">
For maximum privacy, use Ollama or a local backend instead.
</p>
<div className="flex items-center justify-center gap-3 pt-2">
diff --git a/src/components/ui/ContextMenu.tsx b/src/components/ui/ContextMenu.tsx
index 2ae39b09..938f9cf9 100644
--- a/src/components/ui/ContextMenu.tsx
+++ b/src/components/ui/ContextMenu.tsx
@@ -174,7 +174,7 @@ export function ContextMenu({ items, x, y, label, onClose }: ContextMenuProps) {
ref={menuRef}
role="menu"
aria-label={label}
- className="absolute min-w-[9rem] py-1 rounded-md bg-white dark:bg-[#141414] border border-gray-200 dark:border-white/10 shadow-lg text-[0.7rem]"
+ className="absolute min-w-[9rem] py-1 rounded-md bg-white dark:bg-lu-canvas border border-gray-200 dark:border-white/10 shadow-lg text-[0.7rem]"
style={{ left: pos.left, top: pos.top }}
onClick={(e) => e.stopPropagation()}
onKeyDown={onKeyDown}
diff --git a/src/index.css b/src/index.css
index 78164e9d..d623ad7d 100644
--- a/src/index.css
+++ b/src/index.css
@@ -93,18 +93,80 @@
carry no colour identity.
───────────────────────────────────────────────────────────────────── */
@theme {
- /* ── Neutral ramp — spread for depth (uselu base, widened). Used by the
- elevated-surface helper below; the canvas/sidebar/header shades live as
- literals in the layout components. ── */
- --color-lu-base: #202020; /* app canvas */
+ /* ── Neutral ramp — spread for depth (uselu base, widened) ──────────
+ D-T06, am 01.09.2026 nachgezaehlt. Der Kommentar, der hier stand, war
+ an einer Stelle schlicht falsch: `--color-lu-base` hiess „app canvas",
+ aber die Leinwand der App ist #141414, nicht #202020. Gemessen im
+ laufenden Fenster (getComputedStyle auf der AppShell-Wurzel):
+
+ Leinwand + Titelleiste + Header #141414 9 Fundstellen KEIN Token
+ Pane + Sidebar + Create-Panel #1e1e1e 5 Fundstellen KEIN Token
+ --color-lu-base #202020 2 Fundstellen (zwei Modale)
+ --color-lu-panel #262626 4 Fundstellen
+ --color-lu-raised #2d2d2d 0 Fundstellen — im Browser als LEERE
+ Variable gemessen: Tailwind gibt ein
+ Farbtoken nur aus, wenn es jemand
+ aufruft. Das Token existiert nur hier.
+ --color-lu-overlay #363636 6 Fundstellen
+
+ Neu ist deshalb nur EINE Stufe, und zwar die meistbenutzte Flaeche der
+ App, die als einzige gar keinen Namen hatte. `--color-lu-raised`
+ bleibt vorerst stehen (Entfernen waere eine eigene Entscheidung), aber
+ es steht jetzt dran, dass es tot ist.
+
+ Diese Leiter ist DUNKEL. Es gibt bewusst kein `.light`-Gegenstueck:
+ im Hellmodus zerfaellt #141414 in ZWEI Rollen, die dieselbe dunkle
+ Zahl teilen — Fensterrahmen (`bg-gray-200`: Titlebar, Header,
+ AppShell) und Vollflaeche (`bg-white`: ViewSkeletons, Kontextmenues,
+ Create-Wurzel). Eine gespiegelte Leiter muesste sich fuer eine der
+ beiden entscheiden und faerbte die andere falsch. Deshalb tragen alle
+ Call-Sites weiterhin `dark:` und ihr eigenes Hell-Pendant. ── */
+ --color-lu-canvas: #141414; /* Leinwand, Titelleiste, Header */
+ --color-lu-base: #202020; /* zwei Modalflaechen, NICHT die Leinwand */
--color-lu-panel: #262626; /* sidebar, panels */
- --color-lu-raised: #2d2d2d; /* cards, hover */
+ --color-lu-raised: #2d2d2d; /* TOT: 0 Call-Sites (Stand 01.09.2026) */
--color-lu-overlay: #363636; /* dropdowns, modals, popovers */
- /* ── Form: moderately less round (pills/cards read less "toy") ── */
- --radius-xl: 0.5rem;
- --radius-2xl: 0.625rem;
- --radius-3xl: 0.75rem;
+ /* ── Form: EINE Radiusleiter ────────────────────────────────────────
+ D-T08. Vorher liefen zwei Systeme nebeneinander: die rem-abgeleitete
+ Tailwind-Leiter und die px-Tokens `--radius-control/panel/pill` unten
+ im `:root`. Das Ergebnis war im Browser nachgemessen (Chromium 149,
+ getComputedStyle):
+
+ rounded 4px rounded-lg 8px
+ rounded-sm 4px rounded-xl 8px ← DIESELBE Zahl wie lg
+ rounded-md 6px rounded-2xl 10px
+
+ `rounded-lg` und `rounded-xl` waren derselbe Wert: zwei Namen, eine
+ Zahl, und keine Moeglichkeit, im Code eine Stufe ueber 8px zu meinen,
+ ohne in eckige Klammern auszuweichen. Genau das ist passiert —
+ `rounded-[10px]` (3x), `rounded-[8px]` (8x), `rounded-[6px]` (4x)
+ und `rounded-[5px]` (20x) sagen Zahlen, fuer die es Namen gibt oder
+ geben sollte.
+
+ Jetzt sind die Haus-px-Tokens die Quelle, und jede Stufe ist genau
+ einmal da:
+
+ rounded-sm 4px die Nagelstufe (Badges, Punkte)
+ rounded-md 6px
+ rounded-lg 8px = --radius-control Controls, Knoepfe
+ rounded-xl 10px Panes (die Sidebar steht dort)
+ rounded-2xl 12px = --radius-panel Dialoge, Panels
+
+ Zwei Werte aendern sich sichtbar: `rounded-xl` 8 → 10px (16
+ Fundstellen) und `rounded-2xl` 10 → 12px (6 Fundstellen). Beide sind
+ kein Zufallssprung, sondern schliessen eine gemessene Luecke: die
+ Hauptpane in AppShell trug `rounded-xl` (8px) und stand direkt neben
+ der Sidebar mit `rounded-[10px]` — zwei Flaechen derselben Familie,
+ nebeneinander, mit verschiedenen Ecken. Und `rounded-2xl` ist der
+ Dialogradius, der damit auf `--radius-panel` faellt statt 2px
+ daneben zu liegen.
+
+ `--radius-3xl` ist geloescht: 0 Fundstellen, und im Browser als leere
+ Variable gemessen — die Klasse haette 0px ergeben. ── */
+ --radius-lg: var(--radius-control);
+ --radius-xl: 10px;
+ --radius-2xl: var(--radius-panel);
/* ── Depth: shadows tuned to be visible on dark backgrounds ── */
--shadow-lg: 0 8px 24px -6px rgba(0, 0, 0, 0.6), 0 2px 6px -2px rgba(0, 0, 0, 0.4);
@@ -133,6 +195,48 @@
--color-lu-on-accent: #111827;
--color-lu-accent-edge: #8b7cf0;
+ /* ── Der Cloud-Akzent (D-T05) ───────────────────────────────────────
+ Der Audit las die Lage als „zwei Akzente nebeneinander": #a094f8
+ steht hier als Token, #7c3aed stand an 20 Stellen als Literal, und
+ das Brand-Kit-Violett #8b5cf6 kommt in src/ ueberhaupt nicht vor
+ (nachgezaehlt: 0 Fundstellen). Der naheliegende Schluss waere, auf
+ EINEN Hex zusammenzufallen. Nachgerechnet ist dieser Schluss falsch,
+ und zwar deutlich.
+
+ Es sind keine zwei Marken, es sind zwei ROLLEN. #7c3aed steht
+ ausschliesslich an der Cloud: der getoente Composer-Rahmen im
+ Cloud-Modus, das „Cloud"-Abzeichen ueber dem Eingabefeld, der
+ Cloud-Schalter, der Cloud-Gate-Dialog. Cloud ist in dieser App ein
+ GELDZUSTAND — die Nachricht laeuft auf gemieteten GPUs und wird
+ abgerechnet. Dass dieser Zustand nicht dieselbe Farbe traegt wie die
+ Hausmarke, ist die Aussage, nicht der Fehler.
+
+ Die Rechnung (WCAG 2.1, relative Luminanz, alle Halbtransparenzen
+ ueber ihren echten Grund gedeckt — #ffffff hell, #1e1e1e dunkel;
+ Minimum ueber die sechs Cloud-Textstellen):
+
+ heute #7c3aed hell / #a78bfa dunkel 4,53:1 ✓ AA
+ nur #a094f8 (Haus-Akzent) 2,29:1 ✗
+ nur #8b5cf6 (Brand-Kit) 3,36:1 ✗
+ Paar #8b7cf0 hell / #a094f8 dunkel 2,87:1 ✗
+
+ Das heutige Paar ist das einzige der vier, das AA haelt. Ein Wechsel
+ KOSTET also zwischen 1,2 und 2,2 Kontraststufen und wirft jede
+ Cloud-Beschriftung unter die Grenze. Die gefuellte Cloud-Flaeche
+ (`bg-lu-cloud text-white`) traegt in beiden Modi dieselbe Farbe und
+ kommt auf 5,70:1; unter #a094f8 waere sie 2,60:1.
+
+ Was hier also passiert, ist NICHT „ein Akzent statt zwei", sondern
+ „eine Definition statt zwanzig Literalen". Dieselbe Aufteilung wie
+ beim Haus-Akzent oben: eine Farbe fuers Helle, eine angehobene
+ fuers Dunkle.
+
+ hell #7c3aed auf #ffffff 5,70:1 (und als Flaeche, beide Modi)
+ dunkel #a78bfa auf #1e1e1e 6,13:1
+ ── */
+ --color-lu-cloud: #7c3aed;
+ --color-lu-cloud-lift: #a78bfa;
+
/* ── Motion — eine benannte Leiter statt verstreuter Zahlen ──
Dauer und Kurve standen bisher als Literale in den Komponenten. Erhoben
wurde, was tatsächlich benutzt wird (framer-motion + Tailwind, Stand 2.6.7):
@@ -205,12 +309,51 @@
17,48 / 14,72 / 13,248 / 11,408 / 12,88px fielen; keine einzige davon
lag auf einem Pixel. Die Stufen selbst sind unverändert gemeint, nur
gerundet: 20 / 15 / 13 / 12 / 10 / 11px. */
- --text-display: 20px; --text-display-lh: 1.2; --text-display-fw: 600;
+ --text-display: 20px; --text-display-lh: 1.2; --text-display-fw: 500;
--text-title: 15px; --text-title-lh: 1.3; --text-title-fw: 600;
--text-body: 13px; --text-body-lh: 1.5; --text-body-fw: 400;
--text-control: 12px; --text-control-lh: 1; --text-control-fw: 500;
--text-label: 10px; --text-label-lh: 1; --text-label-fw: 600;
--text-mono: 11px;
+ /* --text-micro ist KEINE siebte Zahl: es ist dieselbe 10, die
+ --text-label traegt. Siehe die Rechnung bei `.t-micro` unten. */
+ --text-micro: var(--text-label);
+
+ /* ── Die Markenschrift fuer die Displaystufe ────────────────────────
+ D-T03 stand als „Display-Schrift fehlt ganz" in der Matrix, mit der
+ Begruendung, `public/fonts/lu-fonts.css` enthalte ausschliesslich
+ Inter-Faces. Das ist nachgemessen falsch. Die Datei hat 39
+ `@font-face`-Bloecke in drei Familien:
+
+ Inter 21 Bloecke (400/500/600, sieben Unicode-Bereiche)
+ JetBrains Mono 12 Bloecke (500)
+ Space Grotesk 6 Bloecke (500 und 700, latin/latin-ext/vietn.)
+
+ Und sie ist nicht nur deklariert, sie laedt. Im laufenden Fenster
+ (Chromium 149) nach `document.fonts.load`:
+
+ [...document.fonts] enthaelt „Space Grotesk" 500 und 700,
+ document.fonts.check('500 20px "Space Grotesk"') === true
+ Breite von „Locally Uncensored" bei 100px Schriftgrad:
+ Inter 600 1103,51px
+ Space Grotesk 500 1094,18px (-0,85 %)
+ Space Grotesk 700 1094,34px
+ serif (Rueckfall) 972,23px ← klar unterscheidbar, es faellt
+ also nichts zurueck
+
+ Die drei woff2-Dateien liegen in public/fonts/woff2/ und sind ueber
+ `index.html` schon heute im Bundle. Nichts wird nachgeladen, nichts
+ kommt hinzu — der Slot war unbesetzt, obwohl die Schrift ausgeliefert
+ wurde.
+
+ Gewicht 500, nicht 600: Space Grotesk hat in dieser Datei genau die
+ Schnitte 500 und 700. Bei `font-weight: 600` waehlt Chromium nach der
+ CSS-Font-Matching-Regel den naechsthoeheren echten Schnitt, also 700
+ — gemessen an der Breite (600 ergab 1094,34 = exakt der 700er-Wert,
+ nicht 1094,18 wie 500). Die Displaystufe haette also still fett
+ gerendert. --text-display-fw geht deshalb auf 500, den Schnitt, den
+ es wirklich gibt. ── */
+ --font-display: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
/* Control heights + spacing rhythm */
--space-unit: 4px;
@@ -652,6 +795,58 @@ input[type="range"]::-webkit-slider-thumb {
box-shadow: var(--shadow-lg);
}
+/* ─────────────────────────────────────────────────────────────────────
+ `shadow-sm` ist ein Hellmodus-Rezept — eine Regel statt zwoelf
+ Call-Sites (D-T09).
+
+ `--shadow-lg/xl/2xl` hat dieses Haus fuer dunkle Flaechen nachgezogen
+ (0,6–0,8 Alpha, grosse Weichzeichnung). `shadow-sm` NICHT: es steht
+ weiterhin auf Tailwinds Werkseinstellung, `0 1px 3px rgb(0 0 0/.1)`
+ plus `0 1px 2px -1px rgb(0 0 0/.1)`. An zwoelf Stellen der App.
+
+ Nachgerechnet (WCAG 2.1, dunkelster Schattenpixel gegen seinen Grund;
+ wo beide Lagen uebereinanderliegen, deckt der Schatten 19 % Schwarz):
+
+ hell #ffffff Blatt 1,248 … 1,558:1
+ hell #e5e7eb Leinwand 1,247 … 1,554:1
+ dunkel #141414 Leinwand 1,017 … 1,033:1
+ dunkel #1e1e1e Pane 1,033 … 1,065:1
+ dunkel #262626 Panel 1,051 … 1,089:1
+ dunkel #363636 Overlay 1,077 … 1,156:1
+
+ Zum Vergleich: die Pane-Kante im Hellmodus stand vor D-S42 bei 1,008:1
+ und wurde dort als „keine Kante, das ist Rauschen" verworfen. Die
+ dunklen Werte hier liegen in derselben Klasse.
+
+ Und es hilft NICHT, den Schatten dunkler zu stellen. Ein Schatten kann
+ eine Flaeche nur abdunkeln, also ist er nach unten durch Schwarz
+ begrenzt. Selbst 100 % Schwarz schafft:
+
+ auf #141414 1,140:1 auf #ffffff 21,000:1
+ auf #1e1e1e 1,260:1 auf #e5e7eb 16,962:1
+
+ Auf der Leinwand dieser App ist die theoretische Obergrenze eines
+ Schattens also 1,14:1. Das ist keine Frage der Einstellung, das ist
+ Arithmetik — Erhebung im Dunkeln kommt aus einer Kante, nicht aus
+ einem Schatten (so hat es D-S24 an den 53 Modellkacheln schon
+ entschieden).
+
+ Im HELLMODUS bleibt er, und dort traegt er wirklich: der weisse
+ Schaltknopf der Toggles steht auf seiner hellen Spur
+ (`bg-gray-300/30` ueber Weiss = #f1f2f4) bei 1,120:1 — ohne den
+ Schatten waere er dort fast unsichtbar.
+
+ Warum `--tw-shadow` und nicht `box-shadow: none`: Tailwind 4 setzt
+ `box-shadow` als EINE Liste aus fuenf Variablen zusammen (inset-shadow,
+ inset-ring, ring-offset, ring, shadow). `box-shadow: none` haette auch
+ jeden `ring-*` auf demselben Element geloescht. Ueberschrieben wird
+ deshalb genau die eine Variable, die dem Schatten gehoert — dasselbe,
+ was Tailwinds eigenes `shadow-none` tut.
+ ───────────────────────────────────────────────────────────────────── */
+.dark .shadow-sm {
+ --tw-shadow: 0 0 #0000;
+}
+
/* ─────────────────────────────────────────────────────────────────────
Theme-contrast rescue layer — ported from the web companion.
Many components were authored dark-first and use raw `text-gray-300/400`,
@@ -761,13 +956,78 @@ input[type="range"]::-webkit-slider-thumb {
the control-height vars above were undefined. See the token block near the
top of this file for the full rationale.
───────────────────────────────────────────────────────────────────── */
-.t-display { font-size: var(--text-display); line-height: var(--text-display-lh); font-weight: var(--text-display-fw); }
+.t-display { font-size: var(--text-display); line-height: var(--text-display-lh); font-weight: var(--text-display-fw); font-family: var(--font-display); letter-spacing: -0.01em; }
.t-title { font-size: var(--text-title); line-height: var(--text-title-lh); font-weight: var(--text-title-fw); }
.t-body { font-size: var(--text-body); line-height: var(--text-body-lh); font-weight: var(--text-body-fw); }
.t-control { font-size: var(--text-control); line-height: var(--text-control-lh); font-weight: var(--text-control-fw); }
.t-label { font-size: var(--text-label); line-height: var(--text-label-lh); font-weight: var(--text-label-fw); letter-spacing: 0.08em; text-transform: uppercase; }
.t-mono { font-size: var(--text-mono); font-variant-numeric: tabular-nums; font-family: ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, monospace; }
+/* ─────────────────────────────────────────────────────────────────────
+ `.t-micro` — die Stufe, deren Fehlen die Leiter umgangen hat (D-T04)
+
+ Gezaehlt am 01.09.2026 ueber src/ ohne __tests__: 1026 Fundstellen
+ einer arbitraeren Schriftgroesse in eckigen Klammern, verteilt auf 30
+ verschiedene Werte (28 Groessen + 2 Farben). Dagegen 143 Nutzungen der
+ `.t-*`-Klassen. Das System existiert und wird umgangen.
+
+ Die Frage war, WARUM. Die Antwort steht in der Verteilung:
+
+ 947 von 1026 (92,3 %) liegen zwischen 8 und 11,99 px, also UNTER
+ --text-body (13). Nur 65 (6,3 %) sitzen exakt auf einer Stufe.
+
+ Unter 13px hat die Leiter drei Stufen — und keine davon ist
+ schlichter Text:
+ --text-label (10) erzwingt uppercase + 0,08em Laufweite
+ --text-mono (11) wechselt die Schriftfamilie
+ --text-control (12) setzt line-height 1 (Controlmass, kein Satz)
+
+ Von den 947 Bandstellen tragen 38 uppercase/tracking, waeren also
+ `.t-label`-Kandidaten. Die anderen 909 sind schlichter Kleintext,
+ und dafuer gab es keinen Namen.
+
+ Die Luecke ist also KEINE fehlende Zahl. Der haeufigste Umgehungswert
+ ist 0.6rem = 9,6px, der gewichtete Mittelwert des ganzen Bandes 9,75px
+ — beides einen Viertelpixel neben der 10, die schon da ist. Die
+ Leiter hatte die Zahl und hat sie in einem Stilrezept eingesperrt.
+
+ Deshalb bekommt `.t-micro` KEINE eigene Zahl: --text-micro ist
+ `var(--text-label)`. Eine Groesse, zwei Rezepte — das Grossbuchstaben-
+ Etikett und der schlichte Kleintext.
+
+ Die Auflösung, in der bisher entworfen wurde, ist der zweite Teil des
+ Befunds: 14 verschiedene Werte in einem 4px-Band, die engsten 0,08px
+ auseinander (0.62rem = 9,92 gegen 0.63rem = 10,08). Bei --ui-scale
+ 1,15 sind das 0,09 gerenderte Pixel. Das ist keine Entscheidung, das
+ ist Rauschen.
+
+ ── Warum diese Klasse NUR die Groesse setzt ──
+
+ Es gibt einen zweiten Grund fuer die Umgehung, und er ist im Browser
+ nachgemessen: die sechs Klassen oben stehen UNGESCHICHTET und schlagen
+ damit jede Tailwind-Utility, egal mit welcher Spezifitaet (dieselbe
+ Mechanik wie beim Fokusring weiter oben). Gemessen mit
+ getComputedStyle, Chromium 149:
+
+ class="t-body font-semibold" → font-weight 400 (nicht 600)
+ class="t-control font-bold" → font-weight 500 (nicht 700)
+ class="t-body leading-none" → line-height 19,5px (nicht 1)
+ class="t-label font-normal" → font-weight 600 (nicht 400)
+
+ Wer `.t-body` nimmt, verliert also still sein `font-semibold`. Ein
+ Rezept, das die Entscheidungen der Call-Site frisst, ist kein
+ Angebot — es ist ein Grund, in eckige Klammern auszuweichen.
+
+ `.t-micro` macht das ausdruecklich nicht: EINE Eigenschaft, sonst
+ nichts. Damit ist der Tausch gegen `text-[10px]` beweisbar
+ folgenlos. Nachgemessen: `text-[10px]` erbt line-height 1,5 aus dem
+ Preflight (`html { line-height: 1.5 }` vererbt als ZAHL) und rendert
+ 15px; `.t-micro` aendert daran nichts und rendert ebenfalls 15px.
+ Ein `line-height` hier wuerde genau den Fehler wiederholen, der die
+ anderen fuenf Klassen unbrauchbar macht.
+ ───────────────────────────────────────────────────────────────────── */
+.t-micro { font-size: var(--text-micro); }
+
/* `.lu-focus-ring` stand hier und ist ersatzlos gestrichen (Audit §5:
„9 redundante Nutzungen"). Sie war die Kopie der globalen Regel fuer
Controls, die keine `<button>`/`<a>` sind — seit der Fokusring oben an