Merge claude/2

This commit is contained in:
librelad 2026-05-28 16:46:23 +01:00
commit 324240dd90

View File

@ -203,7 +203,6 @@ class SystemMetricPage {
this.points = [];
}
if (loading) loading.hidden = true;
if (this.points.length === 0 && empty) empty.hidden = false;
this._renderChart();
this._renderStats();
this._renderFootMeta();
@ -307,7 +306,17 @@ class SystemMetricPage {
svg.setAttribute('viewBox', `0 0 ${W} ${H}`);
svg.setAttribute('width', W);
svg.setAttribute('height', H);
if (!this.points.length) { svg.innerHTML = ''; return; }
// Single source of truth for the empty overlay: it tracks whether we
// actually have points. Without this the "no samples" message, shown
// by _loadRange when history came back empty, never cleared once live
// ticks started filling the chart + stats — a confusing contradiction.
const empty = root.querySelector('.sys-detail-empty');
if (!this.points.length) {
svg.innerHTML = '';
if (empty) empty.hidden = false;
return;
}
if (empty) empty.hidden = true;
const padL = 64, padR = 24, padT = 18, padB = 36;
const innerW = Math.max(1, W - padL - padR);
const innerH = Math.max(1, H - padT - padB);