Commit Graph
13 Commits
Author SHA1 Message Date
inference-admin ffd42a2045 manifest: pin to 20261113-b37b954 2026-11-13 21:45:46 +00:00
inference-admin b37b9549e4 dashboard: the panel's button shape, the server's spend figure, and keys as a chart
* Chart buttons take the admin panel's look: bordered, 8px radius, green-mid when
  active (was a borderless segmented control). One design across both apps.
* "co-op spend, all time" now reads the portal's figure from /api/metrics instead
  of summing the chart series in the browser. The second card ("of which the
  co-op's own accounts") is gone: it was that same client-side sum, and the
  portal's own breakdown is a panel-side notion I will not fake here.
* The API keys are a chart: one bar row per key — the chat key included, so the
  built-in key's usage is comparable rather than a footnote — with a Spend /
  Requests toggle. Revoke stays on each real key's row.
2026-11-13 21:44:14 +00:00
inference-admin 6e044c0f05 manifest: pin to 20261113-2b8b8ad 2026-11-13 21:27:14 +00:00
inference-admin 2b8b8ade18 charts: take the shared concise metric titles (Members · Requests · Spend · Money · Energy · Carbon)
Same menu, same order, same words as the panel — the two UIs now differ only in
whose usage they show and in their own visual style.
2026-11-13 21:26:28 +00:00
inference-admin 2172202315 manifest: pin to 20261113-8f67896 2026-11-13 21:19:25 +00:00
inference-admin 8f67896407 page: Cache-Control no-store (same reason as the panel: no validators on a single inline script, so a cached copy runs the previous deploy's JS) 2026-11-13 21:18:41 +00:00
inference-admin a6a70a0754 manifest: pin to 20261113-f72af43 2026-11-13 21:18:14 +00:00
inference-admin f72af43051 dashboard: build the shared metric row at boot
buildMetricButtons() was defined but never called — a one-shot replace had
slipped the call into loadGuests()'s 401 branch, and removing that left no call
at all. So the dashboard rendered its data with an empty metric row: no way to
switch between the shared metrics. Called at boot now, anchored on the closing
script tag, and the harnesses plus the served-page browser check confirm the row
exists with all six data-metric buttons.
2026-11-13 21:17:59 +00:00
inference-admin 1340548859 manifest: pin to registry.inference.coop/code/member-dashboard:20261113-e2a5018 2026-11-13 21:14:40 +00:00
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