Members · Requests · Spend · Money · Energy · Carbon. The titles were carrying
the unit ('Requests per day', 'Token spend per day') while the axis already
labels the unit, so the menus read long and the two apps said different things
in different places. The aria label still reads '<title> over time'.
The two UIs shared only the drawing primitives, so the same five metrics shipped
with different titles AND different kinds (the panel's "Spend per day" was the
dashboard's "What the co-op spent (members + the co-op's own accounts)"), and
Money was a whole separate tab with four renderers of its own.
CHART_METRICS is now the one place a chart is described — id, title, kind
(line|bar|multi), axis rule, value formatter, series — and renderChart() draws any
of them, registering the exact tooltip values and breaking lines at NULLs as
before. Money is a metric like the others (a "multi" chart: cumulative revenue,
cumulative token spend, and the OC balance as a gap before snapshots began).
fmtMoney/fmtMetric/fmtMoneyTick are shared so labels cannot drift.
Each app keeps what legitimately differs: its data source, its toggle classes, its
empty-state markup, its DOM. Nothing identifying belongs in this list.
Hand-rolled chart rendering + exact-value hover tooltips as ONE module
(no library, no CDN): tooltip machinery, niceStep (count vs 1/2/5 x 10^k),
measured runs (NULL stays a gap), frame/date-marks/bars/lines/hover-targets.
Byte-identical copies ship in admin-panel and member-dashboard (app/coop_chart.js),
pinned by tests/test_chart_sync.py in each; check-chart-sync.py is the
pre-deploy gate, sync-chart-module.sh re-copies + re-pins both apps.
Vendored check-page-js.sh (skill copy + both apps) now splices the module
into the extracted page JS exactly as the apps do at import time.