Fix: Speicher-Anzeige einheitlich (Box-Health == System-Status)

Die 'Box gesund'-Speicher-Pille zeigte den GTT-Pool (GPU-Sicht auf den
Unified-Memory der APU), die System-Status-Kachel daneben den System-RAM
— zwei verschiedene Zahlen fuer denselben Speicher (z.B. 73/124 vs 90/122).

useLucyHealth: Speicher-Ampel jetzt aus sys.ram (dieselbe Quelle wie die
RAM-Zeile), Schwellen am RAM-Charakter geeicht (warn 85%, full 93%; 4 Modelle
warm ~78% bleibt gruen). CockpitView: Pille auf 1 Nachkommastelle wie gb().
Live verifiziert: beide zeigen jetzt identisch 95.9/122.7 GB.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Hitonabi
2026-07-13 15:42:41 +02:00
parent c71a0a1abd
commit a2bfe0e480
20 changed files with 33 additions and 29 deletions
+10 -6
View File
@@ -164,16 +164,20 @@ export function useLucyHealth(): LucyHealth {
}
})())
// Speicher-Ampel aus dem echten GTT-Pool (unified RAM inkl. KV-Cache).
const total = sys?.gpu?.gtt_total || sys?.gpu?.vram_total || 0
const used = sys?.gpu?.gtt_used || 0
const pct = total > 0 ? Math.min(100, (used / total) * 100) : 0
// Speicher-Ampel = System-RAM, DIESELBE Quelle wie die RAM-Zeile in der
// System-Status-Kachel. Vorher zeigte die Pille den GTT-Pool (GPU-Sicht auf den
// Unified-Memory) — der weicht auf der APU vom System-RAM ab, wodurch „Box gesund"
// und „System-Status" zwei verschiedene Speicher-Zahlen zeigten. Eine Box, eine Zahl.
// Schwellen am RAM-Charakter geeicht: 4 Modelle warm ≈ 78 % gilt als gesund → grün.
const total = sys?.ram?.total ?? 0
const used = sys?.ram?.used ?? 0
const pct = sys?.ram?.percent ?? (total > 0 ? Math.min(100, (used / total) * 100) : 0)
const B = 1024 ** 3
const memory: MemoryAmpel = !total
? { status: "unknown", usedGb: 0, totalGb: 0, pct: 0, text: "Speicher-Auslastung unbekannt." }
: pct >= 90
: pct >= 93
? { status: "full", usedGb: used / B, totalGb: total / B, pct, text: "Speicher fast voll — Lucy könnte langsamer werden." }
: pct >= 72
: pct >= 85
? { status: "warn", usedGb: used / B, totalGb: total / B, pct, text: "Speicher gut gefüllt — noch okay." }
: { status: "ok", usedGb: used / B, totalGb: total / B, pct, text: "Genug Speicher frei." }