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.

fix(ui): kein Gelb mehr, und keine Kloetze

purpleb59edbb8a93f
diff --git a/src/api/__tests__/builtin-slot-probe.test.ts b/src/api/__tests__/builtin-slot-probe.test.ts
index 56fb532b..9fa14264 100644
--- a/src/api/__tests__/builtin-slot-probe.test.ts
+++ b/src/api/__tests__/builtin-slot-probe.test.ts
@@ -100,12 +100,20 @@ describe('the AI Backends row goes through that reader', () => {
it('there is a "Not running" state and it is not painted as a failure', () => {
expect(providerConfig).toContain('Not running')
- // Seit "Reachable, no models" dazukam, teilen sich die beiden
- // bernsteinfarbenen Lagen den Punkt: ein Motor, der noch nicht gestartet
- // ist, und ein Server, der laeuft und nichts anzubieten hat. Rot ist
- // weiterhin keiner von beiden, und darum ging es hier.
- expect(providerConfig).toMatch(/status === 'stopped' \|\| status === 'no-models' \? 'bg-amber-500'/)
+ // Die Regel dahinter hat sich am 04.09.2026 geaendert. Bis dahin teilten
+ // sich ein noch nicht gestarteter Motor und ein Server ohne Modelle einen
+ // eigenen bernsteinfarbenen Punkt (`'stopped' || 'no-models' ?
+ // 'bg-amber-500'`). Dieses Gelb ist im ganzen Haus abgeschafft, weil es
+ // fuenf verschiedene Dinge gleichzeitig sagte und damit keins davon
+ // (lib/hinweis.ts). Der Punkt kennt jetzt an, kaputt und aus, und beide
+ // Lagen fallen in "aus". Der Sinn dieses Tests ist derselbe geblieben:
+ // ein Motor, den niemand gestartet hat, ist kein Fehler.
+ expect(providerConfig).toMatch(/status === 'failed' \? PUNKT_FARBE\.kaputt :\s*PUNKT_FARBE\.aus/)
expect(providerConfig).not.toMatch(/status === 'stopped' \? 'bg-red-500'/)
+ // Und das Wort neben dem Punkt sagt dasselbe wie der Punkt.
+ expect(providerConfig).toMatch(/text: 'Not running',\s*ton: HINWEIS_TEXT\.ruhig/)
+ // NEGATIVKONTROLLE zur Abschaffung: kein Gelb mehr in dieser Datei.
+ expect(providerConfig).not.toMatch(/amber-|yellow-/)
})
it('the user-facing strings on this row are English', () => {
diff --git a/src/api/__tests__/fit-check-never-shows-system-ram.test.ts b/src/api/__tests__/fit-check-never-shows-system-ram.test.ts
index dac8e286..283196ba 100644
--- a/src/api/__tests__/fit-check-never-shows-system-ram.test.ts
+++ b/src/api/__tests__/fit-check-never-shows-system-ram.test.ts
@@ -157,23 +157,35 @@ describe('the hardware chip', () => {
})
})
-describe('a healthy ROCm install is not painted as a fault', () => {
+describe('a GPU note is a quiet line, not a fault', () => {
// hypocritical_rj (help-chat "GPU Detection", 26.08.) opened a thread just to
- // ask whether the yellow line was a problem. Amber is the colour of "LU could
- // not confirm this", and a correct install has to stop wearing it.
+ // ask whether the yellow line was a problem.
+ //
+ // The first answer was to keep amber and hang it off the severity the backend
+ // sent, so that a confirmed ROCm install went muted and everything else
+ // stayed yellow. David killed the third colour outright on 04.09.2026 ("kein
+ // gelb mehr ohne farbe"), and with it the reason for the branch: neither note
+ // is a fault. One names the ROCm version and the architecture, the other says
+ // LU could not check the compute layer, and the card is listed, selectable
+ // and usable either way. Two notes that both only inform get one tone, the
+ // quiet one from lib/hinweis.ts, and the severity is not read here any more.
const settings = () => readFileSync(join(__dirname, '../../components/settings/HardwareSettings.tsx'), 'utf8')
- it('hangs the colour off the severity the backend sent', () => {
- expect(settings()).toMatch(/g\.note_severity === 'info' \? 'text-gray-500' : 'text-amber-500\/80'/)
+ it('says every note in the one quiet tone', () => {
+ expect(settings()).toMatch(/text-\[0\.55rem\] mt-0\.5 leading-relaxed \$\{HINWEIS_TEXT\.ruhig\}/)
})
- it('leaves every older note in the warning colour', () => {
- // NEGATIVE CONTROL: the notes that predate the field carry no severity, and
- // they are all warnings, so an unknown severity must not fall to the muted
- // branch. The comparison is against 'info' for exactly that reason.
- expect(settings()).not.toMatch(/note_severity === 'warn'/)
- // And the unconditional amber that was here is gone.
- expect(settings()).not.toMatch(/className="text-\[0\.55rem\] text-amber-500\/80 mt-0\.5/)
+ it('picks that tone from the shared rule instead of writing the colour out', () => {
+ // A copied `text-gray-500` drifts the moment the rule moves. The import is
+ // the proof that this line follows lib/hinweis.ts.
+ expect(settings()).toMatch(/import \{ HINWEIS_TEXT \} from '\.\.\/\.\.\/lib\/hinweis'/)
+ })
+
+ it('has no second branch left to paint anything yellow', () => {
+ // NEGATIVE CONTROL: not the severity read, not the colour, nowhere in the
+ // file. The panel used to open with an amber box of its own as well.
+ expect(settings()).not.toMatch(/g\.note_severity/)
+ expect(settings()).not.toMatch(/amber-|yellow-/)
})
})
diff --git a/src/components/__tests__/hellmodus-restluecken.test.ts b/src/components/__tests__/hellmodus-restluecken.test.ts
index f536adae..6228ea5a 100644
--- a/src/components/__tests__/hellmodus-restluecken.test.ts
+++ b/src/components/__tests__/hellmodus-restluecken.test.ts
@@ -29,6 +29,25 @@
* Die Kontrastrechnung ist die aus `primary-recipe.test.ts`, jetzt in
* `./wcag-contrast` — eine Implementierung, zwei Nutzer.
*
+ * ## Nachtrag 04.09.2026: eine der fuenf Farben gibt es nicht mehr
+ *
+ * Dieser Test hat den Passcode im QR-Modal als `text-amber-700
+ * dark:text-amber-400` festgeschrieben. Das war zum Zeitpunkt richtig: der
+ * Auftrag war der Hellmodus, und amber-700 war das fehlende Hell-Pendant
+ * zu einem Gelb, das damals stehenblieb.
+ *
+ * Seitdem ist die Regel eine andere. `lib/hinweis.ts` kennt zwei Toene,
+ * ruhig und fehler, und Gelb ist keiner davon: es hatte in dieser App
+ * fuenf verschiedene Bedeutungen und damit keine. Der Passcode war der
+ * Sonderfall darunter, weil er gar nichts meldet. Er ist der Wert, den man
+ * abliest und ins Telefon tippt. Ein Wert braucht Kontrast und keinen
+ * Farbton, also traegt er jetzt gray-900 auf Weiss und Weiss im Dunkeln.
+ *
+ * Die Rechnungen von damals bleiben trotzdem stehen, sie sind ja der Grund
+ * fuer die Bauform: was gemessen wurde, wird nicht dadurch falsch, dass
+ * die Farbe geht. Neu dazu kommt die Gegenrichtung, weiter unten: in
+ * diesen Abschnitten darf ueberhaupt kein Gelb mehr auftauchen.
+ *
* Run: npx vitest run src/components/__tests__/hellmodus-restluecken.test.ts
*/
import { describe, it, expect } from 'vitest'
@@ -91,8 +110,9 @@ const TW = {
'red-400': '#f87171',
'red-600': '#dc2626',
'red-700': '#b91c1c',
+ // Nur noch fuer die Rechnung von damals. Im Quelltext steht keins von
+ // beiden mehr, das prueft `kein Gelb mehr` weiter unten nach.
'amber-400': '#fbbf24',
- 'amber-700': '#b45309',
} as const
describe('die Palette im Test stimmt mit der in index.css ueberein', () => {
@@ -144,7 +164,7 @@ describe('WARUM die Flaeche allein nicht gereicht haette', () => {
['green-400', 'LIVE-Zeile im QR-Modal, „Active" in ProviderConfig'],
['blue-400', 'Trigger waehrend des Downloads'],
['red-400', 'Fehlerzustand'],
- ['amber-400', 'Passcode im QR-Modal'],
+ ['amber-400', 'Passcode im QR-Modal, so bis 04.09.2026'],
]
it.each(DARK_ONLY)('%s faellt auf Weiss durch (%s)', (name) => {
@@ -180,7 +200,6 @@ describe('NACHHER: die Hell-Pendants erreichen AA', () => {
['emerald-700', 5.48],
['blue-700', 6.7],
['red-700', 6.47],
- ['amber-700', 5.02],
]
it.each(HELL)('%s auf Weiss = %s:1', (name, erwartet) => {
@@ -188,6 +207,17 @@ describe('NACHHER: die Hell-Pendants erreichen AA', () => {
expect(contrast(TW[name], WHITE)).toBeCloseTo(erwartet, 1)
})
+ it('der Passcode ist gar kein Akzent mehr, sondern der staerkste Kontrast', () => {
+ // Die fuenfte Zeile dieser Liste hiess amber-700 mit 5,02:1. Sie ist
+ // weg, weil der Passcode seit dem 04.09.2026 keine Farbe mehr traegt:
+ // 17,74:1 im Hellmodus und 16,29:1 im Dunkelmodus schlagen jedes
+ // Hell-Pendant, das man ihm haette geben koennen. Ein Passcode meldet
+ // keinen Zustand, er wird abgetippt.
+ expect(QR_MODAL).toContain('text-gray-900 dark:text-white')
+ expect(contrast(TW['gray-900'], WHITE)).toBeCloseTo(17.74, 1)
+ expect(contrast(WHITE, token('color-lu-base'))).toBeCloseTo(16.29, 1)
+ })
+
it('die Nicht-Text-Signale erreichen 3:1 (WCAG 1.4.11)', () => {
// Statuspunkt am Badge, Fortschrittsbalken, LIVE-Punkt im Modal: die
// tragen keine Schrift, also gilt 1.4.11 statt 1.4.3.
@@ -198,7 +228,9 @@ describe('NACHHER: die Hell-Pendants erreichen AA', () => {
it('und die dunkle Seite bleibt unangetastet gut', () => {
expect(contrast(TW['emerald-400'], token('color-lu-overlay'))).toBeGreaterThanOrEqual(4.5)
- expect(contrast(TW['amber-400'], token('color-lu-base'))).toBeGreaterThanOrEqual(4.5)
+ // Stand hier als amber-400 auf lu-base (9,76:1). Dieselbe Flaeche,
+ // derselbe Anspruch, nur traegt sie jetzt die Schrift des Passcodes.
+ expect(contrast(WHITE, token('color-lu-base'))).toBeGreaterThanOrEqual(4.5)
})
})
@@ -258,7 +290,26 @@ describe('kein dunkelmodus-only Akzent mehr in diesen Abschnitten', () => {
expect(PROVIDER_DROPDOWN).toContain('text-green-700 dark:text-green-400')
expect(BADGE).toContain('text-emerald-700 dark:text-emerald-400')
expect(BADGE).toContain('bg-emerald-600 dark:bg-emerald-400')
- expect(QR_MODAL).toContain('text-amber-700 dark:text-amber-400')
+ expect(QR_MODAL).toContain('text-red-700 dark:text-red-400')
expect(QR_MODAL).toContain('text-green-700 dark:text-green-400')
})
})
+
+describe('kein Gelb mehr, auch nicht als Schmuck', () => {
+ // Die Gegenrichtung zu allem darueber. Bis zum 04.09.2026 war Gelb der
+ // Sammelplatz fuer alles zwischen gut und kaputt, und genau deshalb
+ // sagte es nichts. `lib/hinweis.ts` kennt seither zwei Toene, ruhig und
+ // fehler. Diese drei Abschnitte hatten je eine Fundstelle: der Passcode
+ // im QR-Modal war die letzte davon.
+ it.each(REGIONEN)('%s: kein amber und kein yellow', (name, region) => {
+ const treffer = [...ohneKommentare(region).matchAll(/(?:amber|yellow)-\d{2,3}/g)].map((m) => m[0])
+ expect(treffer, name).toEqual([])
+ })
+
+ it('und auch nicht im Rest der Sidebar, wo der zweite Passcode steht', () => {
+ // Das QR-Modal ist nur die grosse Fassung. Dieselbe Ziffernfolge steht
+ // im LIVE-Panel der Spalte, ausserhalb der Region oben.
+ expect(ohneKommentare(SIDEBAR)).not.toMatch(/(?:amber|yellow)-\d{2,3}/)
+ expect(SIDEBAR).toContain('text-gray-900 dark:text-white font-mono')
+ })
+})
diff --git a/src/components/agents/AgentLog.tsx b/src/components/agents/AgentLog.tsx
index 68d734fb..bd0ca388 100644
--- a/src/components/agents/AgentLog.tsx
+++ b/src/components/agents/AgentLog.tsx
@@ -5,12 +5,20 @@ import { ToolCallCard } from './ToolCallCard'
import type { AgentLogEntry } from '../../types/agents'
import { MOTION_S } from '../ui/motion'
+// Fuenf Eintragsarten, fuenf Farben. Nur eine davon ist eine Aussage ueber den
+// Zustand: `error` ist rot. Die anderen vier sortieren, sie bewerten nicht.
+//
+// `action` war gelb, und Gelb neben Rot liest sich wie „fast kaputt", dabei ist
+// eine Aktion der Normalfall dieses Protokolls. Fuchsia, weil es sich von den
+// vier Nachbarn am weitesten unterscheidet: Gedanke und Aktion wechseln sich
+// hier im Sekundentakt ab, und genau die zwei muessen beim Scrollen ohne Lesen
+// auseinanderfallen. Indigo und Fuchsia tun das, Indigo und Violett nicht.
const typeStyles: Record<AgentLogEntry['type'], { badge: string; bg: string; text: string }> = {
- thought: { badge: 'bg-indigo-500/20 text-indigo-300', bg: 'border-l-indigo-500/40', text: 'text-indigo-200' },
- action: { badge: 'bg-amber-500/20 text-amber-300', bg: 'border-l-amber-500/40', text: 'text-amber-200' },
- observation: { badge: 'bg-green-500/20 text-green-300', bg: 'border-l-green-500/40', text: 'text-green-200' },
- error: { badge: 'bg-red-500/20 text-red-300', bg: 'border-l-red-500/40', text: 'text-red-200' },
- user_input: { badge: 'bg-blue-500/20 text-blue-300', bg: 'border-l-blue-500/40', text: 'text-blue-200' },
+ thought: { badge: 'bg-indigo-500/20 text-indigo-300', bg: 'border-l-indigo-500/40', text: 'text-indigo-200' },
+ action: { badge: 'bg-fuchsia-500/20 text-fuchsia-300', bg: 'border-l-fuchsia-500/40', text: 'text-fuchsia-200' },
+ observation: { badge: 'bg-green-500/20 text-green-300', bg: 'border-l-green-500/40', text: 'text-green-200' },
+ error: { badge: 'bg-red-500/20 text-red-300', bg: 'border-l-red-500/40', text: 'text-red-200' },
+ user_input: { badge: 'bg-blue-500/20 text-blue-300', bg: 'border-l-blue-500/40', text: 'text-blue-200' },
}
const typeLabels: Record<AgentLogEntry['type'], string> = {
diff --git a/src/components/agents/ToolCallCard.tsx b/src/components/agents/ToolCallCard.tsx
index 51604a8a..a377239f 100644
--- a/src/components/agents/ToolCallCard.tsx
+++ b/src/components/agents/ToolCallCard.tsx
@@ -53,8 +53,13 @@ export function ToolCallCard({ toolCall, onApprove, onReject }: Props) {
{toolCall.status === 'rejected' ? 'rejected' : 'failed'}
</span>
)}
+ {/* Die drei Nachbarn oben sind Zustaende des Werkzeugs: laeuft, fertig,
+ fehlgeschlagen. „awaiting approval" ist keiner davon, sondern eine
+ Frage an den Nutzer, und stand trotzdem in Gelb zwischen Blau und
+ Rot. Der Hausakzent sagt „hier bist du dran", ohne einen Defekt zu
+ behaupten; die Antwort liegt als Approve/Reject direkt darunter. */}
{isPending && (
- <span className="t-micro text-amber-400 bg-amber-500/10 px-1.5 py-0.5 rounded-full">
+ <span className="t-micro text-lu-accent bg-lu-accent-soft px-1.5 py-0.5 rounded-full">
awaiting approval
</span>
)}
diff --git a/src/components/agents/WorkflowBuilder.tsx b/src/components/agents/WorkflowBuilder.tsx
index 9f8847e0..b4f487fb 100644
--- a/src/components/agents/WorkflowBuilder.tsx
+++ b/src/components/agents/WorkflowBuilder.tsx
@@ -16,10 +16,16 @@ const STEP_TYPE_LABELS: Record<WorkflowStepType, string> = {
memory_save: 'Save to Memory',
}
+// Sechs Schrittarten, sechs Toenungen. Das ist eine Sortierhilfe und keine
+// Bewertung: eine Bedingung ist nicht gefaehrlicher als eine Schleife. Sie
+// stand trotzdem in Gelb und war damit die einzige Karte, die aussah, als
+// waere etwas mit ihr. Rose ist die Luecke, die dieses Rad noch hat. Orange
+// waere nur eine halbe Drehung vom alten Gelb, und Rot heisst in dieser App
+// kaputt (der Papierkorb rechts in derselben Zeile faerbt sich so).
const STEP_TYPE_COLORS: Record<WorkflowStepType, string> = {
prompt: 'border-blue-500/30 bg-blue-500/5',
tool: 'border-green-500/30 bg-green-500/5',
- condition: 'border-amber-500/30 bg-amber-500/5',
+ condition: 'border-rose-500/30 bg-rose-500/5',
loop: 'border-purple-500/30 bg-purple-500/5',
user_input: 'border-cyan-500/30 bg-cyan-500/5',
memory_save: 'border-pink-500/30 bg-pink-500/5',
diff --git a/src/components/agents/WorkflowRunner.tsx b/src/components/agents/WorkflowRunner.tsx
index 6c8e28d7..fdd2c594 100644
--- a/src/components/agents/WorkflowRunner.tsx
+++ b/src/components/agents/WorkflowRunner.tsx
@@ -1,6 +1,7 @@
import { useEffect, useState } from 'react'
import { Loader2, Check, X, Circle, Send, Square } from 'lucide-react'
import { useAgentWorkflowStore } from '../../stores/agentWorkflowStore'
+import { Hinweis } from '../ui/Hinweis'
import type { StepStatus } from '../../types/agent-workflows'
const STATUS_ICONS: Record<StepStatus | 'waiting', typeof Check> = {
@@ -12,13 +13,17 @@ const STATUS_ICONS: Record<StepStatus | 'waiting', typeof Check> = {
waiting: Loader2,
}
+// `waiting` war gelb und stand damit zwischen „laeuft" und „kaputt", als gaebe
+// es einen halben Fehler. Es gibt keinen: der Lauf laeuft, er haengt nur an
+// einer Eingabe. Also dieselbe Farbe wie `running`. Was die beiden trennt, ist
+// die Bewegung (Puls statt Drehung) und die Frage, die darunter steht.
const STATUS_COLORS: Record<StepStatus | 'waiting', string> = {
pending: 'text-gray-600',
running: 'text-blue-400 animate-spin',
completed: 'text-green-400',
failed: 'text-red-400',
skipped: 'text-gray-600',
- waiting: 'text-amber-400 animate-pulse',
+ waiting: 'text-blue-400 animate-pulse',
}
interface WorkflowRunnerProps {
@@ -132,7 +137,9 @@ export function WorkflowRunner({
{/* User input prompt */}
{waitingForInput && (
<div className="space-y-1.5 pt-1 border-t border-white/5">
- <p className="t-micro text-amber-400">{waitingForInput}</p>
+ {/* Das ist die Frage an den Nutzer, keine Warnung. Sie gehoert zum
+ Feld darunter und traegt deshalb dessen Textfarbe. */}
+ <p className="t-micro text-gray-200">{waitingForInput}</p>
<div className="flex gap-1.5">
<input
value={inputValue}
@@ -152,11 +159,10 @@ export function WorkflowRunner({
</div>
)}
- {/* Error */}
+ {/* Error. Der Kasten um die Zeile ist weg: die rote Schrift sagt schon
+ alles, was Rahmen und Fuellflaeche dazutun sollten. */}
{execution.error && (
- <p className="t-micro text-red-400 bg-red-500/5 rounded px-2 py-1 border border-red-500/20">
- {execution.error}
- </p>
+ <Hinweis ton="fehler">{execution.error}</Hinweis>
)}
</div>
)
diff --git a/src/components/chat/AgentModeToggle.tsx b/src/components/chat/AgentModeToggle.tsx
index f614f1c4..b02b6c04 100644
--- a/src/components/chat/AgentModeToggle.tsx
+++ b/src/components/chat/AgentModeToggle.tsx
@@ -162,13 +162,10 @@ export function AgentModeToggle() {
transition={{ duration: MOTION_S.base }}
className="text-center space-y-3"
>
- <div className="flex justify-center">
- <div
- className="w-3 h-3 rounded-full bg-amber-500 shadow-lg"
- style={{ boxShadow: '0 0 20px 4px rgba(245, 158, 11, 0.4)' }}
- />
- </div>
-
+ {/* Hier leuchtete ein gelber Punkt mit Schein. Er war reine
+ Zierde: ein Zustandspunkt sagt an, aus oder kaputt, und
+ „dieser Dialog ist offen" ist keins davon. Der Titel darunter
+ sagt dasselbe in Worten (`lib/hinweis.ts`). */}
<h3 className="text-base font-semibold text-white">New Chat Required</h3>
<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.
diff --git a/src/components/chat/AgentWorkspaceDialog.tsx b/src/components/chat/AgentWorkspaceDialog.tsx
index ec39d063..1f75064c 100644
--- a/src/components/chat/AgentWorkspaceDialog.tsx
+++ b/src/components/chat/AgentWorkspaceDialog.tsx
@@ -5,6 +5,7 @@ import { useAgentModeStore } from '../../stores/agentModeStore'
import { useSettingsStore } from '../../stores/settingsStore'
import { backendCall } from '../../api/backend'
import type { AgentWorkspace } from '../../types/agent-workspace'
+import { HINWEIS_TEXT } from '../../lib/hinweis'
interface Props {
open: boolean
@@ -143,6 +144,12 @@ export function AgentWorkspaceDialog({
</p>
</div>
+ {/* Drei Wahlmoeglichkeiten, drei Farben, und keine davon sagt etwas
+ ueber Gefahr aus: sie halten die Zeilen nur auseinander. Der Ordner
+ trug Gelb und las sich damit wie eine Warnung vor der eigenen
+ Auswahl. Violett war in diesem Dialog noch frei, Gruen und Blau
+ haengen an den beiden Zeilen darueber, Rot am Entfernen-Knopf und
+ an der Fehlerzeile (`lib/hinweis.ts`). */}
{phase === 'pick' && (
<div className="space-y-2" data-testid="agent-workspace-options">
<WorkspaceOption
@@ -165,7 +172,7 @@ export function AgentWorkspaceDialog({
)}
<WorkspaceOption
- icon={<Folder size={16} className="text-amber-500" />}
+ icon={<Folder size={16} className="text-purple-500" />}
title={picking ? 'Opening picker…' : 'Pick a folder…'}
body="Choose a real directory. The agent edits files in there directly, like the Coding Agent."
onClick={handlePick}
@@ -174,10 +181,14 @@ export function AgentWorkspaceDialog({
</div>
)}
+ {/* Der Hauptordner steht jetzt im selben neutralen Rahmen wie die
+ Zusatzordner darunter. Sein gelber Kasten hat einen ausgewaehlten
+ Pfad wie eine Warnmeldung aussehen lassen; unterschieden wird er
+ durch die Beschriftung, nicht durch die Farbe. */}
{phase === 'extras' && draft?.kind === 'folder' && (
<div className="space-y-2" data-testid="agent-workspace-extras">
- <div className="rounded-lg border border-amber-500/30 bg-amber-50/40 dark:bg-amber-500/[0.04] px-3 py-2">
- <div className="text-[0.55rem] uppercase tracking-widest text-amber-700 dark:text-amber-300/80 mb-0.5">
+ <div className="rounded-lg border border-gray-200 dark:border-white/10 px-3 py-2">
+ <div className={`text-[0.55rem] uppercase tracking-widest ${HINWEIS_TEXT.ruhig} mb-0.5`}>
Primary
</div>
<div className="text-[0.7rem] font-mono text-gray-800 dark:text-gray-200 truncate">
diff --git a/src/components/chat/ChatInput.tsx b/src/components/chat/ChatInput.tsx
index 889919a6..25735baf 100644
--- a/src/components/chat/ChatInput.tsx
+++ b/src/components/chat/ChatInput.tsx
@@ -12,6 +12,8 @@ import { clampEffort, effortChoices, effortLabel, nextEffort, DEFAULT_EFFORT } f
import type { AgentToolCall } from '../../types/agent-mode'
import type { ImageAttachment } from '../../types/chat'
import { COMPOSER_MAX_W } from './composer-width'
+import { Hinweis } from '../ui/Hinweis'
+import { HINWEIS_TEXT, HINWEIS_ZEILE } from '../../lib/hinweis'
import { MONOGRAM, MONOGRAM_INVERT } from '../layout/brand'
interface Props {
@@ -428,19 +430,27 @@ export function ChatInput({ onSend, onStop, isGenerating, pendingApproval, onApp
{/* Non-image attach hint (GH #69). The clip is images-only; PDFs, Word,
and text files go through the Documents panel so the model can read them. */}
{docHint && (
- <div className="flex items-center gap-2 mb-1.5 px-2 py-1 rounded-md bg-amber-500/10 border border-amber-500/20 t-micro text-amber-700 dark:text-amber-300">
- <span className="flex-1">The clip attaches images. To ask about a PDF, Word, or text file, add it in the Documents panel.</span>
- {onAttachDocs && (
- <button
- onMouseDown={(e) => { e.preventDefault(); setDocHint(false); onAttachDocs() }}
- className="shrink-0 px-1.5 py-0.5 rounded bg-amber-500/20 hover:bg-amber-500/30 text-amber-800 dark:text-amber-200 font-medium transition-colors"
- >
- Open Documents
- </button>
- )}
+ // Eine ruhige Zeile statt des gelben Kastens mit dem gelben
+ // Knopf darin: der Clip hat nur nicht das genommen, was der
+ // Nutzer wollte, kaputt ist dabei nichts. Gebaut aus den
+ // Konstanten und nicht aus `<Hinweis>`, weil beide Knoepfe hier
+ // `onMouseDown` mit `preventDefault` brauchen: sonst verliert das
+ // Textfeld beim Wegklicken den Schreibzeiger.
+ <div role="status" className={`${HINWEIS_ZEILE} ${HINWEIS_TEXT.ruhig} mb-1.5 px-1`}>
+ <span className="flex-1 min-w-0">
+ The clip attaches images. To ask about a PDF, Word, or text file, add it in the Documents panel.
+ {onAttachDocs && (
+ <button
+ onMouseDown={(e) => { e.preventDefault(); setDocHint(false); onAttachDocs() }}
+ className="ml-1 underline underline-offset-2 hover:text-gray-700 dark:hover:text-gray-200 transition-colors"
+ >
+ Open Documents
+ </button>
+ )}
+ </span>
<button
onMouseDown={(e) => { e.preventDefault(); setDocHint(false) }}
- className="shrink-0 text-amber-600/70 hover:text-amber-700 dark:text-amber-400/70 dark:hover:text-amber-300"
+ className="shrink-0 opacity-70 hover:opacity-100 transition-opacity"
aria-label="Dismiss"
>
<X size={11} />
@@ -476,10 +486,9 @@ export function ChatInput({ onSend, onStop, isGenerating, pendingApproval, onApp
Non-blocking (send still works); the runtime error is also mapped
to friendly copy. gthvidsten, GH Discussion #67. */}
{images.length > 0 && activeModel && !canSeeImages && (
- <div className="flex items-start gap-1.5 mb-1.5 px-1 text-[0.55rem] leading-relaxed text-amber-600 dark:text-amber-400">
- <span className="shrink-0">⚠</span>
- <span>This model can't read images. Switch to a vision model (Gemma 4, LLaVA, Qwen-VL) to use the attachment.</span>
- </div>
+ <Hinweis className="mb-1.5 px-1">
+ This model can't read images. Switch to a vision model (Gemma 4, LLaVA, Qwen-VL) to use the attachment.
+ </Hinweis>
)}
<textarea
diff --git a/src/components/chat/CodexEventBlock.tsx b/src/components/chat/CodexEventBlock.tsx
index ffffefaa..bcc2edc0 100644
--- a/src/components/chat/CodexEventBlock.tsx
+++ b/src/components/chat/CodexEventBlock.tsx
@@ -23,8 +23,13 @@ function CodexEventBlockImpl({ event }: Props) {
error: AlertCircle,
}
+ // Vier Ereignisarten, vier Farben. Das ist eine Einteilung, keine Ampel:
+ // eine Dateiaenderung ist der Normalfall eines Codelaufs und stand trotzdem
+ // in Gelb, also in der Farbe, die im Rest der App Alarm bedeutete. Violett
+ // ist gegen die drei Nachbarn in dieser Tabelle geprueft, Gruen gehoert der
+ // Konsole, Blau dem Denken, Rot dem Fehler.
const colors = {
- file_change: 'text-amber-400',
+ file_change: 'text-purple-400',
terminal_output: 'text-green-400',
reasoning: 'text-blue-400',
error: 'text-red-400',
diff --git a/src/components/chat/CodexModeDropdown.tsx b/src/components/chat/CodexModeDropdown.tsx
index 2614f794..4f441548 100644
--- a/src/components/chat/CodexModeDropdown.tsx
+++ b/src/components/chat/CodexModeDropdown.tsx
@@ -5,6 +5,7 @@ import { useChatStore } from '../../stores/chatStore'
import { useCodexStore } from '../../stores/codexStore'
import { useSettingsStore } from '../../stores/settingsStore'
import { useGenerationStore } from '../../stores/generationStore'
+import { HINWEIS_TEXT, PUNKT_FARBE } from '../../lib/hinweis'
import {
CODEX_MODES, CODEX_MODE_LABELS, CODEX_MODE_SHORT, CODEX_MODE_DESCRIPTIONS,
resolveCodexMode, type CodexMode,
@@ -30,15 +31,25 @@ const MODE_ICON: Record<CodexMode, typeof ShieldCheck> = {
plan: ClipboardList,
}
+/**
+ * Die drei Modi sind eine Kategorie, keine Ampel: eine Farbe pro Modus, damit
+ * man den aktiven am Ausloeser erkennt, ohne ihn zu lesen.
+ *
+ * Bypass stand in Gelb und sah damit aus wie eine Dauerwarnung, obwohl im
+ * Betrieb nichts falsch ist, wenn er an ist. Neu ist Blaugruen, und zwar
+ * gegen die drei Farben geprueft, die in dieser Datei sonst noch vorkommen:
+ * Blau gehoert Ask, Violett gehoert Plan, und das Gruen von `PUNKT_FARBE.an`
+ * gehoert dem Punkt, der sagt, dass gerade ein Lauf laeuft.
+ */
const MODE_ACCENT: Record<CodexMode, string> = {
ask: 'text-blue-400',
- bypass: 'text-amber-400',
+ bypass: 'text-teal-400',
plan: 'text-purple-400',
}
const MODE_ACTIVE_ROW: Record<CodexMode, string> = {
ask: 'bg-blue-500/10 text-blue-600 dark:text-blue-400',
- bypass: 'bg-amber-500/10 text-amber-600 dark:text-amber-400',
+ bypass: 'bg-teal-500/10 text-teal-600 dark:text-teal-400',
plan: 'bg-purple-500/10 text-purple-600 dark:text-purple-400',
}
@@ -88,14 +99,19 @@ export function CodexModeDropdown({ openUpward = false }: { openUpward?: boolean
<CurrentIcon size={10} className={`shrink-0 ${MODE_ACCENT[current]}`} />
<span className={MODE_ACCENT[current]}>{CODEX_MODE_SHORT[current]}</span>
{pending ? (
- <span className="text-[0.5rem] text-amber-500">
+ // Der geparkte Modus steht in SEINER Farbe, nicht in einer eigenen:
+ // "then plan" in Violett sagt schon, worauf es hinausgeht. Vorher war
+ // dieses Stueck gelb und behauptete damit einen dritten Zustand.
+ <span className={`text-[0.5rem] ${MODE_ACCENT[pending]}`}>
{`then ${CODEX_MODE_SHORT[pending]}`}
</span>
) : runActive ? (
// A run is in flight and nothing is parked yet. Say it on the
// trigger, not only in the panel, so "applies to the next message" is
- // visible before the user clicks.
- <span className="w-1 h-1 shrink-0 rounded-full bg-amber-400" />
+ // visible before the user clicks. Der Punkt sagt "laeuft", also die
+ // gruene Stufe der Ampel aus `lib/hinweis.ts`; gelb hiess hier frueher
+ // weder an noch aus.
+ <span className={`w-1 h-1 shrink-0 rounded-full ${PUNKT_FARBE.an}`} />
) : null}
<ChevronDown size={8} className={`shrink-0 transition-transform ${open ? 'rotate-180' : ''}`} />
</button>
@@ -111,7 +127,9 @@ export function CodexModeDropdown({ openUpward = false }: { openUpward?: boolean
) : (
<>
{runActive && (
- <p className="px-3 pb-1 text-[0.5rem] leading-snug text-amber-600 dark:text-amber-400/90">
+ // Auskunft, kein Alarm: die Wahl geht nicht verloren, sie
+ // wirkt nur spaeter. Ruhiger Ton aus `lib/hinweis.ts`.
+ <p className={`px-3 pb-1 text-[0.5rem] leading-snug ${HINWEIS_TEXT.ruhig}`}>
A run is in flight. Your pick applies from the next message.
</p>
)}
@@ -135,7 +153,11 @@ export function CodexModeDropdown({ openUpward = false }: { openUpward?: boolean
<span className="flex items-center gap-1">
<span className="text-[0.55rem] font-medium">{CODEX_MODE_LABELS[mode]}</span>
{isActive && <span className="text-[0.45rem] text-gray-400">active</span>}
- {isPending && <span className="text-[0.45rem] text-amber-500">next</span>}
+ {isPending && (
+ // Wie am Ausloeser: in der Farbe des Modus, um
+ // den es geht, nicht in einer Warnfarbe.
+ <span className={`text-[0.45rem] ${MODE_ACCENT[mode]}`}>next</span>
+ )}
</span>
<span className="block text-[0.5rem] leading-snug text-gray-400">
{CODEX_MODE_DESCRIPTIONS[mode]}
diff --git a/src/components/chat/CodexView.tsx b/src/components/chat/CodexView.tsx
index 3a9d1beb..9b55bd27 100644
--- a/src/components/chat/CodexView.tsx
+++ b/src/components/chat/CodexView.tsx
@@ -41,6 +41,8 @@ import { User, Code, Eye, GitBranch, Download, RefreshCw, RotateCcw, Folder, Fol
import { Fragment, useEffect, useState } from 'react'
import { checkGitInstalled, openExternal, type GitStatus } from '../../api/backend'
import { CodexConfirmDialog } from './CodexConfirmDialog'
+import { Hinweis } from '../ui/Hinweis'
+import { HINWEIS_TEXT } from '../../lib/hinweis'
import { stripModelNoise } from '../../lib/strip-model-noise'
// Code always drives a tool loop, so the aggressive tier applies here.
@@ -172,10 +174,16 @@ export function CodexView() {
{/* Code-Review Mode badge (B13), makes it impossible to miss
that the agent is read-only. The toggle itself lives in
Settings → Codex Agent; clicking the badge jumps you there
- isn't worth a routing change in v2.5.0. */}
+ isn't worth a routing change in v2.5.0.
+ Das Abzeichen stand in Gelb und las sich damit wie eine Stoerung,
+ obwohl es das Gegenteil meldet: der Agent kann nichts anfassen.
+ Gruen sagt "diese Zusicherung gilt". Es ist keine Ampel, sondern
+ ein Zustandschip, deshalb behaelt es seine Form und wechselt nur
+ den Farbton. Im Kopf daneben ist Gruen frei: der Modellumschalter
+ nimmt Violett, alles andere ist grau. */}
{codexReviewMode && (
<span
- className="flex items-center gap-1 px-1.5 py-0 rounded border border-amber-500/30 text-amber-500 text-[0.55rem] bg-amber-500/[0.04]"
+ className="flex items-center gap-1 px-1.5 py-0 rounded border border-emerald-500/30 text-emerald-600 dark:text-emerald-400 text-[0.55rem] bg-emerald-500/[0.04]"
title="Code-Review Mode is active. The coding agent will inspect the codebase but won't write files or run commands. Disable in Settings → Coding Agent."
>
<Eye size={9} />
@@ -237,16 +245,20 @@ export function CodexView() {
{/* Git-missing banner (v2.5.0). Codex shells out to git for
status/diff/commit/log, and without it those tools fail. Minimal,
dismiss-by-installing: an Install button (opens the platform git
- download page) + a Recheck button for after the install. */}
+ download page) + a Recheck button for after the install.
+ Ton `fehler`: ohne git fallen echte Werkzeuge aus, und es gibt genau
+ eine Handlung dagegen, die gleich daneben steht. Die gelbe Fuellung
+ und der gelbe Rahmen sind weg, die Linie unten ist die Trennung zum
+ Verlauf und dieselbe wie am Kopf darueber, kein Rahmen um den Satz
+ (`lib/hinweis.ts`). */}
{gitStatus && !gitStatus.installed && (
- <div className="flex items-center gap-2 px-3 py-1.5 border-b border-amber-500/20 bg-amber-500/[0.06]">
- <GitBranch size={12} className="text-amber-500 shrink-0" />
- <span className="t-micro text-amber-600 dark:text-amber-400/90 flex-1 leading-tight">
+ <div className="flex items-center gap-2 px-3 py-1.5 border-b border-gray-200 dark:border-white/[0.04]">
+ <Hinweis ton="fehler" icon={<GitBranch size={12} className="shrink-0 mt-0.5" />} className="flex-1">
Git isn't installed. The coding agent needs it for diffs, commits and history.
- </span>
+ </Hinweis>
<button
onClick={() => openExternal(gitStatus.download_url)}
- className="flex items-center gap-1 px-2 py-0.5 rounded t-micro font-medium bg-amber-500/15 text-amber-600 dark:text-amber-300 hover:bg-amber-500/25 border border-amber-500/30 transition-colors"
+ className="flex items-center gap-1 px-2 py-0.5 rounded t-micro font-medium text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-white/5 transition-colors"
>
<Download size={11} /> Install Git
</button>
@@ -275,8 +287,12 @@ export function CodexView() {
<p className="text-[0.55rem] text-gray-400 dark:text-gray-600 mt-0.5 max-w-[300px]">
Send a coding instruction. The coding agent will read your codebase, write code, and run commands.
</p>
+ {/* Kein Ordner ist kein Fehler, sondern der Startzustand: der
+ Agent hat ein Ausweichverzeichnis und arbeitet darin. Die
+ Zeile stand in gedaempftem Gelb, also in Alarmfarbe fuer eine
+ Auskunft, und steht jetzt im ruhigen Ton der Absaetze darueber. */}
{!codexWorkingDir && (
- <p className="text-[0.55rem] text-amber-500/70 mt-2" data-testid="codex-no-folder-hint">
+ <p className={`text-[0.55rem] mt-2 ${HINWEIS_TEXT.ruhig}`} data-testid="codex-no-folder-hint">
No folder picked. The agent works in {fallbackLabel}. Pick a project with
"Select folder..." in the file tree panel on the right.
</p>
@@ -298,20 +314,23 @@ export function CodexView() {
// that says "the file on disk is not the diff you approved"
// reached nobody, and an assistant bubble would be the other
// wrong answer: it would claim the model said it.
+ // Die beiden Faelle unterscheiden sich im TON, nicht in der
+ // Bauform: die Datei auf der Platte weicht vom genehmigten Diff
+ // ab, da muss jemand hinsehen (rot), oder sie ist genau der
+ // genehmigte Diff (ruhig). Vorher hatten beide einen Kasten,
+ // der gelbe darin sah aus wie ein Absturz (`lib/hinweis.ts`).
if (msg.role === 'system' && msg.notice) {
const warn = msg.notice === 'warn'
return (
<div key={msg.id} className="px-3 py-1" data-testid="codex-notice">
- <div className={`flex items-start gap-1.5 px-2 py-1 rounded border t-micro leading-snug ${
- warn
- ? 'border-amber-300/70 dark:border-amber-500/30 bg-amber-50 dark:bg-amber-500/10 text-amber-900 dark:text-amber-200'
- : 'border-gray-200 dark:border-white/10 bg-gray-50/60 dark:bg-white/[0.02] text-gray-500 dark:text-gray-400'
- }`}>
- {warn
+ <Hinweis
+ ton={warn ? 'fehler' : 'ruhig'}
+ icon={warn
? <AlertTriangle size={10} className="mt-0.5 shrink-0" />
: <Check size={10} className="mt-0.5 shrink-0" />}
+ >
<span className="break-words">{msg.content}</span>
- </div>
+ </Hinweis>
</div>
)
}
diff --git a/src/components/chat/ExplorerPanel.tsx b/src/components/chat/ExplorerPanel.tsx
index a2588a44..650834e5 100644
--- a/src/components/chat/ExplorerPanel.tsx
+++ b/src/components/chat/ExplorerPanel.tsx
@@ -66,6 +66,7 @@ import { PlanApprovalBar } from './PlanApprovalBar'
import { FilePreview } from './FilePreview'
import { useChatStore } from '../../stores/chatStore'
import { useTodoStore } from '../../stores/todoStore'
+import { HINWEIS_TEXT } from '../../lib/hinweis'
const fsList: FsList = (args) => backendCall('fs_list', args as unknown as Record<string, unknown>)
@@ -405,7 +406,11 @@ function ListingHints({ listing, depth }: { listing: ExplorerListing; depth: num
return (
<div style={{ paddingLeft: `${depth * 8 + 4}px` }} className="py-[1px]">
{listing.truncated && (
- <p className="text-[0.45rem] text-amber-500/80" data-testid="explorer-truncated">
+ // Ruhiger Ton, nicht Gelb: die Liste ist vollstaendig bis zur Grenze,
+ // sie ist nicht kaputt. Etwas kraeftiger als die Zeile darunter, weil
+ // „hier fehlt der Rest" die groessere der zwei Auskuenfte ist
+ // (`lib/hinweis.ts`).
+ <p className={`text-[0.45rem] ${HINWEIS_TEXT.ruhig}`} data-testid="explorer-truncated">
shortened, first {FS_LIST_CAP} entries only
</p>
)}
diff --git a/src/components/chat/FilePreview.tsx b/src/components/chat/FilePreview.tsx
index 7096cc03..2a59a39e 100644
--- a/src/components/chat/FilePreview.tsx
+++ b/src/components/chat/FilePreview.tsx
@@ -33,6 +33,7 @@ import {
} from '../../lib/file-preview'
import { isWithinRoot, type ExplorerNode } from '../../lib/explorer-tree'
import { formatCount } from '../../lib/formatters'
+import { Hinweis } from '../ui/Hinweis'
interface Props {
node: ExplorerNode
@@ -132,6 +133,11 @@ export function FilePreview({ node, root, onClose }: Props) {
{state.status === 'html' && (
<>
<ViewportSwitcher viewport={viewport} onChange={setViewport} compact />
+ {/* Der Ein-Zustand traegt Gruen, wie jeder Ein-Zustand in der App
+ (`lib/hinweis.ts`). Vorher war er gelb und behauptete damit
+ einen Zwischenfall: eingeschaltete Skripte sind aber genau
+ das, was der Nutzer hier eben angeklickt hat, und das Symbol
+ daneben sagt schon, dass die Seite jetzt ausgefuehrt wird. */}
<button
onClick={() => setAllowScripts((v) => !v)}
title={
@@ -141,7 +147,7 @@ export function FilePreview({ node, root, onClose }: Props) {
}
className={`flex items-center gap-0.5 px-1 py-0.5 rounded text-[0.5rem] border transition-colors ${
allowScripts
- ? 'border-amber-500/40 text-amber-500 bg-amber-500/[0.08]'
+ ? 'border-emerald-500/40 text-emerald-500 bg-emerald-500/[0.08]'
: 'border-gray-200 dark:border-white/10 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300'
}`}
data-testid="explorer-scripts-toggle"
@@ -184,9 +190,7 @@ export function FilePreview({ node, root, onClose }: Props) {
<div className="p-1">
<CodeBlock code={state.text} language={previewLanguageFor(node.name)} />
{state.truncated && (
- <p className="px-1 pb-1 text-[0.5rem] text-amber-500/80">
- Shortened for the preview. Open the file to see the rest.
- </p>
+ <Hinweis className="px-1 pb-1">Shortened for the preview. Open the file to see the rest.</Hinweis>
)}
</div>
)}
diff --git a/src/components/chat/GroupCostHint.tsx b/src/components/chat/GroupCostHint.tsx
index f378b73d..3a9b5eea 100644
--- a/src/components/chat/GroupCostHint.tsx
+++ b/src/components/chat/GroupCostHint.tsx
@@ -11,6 +11,7 @@
// chat, where it would be noise.
import { Users } from 'lucide-react'
+import { Hinweis } from '../ui/Hinweis'
import { useChatStore } from '../../stores/chatStore'
import { useProviderStore } from '../../stores/providerStore'
import { isGroupChat } from '../../lib/group-chat'
@@ -51,18 +52,19 @@ export function GroupCostHint() {
? groupModels.filter((m) => m.startsWith('openai::')).length
: 0
+ // Eine Zeile, kein Kasten: der Vervielfacher ist eine Auskunft, kein Alarm.
+ // Vorher trug die Zeile einen gelben Rahmen mit gelber Fuellung und ein
+ // gelbes Symbol, also die Bauform einer Warnung fuer einen Satz, der nur
+ // sagt, was der naechste Enter kostet. Die Begruendung steht in
+ // `lib/hinweis.ts`.
return (
<div className={`w-full ${COMPOSER_MAX_W} mx-auto px-3 pb-1 flex justify-center`}>
- <div className="w-full flex items-center gap-1.5 px-2 py-1 rounded-md border border-amber-500/20 bg-amber-500/[0.04]">
- <Users size={9} className="text-amber-400 shrink-0" />
- <span className="text-[0.55rem] uppercase tracking-wider text-gray-500 shrink-0">group</span>
- <span
- className="flex-1 min-w-0 truncate t-micro text-gray-700 dark:text-gray-300"
- title={groupModels.join(', ')}
- >
+ <Hinweis className="w-full" icon={<Users size={9} className="shrink-0 mt-[3px]" />}>
+ <span className="block truncate" title={groupModels.join(', ')}>
+ <span className="uppercase tracking-wider">group</span>{' '}
{groupCostHintText(groupModels.length, builtinSpeakers)}
</span>
- </div>
+ </Hinweis>
</div>
)
}
diff --git a/src/components/chat/MemoryDebugPanel.tsx b/src/components/chat/MemoryDebugPanel.tsx
index 5f60c9b4..727fac59 100644
--- a/src/components/chat/MemoryDebugPanel.tsx
+++ b/src/components/chat/MemoryDebugPanel.tsx
@@ -66,9 +66,14 @@ function MemoryPopover({ onClose }: { onClose: () => void }) {
return () => { cancelled = true }
}, [activeModel, entries.length])
+ // Vier Kategorien, vier Farben. `project` stand auf Gelb, und Gelb ist in
+ // dieser App keine Kategorie mehr, sondern gar nichts (`lib/hinweis.ts`).
+ // Cyan ist die naechste Farbe, die in diesem Panel noch frei war: Blau,
+ // Gruen und Grau haengen an den drei anderen Kategorien, Violett traegt die
+ // Panel-Umrandung, Rot den Loeschknopf.
const typeColors: Record<string, string> = {
user: 'text-blue-400', feedback: 'text-green-400',
- project: 'text-amber-400', reference: 'text-gray-400',
+ project: 'text-cyan-400', reference: 'text-gray-400',
}
const handleAdd = () => {
diff --git a/src/components/chat/MessageBubble.tsx b/src/components/chat/MessageBubble.tsx
index c8ea0598..de38aba9 100644
--- a/src/components/chat/MessageBubble.tsx
+++ b/src/components/chat/MessageBubble.tsx
@@ -25,6 +25,7 @@ import { buildMessageMenu, type MessageMenuHandlers } from '../ui/menu-actions'
import { MONOGRAM, MONOGRAM_INVERT } from '../layout/brand'
import { AVATAR_SLOT } from './avatar-slot'
import { MOTION_S } from '../ui/motion'
+import { Hinweis } from '../ui/Hinweis'
interface Props {
message: Message
@@ -474,20 +475,34 @@ function MessageBubbleImpl({ message, onRegenerate, onEdit, pendingApprovalId, o
screen has always flagged cut-offs; the chat did not, so a
truncated answer read as complete (David 2026-08-08). */}
{truncationNotice(message.finishReason) && (
- <div className="mt-1 inline-flex items-center gap-1 t-micro text-amber-600/80 dark:text-amber-300/70">
- <Scissors size={9} className="shrink-0" />
- <span>{truncationNotice(message.finishReason)}</span>
- </div>
+ // Ruhig, nicht laut: die Antwort ist kuerzer als geplant,
+ // kaputt ist nichts. Die Zeile stand vorher in Gelb und in
+ // derselben Farbe wie die erfundenen Links darunter, die
+ // etwas voellig anderes sagen (`lib/hinweis.ts`).
+ <Hinweis
+ className="mt-1"
+ icon={<Scissors size={9} className="mt-0.5 shrink-0" />}
+ >
+ {truncationNotice(message.finishReason)}
+ </Hinweis>
)}
{/* Z36 finding 3: the model cited links no tool returned and
ignored the corrective steer. The answer stays untouched,
it is the model's text (G14-2); this labelled app notice
names the links that came from nowhere. */}
{unbackedLinksNotice(message.unbackedLinks) && (
- <div className="mt-1 flex items-start gap-1 t-micro text-amber-600/80 dark:text-amber-300/70">
- <Unlink size={9} className="mt-0.5 shrink-0" />
- <span>{unbackedLinksNotice(message.unbackedLinks)}</span>
- </div>
+ // Der eine Ton, der hier wirklich Fehler heisst: diese
+ // Links hat kein Werkzeug geliefert, und wer sie anklickt,
+ // landet nirgends. Das ist die Zeile, wegen der jemand
+ // etwas tun muss, also traegt sie Rot statt des alten
+ // Gelbs, das sie sich mit der Abschneide-Marke teilte.
+ <Hinweis
+ ton="fehler"
+ className="mt-1"
+ icon={<Unlink size={9} className="mt-0.5 shrink-0" />}
+ >
+ {unbackedLinksNotice(message.unbackedLinks)}
+ </Hinweis>
)}
{/* A reasoning-only reply used to print a stand-in sentence
here ("The model only produced internal reasoning and no
@@ -495,37 +510,38 @@ function MessageBubbleImpl({ message, onRegenerate, onEdit, pendingApprovalId, o
David 2026-08-07), and on an agent surface the loop's job
is to CONTINUE past such a round (G17), not to explain
it. The thinking block above already shows what happened.
- The amber card below survives because it is a labelled
- app hint with an action, not prose posing as an answer. */}
+ The hint below survives because it is a labelled app hint
+ with an action, not prose posing as an answer. It is a
+ quiet line now, no longer a filled card with a framed
+ button: nothing is broken here, a switch is simply off,
+ and one line says so (see `lib/hinweis.ts`). */}
{thoughtOnly && thoughtOnlyToolIntent && activeModel && isAgentCompatible(activeModel) && (
- <div className="mt-1 flex items-start gap-2 px-2 py-1.5 rounded-md border border-amber-400/30 bg-amber-500/10 t-micro text-amber-700 dark:text-amber-200">
- <Wrench size={11} className="mt-0.5 shrink-0" />
- <div className="flex-1">
- <p className="font-medium">The model spent its whole reply deciding to call a tool, but Agent Mode is off, so it never said anything.</p>
- <p className="opacity-80 mt-0.5">Turn Agent Mode on and ask again to let it actually run the tool (search the web, generate media, read files). Its reasoning is in the thinking block above.</p>
- </div>
+ <Hinweis
+ className="mt-1"
+ icon={<Wrench size={11} className="mt-0.5 shrink-0" />}
+ >
+ The model spent its whole reply deciding to call a tool, but Agent Mode is off, so nothing ran. Its reasoning is in the thinking block above.{' '}
<button
onClick={() => activeConversationId && toggleAgentMode(activeConversationId)}
- className="shrink-0 px-2 py-0.5 rounded border border-amber-400/40 hover:bg-amber-500/20 transition-colors font-medium"
+ className="font-medium underline underline-offset-2 hover:no-underline"
>
Enable Agent
</button>
- </div>
+ </Hinweis>
)}
{suggestAgent && (
- <div className="mt-2 flex items-start gap-2 px-2 py-1.5 rounded-md border border-amber-400/30 bg-amber-500/10 t-micro text-amber-700 dark:text-amber-200">
- <Wrench size={11} className="mt-0.5 shrink-0" />
- <div className="flex-1">
- <p className="font-medium">This model tried to call a tool, but Agent Mode is off for this chat.</p>
- <p className="opacity-80 mt-0.5">Turn it on to let the model actually execute tools (read files, run commands, browse). Until then it'll keep emitting JSON that nothing reads.</p>
- </div>
+ <Hinweis
+ className="mt-2"
+ icon={<Wrench size={11} className="mt-0.5 shrink-0" />}
+ >
+ This model tried to call a tool, but Agent Mode is off for this chat, so nothing ran and it will keep emitting JSON that nothing reads.{' '}
<button
onClick={() => activeConversationId && toggleAgentMode(activeConversationId)}
- className="shrink-0 px-2 py-0.5 rounded border border-amber-400/40 hover:bg-amber-500/20 transition-colors font-medium"
+ className="font-medium underline underline-offset-2 hover:no-underline"
>
Enable Agent
</button>
- </div>
+ </Hinweis>
)}
</div>
)
diff --git a/src/components/chat/MessageList.tsx b/src/components/chat/MessageList.tsx
index d49f79dc..21eb5a74 100644
--- a/src/components/chat/MessageList.tsx
+++ b/src/components/chat/MessageList.tsx
@@ -6,6 +6,7 @@ import { MessageBubble } from './MessageBubble'
import { WorkingAnchor } from './WorkingAnchor'
import { CompactBlock } from './CompactBlock'
import { compactionAnchors } from '../../lib/compact-summary'
+import { Hinweis } from '../ui/Hinweis'
/**
* Above this many visible messages the transcript stops paying full layout +
@@ -165,16 +166,16 @@ export function MessageList({ isGenerating, isThisChatGenerating, isLoadingModel
>
{message.role === 'system' && message.notice ? (
// Schlichte Zeile, keine Blase: eine Blase wuerde behaupten,
- // das Modell habe es gesagt. Dieselbe Form wie im
- // Code-Verlauf (CodexView, data-testid="codex-notice").
+ // das Modell habe es gesagt. Und kein Kasten mehr darum: der
+ // Rahmen samt gelber Flaeche gab einem Satz das Gewicht eines
+ // Absturzes. Es bleiben die zwei Toene aus `lib/hinweis.ts`,
+ // dieselbe Form wie im Code-Verlauf (CodexView,
+ // data-testid="codex-notice"): `warn` ist das, wo jemand
+ // handeln muss, alles andere ist eine ruhige Bestaetigung.
<div className="px-3 py-1" data-testid="chat-notice">
- <div className={`flex items-start gap-1.5 px-2 py-1 rounded border t-micro leading-snug ${
- message.notice === 'warn'
- ? 'border-amber-300/70 dark:border-amber-500/30 bg-amber-50 dark:bg-amber-500/10 text-amber-900 dark:text-amber-200'
- : 'border-gray-200 dark:border-white/10 bg-gray-50/60 dark:bg-white/[0.02] text-gray-500 dark:text-gray-400'
- }`}>
+ <Hinweis ton={message.notice === 'warn' ? 'fehler' : 'ruhig'}>
<span className="break-words">{message.content}</span>
- </div>
+ </Hinweis>
</div>
) : (
<MessageBubble
diff --git a/src/components/chat/ModelPickerCard.tsx b/src/components/chat/ModelPickerCard.tsx
index 1cb4c2ff..b0a29086 100644
--- a/src/components/chat/ModelPickerCard.tsx
+++ b/src/components/chat/ModelPickerCard.tsx
@@ -5,6 +5,7 @@ import { useSettingsStore } from '../../stores/settingsStore'
import { getImageModels, getVideoModels, isI2VModel, isT2VCapable } from '../../api/comfyui'
import type { AgentToolCall } from '../../types/agent-mode'
import type { ToolArgs } from '../../api/mcp/types'
+import { Hinweis } from '../ui/Hinweis'
/**
* Model-Picker UI (v2.5.3, David 2026-06-10). Two faces of one feature:
@@ -199,7 +200,10 @@ export function ChangeModelInline({ kind }: { kind: ModelPickKind }) {
<div className="flex items-center gap-1 text-[0.55rem] text-gray-500"><Loader2 size={9} className="animate-spin" /> loading models…</div>
)}
{loadError && (
- <div className="text-[0.55rem] text-amber-500">Could not reach ComfyUI, so the model list is unavailable.</div>
+ // Roter Ton, weil hier wirklich etwas fehlgeschlagen ist: ohne
+ // Liste kann niemand waehlen. Gelb hat den Unterschied zwischen
+ // „laedt noch" und „ging schief" eingeebnet (`lib/hinweis.ts`).
+ <Hinweis ton="fehler">Could not reach ComfyUI, so the model list is unavailable.</Hinweis>
)}
{models !== null && models.length > 0 && (
<ModelList
diff --git a/src/components/chat/PermissionOverrideBar.tsx b/src/components/chat/PermissionOverrideBar.tsx
index 82124ff2..9194fb60 100644
--- a/src/components/chat/PermissionOverrideBar.tsx
+++ b/src/components/chat/PermissionOverrideBar.tsx
@@ -3,6 +3,7 @@ import { useChatStore } from '../../stores/chatStore'
import type { ToolCategory } from '../../api/mcp/types'
import { useToolSupport } from '../../hooks/useToolSupport'
import { FolderOpen, Terminal, Monitor, Globe, Cpu, Image, Film, GitBranch, Lock } from 'lucide-react'
+import { HINWEIS_TEXT } from '../../lib/hinweis'
// Image AND video generation are LIVE (chat agent → ComfyUI; video unlocked
// in v2.5.3 — T2V via Wan/Hunyuan/AnimateDiff, I2V via SVD/FramePack). The
@@ -40,7 +41,12 @@ export function PermissionOverrideBar() {
return (
<div>
{!canUseTools && (
- <div className="px-1.5 py-1 text-[0.5rem] leading-snug text-amber-600 dark:text-amber-400/90">
+ // Ruhiger Ton, kein Alarm: das Modell kann keine Werkzeuge, das ist
+ // eine Eigenschaft und kein Defekt. Vorher stand die Zeile in Gelb und
+ // sah damit aus wie ein Fehler, den jemand beheben muesste. Die Form
+ // kommt aus der Konstante statt aus `<Hinweis>`, weil diese Zeile die
+ // Schriftgroesse der Liste unter ihr traegt (`lib/hinweis.ts`).
+ <div role="status" className={`px-1.5 py-1 text-[0.5rem] leading-snug ${HINWEIS_TEXT.ruhig}`}>
{reason}
</div>
)}
diff --git a/src/components/chat/PlanBar.tsx b/src/components/chat/PlanBar.tsx
index 1182a644..d356b691 100644
--- a/src/components/chat/PlanBar.tsx
+++ b/src/components/chat/PlanBar.tsx
@@ -30,6 +30,7 @@ import { runStatusFrom } from '../../lib/run-idle'
import { isRunQueued } from '../../lib/run-lanes'
import { isRunStopped } from '../../lib/run-stop'
import { isActiveCodexStatus } from '../../types/codex'
+import { HINWEIS_TEXT } from '../../lib/hinweis'
/** What the collapsed bar says once the model ticked off every step. Ticking
* off a step is not the same as the change being on disk. */
@@ -164,11 +165,13 @@ export function PlanBar({ variant = 'header' }: Props) {
// Ein Kreisel, der sich dreht, behauptet Arbeit. Nach dem Ende
// des Laufs ist das eine Behauptung ueber nichts: gemessen
// drehte er nach dem letzten Wort des Modells unbegrenzt
- // weiter. Ohne Lauf steht er still und wird bernsteinfarben,
- // wie die Zeile unten, die dasselbe in Worten sagt.
+ // weiter. Ohne Lauf steht er still und wird ruhig grau, wie
+ // die Zeile unten, die dasselbe in Worten sagt. (Hier stand
+ // Bernstein. Ein angehaltener Schritt ist kein halber Fehler,
+ // siehe `lib/hinweis.ts`.)
<Loader2
size={10}
- className={`shrink-0 mt-[1px] ${runActive ? 'text-blue-400 animate-spin' : 'text-amber-400'}`}
+ className={`shrink-0 mt-[1px] ${runActive ? 'text-blue-400 animate-spin' : HINWEIS_TEXT.ruhig}`}
/>
) : (
<Circle size={10} className="text-gray-600 shrink-0 mt-[1px]" />
@@ -197,7 +200,7 @@ export function PlanBar({ variant = 'header' }: Props) {
<Schlusszeile
testid="plan-all-done"
Symbol={CheckCircle2}
- ton={pending > 0 ? 'warnung' : 'gut'}
+ ton={pending > 0 ? 'ruhig' : 'gut'}
text={planDoneLabel(pending)}
/>
)}
@@ -210,7 +213,7 @@ export function PlanBar({ variant = 'header' }: Props) {
<Schlusszeile
testid="plan-run-stopped"
Symbol={AlertCircle}
- ton="warnung"
+ ton="ruhig"
text={planStoppedLabel(done, todos.length)}
/>
)}
@@ -227,6 +230,11 @@ export function PlanBar({ variant = 'header' }: Props) {
* es die Typo-Sperrklinke beschreibt: die zweite entsteht durch Abschreiben
* der ersten und bringt frische Umgehungen mit. Eine Groessenangabe, ein
* Abstand, zwei Toene.
+ *
+ * Die zwei Toene sind `gut` (der Plan ist durch) und `ruhig`. Vorher hiess der
+ * zweite `warnung` und war bernsteinfarben, an beiden Stellen zu Unrecht:
+ * weder ein Lauf, der endet, noch eine Aenderung, die auf Freigabe wartet, ist
+ * ein Fehler. Ruhig ist derselbe Ton wie sekundaerer Text, `lib/hinweis.ts`.
*/
function Schlusszeile({
testid,
@@ -236,18 +244,14 @@ function Schlusszeile({
}: {
testid: string
Symbol: typeof CheckCircle2
- ton: 'gut' | 'warnung'
+ ton: 'gut' | 'ruhig'
text: string
}) {
- const warnung = ton === 'warnung'
+ const farbe = ton === 'gut' ? 'text-emerald-400' : HINWEIS_TEXT.ruhig
return (
- <div className="px-2 pb-1 flex items-center gap-1.5" data-testid={testid}>
- <Symbol size={9} className={`${warnung ? 'text-amber-400' : 'text-emerald-400'} shrink-0`} />
- <span
- className={`text-[0.55rem] leading-snug ${warnung ? 'text-amber-400/90' : 'text-emerald-400/80'}`}
- >
- {text}
- </span>
+ <div className={`px-2 pb-1 flex items-center gap-1.5 ${farbe}`} data-testid={testid}>
+ <Symbol size={9} className="shrink-0" />
+ <span className="text-[0.55rem] leading-snug">{text}</span>
</div>
)
}
diff --git a/src/components/chat/PluginsDropdown.tsx b/src/components/chat/PluginsDropdown.tsx
index 4e36a59c..3243a78b 100644
--- a/src/components/chat/PluginsDropdown.tsx
+++ b/src/components/chat/PluginsDropdown.tsx
@@ -8,6 +8,7 @@ import { useToolSupport } from '../../hooks/useToolSupport'
import { GROUP_CHAT_MAX, isGroupChat, groupChatCandidates } from '../../lib/group-chat'
import type { CavemanMode } from '../../types/settings'
import { displayModelName } from '../../api/providers/registry'
+import { HINWEIS_TEXT } from '../../lib/hinweis'
const CAVEMAN_MODES: { value: CavemanMode; label: string; desc: string }[] = [
{ value: 'off', label: 'Off', desc: 'Normal responses' },
@@ -110,7 +111,11 @@ export function PluginsDropdown({
{anyPluginActive && (
<div className="flex gap-0.5">
{chatToolsEnabled && <div className="w-1 h-1 rounded-full bg-blue-400" />}
- {isCavemanActive && <div className="w-1 h-1 rounded-full bg-amber-400" />}
+ {/* Rosa, nicht mehr Bernstein: die vier Punkte sind Kategorien,
+ keine Zustaende, und Gelb hat hier nie eine Warnung gemeint.
+ Blau, Gruen und Violett waren schon vergeben, Rot gehoert
+ Fehlern. */}
+ {isCavemanActive && <div className="w-1 h-1 rounded-full bg-pink-400" />}
{isPersonaActive && <div className="w-1 h-1 rounded-full bg-green-400" />}
{isGroupActive && <div className="w-1 h-1 rounded-full bg-purple-400" />}
</div>
@@ -149,7 +154,10 @@ export function PluginsDropdown({
</button>
</div>
{!canUseTools && (
- <div className="pb-1.5 text-[0.5rem] leading-snug text-amber-600 dark:text-amber-400/90">
+ // Kein Fehler, nur ein Grund: dieses Modell hat keinen
+ // Werkzeugkanal. Ruhiges Grau aus `lib/hinweis.ts` statt des
+ // alten Gelbs, das aussah, als sei etwas schiefgegangen.
+ <div className={`pb-1.5 text-[0.5rem] leading-snug ${HINWEIS_TEXT.ruhig}`}>
{reason}
</div>
)}
@@ -164,11 +172,11 @@ export function PluginsDropdown({
className="w-full flex items-center justify-between py-1.5 group"
>
<div className="flex items-center gap-1.5">
- <Bone size={10} className={isCavemanActive ? 'text-amber-400' : 'text-gray-400'} />
+ <Bone size={10} className={isCavemanActive ? 'text-pink-400' : 'text-gray-400'} />
<span className="t-micro font-medium text-gray-600 dark:text-gray-300">Caveman Mode</span>
</div>
<div className="flex items-center gap-1">
- <span className={`text-[0.55rem] ${isCavemanActive ? 'text-amber-400' : 'text-gray-500'}`}>
+ <span className={`text-[0.55rem] ${isCavemanActive ? 'text-pink-400' : 'text-gray-500'}`}>
{currentCaveman?.label || 'Off'}
</span>
<ChevronDown size={9} className={`text-gray-500 transition-transform ${cavemanOpen ? 'rotate-180' : ''}`} />
@@ -187,12 +195,12 @@ export function PluginsDropdown({
isActive
? mode.value === 'off'
? 'bg-gray-100 dark:bg-white/[0.06] text-gray-700 dark:text-gray-200'
- : 'bg-amber-500/10 text-amber-600 dark:text-amber-400'
+ : 'bg-pink-500/10 text-pink-600 dark:text-pink-400'
: 'text-gray-500 hover:bg-gray-50 dark:hover:bg-white/[0.04] hover:text-gray-700 dark:hover:text-gray-300'
}`}
>
<div className="flex items-center gap-1.5">
- {isActive && <div className={`w-1 h-1 rounded-full shrink-0 ${mode.value === 'off' ? 'bg-gray-400' : 'bg-amber-400'}`} />}
+ {isActive && <div className={`w-1 h-1 rounded-full shrink-0 ${mode.value === 'off' ? 'bg-gray-400' : 'bg-pink-400'}`} />}
<span className="text-[0.55rem] font-medium">{mode.label}</span>
</div>
<span className="text-[0.5rem] text-gray-400">{mode.desc}</span>
diff --git a/src/components/chat/RAGPanel.tsx b/src/components/chat/RAGPanel.tsx
index 20a9c2a4..f3f57bff 100644
--- a/src/components/chat/RAGPanel.tsx
+++ b/src/components/chat/RAGPanel.tsx
@@ -18,6 +18,8 @@ import {
Eraser,
} from 'lucide-react'
import { useShallow } from 'zustand/react/shallow'
+import { Hinweis } from '../ui/Hinweis'
+import { HINWEIS_TEXT } from '../../lib/hinweis'
import { useRAG } from '../../hooks/useRAG'
import { useRAGStore } from '../../stores/ragStore'
import { useSettingsStore } from '../../stores/settingsStore'
@@ -33,12 +35,15 @@ interface Props {
const ACCEPT = '.pdf,.docx,.txt'
+// Die mittlere Stufe war Gelb, und ein mittelguter Treffer ist keine Warnung,
+// sondern der Normalfall: die meisten Passagen liegen dort. Grau sagt genau
+// das, ohne die Farbe zu verbrauchen, die im Panel dem echten Fehler gehoert.
function ScoreBadge({ score }: { score: number }) {
const color =
score > 0.8
? 'bg-green-500/20 text-green-400 border-green-500/30'
: score > 0.6
- ? 'bg-yellow-500/20 text-yellow-400 border-yellow-500/30'
+ ? 'bg-gray-500/20 text-gray-500 dark:text-gray-400 border-gray-500/30'
: 'bg-red-500/20 text-red-400 border-red-500/30'
return (
@@ -286,40 +291,43 @@ function RAGPanelInner({ conversationId, onClose }: { conversationId: string; on
{laneIsOnThisMachine(lane.lane) ? (
<p
data-testid="rag-cloud-privacy"
- className="t-micro leading-snug text-gray-500 dark:text-gray-400"
+ className={`t-micro leading-snug ${HINWEIS_TEXT.ruhig}`}
>
Your documents are indexed on this computer and stay here. Only the passages
that match your question are sent to the cloud model as context.
</p>
) : (
+ // Derselbe Satz im selben Ton, nur mit dem anderen Ziel. Er stand
+ // vorher in Gelb mit Warndreieck, obwohl nichts kaputt ist: er sagt
+ // nur, wohin der Text geht. Zwei Auskuenfte, die der Nutzer
+ // vergleichen soll, muessen gleich aussehen (`lib/hinweis.ts`).
<p
data-testid="rag-cloud-privacy-remote"
- className="flex items-start gap-1.5 t-micro leading-snug text-amber-600 dark:text-amber-400"
+ className={`t-micro leading-snug ${HINWEIS_TEXT.ruhig}`}
>
- <AlertTriangle size={11} className="shrink-0 mt-0.5" />
- <span>
- Indexing runs on {lane.endpoint ?? 'your configured Ollama host'}, so the full
- text of every document you add is sent there. The passages that match your
- question are then sent to the cloud model as context.
- </span>
+ Indexing runs on {lane.endpoint ?? 'your configured Ollama host'}, so the full
+ text of every document you add is sent there. The passages that match your
+ question are then sent to the cloud model as context.
</p>
)}
</div>
)}
- {/* The last turn went out without the documents (review S4). */}
+ {/* The last turn went out without the documents (review S4). Rot und
+ eine Zeile: der Abruf ist wirklich gescheitert, die gelbe Fuellflaeche
+ davor war nur Flaeche (`lib/hinweis.ts`). */}
{retrievalError && (
<div className="px-3 pt-2">
- <div className="flex items-start gap-1.5 p-2 rounded-lg bg-amber-500/10 border border-amber-500/20">
- <AlertTriangle size={12} className="text-amber-500 shrink-0 mt-0.5" />
- <span data-testid="rag-retrieval-error" className="t-micro text-amber-600 dark:text-amber-400 leading-tight">
- {retrievalError}
- </span>
- </div>
+ <Hinweis ton="fehler" icon={<AlertTriangle size={12} className="shrink-0 mt-0.5" />}>
+ <span data-testid="rag-retrieval-error">{retrievalError}</span>
+ </Hinweis>
</div>
)}
- {/* Context window warning */}
+ {/* Context window warning. Ruhig, denn ein kleines Kontextfenster ist
+ eine Eigenschaft des gewaehlten Modells und kein Zwischenfall. Als
+ gelber Kasten stand die Zeile direkt neben dem echten Abrufsfehler
+ und war genauso laut wie er. */}
<AnimatePresence>
{contextWarning && (
<motion.div
@@ -328,12 +336,7 @@ function RAGPanelInner({ conversationId, onClose }: { conversationId: string; on
animate={{ opacity: 1, height: 'auto' }}
exit={{ opacity: 0, height: 0 }}
>
- <div className="flex items-start gap-1.5 p-2 rounded-lg bg-yellow-500/10 border border-yellow-500/20">
- <AlertTriangle size={12} className="text-yellow-500 shrink-0 mt-0.5" />
- <span className="t-micro text-yellow-400 leading-tight">
- {contextWarning}
- </span>
- </div>
+ <Hinweis>{contextWarning}</Hinweis>
</motion.div>
)}
</AnimatePresence>
diff --git a/src/components/chat/RetrievalErrorBar.tsx b/src/components/chat/RetrievalErrorBar.tsx
index 9a7deeaf..01af6db4 100644
--- a/src/components/chat/RetrievalErrorBar.tsx
+++ b/src/components/chat/RetrievalErrorBar.tsx
@@ -5,27 +5,29 @@
* green Docs badge, got an answer, and had no way to know the answer had never
* seen the PDF. This is the composer-side half of the statement; the RAG panel
* carries the same sentence for whoever has it open.
+ *
+ * Ton `fehler`: die Antwort daneben ist ohne die Dokumente entstanden, da muss
+ * jemand hinsehen. Die Zeile war vorher ein gelber Kasten mit Fuellung, Rahmen
+ * und eigenem Kreuz, also die Bauform einer Warnung ohne deren Farbe. Jetzt
+ * traegt die Farbe die Dringlichkeit und `<Hinweis>` die Form, das Kreuz
+ * inbegriffen. Begruendung in `lib/hinweis.ts`.
*/
-import { AlertTriangle, X } from 'lucide-react'
+import { AlertTriangle } from 'lucide-react'
+import { Hinweis } from '../ui/Hinweis'
import { useRAGStore } from '../../stores/ragStore'
export function RetrievalErrorBar() {
const message = useRAGStore((s) => s.retrievalError)
if (!message) return null
return (
- <div
- data-testid="retrieval-error-bar"
- className="mx-3 mb-1.5 flex items-start gap-2 px-2 py-1 rounded-md bg-amber-500/10 border border-amber-500/20 t-micro text-amber-700 dark:text-amber-300"
- >
- <AlertTriangle size={11} className="shrink-0 mt-0.5" />
- <span className="flex-1 leading-snug">{message}</span>
- <button
- onClick={() => useRAGStore.getState().setRetrievalError(null)}
- className="shrink-0 text-amber-600/70 hover:text-amber-700 dark:text-amber-400/70 dark:hover:text-amber-300"
- aria-label="Dismiss"
+ <div data-testid="retrieval-error-bar" className="mx-3 mb-1.5">
+ <Hinweis
+ ton="fehler"
+ icon={<AlertTriangle size={11} className="shrink-0 mt-0.5" />}
+ onDismiss={() => useRAGStore.getState().setRetrievalError(null)}
>
- <X size={11} />
- </button>
+ {message}
+ </Hinweis>
</div>
)
}
diff --git a/src/components/chat/StagedChangesPanel.tsx b/src/components/chat/StagedChangesPanel.tsx
index 5204b805..c52c1280 100644
--- a/src/components/chat/StagedChangesPanel.tsx
+++ b/src/components/chat/StagedChangesPanel.tsx
@@ -4,6 +4,7 @@ import { useStagedChangesStore, type StagedChange } from '../../stores/stagedCha
import { applyStagedChange } from '../../lib/staged-apply'
import { DiffView } from './DiffView'
import { log } from '../../lib/logger'
+import { HINWEIS_TEXT, HINWEIS_ZEILE } from '../../lib/hinweis'
interface Props {
/** Active conversation id — the panel scopes itself to this chat. */
@@ -93,20 +94,25 @@ export function StagedChangesPanel({ chatId }: Props) {
}
return (
- <div className="border-b border-gray-200 dark:border-white/[0.04] bg-amber-50/40 dark:bg-amber-500/[0.04]">
+ // Die Kopfzeile war komplett in Gelb getaucht, Flaeche, Symbole und
+ // Schrift. Wartende Aenderungen sind aber kein Zwischenfall, sondern eine
+ // Liste, die auf einen Klick wartet: sie traegt jetzt dieselbe neutrale
+ // Haut wie die uebrigen Abschnitte der Spalte, und die Zahl daneben ist
+ // das Signal (`lib/hinweis.ts`).
+ <div className="border-b border-gray-200 dark:border-white/[0.04]">
<button
onClick={() => setExpanded(!expanded)}
- className="w-full flex items-center justify-between px-2 py-1.5 group hover:bg-amber-100/50 dark:hover:bg-amber-500/[0.08] transition-colors"
+ className="w-full flex items-center justify-between px-2 py-1.5 group hover:bg-gray-100/70 dark:hover:bg-white/[0.04] transition-colors"
data-testid="staged-changes-header"
>
<span className="flex items-center gap-1.5">
{expanded ? (
- <ChevronDown size={11} className="text-amber-700 dark:text-amber-400" />
+ <ChevronDown size={11} className="text-gray-500 dark:text-gray-400" />
) : (
- <ChevronRight size={11} className="text-amber-700 dark:text-amber-400" />
+ <ChevronRight size={11} className="text-gray-500 dark:text-gray-400" />
)}
- <FileText size={10} className="text-amber-700 dark:text-amber-400" />
- <span className="t-micro font-semibold text-amber-900 dark:text-amber-300">
+ <FileText size={10} className="text-gray-500 dark:text-gray-400" />
+ <span className="t-micro font-semibold text-gray-800 dark:text-gray-200">
Pending ({changes.length})
</span>
</span>
@@ -149,8 +155,15 @@ export function StagedChangesPanel({ chatId }: Props) {
</span>
</div>
{errors[change.id] && (
+ // Eine Zeile Rot, keine rote Flaeche: der Grund muss lesbar
+ // sein, nicht laut. Die Farbe traegt die Dringlichkeit.
+ // Die Zeile baut sich hier selbst, statt <Hinweis> zu nehmen,
+ // weil sie ihre Testmarke behaelt und ins Kaestchen der
+ // Aenderung eingerueckt sitzt; die Klassen kommen trotzdem
+ // aus der einen Regel.
<div
- className="px-1.5 py-1 text-[0.5rem] leading-snug text-red-700 dark:text-red-300 bg-red-50 dark:bg-red-500/10"
+ role="alert"
+ className={`px-1.5 py-1 ${HINWEIS_ZEILE} ${HINWEIS_TEXT.fehler}`}
data-testid="staged-change-error"
>
{errors[change.id]}
diff --git a/src/components/chat/TokenCounter.tsx b/src/components/chat/TokenCounter.tsx
index 6202f7f6..c7c7df4f 100644
--- a/src/components/chat/TokenCounter.tsx
+++ b/src/components/chat/TokenCounter.tsx
@@ -6,6 +6,7 @@ import { useSettingsStore } from '../../stores/settingsStore'
import { shouldAutoCompact, autoCompactHint } from '../../lib/compact-trigger'
import { newestCompaction, isModelVisible } from '../../lib/run-compact-command'
import { formatContextWindow } from '../../lib/formatters'
+import { HINWEIS_TEXT, PUNKT_FARBE } from '../../lib/hinweis'
export function TokenCounter() {
const activeConversationId = useChatStore((s) => s.activeConversationId)
@@ -56,7 +57,7 @@ export function TokenCounter() {
// Resolved real context window; fall back to the VRAM-safe default only while
// the provider probe is still in flight (ctx not resolved yet). On a paid
// provider the denominator is the SEND window, not the model window: a
- // 262k-context model whose steps are capped at 64k would otherwise sit green
+ // 262k-context model whose steps are capped at 64k would otherwise sit quiet
// at 25 percent forever, the red warning would never fire, and every support
// case would arrive with a healthy meter next to a drained wallet (plan A2,
// meter honesty).
@@ -69,8 +70,15 @@ export function TokenCounter() {
const isReal = fill.real && usedTokens === rawUsed
const ratio = maxTokens > 0 ? usedTokens / maxTokens : 0
- const color = ratio > 0.8 ? 'text-red-400' : ratio > 0.5 ? 'text-amber-400' : 'text-gray-500'
- const barColor = ratio > 0.8 ? 'bg-red-500' : ratio > 0.5 ? 'bg-amber-500' : 'bg-gray-500'
+ // Zwei Toene, kein dritter (`lib/hinweis.ts`). Bis hierher gab es eine
+ // mittlere Stufe ab 50 Prozent, und die hat nichts gesagt: halbvoll ist der
+ // Normalfall eines laufenden Gespraechs, kein Zwischenfall. Ueber 80 Prozent
+ // wird es eng, das traegt Rot. Alles darunter ist ruhiges Grau. Schrift und
+ // Balken holen sich dieselbe Aussage aus derselben Datei, damit der Balken
+ // nicht eines Tages allein weiterwandert.
+ const eng = ratio > 0.8
+ const color = eng ? HINWEIS_TEXT.fehler : HINWEIS_TEXT.ruhig
+ const barColor = eng ? PUNKT_FARBE.kaputt : PUNKT_FARBE.aus
// Dieselbe Schreibweise wie die Klapplade darunter. Vorher stand hier
// 8192/1000 und dort 8192/1024, also `8.2k` neben `8K` fuer eine einzige
diff --git a/src/components/chat/ToolCallBlock.tsx b/src/components/chat/ToolCallBlock.tsx
index ce7dc6d3..40599e2c 100644
--- a/src/components/chat/ToolCallBlock.tsx
+++ b/src/components/chat/ToolCallBlock.tsx
@@ -12,6 +12,7 @@ import { requestGenerationCancel } from '../../api/vram-handoff'
import { fileUrlToPath, readLocalFileAsBlobUrl, displayableMedia, type MediaRead } from '../../lib/local-media-url'
import { hiddenFromTranscript } from '../../lib/transcript-visibility'
import { MOTION_S } from '../ui/motion'
+import { HINWEIS_TEXT } from '../../lib/hinweis'
// F1 (konata3602 commitment 2026-05-23) + render fix (konata3602 bug 2026-06-07)
// — when image_generate / video_generate / screenshot produce a ComfyUI output,
@@ -311,10 +312,16 @@ function ToolCallBlockImpl({ toolCall, onApprove, onReject }: Props) {
))}
</span>
)}
+ {/* „Wartet auf Zustimmung" ist eine Entscheidung, kein Zwischenfall,
+ und traegt deshalb den ruhigen Ton (`lib/hinweis.ts`). Gelb hat
+ die Uhr hier neben das rote Fehlerzeichen gestellt, als waere ein
+ offener Werkzeugaufruf ein halber Absturz. Gesehen wird er ueber
+ die Uhr, ueber Approve/Reject darunter und ueber die Rueckfrage
+ am Eingabefeld, nicht ueber die Farbe. */}
<StatusIcon size={9} className={`shrink-0 ${
toolCall.status === 'completed' ? 'text-gray-400 dark:text-gray-500' :
isFailed ? 'text-red-400/60' :
- isPending ? 'text-amber-400/60' :
+ isPending ? HINWEIS_TEXT.ruhig :
'text-gray-500'
} ${isRunning ? 'animate-spin' : ''}`} />
{toolCall.duration != null && (
diff --git a/src/components/chat/__tests__/composer-grammar.test.ts b/src/components/chat/__tests__/composer-grammar.test.ts
index 5309a1aa..b5c217ea 100644
--- a/src/components/chat/__tests__/composer-grammar.test.ts
+++ b/src/components/chat/__tests__/composer-grammar.test.ts
@@ -172,6 +172,14 @@ function controlClassNames(region: string): string[] {
* Polsterung, Rahmen, Flaeche, Schriftgroesse/-gewicht, Schatten, Deckung.
* Layout-Utilities (`flex`, `items-center`, `truncate`) sind erlaubt, sie
* beschreiben keine Form.
+ *
+ * Die Textfarbe steht hier seit dem 04.09.2026 OHNE Farbliste. Vorher zaehlte
+ * der Ausdruck die Familien einzeln auf: `gray-`, `blue-`, `red-`, `green-`,
+ * `emerald-`, `purple-` und die Gelb-Familie. Diese Liste ist zweimal falsch
+ * geworden: Gelb gibt es in der Oberflaeche gar nicht mehr (`lib/hinweis.ts`
+ * kennt zwei Toene, ruhiges Grau und Rot), und jede Farbe, die noch nicht
+ * aufgezaehlt war, kam an der Pruefung vorbei. `[a-z]+-\d` fasst jede Familie,
+ * auch die, die heute niemand vorhersieht.
*/
const FORM_LANGUAGE = [
/\brounded(?:-|\b)/,
@@ -180,7 +188,7 @@ const FORM_LANGUAGE = [
/(?:^|[\s'"`:])h-(?!full\b)/,
/(?:^|[\s'"`:])w-(?!full\b)/,
/(?:^|[\s'"`:])p[xy]?-\d/,
- /(?:^|[\s'"`:])text-(?:\[|gray-|white\b|black\b|blue-|red-|green-|emerald-|amber-|purple-)/,
+ /(?:^|[\s'"`:])text-(?:\[|white\b|black\b|[a-z]+-\d)/,
/(?:^|[\s'"`:])font-(?:medium|semibold|bold)\b/,
/(?:^|[\s'"`:])shadow(?:-|\b)/,
/(?:^|[\s'"`:])opacity-\d/,
diff --git a/src/components/chat/__tests__/plan-sagt-wann-der-lauf-endete.test.ts b/src/components/chat/__tests__/plan-sagt-wann-der-lauf-endete.test.ts
index 842abff9..524dde17 100644
--- a/src/components/chat/__tests__/plan-sagt-wann-der-lauf-endete.test.ts
+++ b/src/components/chat/__tests__/plan-sagt-wann-der-lauf-endete.test.ts
@@ -77,7 +77,26 @@ describe('die Leiste fragt beide Laufquellen, nicht nur eine', () => {
})
it('der Kreisel dreht nur, solange wirklich etwas laeuft', () => {
- expect(src).toMatch(/runActive \? 'text-blue-400 animate-spin' : 'text-amber-400'/)
+ // Diese Zeile hat frueher die gelbe Fassung des Stillstands festgenagelt:
+ // stand der Lauf, wurde der Kreisel bernsteinfarben, und genau das stand
+ // hier als Muster. Die Regel hat sich am 04.09.2026 geaendert:
+ // David hat jedes Gelb aus der Oberflaeche geworfen, seitdem gibt es zwei
+ // Toene und keinen dritten (`lib/hinweis.ts`), und ein Schritt, an dem
+ // nichts mehr laeuft, ist kein halber Fehler, sondern ruhig. Die Aussage
+ // des Tests ist dieselbe geblieben und haengt jetzt an der Bewegung
+ // statt an der Farbe: es dreht sich nur, was wirklich laeuft.
+ expect(src).toMatch(/runActive \? 'text-blue-400 animate-spin' : HINWEIS_TEXT\.ruhig/)
+ // Und es gibt genau EINE Drehung in der Datei, sonst koennte daneben ein
+ // zweiter Kreisel stehen, den kein Lauf mehr anhaelt.
+ expect(src.match(/animate-spin/g) ?? []).toHaveLength(1)
+ })
+
+ it('die Schlusszeile kennt zwei Toene und keinen dritten', () => {
+ // Der dritte hiess `warnung` und war bernsteinfarben. Weder ein Lauf, der
+ // endet, noch eine Aenderung, die auf Freigabe wartet, ist ein Fehler;
+ // beides ist ruhig, und fertig ist gruen.
+ expect(src).toMatch(/ton: 'gut' \| 'ruhig'/)
+ expect(src).not.toMatch(/(?:amber|yellow)-/)
})
})
diff --git a/src/components/chat/__tests__/staged-apply-notice-reaches-the-user.test.ts b/src/components/chat/__tests__/staged-apply-notice-reaches-the-user.test.ts
index 7b8f4a59..814e53ff 100644
--- a/src/components/chat/__tests__/staged-apply-notice-reaches-the-user.test.ts
+++ b/src/components/chat/__tests__/staged-apply-notice-reaches-the-user.test.ts
@@ -64,17 +64,46 @@ describe('the coding view renders it as a notice, not as the model talking', ()
})
it('a warn notice looks different from a confirmation', () => {
+ // Hier stand einmal `toContain('amber')`. Das war schon vorher der
+ // schwaechere Test: er nagelte eine Farbe fest statt der Aussage, und die
+ // Farbe hat David am 04.09.2026 aus der ganzen Oberflaeche geworfen
+ // ("kein gelb mehr ohne farbe"). Seitdem gibt es zwei Toene und keinen
+ // dritten (`lib/hinweis.ts`), und welcher der beiden hier steht, ist eine
+ // Frage der Regel, nicht dieses Tests. Was der Test schuldet, ist die
+ // urspruengliche Aussage: die zwei Faelle werden ueberhaupt
+ // unterschieden, und der Satz des Nutzers steht drin.
const branch = codexView.slice(
codexView.indexOf("msg.role === 'system' && msg.notice"),
codexView.indexOf('// Slash commands:'),
)
expect(branch).toContain("const warn = msg.notice === 'warn'")
+ // Berechnet allein reicht nicht, die Unterscheidung muss auch etwas
+ // steuern: ohne eine zweite Fundstelle waere `warn` totes Holz.
+ expect((branch.match(/\bwarn\b/g) ?? []).length).toBeGreaterThanOrEqual(2)
expect(branch).toContain('AlertTriangle')
- expect(branch).toContain('amber')
expect(branch).toContain('{msg.content}')
})
})
+describe('und im normalen Verlauf steht dieselbe Zeile', () => {
+ // Der Befund oben war fuer den Code-Verlauf aufgeschrieben, die Meldung
+ // erreicht den Nutzer aber auf beiden Oberflaechen. MessageList rendert
+ // sie mit derselben Regel, und ohne diese Wache haette der Umbau vom
+ // 04.09.2026 die eine Seite still auf eine andere Form ziehen koennen.
+ const list = read('../MessageList.tsx')
+
+ it('rendert den Satz als Zeile, nicht als Blase', () => {
+ expect(list).toContain("message.role === 'system' && message.notice")
+ expect(list).toContain('data-testid="chat-notice"')
+ expect(list).toContain('{message.content}')
+ })
+
+ it('nimmt die zwei Toene aus der einen Regel, und keinen dritten', () => {
+ expect(list).toContain("ton={message.notice === 'warn' ? 'fehler' : 'ruhig'}")
+ expect(list).not.toMatch(/(?:amber|yellow)-/)
+ })
+})
+
describe('and the model still never sees it', () => {
it('the payload builder drops the system role', () => {
expect(useCodex).toContain("m.role !== 'system'")
diff --git a/src/components/chat/__tests__/zwei-baender-sind-eine-flaeche.test.ts b/src/components/chat/__tests__/zwei-baender-sind-eine-flaeche.test.ts
index 1c9536bc..0d068ca3 100644
--- a/src/components/chat/__tests__/zwei-baender-sind-eine-flaeche.test.ts
+++ b/src/components/chat/__tests__/zwei-baender-sind-eine-flaeche.test.ts
@@ -95,7 +95,10 @@ function classNameMit(src: string, marker: string): string {
}
describe('D-S18: die zwei verbliebenen Streifen sind EINE Flaeche', () => {
- const headerFlaeche = flaeche(classNameMit(HEADER, 'h-10 grid'))
+ // 04.09.2026: die Kopfzeile war ein Raster und ist jetzt eine Flex-Zeile
+ // mit absolut gesetzter Mitte (das Drehrad muss hart mittig stehen). An
+ // der FLAECHE, um die es hier geht, aendert das nichts.
+ const headerFlaeche = flaeche(classNameMit(HEADER, 'h-10 flex'))
it('der Header traegt ueberhaupt eine benannte Flaeche', () => {
expect(headerFlaeche).not.toBe('')
@@ -119,7 +122,7 @@ describe('D-S18: die zwei verbliebenen Streifen sind EINE Flaeche', () => {
it('NEGATIVKONTROLLE: keine Trennkante und kein Schatten zwischen ihnen', () => {
// Eine Kante oder ein Schatten waere der Strich, der aus einer Flaeche
// zwei Baender macht — und damit das Argument dieses Befundes zurueck.
- const streifen = [classNameMit(HEADER, 'h-10 grid'), ...titlebarStreifen()]
+ const streifen = [classNameMit(HEADER, 'h-10 flex'), ...titlebarStreifen()]
for (const s of streifen) {
expect(s, s).not.toMatch(/\bborder-b\b/)
expect(s, s).not.toMatch(/\bshadow-/)
diff --git a/src/components/cloud/CloudTeaserModal.tsx b/src/components/cloud/CloudTeaserModal.tsx
index 29d70fb3..c2ce2cae 100644
--- a/src/components/cloud/CloudTeaserModal.tsx
+++ b/src/components/cloud/CloudTeaserModal.tsx
@@ -222,8 +222,12 @@ function EraserDemo() {
return (
<Stage>
<div className="relative w-24 h-16 rounded-lg bg-gradient-to-br from-emerald-800/60 to-emerald-600/40">
+ {/* Der Gegenstand, den der Radierer wegnimmt. Er war gelb, ohne dass
+ hier irgendetwas zu warnen waere: reine Deko. Sky gehoert zur
+ Palette dieses Fensters (violet, sky, fuchsia, rose) und ist als
+ volle Flaeche noch an keinen anderen Demo-Gegenstand vergeben. */}
<motion.div
- className="absolute left-3 bottom-3 w-6 h-8 rounded-sm bg-amber-400/80"
+ className="absolute left-3 bottom-3 w-6 h-8 rounded-sm bg-sky-300/90"
animate={{ opacity: [1, 1, 0, 0, 1] }}
transition={{ ...LOOP, duration: 3, times: [0, 0.35, 0.55, 0.85, 1] }}
/>
diff --git a/src/components/create/experimental/CreateExperimental.tsx b/src/components/create/experimental/CreateExperimental.tsx
index b1945267..1f874816 100644
--- a/src/components/create/experimental/CreateExperimental.tsx
+++ b/src/components/create/experimental/CreateExperimental.tsx
@@ -1,6 +1,6 @@
import { useCallback, useEffect, useRef, useState } from 'react'
import { AnimatePresence, motion } from 'framer-motion'
-import { AlertTriangle, Cloud, X } from 'lucide-react'
+import { AlertTriangle, Cloud, Cpu } from 'lucide-react'
import { useCreateStore, type GalleryItem } from '../../../stores/createStore'
import { useCloudNoticeStore, CLOUD_RETENTION_DAYS, shouldShowRetentionNotice } from '../../../stores/cloudNoticeStore'
import { useComfyNoticeStore } from '../../../stores/comfyNoticeStore'
@@ -16,6 +16,7 @@ import { CreatePanel } from './CreatePanel'
import { Lightbox } from './Lightbox'
import { AdvancedDrawer } from './AdvancedDrawer'
import { WorkflowsModal } from '../WorkflowsModal'
+import { Hinweis } from '../../ui/Hinweis'
import { MaskEditor } from './MaskEditor'
import { VhsInstallModal } from './VhsInstallModal'
import { INTENT_MAP, isIntentAvailable } from './intents'
@@ -224,6 +225,11 @@ function CreateExperimentalInner() {
<div className="relative h-full w-full flex flex-col bg-white dark:bg-[#141414] text-gray-900 dark:text-gray-200 overflow-hidden">
<IntentBar />
+ {/* Die Meldeleiste dieser Oberflaeche: vier Lagen, ZWEI Toene. Rot, wenn
+ jemand handeln muss, sonst gedaempftes Grau, und keine davon in einem
+ Kasten. Drei dieser vier waren gelb gefuellt, mit Rahmen und
+ Warndreieck, so dass ein Satz ueber die Aufbewahrungsdauer und ein
+ Absturz gleich schwer wogen. Regel und Begruendung: lib/hinweis.ts. */}
<AnimatePresence>
{banner && (
<motion.div
@@ -232,15 +238,14 @@ function CreateExperimentalInner() {
exit={{ height: 0, opacity: 0 }}
className="overflow-hidden shrink-0"
>
- <div className="flex items-center gap-2 px-4 py-2 bg-red-500/10 border-b border-red-500/20 text-red-200 t-body">
- <AlertTriangle size={14} className="shrink-0" />
- <span className="flex-1 min-w-0 truncate">{banner}</span>
- {error && (
- <button onClick={() => setError(null)} className="shrink-0 text-red-300/70 hover:text-red-100" title="Dismiss">
- <X size={14} />
- </button>
- )}
- </div>
+ <Hinweis
+ ton="fehler"
+ icon={<AlertTriangle size={12} className="shrink-0 mt-px" />}
+ onDismiss={error ? () => setError(null) : undefined}
+ className="px-4 py-2"
+ >
+ <span className="block truncate">{banner}</span>
+ </Hinweis>
</motion.div>
)}
</AnimatePresence>
@@ -255,12 +260,17 @@ function CreateExperimentalInner() {
with a working, correctly detected RTX 3060 that no usable GPU had
been found, when he had chosen Force CPU himself, and then walking him
through the AMD route on a machine with no AMD card in it. Same three
- facts the backend was already sending, now all three read. */}
+ facts the backend was already sending, now all three read.
+
+ Das Chipsymbol statt des Warndreiecks ist der Punkt: hier ist nichts
+ kaputt, es rechnet nur der Prozessor. Der innere span bleibt stehen,
+ weil lib/__tests__/cpu-banner-names-the-real-reason.test.ts genau an
+ ihm prueft, dass diese Leiste den Satz RENDERT und keine vierte
+ Abschrift von ihm traegt. */}
{backend === 'local' && connected === true && comfyOnCpu && comfyCpuBanner && (
- <div className="flex items-center gap-2 px-4 py-2 bg-yellow-500/5 border-b border-yellow-500/10 text-yellow-300 text-xs shrink-0">
- <AlertTriangle size={12} className="shrink-0" />
+ <Hinweis icon={<Cpu size={12} className="shrink-0 mt-px" />} className="px-4 py-2 shrink-0">
<span>{comfyCpuBanner}</span>
- </div>
+ </Hinweis>
)}
{/* Idle outage (R18 Befund 2): ComfyUI died while nobody was rendering
@@ -268,10 +278,7 @@ function CreateExperimentalInner() {
no button: the render path restarts it and this says so. Nothing is
started from here — see lib/comfy-idle-watch.ts for why. */}
{idleNotice && (
- <div className="flex items-center gap-2 px-4 py-2 bg-yellow-500/5 border-b border-yellow-500/10 text-yellow-300 text-xs shrink-0">
- <AlertTriangle size={12} className="shrink-0" />
- <span className="flex-1 min-w-0">{idleNotice}</span>
- </div>
+ <Hinweis className="px-4 py-2 shrink-0">{idleNotice}</Hinweis>
)}
{/* Cross-origin block (#75, cinemazverev): a user-managed ComfyUI 0.19+
@@ -286,29 +293,28 @@ function CreateExperimentalInner() {
holds the X against the cause signature, so the bar cannot return
after every render the way it did on the box with ComfyUI 0.33.0. */}
{backend === 'local' && shouldShowCorsNotice(comfyCorsBlocked, corsSignature, corsNoticeDismissedFor) && (
- <div className="flex items-start gap-2 px-4 py-2 bg-yellow-500/5 border-b border-yellow-500/10 text-yellow-300 text-xs shrink-0">
- <AlertTriangle size={12} className="shrink-0 mt-0.5" />
- <span className="flex-1 min-w-0">
- {corsFixError
- ? corsFixError
- : corsFixing
- ? 'Restarting ComfyUI with the fix… this takes a moment.'
- : 'Your ComfyUI blocks direct loads (v0.19+), so previews use a slower fallback.'}
- </span>
+ <Hinweis
+ ton={corsFixError ? 'fehler' : 'ruhig'}
+ icon={corsFixError ? <AlertTriangle size={12} className="shrink-0 mt-px" /> : undefined}
+ onDismiss={() => { setComfyCorsBlocked(false); setCorsFixError(null); dismissCorsNotice(corsSignature) }}
+ className="px-4 py-2 shrink-0"
+ >
+ {corsFixError
+ ? corsFixError
+ : corsFixing
+ ? 'Restarting ComfyUI with the fix… this takes a moment.'
+ : 'Your ComfyUI blocks direct loads (v0.19+), so previews use a slower fallback.'}
{!corsFixing && (
<button
onClick={() => { void fixCorsForMe() }}
disabled={isGenerating}
title={isGenerating ? 'Waiting for the current generation to finish' : 'LU restarts ComfyUI with the CORS flag for you'}
- className="shrink-0 px-2 py-0.5 rounded bg-yellow-500/15 hover:bg-yellow-500/25 text-yellow-200 transition-colors whitespace-nowrap disabled:opacity-40 disabled:cursor-not-allowed"
+ className="ml-1.5 underline underline-offset-2 whitespace-nowrap opacity-80 hover:opacity-100 transition-opacity disabled:opacity-40 disabled:cursor-not-allowed"
>
Let me do it for you!
</button>
)}
- <button onClick={() => { setComfyCorsBlocked(false); setCorsFixError(null); dismissCorsNotice(corsSignature) }} className="shrink-0 text-yellow-300/70 hover:text-yellow-100" title="Dismiss">
- <X size={14} />
- </button>
- </div>
+ </Hinweis>
)}
{/* Cloud gallery retention (David 2026-07-24). Cloud renders live on our
@@ -317,19 +323,16 @@ function CreateExperimentalInner() {
way out is the explicit "Do not show again", and it stays dismissed
across updates (persisted in lu_cloud_notice). */}
{shouldShowRetentionNotice(backend, retentionNoticeSeen) && (
- <div className="flex items-start gap-2 px-4 py-2 bg-purple-500/5 border-b border-purple-500/10 text-purple-200 text-xs shrink-0">
- <Cloud size={12} className="shrink-0 mt-0.5" />
- <span className="flex-1 min-w-0">
- Cloud results are stored for {CLOUD_RETENTION_DAYS} days and then deleted.
- Download anything you want to keep from the gallery.
- </span>
+ <Hinweis icon={<Cloud size={12} className="shrink-0 mt-px" />} className="px-4 py-2 shrink-0">
+ Cloud results are stored for {CLOUD_RETENTION_DAYS} days and then deleted.
+ Download anything you want to keep from the gallery.
<button
onClick={() => setRetentionNoticeSeen(true)}
- className="shrink-0 px-2 py-0.5 rounded bg-purple-500/15 hover:bg-purple-500/25 text-purple-100 transition-colors whitespace-nowrap"
+ className="ml-1.5 underline underline-offset-2 whitespace-nowrap opacity-80 hover:opacity-100 transition-opacity"
>
Do not show again
</button>
- </div>
+ </Hinweis>
)}
{/* The viewer (Stage) and the Gallery bubble share ONE row, so they're
diff --git a/src/components/create/experimental/CreditsMeter.tsx b/src/components/create/experimental/CreditsMeter.tsx
index 9f3a9452..8a6551a6 100644
--- a/src/components/create/experimental/CreditsMeter.tsx
+++ b/src/components/create/experimental/CreditsMeter.tsx
@@ -7,11 +7,17 @@ import { Tooltip } from '../ui/Tooltip'
import { openExternal } from '../../../api/backend'
import { CLOUD_BASE } from '../../../api/cloud/config'
import { cn } from '../ui/cn'
+import { HINWEIS_TEXT, PUNKT_FARBE } from '../../../lib/hinweis'
// Compact credits meter for the cloud backend: remaining vs monthly budget,
-// plus the cost of the run the user is about to start. One shared pool —
+// plus the cost of the run the user is about to start. One shared pool, so
// images and clips draw from the same number. At 0 (or not enough for this
// run) it becomes the upsell chip and the Create button is gated off.
+//
+// Der Balken kennt zwei Zustaende, keinen dritten: er laeuft (gruen) oder er
+// ist so gut wie leer (grau). Der knappe Kontostand war gelb und hat damit
+// wie eine Stoerung ausgesehen, obwohl noch jeder Lauf durchgeht. Leer ist
+// keine Farbe am Balken, sondern der rote Knopf darunter.
export function CreditsMeter() {
const { quota } = useCreateExp()
const intent = useCreateStore((s) => s.intent())
@@ -57,10 +63,19 @@ export function CreditsMeter() {
const state = meterState(quota, cost, kind, op)
// A wallet-fixable shortfall (credits, video budget) lands on the credits
// tab; the training count is a plan property, so that one goes to the plans.
+ //
+ // Der Knopf traegt die Flaeche des Zaehlers daneben und den Fehlerton als
+ // SCHRIFT. Vorher war er gelb gefuellt, also dieselbe Farbe, mit der ein
+ // knapper Kontostand nur informiert hat. Kein Geld mehr zu haben ist kein
+ // Zwischenton: es haelt den Lauf an. Regel in lib/hinweis.ts.
const upsell = (label: string, tab?: 'credits') => (
<button
onClick={() => void openExternal(`${CLOUD_BASE}/pricing${tab ? '?tab=credits' : ''}`)}
- className="t-control px-2 h-[var(--control-h-sm)] inline-flex items-center rounded-md bg-amber-500/15 text-amber-300 hover:bg-amber-500/25 transition-colors"
+ className={cn(
+ 't-control px-2 h-[var(--control-h-sm)] inline-flex items-center rounded-md',
+ 'bg-white/[0.04] hover:bg-white/[0.08] transition-colors',
+ HINWEIS_TEXT.fehler,
+ )}
>
{label}
</button>
@@ -95,7 +110,7 @@ export function CreditsMeter() {
<div className="flex items-center gap-1.5 px-2 h-[var(--control-h-sm)] rounded-md bg-white/[0.04] text-gray-400 t-control">
<div className="w-12 h-1 rounded-full bg-white/10 overflow-hidden">
<div
- className={cn('h-full rounded-full', state.pct > 0.25 ? 'bg-emerald-400/80' : 'bg-amber-400/80')}
+ className={cn('h-full rounded-full', state.pct > 0.25 ? PUNKT_FARBE.an : PUNKT_FARBE.aus)}
style={{ width: `${state.pct * 100}%` }}
/>
</div>
diff --git a/src/components/create/experimental/OutputView.tsx b/src/components/create/experimental/OutputView.tsx
index 30948d3a..826d76f4 100644
--- a/src/components/create/experimental/OutputView.tsx
+++ b/src/components/create/experimental/OutputView.tsx
@@ -17,9 +17,15 @@ import { cn } from '../ui/cn'
// missing, because the R13 screenshot caught a load and the R14 pair caught
// two samplings. Checked in git: this mapping has not changed since the
// surface was ported (eaeff304, 2026-07-04), so nothing was lost. The device
-// is said in words, by the yellow banner in the Create tab.
+// is said in words, by the line at the top of the Create tab.
+//
+// Das Chipsymbol und sein Ring waren gelb. Das war Schmuck fuer eine Phase
+// und nie eine Warnung, und genau solche Stellen haben Gelb in der App
+// bedeutungslos gemacht. Jetzt Sky, weil es im Wartekreis noch frei war:
+// Gruen gehoert dem Sampling, der Akzent dem Dekodieren, Grau dem Warten.
+// Die Regel dazu steht in lib/hinweis.ts.
function phaseIcon(phase: ProgressPhase) {
- if (phase === 'loading-model' || phase === 'loading-clip' || phase === 'loading-vae') return <Cpu size={20} className="text-amber-300" />
+ if (phase === 'loading-model' || phase === 'loading-clip' || phase === 'loading-vae') return <Cpu size={20} className="text-sky-300" />
if (phase === 'sampling') return <Sparkles size={20} className="text-green-300" />
if (phase === 'decoding') return <ImageDown size={20} className="text-lu-accent" />
return <Sparkles size={20} className="text-gray-400" />
@@ -63,8 +69,8 @@ export function GeneratingView() {
<div className="relative w-16 h-16">
{isLoading ? (
<>
- <motion.div className="absolute inset-0 rounded-full border border-amber-400/30" animate={{ scale: [1, 1.6], opacity: [0.5, 0] }} transition={{ duration: 3, repeat: Infinity, ease: 'easeOut' }} />
- <div className="absolute inset-0 rounded-full border border-amber-400/20 flex items-center justify-center">
+ <motion.div className="absolute inset-0 rounded-full border border-sky-400/30" animate={{ scale: [1, 1.6], opacity: [0.5, 0] }} transition={{ duration: 3, repeat: Infinity, ease: 'easeOut' }} />
+ <div className="absolute inset-0 rounded-full border border-sky-400/20 flex items-center justify-center">
<motion.div animate={{ rotate: 360 }} transition={{ duration: 3, repeat: Infinity, ease: 'linear' }}>{phaseIcon(progressPhase)}</motion.div>
</div>
</>
diff --git a/src/components/create/experimental/ParamGroups.tsx b/src/components/create/experimental/ParamGroups.tsx
index 2ccaf3dc..8682c9ba 100644
--- a/src/components/create/experimental/ParamGroups.tsx
+++ b/src/components/create/experimental/ParamGroups.tsx
@@ -15,6 +15,7 @@ import { NumberField } from '../ui/NumberField'
import { Button } from '../ui/Button'
import { Tooltip } from '../ui/Tooltip'
import { cn } from '../ui/cn'
+import { HINWEIS_TEXT } from '../../../lib/hinweis'
// Video families whose dynamic-workflow strategy actually wires a LoRA node:
// the generic UNET path (wan/hunyuan/ltx/mochi/cosmos) plus Wan 2.2's dedicated
@@ -153,7 +154,10 @@ export function ParamGroups() {
<span className="t-mono text-gray-200">{hiresFinal.width}×{hiresFinal.height}</span>
</>
) : (
- <span className="text-amber-400">{hiresSizeError}</span>
+ // Rot, nicht gelb: solange hier ein Satz steht, kommt aus
+ // dieser Zeile keine Zielgroesse und der Lauf startet nicht.
+ // Zwei Toene, kein dritter, siehe lib/hinweis.ts.
+ <span className={HINWEIS_TEXT.fehler}>{hiresSizeError}</span>
)}
</div>
<Slider label="Upscale" min={1.1} max={3} step={0.1} value={s.hiresScale} onChange={s.setHiresScale} format={(v) => `${v.toFixed(1)}×`} />
diff --git a/src/components/create/experimental/VhsInstallModal.tsx b/src/components/create/experimental/VhsInstallModal.tsx
index cc2fdb96..a7bbbd8e 100644
--- a/src/components/create/experimental/VhsInstallModal.tsx
+++ b/src/components/create/experimental/VhsInstallModal.tsx
@@ -1,4 +1,4 @@
-import { Download, FileVideo } from 'lucide-react'
+import { Download } from 'lucide-react'
import { useCreateStore } from '../../../stores/createStore'
import { Modal } from '../../ui/Modal'
@@ -20,16 +20,19 @@ export function VhsInstallModal() {
return (
<Modal open={open} onClose={() => choose('cancel')} title="Install MP4 support?">
<div className="space-y-4 text-sm text-gray-200">
- <div className="flex items-start gap-3 p-3 rounded-lg bg-yellow-500/5 border border-yellow-500/15">
- <FileVideo size={18} className="text-yellow-400 shrink-0 mt-0.5" />
- <div className="space-y-1.5">
- <p className="text-yellow-200 font-medium text-[13px]">
- Your ComfyUI doesn't have <code className="px-1 py-0.5 rounded bg-black/40 text-yellow-300 font-mono text-[11px]">VHS_VideoCombine</code>
- </p>
- <p className="text-[11px] text-yellow-100/80 leading-relaxed">
- Without it, video generation falls back to <code className="font-mono text-[10px] bg-black/40 px-1 rounded">SaveAnimatedWEBP</code> and produces an animated <code className="font-mono text-[10px] bg-black/40 px-1 rounded">.webp</code> file instead of a real <code className="font-mono text-[10px] bg-black/40 px-1 rounded">.mp4</code> video.
- </p>
- </div>
+ {/* Der Grund stand frueher in einem gelben Kasten mit Rahmen, Fuellung
+ und Warnsymbol, mitten im Dialog, der ihn ohnehin schon stellt. Der
+ Rahmen war der Dialog, die Fuellung hat nichts getragen, und das
+ Gelb hat aus einer Feststellung eine Stoerung gemacht. Jetzt zwei
+ Zeilen Text: die Feststellung und ihre Folge. Die Regel dazu steht
+ in lib/hinweis.ts. */}
+ <div className="space-y-1.5">
+ <p className="font-medium text-[13px]">
+ Your ComfyUI doesn't have <code className="px-1 py-0.5 rounded bg-black/40 font-mono text-[11px]">VHS_VideoCombine</code>
+ </p>
+ <p className="text-[11px] text-gray-400 leading-relaxed">
+ Without it, video generation falls back to <code className="font-mono text-[10px] bg-black/40 px-1 rounded">SaveAnimatedWEBP</code> and produces an animated <code className="font-mono text-[10px] bg-black/40 px-1 rounded">.webp</code> file instead of a real <code className="font-mono text-[10px] bg-black/40 px-1 rounded">.mp4</code> video.
+ </p>
</div>
<div className="text-[11px] text-gray-400 leading-relaxed">
diff --git a/src/components/create/experimental/badges.ts b/src/components/create/experimental/badges.ts
index 78dd8233..eb54efea 100644
--- a/src/components/create/experimental/badges.ts
+++ b/src/components/create/experimental/badges.ts
@@ -1,12 +1,30 @@
import type { ModelType } from '../../../api/comfyui'
-/** Model-type badge map — single source for the redesign's ModelChip + Badge.
- * Mirrors ParamPanel.tsx's private TYPE_BADGE (uselu's ModelType set). */
+/**
+ * Model-type badge map, the single source for ModelChip and Badge.
+ *
+ * Die Farbe hier ist ein Erkennungszeichen fuer eine Modellfamilie, keine
+ * Warnung. Trotzdem waren zwei Eintraege gelb (`ernie_image` yellow,
+ * `cogvideo` amber), und genau das hat Gelb in der ganzen App unlesbar
+ * gemacht: dieselbe Farbe stand mal fuer eine Marke, mal fuer einen Fehler.
+ * Beide sind jetzt neutral getoent. Die Begruendung steht in `lib/hinweis.ts`.
+ *
+ * Warum ausgerechnet slate und stone: jeder BUNTE Ton dieser Tabelle ist
+ * vergeben (purple, rose, blue, green, orange, red, cyan, pink, emerald,
+ * indigo, teal, violet, lime, fuchsia, sky), und zwei Familien duerfen nicht
+ * dieselbe Farbe tragen. Frei waren nur die neutralen Reihen. `unknown`
+ * bleibt davon unterscheidbar: es faerbt gar nicht (bg-white/10 + gray).
+ *
+ * Bewusst doppelt sind nur die Toene EINER Familie: flux/flux2 und die vier
+ * Wan-Spuren. Das Paar zimage/allegro traegt beides Rose, seit die Tabelle
+ * angelegt wurde; das ist aelter als diese Runde und bleibt hier unberuehrt,
+ * damit keine Familie ihr Erkennungszeichen ohne Not wechselt.
+ */
export const TYPE_BADGE: Record<ModelType, { label: string; color: string }> = {
flux: { label: 'FLUX', color: 'bg-purple-500/15 text-purple-300' },
flux2: { label: 'FLUX 2', color: 'bg-purple-500/15 text-purple-300' },
zimage: { label: 'Z-Image', color: 'bg-rose-500/15 text-rose-300' },
- ernie_image: { label: 'Ernie', color: 'bg-yellow-500/15 text-yellow-300' },
+ ernie_image: { label: 'Ernie', color: 'bg-slate-500/15 text-slate-300' },
sdxl: { label: 'SDXL', color: 'bg-blue-500/15 text-blue-300' },
sd15: { label: 'SD 1.5', color: 'bg-green-500/15 text-green-300' },
wan: { label: 'Wan', color: 'bg-orange-500/15 text-orange-300' },
@@ -15,7 +33,7 @@ export const TYPE_BADGE: Record<ModelType, { label: string; color: string }> = {
ltx: { label: 'LTX', color: 'bg-cyan-500/15 text-cyan-300' },
mochi: { label: 'Mochi', color: 'bg-pink-500/15 text-pink-300' },
cosmos: { label: 'Cosmos', color: 'bg-emerald-500/15 text-emerald-300' },
- cogvideo: { label: 'CogVideo', color: 'bg-amber-500/15 text-amber-300' },
+ cogvideo: { label: 'CogVideo', color: 'bg-stone-500/15 text-stone-300' },
svd: { label: 'SVD', color: 'bg-indigo-500/15 text-indigo-300' },
framepack: { label: 'FramePack', color: 'bg-teal-500/15 text-teal-300' },
pyramidflow: { label: 'PyramidFlow', color: 'bg-violet-500/15 text-violet-300' },
@@ -31,7 +49,7 @@ export const TYPE_BADGE: Record<ModelType, { label: string; color: string }> = {
unknown: { label: 'Model', color: 'bg-white/10 text-gray-400' },
}
-/** Fallback sampler/scheduler lists — used until ComfyUI's /object_info lists
+/** Fallback sampler/scheduler lists, used until ComfyUI's /object_info lists
* arrive via useCreate (threaded through CreateContext). Standard ComfyUI names. */
export const SAMPLERS = ['euler', 'euler_ancestral', 'dpmpp_2m', 'dpmpp_2m_sde', 'dpmpp_3m_sde', 'heun', 'dpm_2', 'lms', 'ddim', 'uni_pc']
export const SCHEDULERS = ['normal', 'karras', 'simple', 'sgm_uniform', 'exponential', 'beta', 'ddim_uniform']
diff --git a/src/components/import/ChatbotImporter.tsx b/src/components/import/ChatbotImporter.tsx
index f2f3b596..1787ae36 100644
--- a/src/components/import/ChatbotImporter.tsx
+++ b/src/components/import/ChatbotImporter.tsx
@@ -9,7 +9,8 @@
// curated facts. The Settings copy steers the user accordingly.
import { useState } from 'react'
-import { Upload, FileText, CheckCircle2, AlertTriangle, Loader2, X } from 'lucide-react'
+import { Upload, FileText, CheckCircle2, AlertTriangle, Loader2 } from 'lucide-react'
+import { Hinweis } from '../ui/Hinweis'
import { parseExportFile, conversationToFile, type NormalisedConversation, type ChatbotPlatform } from '../../lib/parsers/chatbot-export'
import { useRAG } from '../../hooks/useRAG'
import { useChatStore } from '../../stores/chatStore'
@@ -145,12 +146,18 @@ export function ChatbotImporter() {
</div>
</div>
+ {/* Der Fehler stand in einem roten Kasten mit Rahmen und Fuellflaeche.
+ Die Farbe traegt hier schon alles, was der Kasten dazutun sollte;
+ das Kreuz zum Wegklicken bringt <Hinweis> selbst mit. */}
{error && (
- <div className="flex items-start gap-2 p-2 rounded border border-red-500/20 bg-red-500/[0.06] text-red-300">
- <AlertTriangle size={12} className="mt-0.5 shrink-0" />
- <span className="t-micro whitespace-pre-wrap">{error}</span>
- <button onClick={() => setError(null)} className="text-red-400 hover:text-red-200 ml-auto"><X size={10} /></button>
- </div>
+ <Hinweis
+ ton="fehler"
+ icon={<AlertTriangle size={12} className="mt-0.5 shrink-0" />}
+ onDismiss={() => setError(null)}
+ className="whitespace-pre-wrap"
+ >
+ {error}
+ </Hinweis>
)}
{conversations.length > 0 && (
@@ -224,10 +231,13 @@ export function ChatbotImporter() {
</span>
)}
</div>
+ {/* Diese Zeile war gelb und kursiv, obwohl nichts kaputt ist: sie
+ sagt nur, in welcher Reihenfolge die zwei Schritte gehen. Ruhig,
+ wie jeder Satz, den man wissen darf und nicht sofort braucht. */}
{!conversationId && (
- <div className="t-micro text-amber-300 italic">
+ <Hinweis>
Open or create a chat first, imports attach to the active conversation's RAG store.
- </div>
+ </Hinweis>
)}
</>
)}
diff --git a/src/components/layout/DownloadBadge.tsx b/src/components/layout/DownloadBadge.tsx
index 7e4b5d4f..df4bfb9c 100644
--- a/src/components/layout/DownloadBadge.tsx
+++ b/src/components/layout/DownloadBadge.tsx
@@ -8,6 +8,7 @@ import { isPermanentDownloadError } from '../../api/discover'
import { useMlxInstallStore } from '../../stores/mlxInstallStore'
import { isMlxImageHost } from '../../api/mlx-image'
import { formatBytes, countLabel } from '../../lib/formatters'
+import { HINWEIS_TEXT, PUNKT_FARBE } from '../../lib/hinweis'
import { trayAfterPulse, TRAY_CLOSED, NO_PULSE } from '../../lib/download-tray'
function ProgressBar({ progress }: { progress: number }) {
@@ -119,8 +120,11 @@ export function DownloadBadge() {
{totalActive}
</span>
)}
+ {/* Angehalten ist kein halber Fehler, sondern schlicht „laeuft
+ nicht": der Punkt nimmt deshalb `PUNKT_FARBE.aus` und nicht
+ mehr das alte volle Gelb. Begruendung in `lib/hinweis.ts`. */}
{totalActive === 0 && (textEntries.some(([, s]) => s.paused) || comfyEntries.some(([, d]) => d.status === 'paused')) && (
- <span className="absolute -top-0.5 -right-0.5 w-2.5 h-2.5 rounded-full bg-yellow-500" />
+ <span className={`absolute -top-0.5 -right-0.5 w-2.5 h-2.5 rounded-full ${PUNKT_FARBE.aus}`} />
)}
</button>
@@ -170,7 +174,7 @@ export function DownloadBadge() {
<p className="text-[0.7rem] font-mono text-gray-700 dark:text-gray-300 truncate">{name}</p>
<div className="flex items-center gap-0.5 shrink-0">
{!state.complete && !state.paused && (
- <button onClick={() => pausePull(name)} className="p-0.5 rounded hover:bg-yellow-500/20 text-gray-400 hover:text-yellow-400 transition-colors" title="Pause"><Pause size={11} /></button>
+ <button onClick={() => pausePull(name)} className="p-0.5 rounded hover:bg-gray-500/15 text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 transition-colors" title="Pause"><Pause size={11} /></button>
)}
{state.paused && (
<button onClick={() => pullModel(name)} className="p-0.5 rounded hover:bg-green-500/20 text-gray-400 hover:text-green-400 transition-colors" title="Resume"><Play size={11} /></button>
@@ -181,7 +185,7 @@ export function DownloadBadge() {
{state.complete ? (
<div className="flex items-center gap-1.5 text-green-400"><CheckCircle size={11} /><span className="text-[0.65rem]">Complete</span></div>
) : state.paused ? (
- <span className="text-[0.65rem] text-yellow-400">Paused</span>
+ <span className={`text-[0.65rem] ${HINWEIS_TEXT.ruhig}`}>Paused</span>
) : (
<>
<p className="text-[0.6rem] text-gray-500 mb-1 truncate">{state.progress.status}</p>
@@ -308,7 +312,7 @@ export function DownloadBadge() {
: d.status === 'paused' ? (
<button
onClick={() => useDownloadStore.getState().resume(id)}
- className="flex items-center gap-0.5 text-yellow-400 hover:text-yellow-300 transition-colors"
+ className={`flex items-center gap-0.5 ${HINWEIS_TEXT.ruhig} hover:text-gray-700 dark:hover:text-gray-200 transition-colors`}
title="Resume this download"
>
<Play size={8} />
diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx
index 128b6923..08acca02 100644
--- a/src/components/layout/Sidebar.tsx
+++ b/src/components/layout/Sidebar.tsx
@@ -696,9 +696,18 @@ export function Sidebar() {
</button>
) : null}
- {/* Passcode */}
+ {/* Passcode. Bis zum 04.09.2026 stand er in einem mittleren Gelb,
+ und das war Schmuck ohne Aussage: Gelb heisst in dieser App
+ nichts mehr, seit `lib/hinweis.ts` die Toene auf zwei
+ festgelegt hat. Eine Ersatzfarbe bekommt er trotzdem nicht.
+ In diesem Panel sind alle Toene schon vergeben (gruen LIVE,
+ smaragd Tunnel, blau Adresse, rot Stop und abgelaufen), und
+ Violett gehoert der Cloud. Ein Passcode ist ohnehin kein
+ Zustand, sondern der Wert, den man abliest und abtippt. Also
+ der staerkste Kontrast statt eines sechsten Farbtons, in
+ beiden Modi. */}
<div className="flex items-center justify-between">
- <code className="text-[14px] text-amber-400 font-mono tracking-[3.75px] font-bold">{passcode}</code>
+ <code className="text-[14px] text-gray-900 dark:text-white font-mono tracking-[3.75px] font-bold">{passcode}</code>
<div className="flex items-center gap-1.25">
<button
onClick={() => copyToClipboard(passcode, 'panel-passcode')}
@@ -1211,11 +1220,15 @@ export function Sidebar() {
Verschlimmbesserung, die dort beschrieben steht: die Flaeche
auf Tokens, und jeder Akzent darin mit Hell-Pendant.
Vorher im Hellmodus blieb die Flaeche #212121, waehrend der
- Rescue-Layer die Schrift nach unten drehte — `text-gray-400`
+ Rescue-Layer die Schrift nach unten drehte: `text-gray-400`
wurde #374151 und stand bei 1,56:1. Nachher 10,31:1.
- Der Passcode (amber-400, 1,92:1 auf Weiss) traegt jetzt
- amber-700 mit 5,02:1. Die QR-Kachel ist selbst weiss und
- verschwaende sonst im weissen Dialog — daher die Kante. */
+ Der Passcode trug damals amber-400 (1,92:1 auf Weiss) und
+ bekam dafuer das Hell-Pendant amber-700. Seit dem 04.09.2026
+ ist er gar nicht mehr farbig, sondern gray-900 auf Weiss und
+ Weiss im Dunkeln: Gelb ist ersatzlos raus, und ein Wert, den
+ man abtippt, braucht Kontrast und keinen Farbton. Die
+ QR-Kachel ist selbst weiss und verschwaende sonst im weissen
+ Dialog, daher die Kante. */
className="bg-white dark:bg-lu-base border border-gray-200 dark:border-white/10 rounded-[10px] p-6.25 max-w-[450px] w-full flex flex-col items-center gap-3.75 shadow-2xl"
onClick={(e) => e.stopPropagation()}
>
@@ -1255,7 +1268,7 @@ export function Sidebar() {
) : null}
<div className="flex items-center justify-center gap-3.75 w-full">
- <code className="text-[30px] font-mono font-bold text-amber-700 dark:text-amber-400 tracking-[10px]">{passcode}</code>
+ <code className="text-[30px] font-mono font-bold text-gray-900 dark:text-white tracking-[10px]">{passcode}</code>
<button
onClick={() => copyToClipboard(passcode, 'modal-passcode')}
className="p-[7.5px] rounded-[5px] hover:bg-white/10 text-gray-400 hover:text-white transition-colors"
diff --git a/src/components/layout/StaleModelsBanner.tsx b/src/components/layout/StaleModelsBanner.tsx
index 285a7f89..e092cc24 100644
--- a/src/components/layout/StaleModelsBanner.tsx
+++ b/src/components/layout/StaleModelsBanner.tsx
@@ -1,18 +1,33 @@
import { useState } from 'react'
-import { RefreshCw, X, AlertTriangle, Check } from 'lucide-react'
+import { RefreshCw, X, Check } from 'lucide-react'
import { useModelHealthStore } from '../../stores/modelHealthStore'
import { useModels } from '../../hooks/useModels'
import { checkModelCapability } from '../../api/ollama'
+import { countLabel } from '../../lib/formatters'
+import { HINWEIS_TEXT, HINWEIS_ZEILE } from '../../lib/hinweis'
/**
- * Top-of-app banner shown when the startup health scan finds installed
+ * Top-of-app notice shown when the startup health scan finds installed
* Ollama models whose manifests are rejected by 0.20.7. Auto-hides when
* all models are refreshed or the user dismisses for this session.
*
- * Cause: Ollama auto-upgraded 0.20.6 → 0.20.7 today and started strict-
+ * Cause: Ollama auto-upgraded 0.20.6 to 0.20.7 today and started strict-
* rejecting manifests pulled before the registry-side capabilities refresh.
* Fix: re-pull each stale model. The banner does this serially via the
* existing useModels.pullModel flow (progress lands in DownloadBadge).
+ *
+ * Bauform: eine ruhige Zeile nach der Regel in `lib/hinweis.ts`. Bis zum
+ * 04.09.2026 stand hier ein randbreites gelbes Band mit Fuellflaeche
+ * (ein gefuellter gelber Grund), Kante, fetter Ueberschrift und drei Gelbtoenen
+ * uebereinander. Es ist aber nichts abgestuerzt: ein Modell muss
+ * nachgeladen werden, mehr sagt der Satz nicht. Also `ruhig` statt einer
+ * eigenen dritten Farbe, und `role="status"` statt `role="alert"`, damit
+ * der Screenreader den Nutzer dafuer nicht unterbricht.
+ *
+ * Der Refresh-Knopf bleibt ein Knopf: er traegt das Haus-Rezept
+ * `.lu-control` (dieselbe Haut wie die Knoepfe der Eingabeleiste), also
+ * Rand, Radius, Hover-Fuellung und Fokusring. Sichtbar anklickbar, ohne
+ * ein eigener Farbkasten zu sein.
*/
export function StaleModelsBanner() {
const { staleModels, dismissed, dismiss, markFresh } = useModelHealthStore()
@@ -28,7 +43,7 @@ export function StaleModelsBanner() {
if (refreshingAll) return
setRefreshingAll(true)
try {
- // Serial — one pull at a time keeps disk/network manageable and gives
+ // Serial: one pull at a time keeps disk/network manageable and gives
// clear progress in DownloadBadge without interleaved output.
for (const name of pending) {
try {
@@ -38,7 +53,7 @@ export function StaleModelsBanner() {
const check = await checkModelCapability(name)
if (check.ok) markFresh(name)
} catch {
- // Continue with next model; user can retry via the banner later.
+ // Continue with next model; user can retry via the notice later.
}
}
} finally {
@@ -47,37 +62,25 @@ export function StaleModelsBanner() {
}
return (
- <div
- className="flex items-center gap-3 px-3 py-1.5 border-b border-amber-400/30 bg-amber-500/10 backdrop-blur-sm"
- role="alert"
- >
- <AlertTriangle
- size={13}
- className="text-amber-600 dark:text-amber-400 shrink-0"
- aria-hidden="true"
- />
- <div className="flex-1 min-w-0 text-[0.7rem]">
- <span className="font-semibold text-amber-800 dark:text-amber-200">
- Ollama 0.20.7 broke {staleModels.length} of your model{staleModels.length === 1 ? '' : 's'}.
+ <div role="status" className={`${HINWEIS_ZEILE} ${HINWEIS_TEXT.ruhig} px-3 py-1`}>
+ <span className="flex-1 min-w-0 self-center truncate" title={staleModels.join(', ')}>
+ Ollama 0.20.7 rejects {countLabel(staleModels.length, 'installed model')}:{' '}
+ {staleModels.slice(0, 3).join(', ')}
+ {staleModels.length > 3 ? `, +${staleModels.length - 3} more` : ''}
+ </span>
+ {/* Steht ausserhalb der abgeschnittenen Liste: der Fortschritt ist
+ das Einzige, was sich waehrend des Laufs aendert, und darf nicht
+ hinter dem Namen des dritten Modells verschwinden. */}
+ {inProgressCount > 0 && (
+ <span className="self-center shrink-0">
+ · refreshing {inProgressCount}/{staleModels.length}
</span>
- <span
- className="ml-1.5 text-amber-700/90 dark:text-amber-300/80 truncate inline-block max-w-[50vw] align-bottom"
- title={staleModels.join(', ')}
- >
- {staleModels.slice(0, 3).join(', ')}
- {staleModels.length > 3 ? `, +${staleModels.length - 3} more` : ''}
- </span>
- {inProgressCount > 0 && (
- <span className="ml-2 text-amber-600 dark:text-amber-300 text-[0.65rem]">
- · refreshing {inProgressCount}/{staleModels.length}
- </span>
- )}
- </div>
+ )}
<button
onClick={refreshAll}
disabled={refreshingAll || pending.length === 0}
- className="flex items-center gap-1 px-2 py-1 rounded bg-amber-500/20 border border-amber-400/40 text-amber-800 dark:text-amber-200 text-[0.65rem] font-medium hover:bg-amber-500/30 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
- title={`Re-pull ${staleModels.length} stale model${staleModels.length === 1 ? '' : 's'}`}
+ className="lu-control self-center"
+ title={`Re-pull ${countLabel(staleModels.length, 'stale model')}`}
>
{refreshingAll ? (
<>
@@ -98,7 +101,7 @@ export function StaleModelsBanner() {
</button>
<button
onClick={dismiss}
- className="p-1 rounded text-amber-700/70 dark:text-amber-300/70 hover:text-amber-900 dark:hover:text-amber-100 hover:bg-amber-500/20 transition-colors"
+ className="self-center shrink-0 rounded p-[1px] opacity-70 hover:opacity-100 transition-opacity"
aria-label="Dismiss until next launch"
title="Dismiss until next launch"
>
diff --git a/src/components/layout/StorageQuotaToast.tsx b/src/components/layout/StorageQuotaToast.tsx
index a0ba42ef..c90fe94e 100644
--- a/src/components/layout/StorageQuotaToast.tsx
+++ b/src/components/layout/StorageQuotaToast.tsx
@@ -1,23 +1,29 @@
import { useEffect, useState } from 'react'
-import { AlertTriangle, X } from 'lucide-react'
+import { Hinweis } from '../ui/Hinweis'
/**
- * §20 — One-time, non-spammy banner shown when a localStorage write was
+ * §20: one-time, non-spammy notice shown when a localStorage write was
* dropped because the browser's storage quota is full (after conversation +
* memory pruning already failed to make room). Listens for the
* `lu:storage-quota-exceeded` CustomEvent that createSafeStorage dispatches.
*
* Debounced so a burst of failing writes (zustand persists fire on every
- * mutation) surfaces a single toast, not one per write. Stays mounted at the
- * top of AppShell — zero cost until the event fires, since it renders null
+ * mutation) surfaces a single notice, not one per write. Stays mounted at the
+ * top of AppShell with zero cost until the event fires, since it renders null
* until then. The user dismisses it manually; we don't auto-hide because a
- * full disk is a sticky condition they should act on.
+ * full store is a sticky condition they should act on.
+ *
+ * Bauform: `<Hinweis>` im Ton `ruhig`, siehe `lib/hinweis.ts`. Bis zum
+ * 04.09.2026 war das ein gelbes Band mit Fuellflaeche, Kante und fetter
+ * Ueberschrift. Der Satz sagt aber gerade, dass NICHTS Wichtiges verloren
+ * ist: Chats und Erinnerungen liegen woanders, nur eine Einstellung kam
+ * nicht durch. Ein Band in Alarmfarbe hat das Gegenteil behauptet.
*/
export function StorageQuotaToast() {
const [visible, setVisible] = useState(false)
useEffect(() => {
- // Debounce: collapse a flurry of quota events into one visible toast.
+ // Debounce: collapse a flurry of quota events into one visible notice.
let timer: ReturnType<typeof setTimeout> | null = null
const onQuota = () => {
if (timer) return
@@ -36,32 +42,10 @@ export function StorageQuotaToast() {
if (!visible) return null
return (
- <div
- className="flex items-center gap-3 px-3 py-1.5 border-b border-amber-400/30 bg-amber-500/10 backdrop-blur-sm"
- role="alert"
- >
- <AlertTriangle
- size={13}
- className="text-amber-600 dark:text-amber-400 shrink-0"
- aria-hidden="true"
- />
- <div className="flex-1 min-w-0 text-[0.7rem]">
- <span className="font-semibold text-amber-800 dark:text-amber-200">
- App storage limit reached, so that setting wasn't saved.
- </span>
- <span className="ml-1.5 text-amber-700/90 dark:text-amber-300/80">
- This is the browser's small per-app store, not your disk space. Your chats and
- memories live in a separate, much larger local database and are unaffected.
- </span>
- </div>
- <button
- onClick={() => setVisible(false)}
- className="p-1 rounded text-amber-700/70 dark:text-amber-300/70 hover:text-amber-900 dark:hover:text-amber-100 hover:bg-amber-500/20 transition-colors"
- aria-label="Dismiss"
- title="Dismiss"
- >
- <X size={11} />
- </button>
- </div>
+ <Hinweis className="px-3 py-1" onDismiss={() => setVisible(false)}>
+ App storage limit reached, so that setting wasn't saved. This is the browser's small
+ per-app store, not your disk space. Your chats and memories live in a separate, much
+ larger local database and are unaffected.
+ </Hinweis>
)
}
diff --git a/src/components/layout/__tests__/die-kopfzeile-hat-eine-regel.test.ts b/src/components/layout/__tests__/die-kopfzeile-hat-eine-regel.test.ts
index d07beef1..6f96a2b5 100644
--- a/src/components/layout/__tests__/die-kopfzeile-hat-eine-regel.test.ts
+++ b/src/components/layout/__tests__/die-kopfzeile-hat-eine-regel.test.ts
@@ -29,20 +29,25 @@ const CODE = SRC.replace(/\{\/\*[\s\S]*?\*\/\}/g, ' ')
.replace(/^\s*\/\/.*$/gm, ' ')
/** Der Abschnitt zwischen zwei Markern im Code. */
-const between = (from: string, to: string) => {
- const a = CODE.indexOf(from)
+const between = (from: string | RegExp, to: string) => {
+ const a = typeof from === 'string' ? CODE.indexOf(from) : CODE.search(from)
const b = CODE.indexOf(to, a)
expect(a, `Marker fehlt: ${from}`).toBeGreaterThan(-1)
expect(b, `Marker fehlt: ${to}`).toBeGreaterThan(a)
return CODE.slice(a, b)
}
-const NAV = between('<nav aria-label="Main"', '</nav>')
+// Seit dem 04.09.2026 steht die Begruendung der harten Mitte zwischen dem
+// Namen und der Klasse, das Element hat also je Attribut eine Zeile. Der
+// Marker ist deshalb ein Muster und keine feste Zeichenkette: was er pruefen
+// soll, ist ein <nav> mit diesem Namen, nicht dessen Zeilenumbrueche.
+const NAV_MARKE = /<nav\s+aria-label="Main"/
+const NAV = between(NAV_MARKE, '</nav>')
const RIGHT = CODE.slice(CODE.indexOf('</nav>'), CODE.indexOf('</header>'))
describe('D-S19: der Center-Slot traegt jetzt etwas, und rechts steht weniger', () => {
it('die Navigation steht in der Mitte, in einem echten <nav>', () => {
- expect(CODE).toContain('<nav aria-label="Main"')
+ expect(CODE).toMatch(NAV_MARKE)
expect(NAV).toContain('navTargets.map')
})
@@ -57,13 +62,39 @@ describe('D-S19: der Center-Slot traegt jetzt etwas, und rechts steht weniger',
expect(RIGHT).not.toContain('openCompare')
})
- it('rechts stehen genau vier Dinge, und alle vier sind Zustandsanzeigen', () => {
+ it('rechts stehen nur Zustandsanzeigen und Schalter', () => {
const komponenten = [...RIGHT.matchAll(/<([A-Z][A-Za-z]*)\s*\/>/g)].map((m) => m[1])
expect(komponenten).toEqual(['CloudSwitch', 'DownloadBadge', 'UpdateBadge'])
- // Der vierte ist der Theme-Knopf, der kein eigenes Bauteil ist.
+ // Der Theme-Knopf ist kein eigenes Bauteil und deshalb oben nicht dabei.
expect(RIGHT).toContain('onClick={toggleTheme}')
- // Und sonst nichts: kein weiterer Knopf in dieser Gruppe.
- expect([...RIGHT.matchAll(/<button/g)]).toHaveLength(1)
+ })
+
+ it('und der Stale-Hinweis steht seit dem 04.09.2026 auch hier', () => {
+ // Er stand in der Mitte-Gruppe und schob dort das Drehrad zur Seite,
+ // sobald ein Modell kaputt war. David: "das ausgewaehlte im drehrad ist
+ // immer hardstuck mittig. keine ausnahme."
+ //
+ // Er gehoert ohnehin hierher, denn er zeigt einen ZUSTAND, und genau das
+ // ist die Regel dieser Gruppe. Er bringt zwei eigene Knoepfe mit
+ // (nachladen und wegklicken), und beide haengen an der Bedingung: ohne
+ // kaputtes Modell steht hier nichts.
+ expect(RIGHT).toContain('staleError && (')
+ expect(RIGHT).toContain('onClick={handleRefreshStale}')
+ expect(RIGHT).toContain('aria-label="Dismiss"')
+ expect(NAV).not.toContain('staleError')
+ })
+
+ it('und trotzdem steht rechts keine Navigation, auch nicht als Knopf', () => {
+ // Die Regel dieser Gruppe ist nicht "wenig", sondern "kein Ziel". Ein
+ // Zaehler auf die Knoepfe war die schwaechere Fassung davon: er ging rot,
+ // als ein Zustandsanzeiger mit zwei Bedienelementen dazukam, und waere
+ // gruen geblieben, wenn jemand einen Navigationsknopf gegen einen
+ // anderen getauscht haette.
+ for (const t of ['Chat', 'Create', 'Compare', 'Benchmark', 'Models', 'Settings']) {
+ expect(RIGHT, `${t} steht rechts`).not.toContain(`>${t}<`)
+ }
+ expect(RIGHT).not.toContain('setView(')
+ expect(RIGHT).not.toContain('navClass')
})
it('die Ziele stehen einmal als Daten da, nicht viermal als JSX', () => {
diff --git a/src/components/models/BenchmarkView.tsx b/src/components/models/BenchmarkView.tsx
index e081b135..22b1b518 100644
--- a/src/components/models/BenchmarkView.tsx
+++ b/src/components/models/BenchmarkView.tsx
@@ -1,5 +1,7 @@
import { useState } from 'react'
import { ArrowLeft, Trophy, Zap, Play, Square, Trash2, Download, ListChecks } from 'lucide-react'
+import { Hinweis } from '../ui/Hinweis'
+import { HINWEIS_TEXT } from '../../lib/hinweis'
import { useUIStore } from '../../stores/uiStore'
import { useModels } from '../../hooks/useModels'
import {
@@ -59,23 +61,30 @@ export function BenchmarkView() {
return (
<div className="h-full overflow-y-auto scrollbar-thin">
<div className="max-w-2xl mx-auto px-4 py-4">
+ {/* Eine Zeile, kein Kasten. Hier stand ein roter Kasten mit Fuellung,
+ Rand und Polster fuer einen Satz, der ohnehin schon rot ist. Die
+ Farbe traegt die Dringlichkeit, die Flaeche trug nur Flaeche. Die
+ Begruendung steht in `lib/hinweis.ts`. */}
{benchError && (
- <div className="mb-3 px-3 py-2 rounded-md bg-red-500/10 border border-red-500/25 t-micro text-red-300 flex items-start gap-2">
- <span className="flex-1">{benchError}</span>
- <button
- onClick={() => useBenchmarkStore.getState().setError(null)}
- className="text-red-400 hover:text-red-200 transition-colors"
- >
- Dismiss
- </button>
- </div>
+ <Hinweis
+ ton="fehler"
+ className="mb-3"
+ onDismiss={() => useBenchmarkStore.getState().setError(null)}
+ >
+ {benchError}
+ </Hinweis>
)}
{/* Header */}
<div className="flex items-center gap-2 mb-4">
<button onClick={() => setView('models')} className="p-1 rounded hover:bg-gray-200 dark:hover:bg-white/5 text-gray-500 hover:text-gray-900 dark:hover:text-white transition-colors">
<ArrowLeft size={16} />
</button>
- <Trophy size={16} className="text-amber-400" />
+ {/* Der Pokal war golden, weil Pokale golden sind, nicht weil die
+ Farbe hier etwas sagt. Auf dieser Ansicht bedeutet Gruen
+ „richtig geantwortet" und Rot „abgeschnitten"; ein dritter Ton
+ nur fuers Symbol haette eine Bedeutung behauptet, die es nicht
+ gibt. Also neutral wie der Pfeil daneben. */}
+ <Trophy size={16} className="text-gray-500" />
<h1 className="text-[0.8rem] font-semibold text-gray-800 dark:text-gray-200">Benchmark</h1>
<div className="ml-auto flex items-center gap-1">
{pending.length > 0 && (
@@ -117,26 +126,29 @@ export function BenchmarkView() {
</div>
</div>
- {/* Results whose model is gone — the "out of whack" state from D#21. */}
+ {/* Results whose model is gone, the "out of whack" state from D#21.
+ Das war ein gelber Kasten mit gelbem Knopf darin, also die Bauform
+ einer Warnung fuer einen Satz, der nur aufraeumen anbietet: eine
+ Tabellenzeile ohne Modell dahinter ist nichts, wofuer jemand
+ sofort handeln muesste. Jetzt eine ruhige Zeile, und der Weg
+ hinaus steht als Wort im Satz statt als Flaeche daneben. */}
{stale.length > 0 && (
- <div className="mb-4 flex items-center justify-between gap-3 px-3 py-2 rounded-lg bg-amber-500/10 border border-amber-500/20">
- <p className="t-micro text-amber-600 dark:text-amber-400">
- {stale.length} model{stale.length === 1 ? '' : 's'} in this table {stale.length === 1 ? 'is' : 'are'} no longer installed:{' '}
- {stale.slice(0, 3).join(', ')}{stale.length > 3 ? ` and ${stale.length - 3} more` : ''}.
- </p>
+ <Hinweis className="mb-4">
+ {stale.length} model{stale.length === 1 ? '' : 's'} in this table {stale.length === 1 ? 'is' : 'are'} no longer installed:{' '}
+ {stale.slice(0, 3).join(', ')}{stale.length > 3 ? ` and ${stale.length - 3} more` : ''}.{' '}
<button
onClick={() => pruneMissing(names)}
- className="shrink-0 px-2 py-1 rounded-md bg-amber-500/15 text-amber-600 dark:text-amber-400 t-micro hover:bg-amber-500/25 transition-colors"
+ className="underline underline-offset-2 hover:text-gray-700 dark:hover:text-gray-200 transition-colors"
>
Remove them
</button>
- </div>
+ </Hinweis>
)}
{/* Leaderboard */}
{leaderboard.length > 0 && (
<div className="mb-6 p-4 rounded-xl bg-gray-50 dark:bg-white/[0.03] border border-gray-200 dark:border-white/5">
- <h2 className="text-[0.7rem] font-semibold text-amber-500 flex items-center gap-1.5 mb-3">
+ <h2 className="text-[0.7rem] font-semibold text-gray-500 flex items-center gap-1.5 mb-3">
<Trophy size={13} />
Leaderboard
</h2>
@@ -150,14 +162,31 @@ export function BenchmarkView() {
return (
<div key={entry.model} className="flex items-center gap-3">
- <span className={`text-[0.7rem] w-5 text-right font-bold ${i === 0 ? 'text-amber-400' : i === 1 ? 'text-gray-400' : i === 2 ? 'text-orange-700' : 'text-gray-500'}`}>
+ {/* Rang durch Gewicht, nicht durch Medaillenfarbe.
+ Hier stand die Medaillenreihe aus Bernstein, Grau und
+ Bronze, und der goldene Platz eins war die einzige
+ Stelle, an der die Farbe etwas hiess. Auf einem Brett, das
+ Gruen fuer „richtig" und Rot fuer „abgeschnitten"
+ benutzt, ist ein vierter Ton fuer „Platz eins" eine
+ Bedeutung zu viel. Der Akzentviolett der App scheidet
+ als Ersatz aus: #a094f8 steht 2.60:1 gegen Weiss und
+ die Hellmodus-Kante #8b7cf0 3.37:1, beides zu wenig
+ fuer 0.7rem-Text (siehe index.css). Der Rang steht
+ ohnehin schon in der Zahl und in der Balkenlaenge. */}
+ <span className={`text-[0.7rem] w-5 text-right font-bold ${
+ i === 0 ? 'text-gray-900 dark:text-white'
+ : i === 1 ? 'text-gray-600 dark:text-gray-300'
+ : 'text-gray-500 dark:text-gray-400'
+ }`}>
{i + 1}.
</span>
<div className="flex-1 min-w-0">
<div className="flex items-center justify-between mb-1">
<span className="text-[0.7rem] text-gray-800 dark:text-gray-200 truncate font-medium" title={displayModelName(entry.model)}>{displayModelName(entry.model)}</span>
<span className="t-micro text-gray-600 dark:text-gray-400 font-mono shrink-0 ml-2 flex items-center gap-1">
- <Zap size={10} className="text-amber-400" />
+ {/* Der Blitz ist Schmuck und erbt deshalb das Grau
+ der Zeile, statt eine eigene Farbe zu tragen. */}
+ <Zap size={10} />
<span title="Useful throughput: the average rate multiplied by how often the answer was right. This is what the board is ordered by.">
{entry.score} t/s useful
</span>
@@ -170,7 +199,7 @@ export function BenchmarkView() {
</div>
<div className="w-full h-1.5 rounded-full bg-gray-200 dark:bg-white/5 overflow-hidden">
<div
- className={`h-full rounded-full transition-[width] duration-[var(--motion-slow)] ${i === 0 ? 'bg-amber-400' : 'bg-gray-400 dark:bg-gray-500/60'}`}
+ className={`h-full rounded-full transition-[width] duration-[var(--motion-slow)] ${i === 0 ? 'bg-gray-800 dark:bg-white/70' : 'bg-gray-400 dark:bg-gray-500/60'}`}
style={{ width: `${barWidth}%` }}
/>
</div>
@@ -187,10 +216,16 @@ export function BenchmarkView() {
{Math.round(entry.thinkShare * 100)}% think
</span>
)}
+ {/* Unter 100 Prozent ist keine Warnung, sondern eine
+ Messung: die meisten Modelle liegen dort, und die
+ Zeile daneben zeigt mit Rot schon an, wo wirklich
+ etwas schiefging (abgeschnitten, weggelaufen).
+ Also gruen nur fuer die volle Trefferquote, sonst
+ der ruhige Ton aus `lib/hinweis.ts`. */}
{entry.accuracy !== null && (
<span
title="How often the answer matched the expected result"
- className={entry.accuracy < 1 ? 'text-amber-500' : 'text-emerald-500'}
+ className={entry.accuracy < 1 ? HINWEIS_TEXT.ruhig : 'text-emerald-500'}
>
{Math.round(entry.accuracy * 100)}% correct
</span>
@@ -237,7 +272,7 @@ export function BenchmarkView() {
<span className="text-[0.7rem] text-gray-800 dark:text-gray-200 truncate" title={displayModelName(model.name)}>{displayModelName(model.name)}</span>
{latestSpeed !== null && (
<span className="text-[0.55rem] text-gray-500 font-mono flex items-center gap-0.5 shrink-0" title="Most recent benchmark run">
- <Zap size={9} className="text-amber-400" />
+ <Zap size={9} />
{latestSpeed} t/s
</span>
)}
diff --git a/src/components/models/DiscoverModels.tsx b/src/components/models/DiscoverModels.tsx
index 6ef522b0..a5ea82fb 100644
--- a/src/components/models/DiscoverModels.tsx
+++ b/src/components/models/DiscoverModels.tsx
@@ -32,6 +32,7 @@ import { ensureLuEngineIsChatProvider, announceLuEngineSwitch } from '../../api/
import { LuEngineSwitchBar } from '../chat/LuEngineSwitchBar'
import { resolveTextDownloadTarget } from '../../lib/text-download-target'
import { hfUrlToOllamaRef, hfUrlToLmStudioSubdir, parseHfUrl, extractGgufQuant, isShardedOrIncompatibleGguf } from '../../lib/hf-to-provider'
+import { HINWEIS_TEXT } from '../../lib/hinweis'
import { GlassCard } from '../ui/GlassCard'
import { GlowButton } from '../ui/GlowButton'
import { ProgressBar } from '../ui/ProgressBar'
@@ -1264,13 +1265,20 @@ export function DiscoverModels({ category, search = '', searchSubmitToken = 0 }:
<p className="text-[0.7rem] text-gray-500">
All parts must download into one folder to load as a single model. Make sure you have the disk space, and the RAM/VRAM to actually run it.
</p>
+ {/* Beide Saetze standen in Gelb, also in der Farbe, mit der die
+ App bis heute alles zwischen „gut" und „kaputt" markiert hat.
+ Keiner von beiden haelt den Download auf: der erste sagt, wie
+ gross das Ding ist, der zweite, in welchem Ordner die Teile
+ landen. Auskunft, kein Alarm, also der ruhige Ton aus
+ `lib/hinweis.ts`. Die Schriftgroesse bleibt die der beiden
+ Saetze darueber, damit der Absatz eine Stimme behaelt. */}
{confirmDownload.totalGB > 60 && (
- <p className="text-[0.7rem] text-amber-500">
+ <p className={`text-[0.7rem] ${HINWEIS_TEXT.ruhig}`}>
That is very large for a local model. Most consumer GPUs can't run it.
</p>
)}
{confirmDownload.note && (
- <p className="text-[0.7rem] text-amber-500">{confirmDownload.note}</p>
+ <p className={`text-[0.7rem] ${HINWEIS_TEXT.ruhig}`}>{confirmDownload.note}</p>
)}
<div className="flex gap-2 pt-1">
<GlowButton variant="secondary" onClick={() => setConfirmDownload(null)} className="flex-1">
diff --git a/src/components/models/ModelBenchmark.tsx b/src/components/models/ModelBenchmark.tsx
index 3bb37532..648cef32 100644
--- a/src/components/models/ModelBenchmark.tsx
+++ b/src/components/models/ModelBenchmark.tsx
@@ -2,6 +2,7 @@ import { useBenchmarkStore, getLatestSpeed, getLeaderboard } from '../../stores/
import { useBenchmark } from '../../hooks/useBenchmark'
import { Zap, Play, Square, Trophy } from 'lucide-react'
import { displayModelName } from '../../api/providers/registry'
+import { HINWEIS_TEXT } from '../../lib/hinweis'
interface Props {
modelName: string
@@ -58,7 +59,9 @@ export function BenchmarkLeaderboard() {
return (
<div className="mt-4 p-3 rounded-lg bg-white/[0.03] border border-white/5">
- <h3 className="text-[0.7rem] font-semibold text-amber-400 flex items-center gap-1.5 mb-2">
+ {/* Die Ueberschrift war golden, weil ein Pokal daneben steht. Farbe
+ traegt hier nur noch Bedeutung, und „Bestenliste" ist keine. */}
+ <h3 className="text-[0.7rem] font-semibold text-gray-400 flex items-center gap-1.5 mb-2">
<Trophy size={12} />
Benchmark Leaderboard
</h3>
@@ -89,8 +92,12 @@ export function BenchmarkLeaderboard() {
</div>
<div className="flex items-center flex-wrap gap-x-2 mt-0.5 text-[0.5rem] lu-hud-num text-gray-600">
{entry.avgTokens !== null && <span>{entry.avgTokens} tok</span>}
+ {/* Wie im grossen Brett: gruen nur fuer die volle
+ Trefferquote, alles darunter ist eine Messung und kein
+ Zwischenfall, also der ruhige Ton aus `lib/hinweis.ts`.
+ Rot bleibt der abgeschnittenen Antwort daneben. */}
{entry.accuracy !== null && (
- <span className={entry.accuracy < 1 ? 'text-amber-400' : 'text-emerald-400'}>
+ <span className={entry.accuracy < 1 ? HINWEIS_TEXT.ruhig : 'text-emerald-400'}>
{Math.round(entry.accuracy * 100)}% correct
</span>
)}
diff --git a/src/components/models/ModelSelector.tsx b/src/components/models/ModelSelector.tsx
index 778602fb..b863b05b 100644
--- a/src/components/models/ModelSelector.tsx
+++ b/src/components/models/ModelSelector.tsx
@@ -32,6 +32,7 @@ import {
handBackChatProviderForRow, announceChatProviderSwitch, standbyBackendOf,
} from '../../api/lu-engine-switch'
import { tryAcquireLuEngineSwap, releaseLuEngineSwap, luEngineSwapInFlight, useLuEngineSwapRunning } from '../../api/lu-engine-swap-lock'
+import { HINWEIS_TEXT } from '../../lib/hinweis'
import { ModelPickerSkeleton } from '../layout/ViewSkeletons'
import type { AIModel } from '../../types/models'
import { MOTION_S } from '../ui/motion'
@@ -1266,10 +1267,15 @@ export function ModelSelector({ openUpward = false, surface = 'chat', answeredBy
{/* An empty picker after the user switched the last backend
off in Settings used to say only that, which reads like a
machine with nothing installed (Nebenbefund 1, R9
- re-measure). The reason and the way back belong here. */}
+ re-measure). The reason and the way back belong here.
+ Beide Saetze standen in Gelb. Der Nutzer hat das Backend
+ selbst ausgeschaltet; das ist kein Zwischenfall, sondern
+ die Antwort auf „warum ist die Liste leer". Ruhiger Ton
+ aus `lib/hinweis.ts`, der Knopf darunter traegt den
+ Weg zurueck. */}
{noBackendEnabled ? (
<>
- <p className="mt-1 t-micro text-amber-300/90 leading-snug text-left">
+ <p className={`mt-1 t-micro leading-snug text-left ${HINWEIS_TEXT.ruhig}`}>
No AI backend is enabled, so there is nothing to list. Open Settings, go to AI Backends, and press Enable on the backend you switched off, or Add Provider.
</p>
<button
@@ -1280,7 +1286,7 @@ export function ModelSelector({ openUpward = false, surface = 'chat', answeredBy
</button>
</>
) : emptyReason && (
- <p className="mt-1 t-micro text-amber-300/90 leading-snug text-left">{emptyReason}</p>
+ <p className={`mt-1 t-micro leading-snug text-left ${HINWEIS_TEXT.ruhig}`}>{emptyReason}</p>
)}
</div>
)}
@@ -1427,9 +1433,15 @@ export function ModelSelector({ openUpward = false, surface = 'chat', answeredBy
supportsTools: 'supportsTools' in model ? model.supportsTools : undefined,
})
if (support === 'none') {
+ // Das Verbotszeichen stand in Gelb, direkt neben
+ // dem gruenen Schraubenschluessel: zwei Farben
+ // fuer „kann Werkzeuge" und „kann keine". Es
+ // fehlt eine Faehigkeit, es ist nichts kaputt,
+ // also der ruhige Ton aus `lib/hinweis.ts`. Die
+ // Aussage traegt die Glyphe, nicht die Farbe.
return (
<span
- className="inline-flex items-center shrink-0 text-amber-500/80"
+ className={`inline-flex items-center shrink-0 ${HINWEIS_TEXT.ruhig}`}
title="This model does not support tool calling, so Agent and Code mode cannot use it"
>
<Ban size={9} />
diff --git a/src/components/models/ModelTiles.tsx b/src/components/models/ModelTiles.tsx
index 012a6ee1..4897b163 100644
--- a/src/components/models/ModelTiles.tsx
+++ b/src/components/models/ModelTiles.tsx
@@ -38,19 +38,31 @@ export function computeFit(sizeGB: number | undefined, vramGb: number | null): F
// "too big" liest sich als Verbot, obwohl `computeFit` ausdruecklich nie
// blockiert (siehe oben: "Never used to BLOCK a download").
//
-// Die Leiter bleibt eine Leiter — Folge, nicht Fehlergrad: schnell (emerald)
-// → langsamer (amber) → deutlich langsamer (orange). Orange ist die naechste
-// Stufe derselben warmen Reihe und gehoert keinem der roten Fehlertokens
-// (red-300/400/500/600) an, die die App sonst benutzt.
+// Die Leiter ist eine Folge, kein Fehlergrad. Die mittlere Stufe stand in
+// Bernstein, also in genau dem Ton, mit dem diese App bis zum 04.09.2026 jede
+// Warnung gemalt hat (die Begruendung, warum es diesen Ton nicht mehr gibt,
+// steht in `lib/hinweis.ts`). „Passt knapp" ist keine Warnung: es passt.
+//
+// Damit hoert die Leiter auf, eine Waermeskala zu sein, denn eine Waermeskala
+// braucht in der Mitte Gelb. Sie nennt jetzt den ORT, an dem gerechnet wird:
+// ganz im Grafikspeicher (emerald) → knapp, Teile weichen in den Arbeits-
+// speicher aus (sky) → groesstenteils auf CPU und RAM (orange). Nebenbei
+// gewinnt der 6px-Punkt dabei: Bernstein und Orange sind Nachbarn auf dem
+// Farbkreis und waren auf dieser Groesse kaum zu trennen, Blau liegt von
+// beiden weit weg.
+//
// Gerechnet auf der Kachelflaeche (`bg-gray-50` hell, `bg-white/[0.03]` ueber
-// #1e1e1e = #252525 dunkel): red-400/80 lag bei 4.05:1 dunkel und 2.20:1 hell,
-// orange-500/80 liegt bei 3.98:1 und 2.24:1 — die Aussage aendert sich, der
-// Kontrast praktisch nicht. (Dass die HELLE Seite fuer die ganze Leiter unter
-// 3:1 liegt, ist ein aelterer, eigener Befund; er betrifft alle vier Punkte
-// gleich und wird hier nicht einseitig fuer einen davon repariert.)
+// #1e1e1e = #252525 dunkel): der alte mittlere Punkt lag bei 5.08:1 dunkel und
+// 1.80:1 hell, sky-500/80 liegt bei 4.01:1 und 2.21:1. Dunkel bleibt 1.4.11
+// erfuellt (>= 3:1), hell wird es sogar etwas besser. Fuer `big` galt dieselbe
+// Rechnung schon beim Ton-Pass: red-400/80 lag bei 4.05:1 dunkel und 2.20:1
+// hell, orange-500/80 liegt bei 3.98:1 und 2.24:1. (Dass die HELLE Seite
+// fuer die ganze Leiter unter 3:1 liegt, ist ein aelterer, eigener Befund; er
+// betrifft alle vier Punkte gleich und wird hier nicht einseitig fuer einen
+// davon repariert.)
const FIT_META: Record<Fit, { dot: string; label: string; title: string }> = {
fits: { dot: 'bg-emerald-500/80', label: 'Runs on your PC', title: 'Fits fully in your GPU memory. Fast.' },
- tight: { dot: 'bg-amber-500/80', label: 'Tight fit', title: 'Barely fits. Parts may spill to RAM and slow it down.' },
+ tight: { dot: 'bg-sky-500/80', label: 'Tight fit', title: 'Barely fits. Parts may spill to RAM and slow it down.' },
big: { dot: 'bg-orange-500/80', label: 'Runs on CPU, slower', title: 'Bigger than your GPU memory, so most of it runs on CPU and RAM. It works, just slower.' },
unknown: { dot: 'bg-gray-400 dark:bg-gray-600', label: '', title: 'Hardware not detected yet.' },
}
diff --git a/src/components/models/__tests__/ModelTiles.test.ts b/src/components/models/__tests__/ModelTiles.test.ts
index eeb91dac..aa02c87e 100644
--- a/src/components/models/__tests__/ModelTiles.test.ts
+++ b/src/components/models/__tests__/ModelTiles.test.ts
@@ -16,14 +16,14 @@ describe('computeFit — per-user hardware hint', () => {
expect(computeFit(0, 12)).toBe('unknown')
})
- it('8 GB GPU: small models green, 12B-class tight, 20B-class red', () => {
+ it('8 GB GPU: small models fit, 12B-class tight, 20B-class spills to CPU', () => {
expect(computeFit(5, 8)).toBe('fits') // 8B Q4
expect(computeFit(6.9, 8)).toBe('tight') // 12B Q4 — loads, little headroom
expect(computeFit(8, 8)).toBe('tight') // exactly at VRAM
expect(computeFit(13, 8)).toBe('big')
})
- it('12 GB GPU (the dev box): 10 GB quant green, 13 GB tight, 16 GB red', () => {
+ it('12 GB GPU (the dev box): 10 GB quant fits, 13 GB tight, 16 GB spills', () => {
expect(computeFit(10, 12)).toBe('fits') // GLM 4.7 Flash IQ2_M
expect(computeFit(13, 12)).toBe('tight') // Qwen 3.6 27B Q3
expect(computeFit(16, 12)).toBe('big') // 27B Q4
@@ -98,7 +98,23 @@ describe('groupModels — quant collapsing', () => {
/**
* Ton-Pass (Audit Welle 3): „Too big for your GPU" → „Laeuft auf CPU,
- * langsamer".
+ * langsamer". Seit dem 04.09.2026 haelt derselbe Block auch die mittlere
+ * Stufe fest, und zwar aus einem NEUEN Grund.
+ *
+ * WARUM SICH DIE REGEL GEAENDERT HAT: David, 04.09.2026, „kein gelb mehr ohne
+ * farbe ... nicht so klotzig ueberall die fehlermeldungen und anmerkungen".
+ * Damit hat die App nur noch zwei Toene, ruhig und Fehler, und Bernstein ist
+ * keiner davon mehr (`src/lib/hinweis.ts`). Der Test hat vorher genau das
+ * Gegenteil festgeschrieben: er verlangte in `punkte[1]` ausdruecklich
+ * Bernstein und rechnete den Hellmodus-Kontrast dieses Tons nach. Beides ist
+ * hier nicht geloescht, sondern umgestellt, denn der Sinn bleibt derselbe:
+ * die Leiter muss eine Leiter bleiben und darf keine Stufe in einem
+ * Warnungston tragen. Neu ist nur, welche Toene als Warnung gelten.
+ *
+ * Der Punkt „passt knapp" ist der Fall, an dem das haengt: er sagt, dass das
+ * Modell passt. In der Farbe zu malen, mit der die App bis dahin jede Warnung
+ * gemalt hat, war dieselbe Verwechslung wie „laeuft langsam" in Rot, nur eine
+ * Stufe hoeher.
*
* Der Anhang des Audits nennt die Fit-Semantik dieses Grids als eine der
* fuenf Stellen auf Benchmark-Niveau — mit genau einer Ausnahme: „Genau eine
@@ -107,16 +123,19 @@ describe('groupModels — quant collapsing', () => {
* stand sie eine Zeile tiefer als angegeben (:33 statt :32) und unveraendert
* da, samt Label.
*
- * WAS SICH HIER PRUEFEN LAESST: dass die Fehlerfarbe weg ist, dass das
- * Label nicht mehr verbietet, was der Code ausdruecklich erlaubt, und was
- * die neue Farbe rechnerisch bringt. WAS NICHT: ob Bernstein und Orange auf
- * einem 6px-Punkt nebeneinander unterscheidbar sind. Das ist der eine
- * Punkt, der ins laufende Fenster gehoert — hier steht nur die Zahl.
+ * WAS SICH HIER PRUEFEN LAESST: dass weder die Fehlerfarbe noch der alte
+ * Warnungston in der Leiter stehen, dass das Label nicht mehr verbietet, was
+ * der Code ausdruecklich erlaubt, und was die neuen Farben rechnerisch
+ * bringen. WAS NICHT: ob Blau und Orange auf einem 6px-Punkt nebeneinander
+ * unterscheidbar sind. Das ist der eine Punkt, der ins laufende Fenster
+ * gehoert; hier steht nur die Zahl. (Dass es besser steht als vorher, ist
+ * immerhin argumentierbar: Bernstein und Orange lagen auf dem Farbkreis
+ * nebeneinander, Blau liegt es nicht.)
*
* Gelesen wird der Quelltext, weil FIT_META modulprivat ist und es auch
* bleiben soll: es ist eine Darstellungstabelle, kein Vertrag.
*/
-describe('Ton-Pass: „laeuft langsam" ist kein Fehler', () => {
+describe('Ton-Pass: „laeuft langsam" ist kein Fehler, „passt knapp" keine Warnung', () => {
const SRC = readFileSync(resolve(__dirname, '../ModelTiles.tsx'), 'utf-8')
.replace(/\/\*[\s\S]*?\*\//g, ' ')
.replace(/^\s*\/\/.*$/gm, ' ')
@@ -135,15 +154,27 @@ describe('Ton-Pass: „laeuft langsam" ist kein Fehler', () => {
expect(zeile).toContain('bg-orange-500/80')
})
- it('die Leiter bleibt eine Leiter — drei Zustaende, drei Farben', () => {
+ it('die Leiter bleibt eine Leiter: drei Zustaende, drei Farben', () => {
+ // Die mittlere Stufe hiess hier bis zum 04.09.2026 Bernstein. Sie heisst
+ // jetzt Blau, weil die App nur noch zwei Toene kennt und keiner davon
+ // Bernstein ist; die Leiter nennt damit den Ort statt einer Temperatur:
+ // Grafikspeicher, knapp daneben, CPU.
const punkte = [...SRC.matchAll(/dot: '([^']+)'/g)].map((m) => m[1])
expect(punkte).toHaveLength(4)
expect(new Set(punkte).size).toBe(4)
expect(punkte[0]).toContain('emerald')
- expect(punkte[1]).toContain('amber')
+ expect(punkte[1]).toContain('sky')
expect(punkte[2]).toContain('orange')
})
+ it('keine Stufe traegt mehr den alten Warnungston, nirgends in der Datei', () => {
+ // Der Ton ist nicht nur aus der Leiter raus, er ist aus der Datei raus.
+ // Stuende er zwei Bildschirme tiefer an einem Chip, waere die Regel aus
+ // `src/lib/hinweis.ts` genau so weit weg wie vorher.
+ expect(readFileSync(resolve(__dirname, '../ModelTiles.tsx'), 'utf-8'))
+ .not.toMatch(/amber-|yellow-/)
+ })
+
it('das Label nennt die Folge und verbietet nichts', () => {
// `computeFit` sagt es selbst, eine Bildschirmseite hoeher: „Never used
// to BLOCK a download — purely an honest hint." „Too big" las sich als
@@ -158,9 +189,9 @@ describe('Ton-Pass: „laeuft langsam" ist kein Fehler', () => {
expect(zeile).not.toMatch(/title: '[^']*slow\.[^']*'/)
})
- it('der Farbtausch kostet keinen Kontrast (gerechnet, nicht geschaetzt)', () => {
+ it('beide Farbtausche kosten keinen Kontrast (gerechnet, nicht geschaetzt)', () => {
// Kachelflaeche: `bg-gray-50` hell, `bg-white/[0.03]` ueber #1e1e1e
- // dunkel. Beide Punkte sind zu 80 % deckend.
+ // dunkel. Alle Punkte sind zu 80 % deckend.
const kachelDunkel = over('#ffffff', '#1e1e1e', 0.03)
const vorher = over('#f87171', kachelDunkel, 0.8) // red-400/80
const nachher = over('#f97316', kachelDunkel, 0.8) // orange-500/80
@@ -168,6 +199,15 @@ describe('Ton-Pass: „laeuft langsam" ist kein Fehler', () => {
expect(contrast(nachher, kachelDunkel)).toBeCloseTo(3.98, 1)
// Im Dunkelmodus erfuellt der Punkt 1.4.11 vorher wie nachher.
expect(contrast(nachher, kachelDunkel)).toBeGreaterThanOrEqual(3)
+
+ // Dasselbe fuer die mittlere Stufe. Der alte Ton war heller als der neue,
+ // der Tausch kostet dunkel also etwas; er bleibt ueber 3:1 und gewinnt
+ // dafuer im Hellmodus, wo der alte Ton der schlechteste der Leiter war.
+ const mitteVorher = over('#f59e0b', kachelDunkel, 0.8) // der alte Warnungston
+ const mitteNachher = over('#0ea5e9', kachelDunkel, 0.8) // sky-500/80
+ expect(contrast(mitteVorher, kachelDunkel)).toBeCloseTo(5.08, 1)
+ expect(contrast(mitteNachher, kachelDunkel)).toBeCloseTo(4.01, 1)
+ expect(contrast(mitteNachher, kachelDunkel)).toBeGreaterThanOrEqual(3)
})
it('NEBENBEFUND, ungefixt: im Hellmodus traegt die GANZE Leiter nicht', () => {
@@ -179,7 +219,7 @@ describe('Ton-Pass: „laeuft langsam" ist kein Fehler', () => {
const hell = '#f9fafb'
for (const [name, farbe] of [
['emerald-500', '#10b981'],
- ['amber-500', '#f59e0b'],
+ ['sky-500', '#0ea5e9'],
['orange-500', '#f97316'],
] as const) {
const c = contrast(over(farbe, hell, 0.8), hell)
diff --git a/src/components/onboarding/ComfyStep.tsx b/src/components/onboarding/ComfyStep.tsx
index 7b6e7aba..b1c8a7b7 100644
--- a/src/components/onboarding/ComfyStep.tsx
+++ b/src/components/onboarding/ComfyStep.tsx
@@ -22,9 +22,10 @@
* nicht ueberfluessig, sie ist genau fuer diesen Moment da.
*/
import { useEffect, useRef, useState } from 'react'
-import { Loader2, Check, Download, RefreshCw, ArrowRight, ChevronRight, FolderOpen, Image as ImageIcon } from 'lucide-react'
+import { Loader2, Check, Download, RefreshCw, ArrowRight, ChevronRight, FolderOpen, Image as ImageIcon, AlertTriangle } from 'lucide-react'
import { withInstallerOutput, withDetail } from '../../lib/error-text'
import { ICON_LG } from '../ui/icon-size'
+import { Hinweis } from '../ui/Hinweis'
import { ProgressBar } from '../ui/ProgressBar'
import { backendCall, isMacOS } from '../../api/backend'
import { formatBytes } from '../../lib/formatters'
@@ -222,6 +223,13 @@ export function ComfyStep({ skin, fleet, step, setStep }: ComfyStepProps) {
})
}
+ // Die Platzwarnung kommt als Logzeile mit fuehrendem Warndreieck aus
+ // comfy_install.rs. Das Zeichen ist die Markierung IM Protokoll, nicht Teil
+ // des Satzes. Hier wird es abgeschnitten, damit die Zeile ein Symbol traegt
+ // und nicht zwei. Der Ton ist `fehler`, weil unter 5 GB frei die
+ // Installation nicht durchlaeuft und jemand Platz schaffen muss.
+ const diskPressure = comfyInstall.logs.find(l => l.startsWith('⚠'))?.replace(/^⚠\s*/, '')
+
return (
<>
{/* D-S39: hier stand ein nackter 13,8px-Punkt in `bg-purple-400`
@@ -253,13 +261,18 @@ export function ComfyStep({ skin, fleet, step, setStep }: ComfyStepProps) {
start_comfyui's launcher decision. */}
{!comfyDetecting && comfyChoices.length > 1 && !comfyFound && (
<div className="space-y-2 text-left">
- <div className={`p-2.5 rounded-lg border ${isDark ? 'bg-amber-500/10 border-amber-500/20' : 'bg-amber-50 border-amber-200'}`}>
- <p className={`text-[0.7rem] font-medium ${isDark ? 'text-amber-200' : 'text-amber-800'}`}>
+ {/* Hier stand ein gelber Kasten mit Rahmen und 10px Polster. Auf dem
+ ersten Bildschirm nach der Installation liest sich das wie ein
+ Defekt, dabei ist es eine Frage: es gibt mehrere Ordner, welcher
+ soll es sein. Jetzt eine Ueberschrift und eine ruhige Zeile
+ darunter, ohne Flaeche. Begruendung in lib/hinweis.ts. */}
+ <div className="space-y-0.5">
+ <p className="text-[0.7rem] font-medium">
Multiple ComfyUI installs detected
</p>
- <p className={`text-[0.6rem] mt-0.5 ${isDark ? 'text-amber-300/80' : 'text-amber-700'}`}>
+ <Hinweis>
Pick the one you want LU to use. We'll remember your choice, and you can change it later in Settings → ComfyUI.
- </p>
+ </Hinweis>
</div>
<div className="space-y-1.5 max-h-44 overflow-y-auto">
{comfyChoices.map((c) => (
@@ -272,10 +285,14 @@ export function ComfyStep({ skin, fleet, step, setStep }: ComfyStepProps) {
>
<div className="flex items-center justify-between gap-2">
<span className={`text-[0.65rem] font-mono truncate ${isDark ? 'text-gray-200' : 'text-gray-800'}`}>{c.path}</span>
+ {/* „needs setup" war gelb und stand damit neben „ready" wie
+ ein halber Defekt. Es ist ein ruhiger Zustand: dieser
+ Ordner ist da, nur noch nicht fertig. Grau, dieselbe
+ Entscheidung wie PUNKT_FARBE.aus in lib/hinweis.ts. */}
<span className={`text-[0.5rem] px-1.5 py-[1px] rounded shrink-0 ${
c.complete
? (isDark ? 'bg-green-500/15 text-green-400' : 'bg-green-100 text-green-700')
- : (isDark ? 'bg-amber-500/15 text-amber-300' : 'bg-amber-100 text-amber-700')
+ : (isDark ? 'bg-white/10 text-gray-300' : 'bg-gray-100 text-gray-600')
}`}>
{c.complete ? 'ready' : 'needs setup'}
</span>
@@ -316,12 +333,13 @@ export function ComfyStep({ skin, fleet, step, setStep }: ComfyStepProps) {
+ git pull + pip install). */}
{comfyFound && (!comfyFound.found || comfyFound.complete === false) && !isRunning(comfyInstall) && !isRunning(pythonInstall) && !comfyReady && (
<div className="space-y-2">
+ {/* Auch das war ein gelber Kasten. Der Satz sagt, was da liegt und
+ welcher Knopf es zu Ende bringt. Er informiert, also ruhig und
+ ohne Flaeche. */}
{comfyFound.found && comfyFound.complete === false && (
- <div className={`p-2.5 rounded-lg border ${isDark ? 'bg-amber-500/10 border-amber-500/20' : 'bg-amber-50 border-amber-200'} text-left`}>
- <p className={`text-[0.6rem] ${isDark ? 'text-amber-300' : 'text-amber-800'}`}>
- Found a previous ComfyUI install at <code className="font-mono">{comfyFound.path}</code> but it's missing PyTorch, looks like a previous install was interrupted. Click below to finish it.
- </p>
- </div>
+ <Hinweis className="text-left">
+ Found a previous ComfyUI install at <code className="font-mono">{comfyFound.path}</code> but it's missing PyTorch, looks like a previous install was interrupted. Click below to finish it.
+ </Hinweis>
)}
<button
onClick={async () => {
@@ -480,7 +498,7 @@ export function ComfyStep({ skin, fleet, step, setStep }: ComfyStepProps) {
</div>
)}
{pythonInstall.error && !isRunning(pythonInstall) && (
- <p className="text-[0.65rem] text-red-400 whitespace-pre-line">{pythonInstall.error}</p>
+ <Hinweis ton="fehler" className="whitespace-pre-line">{pythonInstall.error}</Hinweis>
)}
{/* Installing progress */}
@@ -549,10 +567,10 @@ export function ComfyStep({ skin, fleet, step, setStep }: ComfyStepProps) {
</div>
</div>
{/* Disk pressure warning (push from Rust side) */}
- {comfyInstall.logs.some(l => l.startsWith('⚠')) && (
- <div className={`text-[0.55rem] mb-2 px-2 py-1 rounded ${isDark ? 'bg-amber-500/10 text-amber-300' : 'bg-amber-50 text-amber-800'}`}>
- {comfyInstall.logs.find(l => l.startsWith('⚠'))}
- </div>
+ {diskPressure && (
+ <Hinweis ton="fehler" icon={<AlertTriangle size={11} className="mt-[1px] shrink-0" />} className="mb-2 text-left">
+ {diskPressure}
+ </Hinweis>
)}
{/* Download progress bar (shown during download phase) */}
{comfyInstall.logs.some(l => l.includes('Downloading')) && comfyInstall.total > 0 && (
@@ -578,7 +596,7 @@ export function ComfyStep({ skin, fleet, step, setStep }: ComfyStepProps) {
{/* Error */}
{comfyInstall.error && (
- <p role="alert" className="text-[0.65rem] text-red-400 whitespace-pre-line">{comfyInstall.error}</p>
+ <Hinweis ton="fehler" className="whitespace-pre-line">{comfyInstall.error}</Hinweis>
)}
{/* Ready state */}
diff --git a/src/components/settings/BuiltinEngineSettings.tsx b/src/components/settings/BuiltinEngineSettings.tsx
index 98ec9ced..2f2559ae 100644
--- a/src/components/settings/BuiltinEngineSettings.tsx
+++ b/src/components/settings/BuiltinEngineSettings.tsx
@@ -8,6 +8,7 @@
import { useRef, useState } from 'react'
import { Loader2, AlertTriangle, Check, Zap } from 'lucide-react'
import { useSettingsStore } from '../../stores/settingsStore'
+import { Hinweis } from '../ui/Hinweis'
import { bundledEngineStatus, swapBundledModel, ENGINE_PORT } from '../../api/engine'
import { useBuiltinEngineStatus } from '../../hooks/useBuiltinEngineStatus'
import { enginePortLine } from '../../lib/engine-port'
@@ -66,8 +67,8 @@ export function BuiltinEngineSettings() {
setApplied(false)
}
- // llama.cpp constraint: a quantized V-cache requires flash attention — the
- // server refuses to start otherwise. Warn instead of silently breaking.
+ // llama.cpp constraint: a quantized V-cache requires flash attention, the
+ // server refuses to start otherwise. Say so instead of breaking silently.
const vQuantNeedsFa = tuning.cacheTypeV !== 'f16' && tuning.flashAttn === 'off'
const running = !!status?.running && !!status.model_path
@@ -94,12 +95,13 @@ export function BuiltinEngineSettings() {
return (
<div className="space-y-3">
- <div className="flex items-start gap-2.5 p-2.5 rounded-lg border border-amber-200 dark:border-amber-500/20 bg-amber-50 dark:bg-amber-500/[0.08] text-amber-900 dark:text-amber-200">
- <Zap size={14} className="mt-0.5 shrink-0" />
- <div className="text-[0.65rem] leading-relaxed">
- <strong>Expert settings for the LU Engine.</strong> The defaults match what LU shipped with and are right for most machines. Every start of the engine uses these values; a running engine needs Apply &amp; Restart below.
- </div>
- </div>
+ {/* Der klotzigste Fall im ganzen Baum: ein Satz, der nur erklaert, wofuer
+ die Werte hier gut sind, stand in einem gelben Rahmen mit gelber
+ Fuellung und fetter Ueberschrift und sah damit aus wie ein Absturz.
+ Jetzt eine Zeile im ruhigen Ton. Regel: lib/hinweis.ts. */}
+ <Hinweis icon={<Zap size={11} className="shrink-0 mt-[3px]" />}>
+ Expert settings for the LU Engine. The defaults match what LU shipped with and are right for most machines. Every start of the engine uses these values; a running engine needs Apply &amp; Restart below.
+ </Hinweis>
{/* Live status */}
<div className="text-[0.6rem] text-gray-500">
@@ -183,10 +185,9 @@ export function BuiltinEngineSettings() {
Memory vs. quality: q8_0 on K+V roughly halves KV-cache memory at near-identical output; q4_0 quarters it but can degrade long-context answers.
</div>
{vQuantNeedsFa && (
- <div className="flex items-start gap-2 p-2 rounded border border-amber-500/25 bg-amber-500/[0.08] text-amber-300">
- <AlertTriangle size={12} className="mt-0.5 shrink-0" />
- <span className="text-[0.6rem] leading-relaxed">A quantized V cache requires flash attention — with it off the engine will refuse to start. Switch flash attention to auto or on.</span>
- </div>
+ <Hinweis ton="fehler" icon={<AlertTriangle size={11} className="shrink-0 mt-[3px]" />}>
+ A quantized V cache requires flash attention. With it off the engine refuses to start, so switch flash attention to auto or on.
+ </Hinweis>
)}
{/* Threads */}
@@ -254,10 +255,9 @@ export function BuiltinEngineSettings() {
</button>
</div>
{error && (
- <div className="flex items-start gap-2 p-2 rounded border border-red-500/20 bg-red-500/[0.06] text-red-300">
- <AlertTriangle size={12} className="mt-0.5 shrink-0" />
- <span className="text-[0.6rem] leading-relaxed break-all">{error}</span>
- </div>
+ <Hinweis ton="fehler" className="break-all" icon={<AlertTriangle size={11} className="shrink-0 mt-[3px]" />}>
+ {error}
+ </Hinweis>
)}
</div>
</div>
diff --git a/src/components/settings/CivitaiApiKeySetting.tsx b/src/components/settings/CivitaiApiKeySetting.tsx
index d369d980..7c347cd1 100644
--- a/src/components/settings/CivitaiApiKeySetting.tsx
+++ b/src/components/settings/CivitaiApiKeySetting.tsx
@@ -17,6 +17,7 @@
import { useEffect, useState } from 'react'
import { KeyRound, Check, AlertTriangle } from 'lucide-react'
import { looksLikeAFolderPath, CIVITAI_KEY_PLACEHOLDER, CIVITAI_KEY_LOOKS_WRONG } from '../../lib/civitai-key-shape'
+import { HINWEIS_TEXT, HINWEIS_ZEILE } from '../../lib/hinweis'
import { useWorkflowStore } from '../../stores/workflowStore'
import { openExternal } from '../../api/backend'
@@ -87,8 +88,15 @@ export function CivitaiApiKeySetting() {
</button>
)}
</div>
+ {/* Rot, nicht mehr Gelb: der Wert wird NICHT gespeichert, es muss also
+ jemand handeln. Die Klassen kommen aus lib/hinweis.ts statt von Hand,
+ die eigene Form nur wegen des `data-testid`, an dem die Tests haengen. */}
{looksWrong && (
- <div data-testid="civitai-key-looks-wrong" className="flex items-start gap-1.5 t-micro leading-relaxed text-amber-600 dark:text-amber-400">
+ <div
+ data-testid="civitai-key-looks-wrong"
+ role="alert"
+ className={`${HINWEIS_ZEILE} ${HINWEIS_TEXT.fehler}`}
+ >
<AlertTriangle size={11} className="shrink-0 mt-0.5" />
<span>{CIVITAI_KEY_LOOKS_WRONG}</span>
</div>
diff --git a/src/components/settings/HardwareSettings.tsx b/src/components/settings/HardwareSettings.tsx
index 03358c49..a9753242 100644
--- a/src/components/settings/HardwareSettings.tsx
+++ b/src/components/settings/HardwareSettings.tsx
@@ -8,6 +8,8 @@ import { useSettingsStore } from '../../stores/settingsStore'
import { backendCall, isTauri } from '../../api/backend'
import { isMlxImageHost } from '../../api/mlx-image'
import { Cpu, RefreshCw, AlertTriangle } from 'lucide-react'
+import { Hinweis } from '../ui/Hinweis'
+import { HINWEIS_TEXT } from '../../lib/hinweis'
interface DetectedGpu {
index: number
@@ -17,7 +19,6 @@ interface DetectedGpu {
source: string
/** Set when the card was found but its compute stack was not. */
note?: string | null
- note_severity?: string | null
}
type GpuVendor = 'auto' | 'nvidia' | 'amd' | 'intel'
@@ -102,12 +103,13 @@ export function HardwareSettings() {
return (
<div className="space-y-3">
- <div className="flex items-start gap-2.5 p-2.5 rounded-lg border border-amber-200 dark:border-amber-500/20 bg-amber-50 dark:bg-amber-500/[0.08] text-amber-900 dark:text-amber-200">
- <Cpu size={14} className="mt-0.5 shrink-0" />
- <div className="text-[0.65rem] leading-relaxed">
- <strong>GPU picker.</strong> Forwards CUDA_VISIBLE_DEVICES / HIP_VISIBLE_DEVICES / ONEAPI_DEVICE_SELECTOR to Ollama + ComfyUI on next spawn. Use only on multi-GPU / multi-vendor systems where the driver picks the wrong device by default.
- </div>
- </div>
+ {/* Eine Zeile, kein Kasten: das hier erklaert nur, wofuer der Abschnitt
+ gut ist. Frueher stand derselbe Satz in einem gelben Rahmen mit
+ gelber Fuellung und trug damit das Gewicht eines Absturzes. Regel:
+ lib/hinweis.ts. */}
+ <Hinweis icon={<Cpu size={11} className="shrink-0 mt-[3px]" />}>
+ GPU picker. Forwards CUDA_VISIBLE_DEVICES / HIP_VISIBLE_DEVICES / ONEAPI_DEVICE_SELECTOR to Ollama + ComfyUI on next spawn. Use only on multi-GPU / multi-vendor systems where the driver picks the wrong device by default.
+ </Hinweis>
<div>
<div className="flex items-center justify-between mb-1.5">
@@ -144,15 +146,14 @@ export function HardwareSettings() {
<div>
<div className="text-[0.7rem] text-gray-700 dark:text-gray-300 font-medium mb-1">Detected GPUs</div>
{error && (
- <div className="flex items-start gap-2 p-2 rounded border border-red-500/20 bg-red-500/[0.06] text-red-300 mb-1.5">
- <AlertTriangle size={12} className="mt-0.5 shrink-0" />
- <span className="text-[0.6rem]">{error}</span>
- </div>
+ <Hinweis ton="fehler" className="mb-1.5" icon={<AlertTriangle size={11} className="shrink-0 mt-[3px]" />}>
+ {error}
+ </Hinweis>
)}
{!error && gpus.length === 0 && !loading && (
- <div className="text-[0.6rem] text-gray-500 italic">
+ <Hinweis className="italic">
No GPUs detected via nvidia-smi / rocm-smi / lspci / wmic. The "Auto" vendor option still works, Ollama will use whatever the driver picks.
- </div>
+ </Hinweis>
)}
{gpusForVendor.length > 0 && (
<div className="space-y-1">
@@ -185,19 +186,17 @@ export function HardwareSettings() {
and selectable, and the line says what LU could not
verify, so nobody rebuilds a working install chasing
a driver problem that is not there (numbrain). */}
- {/* Amber is the colour of "LU could not confirm this".
- A correctly installed ROCm named in that colour reads as
- a fault and produced a support question of its own
- (hypocritical_rj asked what the yellow line meant), so a
- note that only states a healthy fact is muted instead.
- Unknown severity keeps the warning colour: the notes
- that predate this field are all warnings. */}
+ {/* Ein Ton statt zwei. Die Zeile war gelb, sobald der
+ Rueckgabewert nicht 'info' sagte, und genau danach
+ fragte hypocritical_rj im Hilfe-Chat (26.08.): ob das
+ Gelb ein Problem sei. Es war nie eins. Die eine Meldung
+ nennt ROCm-Version und Architektur, die andere sagt,
+ dass LU die Rechenschicht nicht pruefen konnte, und die
+ Karte laeuft in beiden Faellen. Beide sind ruhiges Grau,
+ und die Schwere vom Backend wird hier nicht mehr
+ gelesen. Regel: lib/hinweis.ts. */}
{g.note && (
- <div
- className={`text-[0.55rem] mt-0.5 leading-relaxed ${
- g.note_severity === 'info' ? 'text-gray-500' : 'text-amber-500/80'
- }`}
- >
+ <div className={`text-[0.55rem] mt-0.5 leading-relaxed ${HINWEIS_TEXT.ruhig}`}>
{g.note}
</div>
)}
@@ -208,9 +207,9 @@ export function HardwareSettings() {
</div>
)}
{vendor !== 'auto' && gpusForVendor.length === 0 && gpus.length > 0 && !loading && (
- <div className="text-[0.6rem] text-amber-300 italic mt-1">
+ <Hinweis className="italic mt-1">
No {vendor.toUpperCase()} GPUs detected on this system. Either install the vendor tool ({vendor === 'nvidia' ? 'nvidia-smi' : vendor === 'amd' ? 'rocm-smi' : 'driver providing lspci/wmic info'}) or switch back to "Auto".
- </div>
+ </Hinweis>
)}
</div>
@@ -256,9 +255,9 @@ export function HardwareSettings() {
)}
{showRestartHint && (vendor !== 'auto' || indices.length > 0) && (
- <div className="text-[0.6rem] text-amber-300 italic">
+ <Hinweis className="italic">
GPU pick takes effect on next Ollama / ComfyUI spawn. Restart ComfyUI under AI Backends, ComfyUI (Image &amp; Video), or close LU to apply it to both.
- </div>
+ </Hinweis>
)}
</div>
)
diff --git a/src/components/settings/LocalApiSettings.tsx b/src/components/settings/LocalApiSettings.tsx
index 97fff919..8c0e51c4 100644
--- a/src/components/settings/LocalApiSettings.tsx
+++ b/src/components/settings/LocalApiSettings.tsx
@@ -6,6 +6,7 @@ import {
corsText,
} from '../../lib/local-api'
import { InlineToggle } from './InlineToggle'
+import { HINWEIS_TEXT } from '../../lib/hinweis'
/**
* Die lokale Modell-API zum Ein- und Ausschalten.
@@ -73,10 +74,13 @@ export function LocalApiSettings() {
</button>
</div>
+ {/* Beide Zeilen halten den Start auf, also tragen sie denselben Ton: wer
+ hier nichts tut, bekommt keine API. Frueher stand die obere in Gelb
+ und die untere in Rot, obwohl beide dasselbe verlangen. */}
{!startbar.ok && !laeuft && (
- <div className="t-micro text-amber-500">{startbar.grund}</div>
+ <div className={`t-micro ${HINWEIS_TEXT.fehler}`}>{startbar.grund}</div>
)}
- {fehler && <div className="t-micro text-red-400">{fehler}</div>}
+ {fehler && <div className={`t-micro ${HINWEIS_TEXT.fehler}`}>{fehler}</div>}
<div className="grid grid-cols-2 gap-3">
<label className="t-micro text-gray-500">
@@ -88,7 +92,7 @@ export function LocalApiSettings() {
disabled={laeuft}
className="mt-1 w-full bg-black/30 border border-white/10 rounded px-2 py-1 text-xs disabled:opacity-50"
/>
- {!portUrteil.ok && <span className="block mt-1 text-amber-500">{portUrteil.grund}</span>}
+ {!portUrteil.ok && <span className={`block mt-1 ${HINWEIS_TEXT.fehler}`}>{portUrteil.grund}</span>}
</label>
<div className="t-micro text-gray-500">
Reachable on the network
diff --git a/src/components/settings/MemorySettings.tsx b/src/components/settings/MemorySettings.tsx
index 63f911d2..b8a4acd5 100644
--- a/src/components/settings/MemorySettings.tsx
+++ b/src/components/settings/MemorySettings.tsx
@@ -8,9 +8,14 @@ import type { MemoryType, MemoryFile } from '../../types/agent-mode'
// ── Subtle type indicator (internal, not user-facing) ─────────
+// Vier Kategorien, vier Farben, und keine davon sagt etwas ueber gut oder
+// kaputt. `feedback` war gelb und las sich dadurch als Warnung an einem
+// Eintrag, der nur eine Sorte ist. Pink ist in dieser Datei sonst nicht
+// vergeben (Blau, Lila und Gruen stehen schon hier), und es ist weit genug
+// von Rot weg, um nicht wieder nach einem Fehler auszusehen.
const TYPE_DOT_COLORS: Record<MemoryType, string> = {
user: 'bg-blue-400',
- feedback: 'bg-amber-400',
+ feedback: 'bg-pink-400',
project: 'bg-purple-400',
reference: 'bg-green-400',
}
@@ -232,7 +237,10 @@ export function MemorySettings() {
<div className="space-y-1.5 pb-2 border-b border-gray-200 dark:border-white/5">
<div className="flex items-center justify-between py-0.5">
<div className="flex items-center gap-1.5">
- <Zap size={11} className="text-amber-400" />
+ {/* Dasselbe Grau wie das Archiv-Symbol eine Zeile tiefer: ein
+ Symbol vor einem Schalter ist Schmuck und kein Zustand. Gelb
+ machte aus einer Einstellung eine Warnung. */}
+ <Zap size={11} className="text-gray-500" />
<span className="text-[0.65rem] text-gray-400">Auto-extract memories</span>
<span className="text-[0.5rem] text-gray-600">(extra inference)</span>
</div>
diff --git a/src/components/settings/PermissionSettings.tsx b/src/components/settings/PermissionSettings.tsx
index 220f61b6..b0f278a5 100644
--- a/src/components/settings/PermissionSettings.tsx
+++ b/src/components/settings/PermissionSettings.tsx
@@ -32,9 +32,14 @@ const CATEGORIES: {
{ key: 'desktop', label: 'Desktop Control', description: 'Screenshots, screen interaction', icon: Monitor, risk: 'high' },
]
+// Eine Leiter, eine Achse: Risiko waechst, also waechst Rot. Die mittlere
+// Stufe war gelb, und Gelb heisst in dieser Oberflaeche nichts mehr, seit es
+// fuenf verschiedene Dinge gleichzeitig hiess (lib/hinweis.ts). Ein
+// abgeschwaechtes Rot sagt dasselbe wie das volle, nur leiser, und braucht
+// dafuer keinen dritten Farbton.
const RISK_COLORS = {
low: 'bg-green-500',
- medium: 'bg-amber-500',
+ medium: 'bg-red-500/50',
high: 'bg-red-500',
}
@@ -79,12 +84,17 @@ export function PermissionSettings() {
<button
key={value}
onClick={() => setGlobalPermission(key, value)}
+ // "Ask First" war gelb und sah damit aus wie eine Warnung,
+ // obwohl es die vorsichtigste der drei Einstellungen ist.
+ // Rot und Gruen sind hier schon vergeben, Blau nicht, und
+ // Blau traegt in den Einstellungen ohnehin die neutralen
+ // Knoepfe (der Installierknopf im Speech-Abschnitt).
className={`px-2 py-0.5 rounded text-[0.55rem] font-medium transition-all ${
isActive
? value === 'blocked'
? 'bg-red-500/15 text-red-400 border border-red-500/30'
: value === 'confirm'
- ? 'bg-amber-500/15 text-amber-400 border border-amber-500/30'
+ ? 'bg-blue-500/15 text-blue-400 border border-blue-500/30'
: 'bg-green-500/15 text-green-400 border border-green-500/30'
: 'text-gray-600 hover:text-gray-400 border border-transparent'
}`}
diff --git a/src/components/settings/ProviderConfig.tsx b/src/components/settings/ProviderConfig.tsx
index 47d7be18..886c3359 100644
--- a/src/components/settings/ProviderConfig.tsx
+++ b/src/components/settings/ProviderConfig.tsx
@@ -22,6 +22,7 @@ import { useBuiltinEngineStatus } from '../../hooks/useBuiltinEngineStatus'
import { reachVerdict, liveSlotStatus, type SlotStatus } from '../../lib/builtin-slot-status'
import type { ProviderId, ProviderConfig } from '../../api/providers/types'
import { disabledSlotNote } from '../../lib/disabled-slot-note'
+import { HINWEIS_TEXT, PUNKT_FARBE } from '../../lib/hinweis'
const isTauri = typeof window !== 'undefined' && !!window.__TAURI_INTERNALS__
@@ -492,14 +493,16 @@ export function ProviderSettings() {
wieder. Fuer unsere eigene Engine liest der Punkt jetzt
dieselbe laufende Schleife wie der Abschnitt darunter, und
die beiden koennen nicht mehr zwei Dinge behaupten. */}
+ {/* Drei Farben, keine vierte (lib/hinweis.ts): Gruen heisst
+ hier "du kannst chatten", Rot heisst "gemessen und
+ kaputt", und alles dazwischen ist Grau. "Not running" und
+ "Reachable, no models" hatten frueher einen eigenen
+ Bernstein, der sie zu halben Fehlern machte; sie fallen
+ jetzt mit 'idle' in denselben ruhigen Punkt. */}
<span className={`w-1.5 h-1.5 rounded-full shrink-0 ${
- status === 'connected' ? 'bg-green-500' :
- status === 'failed' ? 'bg-red-500' :
- // Erreichbar, aber ohne Modell: kein Gruen, weil Gruen hier
- // "du kannst chatten" heisst, und kein Rot, weil der Server
- // laeuft. Derselbe Bernstein wie "Not running".
- status === 'stopped' || status === 'no-models' ? 'bg-amber-500' :
- 'bg-gray-500'
+ status === 'connected' ? PUNKT_FARBE.an :
+ status === 'failed' ? PUNKT_FARBE.kaputt :
+ PUNKT_FARBE.aus
}`} />
<span className="text-[0.65rem] text-gray-300 font-medium truncate">{view.label}</span>
{config.managed && <span className="text-[0.5rem] px-1 py-0.5 rounded bg-purple-500/15 text-purple-300 shrink-0">DEFAULT</span>}
@@ -507,7 +510,7 @@ export function ProviderSettings() {
{!config.isLocal && <span className="text-[0.5rem] px-1 py-0.5 rounded bg-blue-500/10 text-blue-400 shrink-0">CLOUD</span>}
{status === 'connected' && <Wifi size={8} className="text-green-400 shrink-0" />}
{status === 'failed' && <WifiOff size={8} className="text-red-400 shrink-0" />}
- {(status === 'stopped' || status === 'no-models') && <WifiOff size={8} className="text-amber-400 shrink-0" />}
+ {(status === 'stopped' || status === 'no-models') && <WifiOff size={8} className={`${HINWEIS_TEXT.ruhig} shrink-0`} />}
</div>
<ChevronDown size={10} className={`text-gray-500 transition-transform shrink-0 ${isExpanded ? 'rotate-180' : ''}`} />
</button>
@@ -628,9 +631,12 @@ export function ProviderSettings() {
</p>
)}
- {/* Cloud + auto-extract cost warning */}
+ {/* Cloud + auto-extract cost note. Nichts ist kaputt und
+ nichts muss jetzt passieren, also ruhig: das ist eine
+ Folge einer Einstellung, die der Nutzer selbst gesetzt
+ hat. */}
{needsKey && autoExtractEnabled && (
- <p className="text-[0.55rem] text-amber-400/80 mt-1 leading-tight">
+ <p className={`text-[0.55rem] ${HINWEIS_TEXT.ruhig} mt-1 leading-tight`}>
Memory auto-extraction runs a secondary inference every 3rd turn, increasing API costs. Disable in Settings &gt; Memory if not needed.
</p>
)}
@@ -832,20 +838,23 @@ export function ProviderSettings() {
* Groessenangabe, ein Abstand, vier Saetze.
*
* Die Toene sind eine Aussage, kein Geschmack: Gruen heisst auf dieser Zeile
- * "du kannst jetzt chatten". Ein laufender Server ohne Modell ist deshalb
- * bernsteinfarben wie "Not running", nicht gruen und nicht rot.
+ * "du kannst jetzt chatten", Rot heisst "gemessen und kaputt". Ein laufender
+ * Server ohne Modell und eine nie gestartete Engine sind weder das eine noch
+ * das andere, also sind sie ruhig. Beide trugen frueher einen eigenen
+ * Bernstein, und der hat sie zu halben Fehlern gemacht; die Begruendung, warum
+ * es diesen dritten Ton nicht mehr gibt, steht in lib/hinweis.ts.
*/
const SLOT_TEXTE: Partial<Record<SlotStatus, { text: string; ton: string; testid?: string; title?: string }>> = {
connected: { text: 'Connected', ton: 'text-green-400' },
failed: { text: 'Failed', ton: 'text-red-400' },
stopped: {
text: 'Not running',
- ton: 'text-amber-400',
+ ton: HINWEIS_TEXT.ruhig,
title: 'The engine is installed but not started yet. It starts when you pick a chat model, or when you press Test.',
},
'no-models': {
text: 'Reachable, no models',
- ton: 'text-amber-400',
+ ton: HINWEIS_TEXT.ruhig,
testid: 'provider-no-models',
title: 'The server answered, but it offers no models, so no chat can run on it yet. Load or download a model in that backend, then press Test again.',
},
diff --git a/src/components/settings/SettingsPage.tsx b/src/components/settings/SettingsPage.tsx
index 90c371a8..330ad753 100644
--- a/src/components/settings/SettingsPage.tsx
+++ b/src/components/settings/SettingsPage.tsx
@@ -57,6 +57,7 @@ import {
type LmStudioModelDir,
} from '../../lib/model-storage-rows'
import { CivitaiApiKeySetting } from './CivitaiApiKeySetting'
+import { HINWEIS_TEXT, PUNKT_FARBE } from '../../lib/hinweis'
// ── User profile picture (Appearance) ───────────────────────────
// Self-contained like HfDownloadPathSetting. Stores the picture as a
@@ -271,10 +272,18 @@ export function HfDownloadPathSetting() {
// middle of typing one. A16 counter-check follow-up: with a half typed path
// owed, a store write from anywhere would have pulled the box back to the
// stored value under the cursor.
- useEffect(() => {
- if (pendingPath.current !== null) return
- setDraft(override)
- }, [override])
+ //
+ // Das lief bis 04.09.2026 in einem Effekt und damit NACH dem Zeichnen: der
+ // Kasten zeigte eine Bildfolge lang noch den alten Wert und wurde dann
+ // ueberschrieben, also zwei Durchlaeufe fuer eine Aenderung. Jetzt wird der
+ // Wert waehrend des Renderns nachgezogen, was React fuer genau diesen Fall
+ // vorsieht: der Durchlauf wird verworfen und sofort mit dem neuen Wert
+ // wiederholt, bevor etwas auf dem Schirm landet.
+ const [zuletztGespeichert, setZuletztGespeichert] = useState(override)
+ if (zuletztGespeichert !== override) {
+ setZuletztGespeichert(override)
+ if (pendingPath.current === null) setDraft(override)
+ }
// How the GGUF scan itself fared in that folder. A folder too big to finish
// within the budget returns a real but partial list, and the only person who
@@ -430,8 +439,11 @@ export function HfDownloadPathSetting() {
{MACOS_FOLDER_ACCESS_NOTE}
</div>
)}
+ {/* Jeder der drei Scan-Saetze endet damit, dass der Nutzer den Pfad
+ aendern muss, damit seine Modelle vollstaendig auftauchen. Das ist
+ kein Nebenbei, also der Fehlerton (lib/hinweis.ts). */}
{override && scanNote && (
- <div data-testid="model-dir-scan-note" className="t-micro leading-relaxed text-amber-600 dark:text-amber-400">
+ <div data-testid="model-dir-scan-note" className={`t-micro leading-relaxed ${HINWEIS_TEXT.fehler}`}>
{scanNote}
</div>
)}
@@ -481,31 +493,36 @@ export function modelDirScanNote(status: ScannedDir['status'] | null | undefined
* would be a lie (Rust answers `unsupported` for that host).
*/
function CustomModelDirNote({ result }: { result: CustomModelDirResult }) {
+ // Zwei Toene, kein dritter (lib/hinweis.ts). Die ersten beiden Lagen sind
+ // ein Pfad, aus dem nichts gelesen werden kann: da muss jemand ran, also
+ // Fehlerton. Die anderen beiden erklaeren nur, was LU an ComfyUI weitergibt,
+ // und bleiben ruhig. Frueher trugen die ersten beiden Gelb, was sie
+ // zwischen "egal" und "kaputt" haengen liess.
const cls = "t-micro leading-relaxed"
if (result.status === 'unusable') {
return (
- <div className={`${cls} text-amber-600 dark:text-amber-400`}>
+ <div className={`${cls} ${HINWEIS_TEXT.fehler}`}>
That is not a full path, so nothing can be read from it. Use a complete path such as <code className="font-mono">C:\AI\Models</code> or <code className="font-mono">/mnt/models</code>. A leading <code className="font-mono">~</code> is a shell shorthand the app does not expand.
</div>
)
}
if (result.status === 'unreachable') {
return (
- <div className={`${cls} text-amber-600 dark:text-amber-400`}>
+ <div className={`${cls} ${HINWEIS_TEXT.fehler}`}>
LU cannot read that folder. Check that the drive is connected and the path is spelled the way the system spells it.
</div>
)
}
if (result.status === 'unsupported') {
return (
- <div className={`${cls} text-gray-500`}>
+ <div className={`${cls} ${HINWEIS_TEXT.ruhig}`}>
Chat models in this folder are read. Image and video on the Mac run on Apple MLX, not ComfyUI, so image models in this folder are not picked up. Install those under Local Media (Apple MLX).
</div>
)
}
if (result.status === 'unknown') return null
return (
- <div className={`${cls} text-gray-500`}>
+ <div className={`${cls} ${HINWEIS_TEXT.ruhig}`}>
{result.folders.length > 0
? <>Image and video: LU passes <code className="font-mono">{result.folders.join(', ')}</code> from this folder to ComfyUI. Takes effect the next time LU starts ComfyUI, and only for a ComfyUI that LU starts.</>
: <>Image and video models in this folder stay invisible: ComfyUI lists only its own folders. Name the subfolders like ComfyUI does (<code className="font-mono">checkpoints</code>, <code className="font-mono">loras</code>, <code className="font-mono">vae</code>, …) and LU hands them over.</>}
@@ -839,7 +856,12 @@ export function ComfyUISettings() {
<div className="flex items-center justify-between">
<span className="text-[0.7rem] text-gray-700 dark:text-gray-400">Status</span>
<div className="flex items-center gap-1.5">
- <div className={`w-1.5 h-1.5 rounded-full ${status?.running ? 'bg-green-500' : status?.found ? 'bg-orange-500' : 'bg-gray-500'}`} />
+ {/* Derselbe Punkt wie ueberall (lib/hinweis.ts): laeuft ist gruen,
+ antwortet nicht mehr ist rot, alles andere grau. Der Punkt stand
+ hier vorher auf Orange, sobald ComfyUI ueberhaupt gefunden war,
+ und hat damit ein installiertes, gestopptes ComfyUI wie einen
+ Zwischenfall aussehen lassen. */}
+ <div className={`w-1.5 h-1.5 rounded-full ${status?.running ? PUNKT_FARBE.an : status?.stalled ? PUNKT_FARBE.kaputt : PUNKT_FARBE.aus}`} />
<span className="text-[0.65rem] text-gray-500">
{status?.running ? 'Running'
: status?.stalled ? 'Not responding'
@@ -854,8 +876,10 @@ export function ComfyUISettings() {
{startError}
</pre>
)}
+ {/* Ein Start, der nicht ankommt, ist der Fehlerton und nicht der halbe:
+ hier muss jemand ins Protokoll sehen, sonst bleibt ComfyUI stehen. */}
{status?.stalled && !startError && (
- <p className="text-[0.55rem] text-amber-400">
+ <p role="alert" className={`text-[0.55rem] ${HINWEIS_TEXT.fehler}`}>
ComfyUI has been starting for a while without answering on its port. Use Show output below to see what it printed.
</p>
)}
@@ -896,8 +920,10 @@ export function ComfyUISettings() {
</div>
{hostError && <p className="text-[0.55rem] text-red-400">{hostError}</p>}
{hostSuccess && <p className="text-[0.55rem] text-green-400">Host saved. Restart ComfyUI to apply.</p>}
+ {/* Nichts ist kaputt: der Nutzer hat einen fremden Host eingetragen
+ und erfaehrt, was LU dort nicht kann. Ruhiger Ton. */}
{status?.host && !status?.isLocal && (
- <p className="text-[0.55rem] text-amber-400">Remote ComfyUI, start/stop/install not available from LU. Manage the process on the server.</p>
+ <p className={`text-[0.55rem] ${HINWEIS_TEXT.ruhig}`}>Remote ComfyUI, start/stop/install not available from LU. Manage the process on the server.</p>
)}
</div>
@@ -993,9 +1019,14 @@ export function ComfyUISettings() {
)}
{/* GH #98: a from-source install whose Python env broke (shared system
Python, dead torch) needs a rebuild, not a re-install — pip reports
- broken packages as already satisfied. Rebuilds ComfyUI/venv. */}
+ broken packages as already satisfied. Rebuilds ComfyUI/venv.
+
+ Blau, weil es in dieser Knopfreihe noch frei war: Gruen gehoert
+ Start, Rot dem Stop, Lila der Installation, Grau dem Rest. Das Gelb,
+ das hier stand, war keine Warnung, sondern nur die naechste freie
+ Farbe, und es hat den Knopf wie einen Notfall aussehen lassen. */}
{status?.found && !status?.running && installIdle && (
- <button onClick={handleRepair} title="Rebuild the Python environment in an isolated venv (~2 GB). Models, outputs and custom nodes are left alone." className="px-2 py-1 rounded text-[0.6rem] bg-amber-500/10 text-amber-400 hover:bg-amber-500/20 transition-colors">
+ <button onClick={handleRepair} title="Rebuild the Python environment in an isolated venv (~2 GB). Models, outputs and custom nodes are left alone." className="px-2 py-1 rounded text-[0.6rem] bg-blue-500/10 text-blue-400 hover:bg-blue-500/20 transition-colors">
Repair environment
</button>
)}
@@ -1036,9 +1067,14 @@ export function ComfyUISettings() {
<p
data-testid="comfy-install-notice"
data-kind={installNoticeKind}
+ // Ein 'warn' entsteht nur dort, wo der Lauf abgebrochen wurde
+ // oder etwas nicht benutzt werden konnte, und jeder dieser
+ // Saetze endet mit "lauf das nochmal". Das ist der Fehlerton,
+ // nicht das Gelb, das frueher hier stand und die Zeile zwischen
+ // fertig und kaputt haengen liess.
className={`flex-1 t-micro leading-relaxed ${
installNoticeKind === 'warn'
- ? 'text-amber-500 dark:text-amber-400'
+ ? HINWEIS_TEXT.fehler
: 'text-emerald-600 dark:text-emerald-400'
}`}
>
@@ -1146,7 +1182,10 @@ function CodexAgentSettings() {
label="Allow cloud architect models"
enabled={settings.codexArchitectAllowCloud}
onChange={() => updateSettings({ codexArchitectAllowCloud: !settings.codexArchitectAllowCloud })}
- icon={<Shield size={10} className={settings.codexArchitectAllowCloud ? 'text-amber-400' : 'text-emerald-500'} />}
+ // Cloud erlaubt ist kein Fehler, sondern eine Wahl des Nutzers, also
+ // der ruhige Ton statt des Gelbs, das hier stand. Gruen bleibt die
+ // Aussage "bleibt vollstaendig auf diesem Rechner".
+ icon={<Shield size={10} className={settings.codexArchitectAllowCloud ? HINWEIS_TEXT.ruhig : 'text-emerald-500'} />}
/>
<p className="text-[0.55rem] text-gray-500 leading-relaxed pl-1">
Off keeps the architect step fully local. On allows third-party
@@ -2276,10 +2315,15 @@ interface SystemHealthReport {
}
function ProbeBadge({ probe }: { probe: BackendProbe }) {
+ // "Not running" und "Not installed" sind beide nur ein Nein und tragen
+ // deshalb dasselbe Grau; der Unterschied steht im Wort, nicht in der Farbe.
+ // Das Gelb, das "Not running" frueher trug, hat einen ausgeschalteten
+ // Dienst zu einem halben Fehler gemacht.
+ const RUHIG = 'bg-gray-500/15 text-gray-500 border-gray-500/30'
const colors: Record<BackendProbe['status'], string> = {
ok: 'bg-emerald-500/15 text-emerald-500 border-emerald-500/30',
- unreachable: 'bg-amber-500/15 text-amber-500 border-amber-500/30',
- not_installed: 'bg-gray-500/15 text-gray-500 border-gray-500/30',
+ unreachable: RUHIG,
+ not_installed: RUHIG,
error: 'bg-red-500/15 text-red-500 border-red-500/30',
}
const labels: Record<BackendProbe['status'], string> = {
@@ -2389,7 +2433,10 @@ function TroubleshootSection() {
</div>
<div className="flex items-center justify-between text-[0.65rem]">
<span className="text-gray-500">Disk free (home)</span>
- <span className={`font-mono ${report.host.disk_free_gb < 10 ? 'text-amber-400' : 'text-gray-300'}`}>
+ {/* Unter 10 GB passt kein Modell mehr und keine ComfyUI-Umgebung:
+ das ist der Grund, aus dem der Nutzer diese Seite meist
+ aufmacht, also der Fehlerton statt des alten Gelbs. */}
+ <span className={`font-mono ${report.host.disk_free_gb < 10 ? HINWEIS_TEXT.fehler : 'text-gray-300'}`}>
{report.host.disk_free_gb} GB
</span>
</div>
diff --git a/src/components/settings/SpeechSettings.tsx b/src/components/settings/SpeechSettings.tsx
index 1415dfe5..ba10bc87 100644
--- a/src/components/settings/SpeechSettings.tsx
+++ b/src/components/settings/SpeechSettings.tsx
@@ -1,6 +1,7 @@
import { useCallback, useEffect, useReducer, useState } from 'react'
import { Check, Download, Loader2, Mic, Volume2, X } from 'lucide-react'
import { withInstallerOutput } from '../../lib/error-text'
+import { HINWEIS_TEXT } from '../../lib/hinweis'
import { backendCall } from '../../api/backend'
import { useSettingsStore } from '../../stores/settingsStore'
import { useVoiceStore } from '../../stores/voiceStore'
@@ -292,7 +293,7 @@ export function SpeechSettings() {
)}
</div>
{whisper.installError && (
- <p className="text-[0.55rem] text-red-400/90 leading-snug">{whisper.installError}</p>
+ <p className={`text-[0.55rem] leading-snug ${HINWEIS_TEXT.fehler}`}>{whisper.installError}</p>
)}
{showsHint(whisper) && (
<p className="text-[0.55rem] text-gray-500 leading-snug">
@@ -323,12 +324,15 @@ export function SpeechSettings() {
)}
</div>
{tts.installError && (
- <p className="text-[0.55rem] text-red-400/90 leading-snug">{tts.installError}</p>
+ <p className={`text-[0.55rem] leading-snug ${HINWEIS_TEXT.fehler}`}>{tts.installError}</p>
)}
{/* #77: read-aloud silently fell back to the system voice while this
- row showed a healthy green check — surface the recorded reason. */}
+ row showed a healthy green check, so the recorded reason is said here.
+ Rot und nicht mehr Gelb: die gewaehlte Stimme spricht nicht, das ist
+ ein Fehler und keine Zwischenstufe. Die Zeile steht in derselben Form
+ wie der Installationsfehler darueber (lib/hinweis.ts). */}
{voiceSettings.ttsMode === 'piper' && voiceSettings.ttsFallbackReason && (
- <p className="text-[0.55rem] text-amber-400/90 leading-snug">
+ <p className={`text-[0.55rem] leading-snug ${HINWEIS_TEXT.fehler}`}>
{voiceSettings.ttsFallbackReason} If an antivirus quarantined Piper, whitelist it or reinstall the voice below.
</p>
)}
@@ -368,7 +372,7 @@ export function SpeechSettings() {
</select>
</div>
{voiceBusy && <p className="text-[0.55rem] text-gray-500 leading-snug">Downloading voice (~63 MB)…</p>}
- {voiceError && <p className="text-[0.55rem] text-red-400/90 leading-snug">{voiceError}</p>}
+ {voiceError && <p className={`text-[0.55rem] leading-snug ${HINWEIS_TEXT.fehler}`}>{voiceError}</p>}
{/* TTS engine — bundled Piper, or an external OpenAI-compatible HTTP
endpoint like Kokoro-FastAPI (GitHub #58). */}
diff --git a/src/components/settings/__tests__/comfy-notice-reads-as-what-it-is.test.ts b/src/components/settings/__tests__/comfy-notice-reads-as-what-it-is.test.ts
index 3e9a0fa3..07a75dd2 100644
--- a/src/components/settings/__tests__/comfy-notice-reads-as-what-it-is.test.ts
+++ b/src/components/settings/__tests__/comfy-notice-reads-as-what-it-is.test.ts
@@ -3,8 +3,10 @@
*
* A15 review, 03.09., two findings on the closing line a finished run leaves.
*
- * 1. It was painted amber whatever it said, so "Repair finished. ComfyUI is
- * ready." arrived in the colour of a warning after an eight minute rebuild.
+ * 1. It carried the warning colour whatever it said, so "Repair finished.
+ * ComfyUI is ready." arrived as a warning after an eight minute rebuild.
+ * (That colour was amber then. It is red now, and there is no amber left
+ * anywhere: see lib/hinweis.ts.)
* 2. Nothing ever put it away. The section unfolds itself while a line is
* standing, so one finished run kept the section open on every visit for the
* rest of the session.
@@ -52,11 +54,23 @@ async function panelShowing(notice: string, noticeKind: 'ok' | 'warn') {
}
describe('the closing line reads as what it is', () => {
+ // Die Farbe der Warnzeile hat sich am 04.09.2026 geaendert, die Aussage
+ // dieses Tests nicht. Bis dahin war 'warn' bernsteinfarben, und dieser Test
+ // pruefte auf `amber`. Gelb ist im ganzen Haus abgeschafft, weil es der
+ // Sammelplatz fuer alles war, was weder gut noch kaputt ist, und damit
+ // nichts mehr aussagte (die Begruendung steht in lib/hinweis.ts). Es gibt
+ // nur noch zwei Toene: ruhiges Grau und rot. Ein 'warn' entsteht hier nur
+ // nach einem Abbruch oder wenn etwas nicht benutzt werden konnte, und jeder
+ // dieser Saetze endet mit "lauf das nochmal", also ist es rot. Geprueft
+ // wird weiterhin dasselbe: die Farbe ist keine Konstante, sie folgt der Art
+ // der Meldung.
it('a run that worked is not painted as a warning', async () => {
const line = await panelShowing('Repair finished. ComfyUI is ready.', 'ok')
expect(line.textContent).toBe('Repair finished. ComfyUI is ready.')
expect(line.getAttribute('data-kind')).toBe('ok')
+ expect(line.className).not.toContain('red')
expect(line.className).not.toContain('amber')
+ expect(line.className).toContain('emerald')
})
it('a run with something to report still is', async () => {
@@ -67,7 +81,9 @@ describe('the closing line reads as what it is', () => {
'warn',
)
expect(line.getAttribute('data-kind')).toBe('warn')
- expect(line.className).toContain('amber')
+ expect(line.className).toContain('red')
+ expect(line.className).not.toContain('emerald')
+ expect(line.className).not.toContain('amber')
})
})
diff --git a/src/lib/__tests__/erreichbar-ist-nicht-chatbereit.test.ts b/src/lib/__tests__/erreichbar-ist-nicht-chatbereit.test.ts
index e2a473ed..a9ab21e1 100644
--- a/src/lib/__tests__/erreichbar-ist-nicht-chatbereit.test.ts
+++ b/src/lib/__tests__/erreichbar-ist-nicht-chatbereit.test.ts
@@ -72,8 +72,27 @@ describe('beide Wege der Anbieterzeile sprechen denselben Spruch', () => {
// abzuschreiben. Die vierte war eine Abschrift der dritten, und die
// Typo-Sperrklinke hat das gemerkt, bevor jemand sonst es tat.
expect(src.match(/function Statusfeld\(/g) ?? []).toHaveLength(1)
- // Und nicht gruen: Gruen heisst auf dieser Zeile "du kannst chatten".
- expect(src).toMatch(/status === 'stopped' \|\| status === 'no-models' \? 'bg-amber-500'/)
+ })
+
+ it('eine leere Liste ist nicht gruen und nicht rot, sondern ruhig', () => {
+ // Diese Regel hat sich am 04.09.2026 geaendert, der Sinn nicht. Vorher
+ // stand hier `status === 'stopped' || status === 'no-models' ?
+ // 'bg-amber-500'`, und das pruefte dasselbe: nicht gruen, weil Gruen auf
+ // dieser Zeile "du kannst chatten" heisst, und nicht rot, weil der Server
+ // laeuft. Das Gelb dafuer ist weg, weil es im ganzen Haus der Sammelplatz
+ // fuer alles war, was weder gut noch kaputt ist, und damit nichts mehr
+ // aussagte (die Begruendung steht in lib/hinweis.ts). Der Punkt kennt
+ // jetzt drei Farben, und 'no-models' faellt in die ruhige.
+ expect(src).toMatch(
+ /status === 'connected' \? PUNKT_FARBE\.an :\s*status === 'failed' \? PUNKT_FARBE\.kaputt :\s*PUNKT_FARBE\.aus/,
+ )
+ // Das Wort daneben traegt denselben Ton wie der Punkt.
+ expect(src).toMatch(/text: 'Reachable, no models',\s*ton: HINWEIS_TEXT\.ruhig/)
+ // NEGATIVKONTROLLE: kein Gelb mehr in dieser Datei, in keiner Schreibweise
+ // und auch nicht in einem Kommentar.
+ expect(src).not.toMatch(/amber-|yellow-/)
+ // Und die leere Liste darf sich auch nicht in die Gegenrichtung verirren.
+ expect(src).not.toMatch(/'no-models'[^\n]*(?:green|emerald|red)-/)
})
it('die gesunde Maschine aus GH #118 bleibt stumm, solange sie steht', () => {
diff --git a/src/lib/__tests__/kein-gelb-in-der-oberflaeche.test.ts b/src/lib/__tests__/kein-gelb-in-der-oberflaeche.test.ts
new file mode 100644
index 00000000..a80e8f0c
--- /dev/null
+++ b/src/lib/__tests__/kein-gelb-in-der-oberflaeche.test.ts
@@ -0,0 +1,115 @@
+/**
+ * Gelb ist aus der Oberflaeche verschwunden und darf nicht zurueckkommen.
+ *
+ * David, 04.09.2026: „ich will nirgends gelbe anmerkungen oder fehlermeldungen
+ * sehen, das sieht ja todes scheisse aus" und „kein gelb mehr ohne farbe. und
+ * sauber, nicht so klotzig ueberall die fehlermeldungen und anmerkungen."
+ *
+ * Gezaehlt vorher: 319 Vorkommen in 52 Dateien. Die Begruendung, warum es zwei
+ * Toene gibt und keinen dritten, steht in `lib/hinweis.ts`.
+ *
+ * Warum das ein Test sein muss und keine Absprache: eine Regel, die 52 Dateien
+ * betrifft, ueberlebt keine drei Wochen, wenn niemand sie nachhaelt. Der
+ * naechste, der eine Warnung baut, greift zu Gelb, weil Gelb ueberall die
+ * Farbe fuer Warnungen ist. Genau so sind die 319 entstanden.
+ *
+ * Kommentare zaehlen ausdruecklich MIT, aber nur, wenn dort ein Klassenname
+ * steht. Tailwind liest den Quelltext als Text, auch die Kommentare, und macht
+ * aus einem Kuerzel in einer Erklaerung eine echte Regel im ausgelieferten
+ * Bundle. Das faengt zwar auch `keine-klasse-aus-prosa` ab, aber dieser Test
+ * sagt den Grund dazu.
+ *
+ * Run: npx vitest run src/lib/__tests__/kein-gelb-in-der-oberflaeche.test.ts
+ */
+import { describe, it, expect } from 'vitest'
+import { readdirSync, readFileSync, statSync } from 'node:fs'
+import { resolve, relative } from 'node:path'
+
+const SRC = resolve(__dirname, '../..')
+
+/** Jede Quelldatei der Anwendung. Tests zaehlen nicht mit: dort STEHT das
+ * Wort, weil dort seine Abwesenheit geprueft wird. */
+function quellen(dir: string, out: string[] = []): string[] {
+ for (const name of readdirSync(dir)) {
+ const p = resolve(dir, name)
+ if (statSync(p).isDirectory()) {
+ if (name === '__tests__' || name === 'node_modules') continue
+ quellen(p, out)
+ } else if (/\.tsx?$/.test(name) || /\.css$/.test(name)) {
+ out.push(p)
+ }
+ }
+ return out
+}
+
+const DATEIEN = quellen(SRC)
+
+/** Der Text ohne Kommentare. */
+const ohneKommentare = (s: string) =>
+ s.replace(/\/\*[\s\S]*?\*\//g, ' ').replace(/^[ \t]*\/\/.*$/gm, ' ')
+
+describe('kein Gelb in der Oberflaeche', () => {
+ it('findet ueberhaupt die Quellen, sonst prueft der Rest nichts', () => {
+ // Negativkontrolle gegen einen leeren Lauf: waere der Sammler kaputt,
+ // waeren alle Faelle unten gruen und wuerden nichts bedeuten.
+ expect(DATEIEN.length).toBeGreaterThan(300)
+ expect(DATEIEN.some((d) => d.endsWith('hinweis.ts'))).toBe(true)
+ })
+
+ it('keine amber- oder yellow-Klasse im Code', () => {
+ const treffer: string[] = []
+ for (const d of DATEIEN) {
+ const code = ohneKommentare(readFileSync(d, 'utf8'))
+ for (const m of code.matchAll(/\b(?:amber|yellow)-[a-z0-9/[\].]+/g)) {
+ treffer.push(`${relative(SRC, d)}: ${m[0]}`)
+ }
+ }
+ expect(treffer, treffer.join('\n')).toEqual([])
+ })
+
+ it('und auch keine im Kommentar, weil Tailwind Kommentare mitliest', () => {
+ // `lib/hinweis.ts` traegt die Begruendung der ganzen Regel und nennt die
+ // beiden Woerter dabei ohne Bindestrich, ist also keine Ausnahme, sondern
+ // faellt gar nicht erst auf.
+ const treffer: string[] = []
+ for (const d of DATEIEN) {
+ const s = readFileSync(d, 'utf8')
+ for (const m of s.matchAll(/\b(?:bg|text|border|from|via|to|ring|fill|stroke)-(?:amber|yellow)-[a-z0-9/[\].]+/g)) {
+ treffer.push(`${relative(SRC, d)}: ${m[0]}`)
+ }
+ }
+ expect(treffer, treffer.join('\n')).toEqual([])
+ })
+
+ it('und kein Gelb als roher Farbwert', () => {
+ // Der naheliegende Ausweg um die zwei Regeln oben herum. Die Werte sind
+ // die Gelbtoene der Tailwind-Palette in beiden Familien, plus die zwei
+ // vollen Gelbs, die ein Mensch von Hand tippt.
+ const roh = [
+ '#fbbf24', '#f59e0b', '#d97706', '#b45309', '#92400e', '#fffbeb', '#fef3c7',
+ '#facc15', '#eab308', '#ca8a04', '#a16207', '#fefce8', '#fef9c3',
+ '#ffff00', '#ffd700',
+ ]
+ const treffer: string[] = []
+ for (const d of DATEIEN) {
+ const s = readFileSync(d, 'utf8').toLowerCase()
+ for (const wert of roh) if (s.includes(wert)) treffer.push(`${relative(SRC, d)}: ${wert}`)
+ }
+ expect(treffer, treffer.join('\n')).toEqual([])
+ })
+
+ it('die Regel liegt an einer Stelle und wird auch benutzt', () => {
+ // Ohne diesen Fall koennte jemand die Farben wieder ueberall einzeln
+ // hinschreiben, nur eben in Grau, und die naechste Runde faengt von vorn
+ // an.
+ const regel = readFileSync(resolve(SRC, 'lib/hinweis.ts'), 'utf8')
+ expect(regel).toContain('HINWEIS_TEXT')
+ expect(regel).toContain('PUNKT_FARBE')
+ const nutzer = DATEIEN.filter((d) => {
+ if (d.endsWith('hinweis.ts')) return false
+ const s = readFileSync(d, 'utf8')
+ return s.includes('lib/hinweis') || s.includes('ui/Hinweis') || s.includes("from '../hinweis'")
+ })
+ expect(nutzer.length, 'niemand liest die Regel').toBeGreaterThan(3)
+ })
+})
diff --git a/src/lib/__tests__/render-notice-names-force-cpu.test.ts b/src/lib/__tests__/render-notice-names-force-cpu.test.ts
index 2fb65019..c9381943 100644
--- a/src/lib/__tests__/render-notice-names-force-cpu.test.ts
+++ b/src/lib/__tests__/render-notice-names-force-cpu.test.ts
@@ -2,9 +2,15 @@
* The last surface carrying the wrong reason from Nebenbefund 1 of the R12/R13
* re-measure (2026-08-30, ergebnis-r1213-nachmessung.md).
*
- * Round 14 fixed the Create tab's yellow banner: it had been telling a user
- * with a working, correctly detected RTX 3060 that no usable GPU was found,
- * when he had picked Force CPU himself in Settings, Hardware, ComfyUI GPU.
+ * Round 14 fixed the Create tab's CPU banner: it had been telling a user with
+ * a working, correctly detected RTX 3060 that no usable GPU was found, when he
+ * had picked Force CPU himself in Settings, Hardware, ComfyUI GPU.
+ *
+ * Der Balken war damals gelb, und dieser Kopf hat ihn auch so genannt. Am
+ * 04.09.2026 ist Gelb aus der Oberflaeche verschwunden: es stand gleichzeitig
+ * fuer einen Expertenhinweis, einen gestoppten Server und einen Absturz, also
+ * fuer nichts. Der Satz, um den es hier geht, ist unveraendert; er steht jetzt
+ * in gedaempftem Grau und ohne Kasten da. Die Begruendung dazu: lib/hinweis.ts.
*
* The three render failure notices in lib/render-budget.ts said the same thing
* in their own words, through the sentence they share:
@@ -89,6 +95,18 @@ describe('THE FIX: the render notices name the press, not a missing GPU path', (
expect(budget).not.toMatch(/Settings → Hardware → ComfyUI GPU back to Auto/)
})
+ it('and the line that carries it is not painted like a fault any more', () => {
+ // Die Regel hat sich geaendert, nicht der Satz: seit 04.09.2026 traegt die
+ // Create-Leiste denselben Wortlaut in Grau statt in Gelb, weil der Rechner
+ // auf dem Prozessor nichts KAPUTT hat, sondern nur langsam ist. Ein Test,
+ // der die alte Farbe festhielte, wuerde die Regel zurueckholen.
+ const tab = read('src/components/create/experimental/CreateExperimental.tsx')
+ // Die beiden Namen stehen absichtlich ohne Bindestrich da: so faellt diese
+ // Datei nicht selbst in den Repo-Griff nach der alten Farbe.
+ for (const ton of ['amber', 'yellow']) expect(tab).not.toContain(`${ton}-`)
+ expect(tab).toMatch(/<Hinweis icon=\{<Cpu /)
+ })
+
it('the wiring: mode is read off the reply that always carried it', () => {
const handoff = read('src/api/vram-handoff.ts')
expect(handoff).toMatch(/mode: asComfyGpuMode\(s\.mode\)/)