money chart: drop the caveat caption and the history-start legend note

The operator removed all caveats from the finance chart. Gone: the
money-caption element, the caveat/stale/errors caption rendering, the
.legend 'history begins' suffix and the orphaned CSS. Chart, legend keys,
series and toggles untouched; balance_history_start stays in the payload.
Harness now asserts no caveat text renders in any mode.
This commit is contained in:
inference-bot committed 2026-11-08 01:55:23 +00:00
1 parent 02fdd9f51c
commit 2904a4c2f8
2 files changed
+18 -16

No files matched your search

+13 -2
View File
@@ -38,10 +38,19 @@ if (rects !== 0) throw new Error("cumulative mode must not draw bars, got " + re
if (!count(/<circle cx="[^"]+" cy="[^"]+" r="3" fill="#a97a2a"/)) throw new Error("single balance point marker missing");
if (!count(/data-tip-host="money-body"/)) throw new Error("hover targets missing");
const legend = $("money-legend").innerHTML;
for (const frag of ["Revenue — OC contributions (cumulative)", "Token spend — cumulative", "OC balance — history begins 2026-11-08"]) {
for (const frag of ["Revenue — OC contributions (cumulative)", "Token spend — cumulative", "OC balance"]) {
if (!legend.includes(frag)) throw new Error("legend missing: " + frag);
}
if ($("money-caption").textContent !== moneyData.caveat) throw new Error("caption not the caveat");
// No caveat anywhere, in any rendering state — even though the fixture still
// carries the payload's caveat field, which the panel must ignore.
function assertNoCaveat() {
const rendered = $("money-body").innerHTML + " " + $("money-legend").innerHTML;
for (const bad of ["Balance history begins", "history begins", "Open Collective API exposes", "money-caption"]) {
if (rendered.includes(bad)) throw new Error("caveat/caption text rendered: " + bad);
}
}
assertNoCaveat();
// Axis: tick labels bottom-first — values ascend while their y descends; the
// top tick must clear the data max. Date labels share text-anchor="end" with
@@ -78,6 +87,8 @@ const rects3 = (svg.match(/<rect /g) || []).length;
if (rects3 !== 30) throw new Error("30-day slice: expected 30 bars, got " + rects3);
setMoneyPeriod(90);
setMoneySpendMode("cum");
renderMoney();
assertNoCaveat();
// --- balance-only deploy-day shape: one point renders as a marker, no crash ---
moneyData.series = [{ day: "2026-11-08", revenue_cum: null, spend_day: null, spend_cum: null, oc_balance: 1160.25 }];