Commit Graph
17 Commits
Author SHA1 Message Date
inference-admin d329b05fe3 panel: the Remaining header hides with its own column
ci/woodpecker/push/woodpecker Pipeline was successful
In All-time mode the Remaining *cell* carried remaining-only and hid, while its
header did not — so every column after it sat under the wrong heading and the
reset dates appeared under Remaining. The header now carries the same class its
cell does. Also widened the loading row's colspan to the real column count.
2026-11-14 21:54:35 +00:00
inference-admin 80e1eaea48 manifest: pin to 20261113-d440165
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-13 22:47:55 +00:00
inference-admin d4401651b6 portal_get kept the blanket 502 too
ci/woodpecker/push/woodpecker Pipeline was successful
Fixing portal_post only closed half of it: portal_get still turned any non-200
from the portal into a 502, so a refusal or a rate limit on a read path would
have arrived as a gateway error as well. Both helpers now pass the portal's own
status and detail through.
2026-11-13 22:47:39 +00:00
inference-admin 1239da192b manifest: pin to 20261113-b1cf76c
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-13 22:47:05 +00:00
inference-admin b1cf76c02d portal errors keep their own status instead of becoming 502
ci/woodpecker/push/woodpecker Pipeline was successful
portal_post collapsed every non-2xx upstream response into HTTPException(502), so
a plain rate limit ("Too many requests. Slow down.") reached the operator as
"Could not send guest access (502)": a gateway failure, for a condition that
clears in a minute and whose message said exactly that.

The status now passes through, so a 429 arrives as a 429 with the portal's own
words.
2026-11-13 22:46:50 +00:00
inference-admin a90f8fdb36 manifest: pin to 20261113-33ea1a7
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-13 22:34:41 +00:00
inference-admin 33ea1a732d panel: an OC-incognito chip, and the Admin column header stops misnaming the mode
ci/woodpecker/push/woodpecker Pipeline was successful
* source 'oc-incognito' gets its own chip. It read as plain "OC" — true as far as
  it goes (they are an OC subscriber) but it hides what matters operationally:
  email matching cannot see them, so their orders match by OC slug.
* The Admin section's spend column said "All-time spend" in BOTH modes, so in
  balance mode the header described data that was not in the table. Now "Spend".
2026-11-13 22:34:16 +00:00
inference-admin a63de0b2b2 manifest: pin to 20261113-825eff7
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-13 21:45:20 +00:00
inference-admin 825eff7053 card: read the portal's all-time spend, the number the dashboard shows too
ci/woodpecker/push/woodpecker Pipeline was successful
Kept the panel's own 'co-op's own share' line — that is the operator-account
breakdown only this app can see. The headline figure is now the shared one.
2026-11-13 21:44:14 +00:00
inference-admin 0a115d5838 manifest: pin to 20261113-e7eb34d
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-13 21:26:43 +00:00
inference-admin e7eb34d787 charts: Money lives in one place, and the menus are concise
ci/woodpecker/push/woodpecker Pipeline was successful
Money was both a tab and a metric of Trends — two doors to one chart, which is
what "not consistent" looks like from the outside. The tab is gone; the metric
stays, and the nav is Members · Model usage · Trends.

Period wording now matches the dashboard exactly: 30 days · 90 days · All time.
Titles come from the shared module (Members · Requests · Spend · Money · Energy ·
Carbon), so both apps offer the same six options in the same order.
2026-11-13 21:26:27 +00:00
inference-admin 92de0c25f0 manifest: pin to 20261113-b85cc93
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-13 21:18:59 +00:00
inference-admin b85cc93a6b page: Cache-Control no-store, so a reload can't run the previous deploy's JS
ci/woodpecker/push/woodpecker Pipeline was successful
The whole UI is one inline <script> with no ETag/Last-Modified and no cache
directive. After the 2026-11-13 fix deploy, a browser holding the previous copy
would keep running the dead script and make a fixed app look broken. The page is
cheap; serve it no-store.
2026-11-13 21:18:40 +00:00
inference-admin 59a34db9f7 manifest: pin to registry.inference.coop/code/admin-panel:20261113-c3f5a32
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-13 21:14:39 +00:00
inference-admin c3f5a326c2 fix: the panel served a page whose script never ran
ci/woodpecker/push/woodpecker Pipeline was successful
The metric buttons were built with an inline handler inside PAGE_HTML:

    + " onclick=\"setTrendMetric('" + def.id + "')">" + ...

In a plain triple-quoted Python string `\"` is just `"`, so the SERVED JS read
    + " onclick="setTrendMetric('" + ...
— the string closes at `onclick=` and the rest is a syntax error. The whole
script died at that line: no fetches, no tables, no charts. Just the shell.

Two failures compounded:
1. The line itself (a Python-escape mistake, from a patch script that turned
   `\\"` into `\"`).
2. The gate certified it. tests/check-page-js.sh sliced PAGE_HTML out of the
   SOURCE TEXT between the triple quotes, so it checked the escapes as typed
   while the app served them INTERPRETED — a page nobody was ever served.
   node --check on that text says OK.

Fixes:
* buildMetricButtons() emits data-metric attributes and the row gets ONE
  delegated click listener. No inline handlers, so no quote escape can break
  the page again — and the wiring is testable.
* The gate now reads PAGE_HTML with ast.literal_eval: the string Python
  actually serves. Proof it works: with the new gate, the pre-fix source FAILS
  node --check for both apps; the fixed tree passes.
* The stub element gained stateful attributes and addEventListener/__fire, so
  the harness can prove a click reaches setTrendMetric (and that a miss does
  nothing).
* The chart harness's "series name is the chart title" assertion now compares
  against the shared definition instead of a title that no longer exists.

Found by rendering the served page in a real browser, which is the only check
that could have caught it: the console said
  Uncaught SyntaxError: Unexpected identifier 'setTrendMetric' @802:24
2026-11-13 21:14:03 +00:00
inference-admin 88bf95ed27 manifest: pin to admin-panel:20261113-fba50e3
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-13 21:02:58 +00:00
inference-admin fba50e3f93 Trends: one chart area for every metric, Money included, drawn by the shared module
ci/woodpecker/push/woodpecker Pipeline failed
Money was its own tab with its own renderers (renderMoney, renderMoneyCumulative,
renderMoneyDaily, renderMoneyLegend), its own period and spend-mode toggles, and
its own titles. It is now a metric of Trends like the others: the definitions come
from CoOpChart.CHART_METRICS, the chart is drawn by the shared renderChart(), and
the Money tab is a shortcut into Trends with that metric selected.

Removed: TREND_CONF, trendVal, trendLabel, the four money renderers, the
period/spend-mode toggles (the single Period row governs every metric now) — 5.1k
chars of duplicate chart code. Added: METRIC_SOURCE (which fetch each metric
needs), buildMetricButtons() (buttons rendered from the shared list, so the panel
and dashboard describe the same charts in the same order), and the metric-aware
renderTrends() that delegates.

The daily token-spend view is now the shared "spend" metric — the same numbers the
metrics endpoint already served, so nothing is lost by dropping the second source.
No caption under the money chart, as before.

Harness rewritten for the new path (it drove renderMoney): invariants preserved —
2 cumulative polylines + single-point balance marker, shared tooltip host, legend
that IS the definition's series list, 5 ascending ticks with the top clearing the
max, 30-day slice. New: every shared metric has a button, and a metric with no
source says so instead of drawing another chart. Tests green (page JS, pins,
guest guard).
2026-11-13 20:55:59 +00:00