Commit Graph
24 Commits
Author SHA1 Message Date
inference-bot daf8fbe471 charts: add Energy and Carbon (co-op/support#26)
Two more metrics on the same chart, from the portal's new energy_wh and co2e_g
daily columns.

- Energy in watt-hours, carbon in grams CO2e, both for the day shown.
- Continuous metrics use the 1/2/5 axis rule (not the integer rule reserved for
  counts), so energy ticks read 500 Wh rather than being rounded to whole
  people-style numbers.
- Labels carry units, so a reader never has to guess what the axis measures.
- Same measured-vs-estimated provenance as the data layer: GreenPT models use
  facts fitted from their own impact API, everyone else a labelled proxy. The
  docs page on estimation is still to be written; the factor table and its
  sources are in metrics_snapshot.py.

Harness extended: one bar per measured day for each, no NaN in markup, and axis
labels matching ^[\d,]+(\.\d+)? (Wh|g)$ so a unit prefix or a forced integer
axis fails the build.
2026-10-28 04:36:42 +00:00
inference-bot a71271e35c 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.
2026-10-28 04:23:50 +00:00
inference-bot 8e8cb90d11 dashboard: "The co-op over time" chart in the Co-op usage view
Members asked for charts to share with the co-op. This is the member-facing
half of it, in the view where co-op-wide data already lives.

- /api/metrics proxies the portal's new /broker/metrics (aggregate, non-personal:
  co-op size, requests served, spend). No per-member figure is fetched.
- Same chart as the admin panel's Trends tab: inline SVG, no library, no CDN,
  colours from the shared palette vars. Members / Requests / Spend, and
  30 / 90 / all time, re-rendered client-side without refetching.
- Lazy: loads the first time someone opens the co-op view, so the dashboard's
  initial load is unchanged.
- Gaps stay gaps. A day never measured breaks the line rather than reading as
  zero members, with the sub-line saying how many days are missing.
- Integer y-axis for people and requests; 1/2/5 money ticks, per the panel fix.

Verified with the same node harness used for the panel (shared, so it asserts
the same invariants against the live series).
2026-10-28 04:15:42 +00:00
Inferencebot 2dee1ea71d fmtMoney: snap |n| < half a cent to exact 0 — kills $-0.00 from float-residue spend 2026-10-19 12:05:51 -06:00
Inferencebot 9cc636dd99 Co-op usage: sort by cost (default) or requests; uniform rank badges (no special #1 styling) 2026-10-19 11:08:27 -06:00
Inferencebot cdff951594 Matrix card: concise redesign per Nathan — 'Current Matrix ID' display, 'Use @local' button when on an external ID, 'Use external account' reveals a validated field; no my/your mixing 2026-10-19 11:03:18 -06:00
Inferencebot 88bda332c3 dashboard: show the member's registered Matrix ID prominently (registered box + notes), surface load errors, add 'Use my co-op account instead' clear button 2026-10-19 10:48:47 -06:00
inference-bot 1242024cc7 Matrix card: clear invite-confirmation UX when saving an external MXID 2026-10-12 09:01:27 -06:00
inference-bot 6627bf0793 Balance view shows credits LEFT (remaining); all-time total in meta line 2026-10-03 13:59:32 -06:00
inference-bot 92158da5ea Dashboard: Matrix chat card — self-serve one extra federated MXID below API keys 2026-10-03 10:48:18 -06:00
inference-bot 98f829b65a Remove all-time tokens stat (all-time spend + requests cover it) 2026-10-01 16:12:28 -06:00
inference-bot e32710f9a6 Dashboard: all-time total spend stat (labeled, sits with the other all-time figures) 2026-10-01 16:08:19 -06:00
inference-bot 14a42b0cbb Leaderboard: single period note at top ('last 30 days'); rows just request counts 2026-10-01 15:57:38 -06:00
inference-bot 7539516c4e Dashboard: current vs all-time labels; leaderboard = last 30 days with total spend (not sub-cent cost/request) 2026-10-01 15:52:47 -06:00
inference-bot 4be4dc4d03 Usage: My usage / Co-op usage mode switch; leaderboard strict descending + cost per request; docs link; drop explainer text 2026-10-01 15:47:59 -06:00
inference-bot d09bc8a9c6 Dashboard: 'Popular in the co-op' model leaderboard (ranked bars, aggregate requests) 2026-10-01 15:38:11 -06:00
inference-bot 112e9ca1fc Mobile layout: responsive breakpoints for header, stats grid, model rows, key tokens, new-key form 2026-09-29 22:01:54 -06:00
inference-bot 4540746da2 Logout: clear session + explicit logged-out page (Cloudron has no RP-initiated logout; silent re-auth was the bug) 2026-09-29 21:53:59 -06:00
inference-bot 095d01ca8a Show allowance vs credits buckets and allowance reset date 2026-09-27 22:40:46 -06:00
inference-bot 5d63e0d54e Add .gitignore (exclude __pycache__/bytecode) 2026-09-27 11:15:08 -06:00
inference-bot 364d618d1f Show key fingerprint instead of full token; reveal key once inline on create 2026-09-24 08:00:07 -06:00
inference-bot 7c7f8840c3 Phase 4: remove proxyAuth header fallback — identity only from OIDC session 2026-09-23 14:14:59 -06:00
inference-bot 506eced854 Phase 2: swap proxyAuth -> oidc addon in manifest 2026-09-23 14:07:18 -06:00
inference-bot 91ac38e534 Phase 1: add OIDC client with proxyAuth header fallback
Replicates the admin-panel OIDC pattern: redirect/callback/token exchange
(client_secret_post) / JWKS validate / signed session cookie. get_user_identity()
prefers the OIDC session and falls back to the proxyAuth header. Adds /logout
route (was previously only a link). No manifest change yet.
2026-09-23 14:06:08 -06:00