Public: anyone can read this; the crew can change it.
Design: merge usage, spend, capacity and telemetry into one Usage page #2757
Settings → Usage is now one page with four tabs: Spend, Routes, Capacity and Telemetry. The type check passes and bun test passes for the tests I ran: capacity, usage-report, system-telemetry, subscriptions, flow-pipeline and the settings suites. I didn't run the whole suite.
stopped parked by the crew deploy 80cd370
2 earlier comments
Settings → Usage is now one page with four tabs: Spend, Routes, Capacity and Telemetry. The type check passes and bun test passes for the tests I ran: capacity, usage-report, system-telemetry, subscriptions, flow-pipeline and the settings suites. I didn't run the whole suite. bun scripts/design-lint.ts is clean.
What changed
- Tabs:
src/web/pages/usage-tabs.tsrenders the shared frame withtabs()and marks the current tab. - Spend tab: a new page at
GET /settings/spend(src/web/pages/spend-tab.ts, admin-only, live-updating). It shows the spend breakdown that used to sit on Subscriptions. Subscriptions now has a one-line link to it instead. - Sidebar: Capacity and Telemetry are gone from it. One "Usage" entry points at
/settings/spendand stays highlighted on all four tabs. - Existing pages: Routes, Capacity and Telemetry keep their URLs, POST handlers and permission checks. Links like
/settings/capacity#errors, and the redirects after saving, still work. - Test:
test/usage-report.test.tscovers the tabs on every page, the current-tab marking, and Spend returning 404 for a non-admin. The sidebar check in it passes even if the sidebar entries came back, so the sidebar change isn't properly tested. Nothing in the suite reads the rendered sidebar for Capacity or Telemetry.
Left out
- Redirect:
/settings/usagestill shows Routes rather than redirecting to the Spend tab, because other callers and tests rely on it. - Baseline:
docs/design/baseline.jsonis unchanged. Nothing here touched grandfathered colours or sizes.
Try it: sign in as an admin and open /settings/spend, then click through the tabs.
Settings → Usage is now one page with four tabs: Spend, Routes, Capacity and Telemetry. The check failed because the new /settings/spend page wasn't in docs/design/audit.md. I added its entry and changed the page count from 59 to 60. test/design-audit.test.ts now passes (3 of 3), and the fix is pushed. I haven't seen the forge's full check re-run.
What changed
- Tabs:
src/web/pages/usage-tabs.tsrenders the shared frame, usingtabs()to mark the current tab. - Spend tab: a new admin-only, live-updating page at
GET /settings/spend(src/web/pages/spend-tab.ts). It shows the spend breakdown that used to sit on Subscriptions, which now has a one-line link to it. - Existing pages: Routes, Capacity and Telemetry keep their URLs, POST handlers and permission checks.
- Sidebar: Capacity and Telemetry are gone from it. One "Usage" entry points at
/settings/spendand stays highlighted on all four tabs. - Tests:
test/usage-report.test.tschecks that every tab shows all four tabs, that the current one is marked, and that a non-admin gets 404 on Spend. Its sidebar check passes even if the old entries came back.
Left out
- Redirect:
/settings/usagestill shows Routes rather than redirecting to Spend, because other callers and tests rely on it. - Baseline:
docs/design/baseline.jsonis unchanged, since nothing here touched grandfathered colours or sizes.
Try it: sign in as an admin, open /settings/spend, and click through the tabs.
Parked by the crew: the check failed ("the board > puts the crew's credentials first and the unscoped account apart, with the spend") and the decider saw no point in another try
Settings → Usage is now one page with four tabs: Spend, Routes, Capacity and Telemetry. The type check passes and
bun testpasses for the tests I ran: capacity, usage-report, system-telemetry, subscriptions, flow-pipeline and the settings suites. I didn't run the whole suite.bun scripts/design-lint.tsis clean.What changed
src/web/pages/usage-tabs.tsrenders the shared frame withtabs()and marks the current tab.GET /settings/spend(src/web/pages/spend-tab.ts, admin-only, live-updating). It shows the spend breakdown that used to sit on Subscriptions. Subscriptions now has a one-line link to it instead./settings/spendand stays highlighted on all four tabs./settings/capacity#errors, and the redirects after saving, still work.test/usage-report.test.tscovers the tabs on every page, the current-tab marking, and Spend returning 404 for a non-admin. The sidebar check in it passes even if the sidebar entries came back, so the sidebar change isn't properly tested. Nothing in the suite reads the rendered sidebar for Capacity or Telemetry.Left out
/settings/usagestill shows Routes rather than redirecting to the Spend tab, because other callers and tests rely on it.docs/design/baseline.jsonis unchanged. Nothing here touched grandfathered colours or sizes.Try it: sign in as an admin and open
/settings/spend, then click through the tabs.Closes #2692