fix: refcount StatsCache keys, keep registrations across config change, and tidy GPU/usage render paths

This commit is contained in:
c4ch3c4d3
2026-08-14 13:04:56 -06:00
parent 9e847940d3
commit d52a0596ed
5 changed files with 75 additions and 48 deletions
+2 -5
View File
@@ -87,7 +87,7 @@ export class GpuGraph extends SingletonAction<GpuSettings> {
const combined = combineSeries(histories, metric);
value = combined.value;
history = combined.history;
gpuName = `GPU ${ids.join("+")}`;
gpuName = ids.length > 0 ? `GPU ${ids.join("+")}` : "NO GPUS";
} else {
const gpuId = state.settings.gpuId ?? "all";
value = poller?.getValue(gpuId, metric);
@@ -108,9 +108,6 @@ export class GpuGraph extends SingletonAction<GpuSettings> {
}
function parseCombo(raw: string | undefined): string[] | undefined {
const ids = (raw ?? "")
.split(",")
.map((s) => s.trim())
.filter(Boolean);
const ids = [...new Set((raw ?? "").split(",").map((s) => s.trim()).filter(Boolean))];
return ids.length > 0 ? ids : undefined;
}