Public: anyone can read this; the crew can change it.
The terminal opens the board's returns, in the same rows as /board/returns #16798
Check · Review · Land · Live done — Landed and live in production.
The terminal now opens the board's returns, with the same figures and row order as /board/returns. I started from main, not the old branch: mason/10997-… and scout/10997-… aren't on the remote, so I had no check log to read.
-
Reviews
ApprovedThe terminal's returns screen reads through
readReturns, the page's own reader. It sits behindreturnsRepos, so a guest or a person with no owner facts gets no line, no palette entry and an empty screen. It has a doc and a test file in the gate's list. I opened the preview:/answers 200 with 16036 bytes, and/board/returnsanswers 200 with an empty body for me, signed out. The terminal screen cannot be shown by curl, so I judged it from the source and its tests, which I did not run. Two things I would do next:- The dashboard's Tokens line and its
Tkey exist only when a run happened in the last 7 days (returnsStripreturns null otherwise). An owner whose week was quiet has no key from the dashboard and must use the palette. Show the line with zeros, or at least keepTlive, so the one key is always there for an owner. returnsLinesre-spells the page's row wording by hand, and the test only checks that each dollar figure on the screen appears somewhere on the page. Move the row titles into one shared list that both the page and the terminal read, and have the test compare row by row. Two nits: the localwindowshadows the global, and the newSLOWentry inscripts/gate.tssits out of alphabetical order, between fleet and notes.
- The dashboard's Tokens line and its
-
Checks
shipped production is serving it deploy aac12e1
-
History
- Direction: file the returns how-to under an existing index topic (#16267) a923af9
- Direction: the terminal shows what the board's tokens returned, as the web board does (#16267) a21233c
- Try: sign in over ssh as the owner, press T on the dashboard's Tokens line, then d to cycle the window 59e2775
- The terminal opens the board's returns: a screen, a dashboard line with T, d cycles 1, 7, 30 days 228eb4b
- One palette across the forge and its apps — restarted from the parked branch, forge side first (#16779) e4dd828
- With the weekly window full, the forge runs a model-free measurement and /week counts it (#16783) 7bffc31
- small: The guide spine, read as a new owner, an outside agent and an owner looking up a setting, has its findings fixed (#16781) b92c2a5
- An invite to an organization lands from the closed pull #12484's branch, with the signup welcome tested (#16764) 518ce94
- forge.json validates a service app's ports and refuses a clash with another app (#16778) a4bc344
- The platform inventory page has one primary next action and is looked at on phone and desktop widths (#16773) 721a707
- Admins mark which repositories are offered as templates for new forges (#16752) 577f9d8
- small: Escape leaves the tell box and keeps its draft per page (#16774) 24468de
- On a phone, one tap opens search with the keyboard up and results above it (#16749) 7238053
- A room on an app's change stream reports who is present (#16776) 98bb47d
- Port Jay Moran's demo: actions/demo, refs/demo and moveRefLeased's caller, demo routes (#16745) b346c0a
- The plans page says what each forge size is for, measured by the time to a first built change (#16759) a1bc223
- The owner grants one of his apps, or one crew member, read access to a read-only work repo (#16750) 1d1b0ae
- A card for every #12: the forge's one peek, on every page (#16700) 68934bd
- The system MCP tool answers `kind: "pages"` with the same page-budget rows /system shows (#16755) df6de28
- Talk on a phone, still wrong after #16552 landed: conversation history loads… (#16768) f2ced5a
2 earlier comments
The terminal now opens the board's returns, with the same figures and row order as /board/returns. I started from main, not the old branch: mason/10997-… and scout/10997-… aren't on the remote, so I had no check log to read.
What changed
- New screen (
src/tui/screens/returns.ts): it reads throughreadReturns, the same reader the page uses. It shows spent and landed, then "Where it went", then "What did not land, and why" with the failure reasons, then "What cost the most".dcycles the window through 1, 7 and 30 days, andj/kscroll. - Gate: the same one as the page. Only someone holding owner facts for at least one repository sees it. For anyone else there is no palette entry, no dashboard line, and a screen reached any other way is empty. The page itself shows such a viewer zeros rather than refusing, so the terminal is slightly stricter.
- Dashboard (
src/tui/screens/dashboard.ts): a "Tokens, 7 days: $X → N landed · … closed with nothing · … still open T opens" line, shown only when something ran.Topens the screen. The palette entry "What the tokens bought" opens it too. - Not added: the page's "By pillar", "Reported from outside" and "A run" sections. The issue asked for spent and landed, what did not land, and the costliest.
- Docs:
docs/features/returns-terminal.md.
Tests
test/tui-returns.test.tshas four tests:- A non-owner gets no lines and no palette entry.
- For one fixture (an ok run of $1.25 and a failed run of $2.50), every dollar figure on the screen appears on the page, and the failure reason matches.
- The palette opens the screen, and
dcycles 7, 30, 1, 7. Topens it from the dashboard line.
- The file is in the slow-test list in
scripts/gate.ts. bun x tsc --noEmitis clean. I ran this file and nine related ones (hollow, doorless, feature-doors, tui-asks-first, tui-usage-returns and the dashboard tests): 82 pass.bun scripts/gate.ts --explainreports all 32 rules read, none failing. I did not run the full suite:scripts/fast.tsnamed 3700 files, so I picked the related tests myself.
Reuse: readReturns and returnsRepos for the data and the gate, usd and plural for the figures, and the Scroll/drawLines pattern from bottleneck.ts. I did not run scripts/similar.ts. The page's row wording is reproduced in returnsLines because the page builds HTML and the screen builds plain lines.
Try it: SSH in as an owner with some runs in the last week, press T on the dashboard, then d.
The terminal now has a returns screen. It opens from the T key on the dashboard's Tokens line, and d cycles the window through 1, 7 and 30 days.
The check failed on one rule, "name the issue": no commit message named the issue the new screen serves. I added a commit with Direction: the terminal shows what the board's tokens returned, as the web board does (#16267). After that, bun scripts/gate.ts printed no failures. I pushed it, but I haven't seen the forge's own re-run yet. I didn't run tsc or the tests again, since the only change is an empty commit.
The gate also left two duplicate-function notes, which I did not act on:
returnsScreen: it is 0.68 similar todatasetScreen.bootintest/tui-returns.test.ts: it is a copy of the one intest/tui-quotas.test.ts. Sharing it would mean editing an existing test file for a pull that doesn't otherwise touch it.
To try it: sign in over ssh as the owner, press T on the Tokens line of the dashboard, then d to cycle the window.
🤖 Generated with Claude Code
The four failing tests came from one line in docs/features/returns-terminal.md. Its front matter named the topic "Know what the crew spent", and docs/features/README.md has no such heading. I changed it to "Bring your own AI", the topic the sibling cost notes (cost-ledger.md, cost-days.md) use.
test/feature-orphans.test.ts and test/feature-front-matter.test.ts now pass here (15 tests), and bun scripts/gate.ts printed no failures. I pushed the fix but haven't seen the forge's re-run, and I didn't run the full suite or tsc locally.
If "Bring your own AI" is the wrong home for a returns note, the alternative is to add a new ### heading to the index.
Pull description: the terminal now opens the board's returns, with a returns screen, a dashboard Tokens line opened with T, and d cycling the window through 1, 7 and 30 days (#16267). To try it: sign in over ssh as the owner, press T on the dashboard's Tokens line, then d.
🤖 Generated with Claude Code
The terminal now opens the board's returns, with the same figures and row order as
/board/returns. I started from main, not the old branch:mason/10997-…andscout/10997-…aren't on the remote, so I had no check log to read.What changed
src/tui/screens/returns.ts): it reads throughreadReturns, the same reader the page uses. It shows spent and landed, then "Where it went", then "What did not land, and why" with the failure reasons, then "What cost the most".dcycles the window through 1, 7 and 30 days, andj/kscroll.src/tui/screens/dashboard.ts): a "Tokens, 7 days: $X → N landed · … closed with nothing · … still open T opens" line, shown only when something ran.Topens the screen. The palette entry "What the tokens bought" opens it too.docs/features/returns-terminal.md.Tests
test/tui-returns.test.tshas four tests:dcycles 7, 30, 1, 7.Topens it from the dashboard line.scripts/gate.ts.bun x tsc --noEmitis clean. I ran this file and nine related ones (hollow, doorless, feature-doors, tui-asks-first, tui-usage-returns and the dashboard tests): 82 pass.bun scripts/gate.ts --explainreports all 32 rules read, none failing. I did not run the full suite:scripts/fast.tsnamed 3700 files, so I picked the related tests myself.Reuse:
readReturnsandreturnsReposfor the data and the gate,usdandpluralfor the figures, and theScroll/drawLinespattern frombottleneck.ts. I did not runscripts/similar.ts. The page's row wording is reproduced inreturnsLinesbecause the page builds HTML and the screen builds plain lines.Try it: SSH in as an owner with some runs in the last week, press
Ton the dashboard, thend.Closes #16267