panel/dashboard: drop the caveat and the status line under the co-op chart

Nathan: the disclaimers are not necessary, especially now that reporting is in
place going forward — and then, on the status line under it: remove that too.

Gone from both apps: the explanatory note paragraph, its per-metric config
strings, the status line ("55 days - 2 not measured"), the now-orphaned CSS for
both, and the gaps counter that only fed the status line. The period toggles
still say what range is on screen, so no information is lost.

The harness assertions that described the status line are replaced by stronger
ones: the rendered chart must contain no caveat text at all, and the 30-day view
must still end at the most recent measured day.
This commit is contained in:
inference-bot committed 2026-10-28 04:23:21 +00:00
1 parent 41b86bcc80
commit 10d62fdde4
1 file changed
+3 -14
+3 -14
View File
@@ -277,9 +277,7 @@ PAGE_HTML = """<!DOCTYPE html>
.trend-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px 12px; margin-top: 12px; }
.trend-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.trend-title { font-weight: 700; font-size: 14px; color: var(--ink); }
.trend-sub { color: var(--muted); font-size: 12px; }
.trend-body svg { display: block; width: 100%; height: auto; overflow: visible; }
.trend-note { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
.trend-empty { color: var(--muted); font-size: 13px; margin: 28px 0; text-align: center; }
@media (max-width: 600px) { .trend-controls { gap: 10px; } .trend-card { padding: 12px 10px; } }
.num { font-variant-numeric: tabular-nums; }
@@ -384,10 +382,8 @@ PAGE_HTML = """<!DOCTYPE html>
<div class="trend-card">
<div class="trend-head">
<span class="trend-title" id="trend-title">Members</span>
<span class="trend-sub" id="trend-sub"></span>
</div>
<div id="trend-body" class="trend-body"><p class="trend-empty">Loading</p></div>
<p class="trend-note" id="trend-note"></p>
</div>
</div>
@@ -476,12 +472,9 @@ let trendMetric = "members"; // members | spend | requests
let trendDays = 90; // 0 = all time
const TREND_CONF = {
members: { kind: "line", title: "Members", unit: "count",
note: "Cumulative members as of each day. A gap means days that were never measured, not zero members." },
spend: { kind: "bar", title: "Spend per day", unit: "money",
note: "Spend charged to the co-op that day. Days with no recorded usage are gaps, not zeroes." },
requests: { kind: "bar", title: "Requests per day", unit: "count",
note: "Gateway requests served that day. Days with no recorded usage are gaps, not zeroes." }
members: { kind: "line", title: "Members" },
spend: { kind: "bar", title: "Spend per day" },
requests: { kind: "bar", title: "Requests per day" }
};
async function loadMetrics() {
@@ -550,16 +543,13 @@ function renderTrends() {
const conf = TREND_CONF[trendMetric];
const rows = trendDays === 0 ? trendsData : trendsData.slice(-trendDays);
$("trend-title").textContent = conf.title;
$("trend-note").textContent = conf.note;
const vals = rows.map(trendVal);
const have = vals.filter(v => v !== null && v !== undefined);
if (have.length < 2) {
host.innerHTML = "<p class=trend-empty>Not enough history yet.</p>";
$("trend-sub").textContent = "";
return;
}
const gaps = vals.length - have.length;
const maxV = Math.max.apply(null, have);
// Axis top = one round step times four ticks: labels land on round numbers
// and the peak still clears the frame.
@@ -619,7 +609,6 @@ function renderTrends() {
}
parts.push("</svg>");
host.innerHTML = parts.join("");
$("trend-sub").textContent = rows.length + " days" + (gaps > 0 ? " - " + gaps + " not measured" : "");
}
// ---- shared state ----