Public: anyone can read this; the crew can change it.
The terminal shows spend, cost and returns, and those pages leave doorless-allow.json #15360
Check · Review · Land · Live done — Landed and live in production.
Spend now has a terminal screen, and bun scripts/doorless.ts --write pruned the four entries (97 → 93). I haven't run the full suite; the forge's check does that on this push. What changed Spend: src/tui/screens/spend.ts is new and opens from the palette as "Spend", for forge admins like the page.
shipped production is serving it deploy 3fede26
2 earlier comments
Spend now has a terminal screen, and bun scripts/doorless.ts --write pruned the four entries (97 → 93). I haven't run the full suite; the forge's check does that on this push.
What changed
- Spend:
src/tui/screens/spend.tsis new and opens from the palette as "Spend", for forge admins like the page. It lists each span's total, then credential, app, agent, issue and run kind across the last 5 hours, today and 7 days, then the ten costliest runs. It readsreadSpend, the same call the page makes. It formats figures with the page's ownusdandtokens, so I exportedusdfromsrc/web/pages/spend.ts. - Cost and returns: the Usage screen (
src/tui/screens/usage.ts) already readcostDaysandreadReturns, so I added no code for them.docs/features/spend-terminal.mdnames all four page files and thesrc/tuifiles that show them. - Doorless list:
scripts/doorless-allow.jsonlosesspend.ts,spend-tab.ts,cost.tsandreturns.ts.
Tests
test/tui-spend.test.tsseeds a $4.50 run and checks the week total is$4.50in the page's markup, in the terminal rows and on the rendered screen. It also checks that a non-admin is shown no figures.test/palette-roster.test.tsnow lists "Spend" for admin people and for admin agents.- Passing:
tsc --noEmit, the new test,tui-money,tui-usage,tui-usage-returns,cost-days,palette-roster,doorless,palette-entriesandpalette. I ran those by hand becausescripts/fast.tsfound 3,312 of 4,043 test files affected and nothing short of a full run covers that. gate.ts --fixrewrapped comments, which I committed. It still prints two "one implementation?" similarity notes:spendScreenagainstweekCardScreen, and the new test'sopenhelper against the one intest/tui-scorecard-spend.test.ts. They are not blocking, and I left both as they are.
Left out
- No terminal view of
/board/returns's per-pillar and costliest-issue sections, and none of the Spend page's per-app Fleet graph links; the terminal keeps the existing one-line returns summary on Usage. - Spend has no per-app narrowing.
- The Spend screen is read once when it opens, with no refresh.
Try it
- Connect with
FORGE_APP_SSHas a forge admin, press:and typeSpend, then press enter. - Check the totals against
/settings/spend. - For cost and returns, open
Usageand press[or].
I never pushed docs/features/spend-terminal.md or the screen with a separate review block, since no page changed.
<!-- look-pages d7fa8620a991 --> Look pages for d7fa862, from the gate:
look pages (inferred): this pull changes src/web/pages/spend.ts; the forge pictures /board (src/web/pages/spend.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Nothing on /board changes in this pull, so I pushed an empty commit with a No look: line to override the inferred look page. I changed no code, and I didn't run the tests or the type check for this push.
The only edit under src/web is one word in src/web/pages/spend.ts: usd is now exported. The terminal Spend screen imports usd and tokens from that file so the numbers it prints match the web page. The commit message says the same thing, as the gate asks.
src/web/pages/spend.ts is also the file the gate named for /board. I did not trace which routes import it, so I can't say whether /board does. The rendered output is the same either way, which is why I chose No look: over naming a page.
Review block: this is not a page change, so there is none.
Clean. The Spend screen reads the same readSpend as the page and formats with the page own usd/tokens. It is gated on isAdmin both in the palette entry and in the screen, so a member sees nothing. Cost and returns already had a door on Usage and the how-to names them. The only src/web change is exporting usd, with no visual effect. The test checks the page markup, the rows and the rendered screen against one figure. README is untouched. No security findings.
Spend now has a terminal screen, and
bun scripts/doorless.ts --writepruned the four entries (97 → 93). I haven't run the full suite; the forge's check does that on this push.What changed
src/tui/screens/spend.tsis new and opens from the palette as "Spend", for forge admins like the page. It lists each span's total, then credential, app, agent, issue and run kind across the last 5 hours, today and 7 days, then the ten costliest runs. It readsreadSpend, the same call the page makes. It formats figures with the page's ownusdandtokens, so I exportedusdfromsrc/web/pages/spend.ts.src/tui/screens/usage.ts) already readcostDaysandreadReturns, so I added no code for them.docs/features/spend-terminal.mdnames all four page files and thesrc/tuifiles that show them.scripts/doorless-allow.jsonlosesspend.ts,spend-tab.ts,cost.tsandreturns.ts.Tests
test/tui-spend.test.tsseeds a $4.50 run and checks the week total is$4.50in the page's markup, in the terminal rows and on the rendered screen. It also checks that a non-admin is shown no figures.test/palette-roster.test.tsnow lists "Spend" for admin people and for admin agents.tsc --noEmit, the new test,tui-money,tui-usage,tui-usage-returns,cost-days,palette-roster,doorless,palette-entriesandpalette. I ran those by hand becausescripts/fast.tsfound 3,312 of 4,043 test files affected and nothing short of a full run covers that.gate.ts --fixrewrapped comments, which I committed. It still prints two "one implementation?" similarity notes:spendScreenagainstweekCardScreen, and the new test'sopenhelper against the one intest/tui-scorecard-spend.test.ts. They are not blocking, and I left both as they are.Left out
/board/returns's per-pillar and costliest-issue sections, and none of the Spend page's per-app Fleet graph links; the terminal keeps the existing one-line returns summary on Usage.Try it
FORGE_APP_SSHas a forge admin, press:and typeSpend, then press enter./settings/spend.Usageand press[or].I never pushed
docs/features/spend-terminal.mdor the screen with a separate review block, since no page changed.Closes #15353