Public: anyone can read this; the crew can change it.
The board shows each subscription's window and each app's units per shipped change #381
Check · Review · Land · Live done — Landed and live in production.
The board (`/board`) now shows every subscription's 5-hour and weekly window to a site admin, and each app card in Today shows what a shipped change cost over the last 7 days. Neither adds a query per row. The full `forge.json` check passes (`tsc` clean, every shard 0 fail).
shipped production is serving it deploy a5415ba
Sign in to join this conversation.
new above
offline
The board (
/board) now shows every subscription's 5-hour and weekly window to a site admin, and each app card in Today shows what a shipped change cost over the last 7 days. Neither adds a query per row. The fullforge.jsoncheck passes (tscclean, every shard 0 fail).Subscription windows. These sit in a new strip,
windowsStripinsrc/web/pages/board.ts, under the forge-health strip. Only site admins see it, because the subscriptions belong to them. It updates itself onrun.*events. For each window it shows:The text comes from a new
windowWordsinsrc/web/studio/words.ts, as the issue asked.Reading many accounts at once.
src/core/standing.tsgainsstandings(db, ids, now). It reads all accounts in three statements: the kept-for-people share, the provider's last limit messages, and one usage-ledger read starting at the earliest point any account needs. Each account still only counts ledger rows from its own start point, so its figures are the same as before.standing()now just calls it with one id. I also switched the subscriptions settings page and the usage action/API (src/actions/usage.ts) to it, since both were reading one account at a time.Spend per shipped change. The new
src/core/efficiency.tshasefficiencyForRepos. It is one grouped query that adds the ledger's spend to the count of pulls merged in the window. The ratio is null when nothing shipped. The card then reads "$4.10 spent, nothing shipped this week" instead of a divide-by-zero, and the wording comes fromperShippedWords. Today used to list only apps that run on their own. It now also lists apps the crew spent on this week, so those apps get the figure too.Choices to look at:
run.cost_usd, so the two can differ slightly. I did not merge them.autonomyStatus, today's runs and shipped count) are unchanged. Only the new readings are grouped.Tests. The new
test/board-windows.test.tsis added to the check inforge.json. It covers:efficiencyForReposagainst a hand sum: ($1.00 + $2.50) ÷ 2 merges = $1.75, ignoring spend and merges from before the window and an open pull, in exactly one statement;standingsgiving the same result as reading each account alone, in three statements for one account or four;docs/STUDIO.md's board section describes both readings. To try it, sign in as an admin, add a subscription under Settings → Subscriptions, let the crew run on it, then open/board.🤖 Generated with Claude Code
Closes #374