From d2aacac55c0a1386ce101aa856949948fdc54bc0 Mon Sep 17 00:00:00 2001 From: Damocles Date: Wed, 15 Apr 2026 20:06:01 +0200 Subject: [PATCH] fix: init cpuCores with correct count on first stat tick regardless of consumers --- modules/SystemStats.qml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/SystemStats.qml b/modules/SystemStats.qml index a9fe320..678f494 100644 --- a/modules/SystemStats.qml +++ b/modules/SystemStats.qml @@ -72,6 +72,13 @@ QtObject { history: hist.length > histLen ? hist.slice(hist.length - histLen) : hist }; }); + } else if (root.cpuCores.length !== ev.cores.length) { + // Keep count in sync so panel can size correctly before consumers activate + root.cpuCores = ev.cores.map(c => ({ + "usage": c.usage, + "freq_ghz": c.freq_ghz, + "history": [] + })); } } else if (ev.type === "temp") { root.tempCelsius = ev.celsius;