Commit Graph
4 Commits
Author SHA1 Message Date
inference-admin e2a5018150 fix: same broken metric-button line, plus a mangled location.reload()
The dashboard carried the identical inline-handler line inside PAGE_HTML — the
served JS was a syntax error from there on, so the page loaded and then did
nothing — and a second casualty of the same sloppy one-shot replace:
`location.reload()` had become `location.rebuildMetricButtons()\nload()` inside
loadGuests(). Both are fixed, and the same gate fix applies (the gate now reads
PAGE_HTML via ast.literal_eval, i.e. the string the app serves, not the source
text between the quotes).

Buttons are delegated data-metric clicks now, the harness proves the click
reaches setTrendMetric, and the stub gained stateful attributes plus
addEventListener/__fire to make that possible.
2026-11-13 21:14:03 +00:00
inference-admin 36d8ba6e35 manifest: pin to member-dashboard:20261113-d10b817 2026-11-13 21:02:58 +00:00
inference-admin d10b817fdc dashboard: the co-op charts come from the shared definitions (Money included)
The dashboard kept its own TREND_CONF with its own titles ("The co-op over time",
"What the co-op spent (members + the co-op's own accounts)") and its own toggles —
the other half of the drift the panel just lost. The metric list is now
CoOpChart.CHART_METRICS, the chart is drawn by the shared renderChart(), and the
buttons are built from the shared list, so members and stewards read the same
charts with the same names.

Money arrives as a metric here too, fed by a new /api/money-series proxy to the
portal's /broker/money-series — the co-op's cumulative revenue, cumulative token
spend and OC balance (a gap before snapshots began, never a zero). Deleting the
local TREND_CONF/trendVal/trendLabel also removes the second set of formatters.

Two page-blanking bugs caught by check-page-js.sh before they could ship: a
destructured fmtMoney colliding with this page's own (duplicate const), and `esc`
(which the panel defines and this page does not — it uses escapeHtml).

Harness extended: the money metric draws 2 lines + a single-point balance marker,
the tooltip lists every series and reports the unmeasured balance as not
measured, the metric row equals the shared list filtered by METRIC_SOURCE, and a
metric with no source says so. Geometry proof: 15 captured renders (5 metrics x 3
ranges) byte-identical to the predecessor with aria stripped.
2026-11-13 21:01:38 +00:00
inference-admin c5d4677ec3 chart module: re-pin to the canonical revision that adds the definition layer
Same byte-identical module as the panel; the dashboard's own port to the shared
definitions is the next commit. check-page-js.sh's DOM stub now supports
setAttribute/insertAdjacentHTML, which the shared metric-button builder needs.
2026-11-13 20:55:52 +00:00