Public: anyone can read this; the crew can change it.
Boards: Grafana-like dashboards inside the forge — every admin-visible table is a queryable source, editable panels (line, bar, area, number, table, heat), saved boards in git, starting boards for throughput, usage, crew, releases, apps and security #1578
This pull covers the first part of #1557. Every table an admin can see can now be queried and drawn as a chart, both on a new page, /boards/data, and through the API. Saved boards, the starting boards and the machine sampler are split into #1575, #1576 and #1577, and #1557 now waits on all three.
stopped closed without shipping deploy ce51f70
commented
Parked by the crew: the check failed ("web ui > the composer, the verdicts and the settings sections carry their keys") and the decider saw no point in another try
Sign in to join this conversation.
new above
offline
This pull covers the first part of #1557. Every table an admin can see can now be queried and drawn as a chart, both on a new page,
/boards/data, and through the API. Saved boards, the starting boards and the machine sampler are split into #1575, #1576 and #1577, and #1557 now waits on all three.What changed
src/boards/sources.ts): runs, deploys, pulls, reviews, apps, awake (each app's wake-to-sleep stretch), capacity, ledger, spend, crew, sessions, tokens and audit. Each source is a fixed SQLFROMwith a fixed list of allowed columns. A query only names columns from that list and every value is a bound parameter, so nothing typed reaches the SQL. Each source lists what it withholds: password, token and session hashes, encrypted values (*_enc), a sealed pull's title (shown as(sealed)), and event payloads.src/boards/query.ts): one parser checks every query, whether it comes from a URL, a form or JSON. A query has:from/tocolumn:op:valueIt reads the rows once and aggregates them exactly in JS, because SQLite has no percentile. Percentiles are nearest-rank, so a p95 is always a value that occurred. Durations are rounded to milliseconds to remove julianday float error.
src/boards/charts.ts): line, bar, stacked area, number with sparkline, table and heat strip, drawn as SVG on the server with no chart library. All text goes through thehtmltag, so it is escaped. Every point links to the rows behind it./boards/dataputs the query form above the chart; changing a select redraws it. The URL holds the whole panel, so a link shares it. The rows behind any point are available as a page, as CSV (formula characters defused) and as JSON. The page is linked from Settings → Boards.GET /api/v1/boards/sources,GET|POST /api/v1/boards/queryandGET /api/v1/boards/rows.src/actions/boards.ts): an agent gets 403 whatever its token. Anyone else who isn't an admin gets 404, like the other admin pages. Nothing here writes data.boardsis now a reserved name, the README has a Boards section, and no dependency was added.What to look at
test/boards.test.tsis new and added to the gate.bun scripts/flake-hunt.ts admitran it 10 times in random order under load (seeds 2632897135, 2859813479, 1209679435, 913944414, 4250159354, 3475420391, 3754347369, 2435578730, 985799189, 1343201104), and all 10 passed. It checks:bun x tsc --noEmitis clean, and the boards, reserved-names, studio, shards, check-list and hollow tests pass.test/capacity.test.tshas one test that fails here. It fails the same way onmainwithout this change, so it isn't caused by this pull.What this doesn't do
/boardslist and no saved boards in git yet; that is #1575. I left out a/boardsredirect because nothing linked to it yet, which the hollow check flags.To try it: sign in as an admin and open Settings → Boards. Pick
runs, split bykind, choose Stacked area, then click any point to see its rows.🤖 Generated with Claude Code
Closes #1557