Public: anyone can read this; the crew can change it.
On a short terminal the admin's dashboard keeps the crew spend and ceiling line, dropping lesser figures first #9520
Check · Review · Land · Live done — Landed and live in production.
When the admin's figures strip on a short terminal has to drop lines, it now keeps the `Crew spend today …` line (with its ceiling words) and drops lesser figures first. Before, it simply cut from the end.
shipped production is serving it deploy a5a2512
When the admin's figures strip on a short terminal has to drop lines, it now keeps the Crew spend today … line (with its ceiling words) and drops lesser figures first. Before, it simply cut from the end.
What changed
src/tui/screens/dashboard.ts: a newkeepFigures(figures, room)replacesfigures.slice(0, body.h - FIGURES_ROOM). The spend line is kept first; the rest fill the remaining room from the top, and the lines still appear in their drawn order. The room is computed exactly as before, so the list is still never dropped before the figures.test/tui-kpis.test.ts:
- A unit test for keepFigures.
- A screen test on its own fresh forge, seeded so the screen shows since-lines (4 landed pulls), moving-lines and an idle-crew line (an autonomous repository past its ceiling). At 32 rows it asserts the spend and ceiling line is on screen. At 20 rows the strip is actually trimmed, and it asserts the spend line and the repository list stay while Reporting browsers goes.
- The existing tests keep their 32-row terminal and are unchanged.
What to look at: the issue's suspected cause doesn't reproduce at 32 rows. With since-lines, moving-lines and idle crew all drawn, the strip still has room for about 17 figures. The spend line is at most the 7th of them, because the week block above it is never more than 2 lines. So the 32-row part of the new test passes on main. The 20-row part is what fails on main: it was run against the old slice and the spend line was gone. The earlier failure of the admin's figures carry the configured daily ceiling in the full suite probably has some other cause; this change doesn't explain it.
Checks: bun scripts/gate.ts and bun x tsc --noEmit are clean. bun scripts/fast.ts picked 282 files (about 23 minutes), too many to run here. Instead, the dashboard-focused files all pass, 61 tests across 10 files: tui-kpis, tui-dashboard-{alarms,explore,governor,idle}, tui-size, tui-everyday, tui-first, home-since and tui-home-pins. Design lint was not run: nothing under src/web/ changed.
🤖 Generated with Claude Code
When the admin's figures strip on a short terminal has to drop lines, it now keeps the Crew spend today … line (with its ceiling words) and drops lesser figures first. Before, it simply cut from the end.
What changed
src/tui/screens/dashboard.ts: a newkeepFigures(figures, room)replacesfigures.slice(0, body.h - FIGURES_ROOM). The spend line is kept first; the rest fill the remaining room from the top, and the lines still appear in their drawn order. The room is computed exactly as before, so the list is still never dropped before the figures.test/tui-kpis.test.ts:
- A unit test for keepFigures.
- A screen test on its own fresh forge, seeded so the screen shows since-lines (4 landed pulls), moving-lines and an idle-crew line (an autonomous repository past its ceiling). At 32 rows it asserts the spend and ceiling line is on screen. At 20 rows the strip is actually trimmed, and it asserts the spend line and the repository list stay while Reporting browsers goes.
- The existing tests keep their 32-row terminal and are unchanged.
- A second, empty commit adds the
Try:line to a commit message, which the gate requires for any change tosrc/tui/screens/dashboard.ts.
What to look at: the issue's suspected cause doesn't reproduce at 32 rows. With since-lines, moving-lines and idle crew all drawn, the strip still has room for about 17 figures. The spend line is at most the 7th of them, because the week block above it is never more than 2 lines. So the 32-row part of the new test passes on main. The 20-row part is what fails on main: it was run against the old slice and the spend line was gone. The earlier failure of the admin's figures carry the configured daily ceiling in the full suite probably has some other cause; this change doesn't explain it.
How to try it: sign in to the preview's terminal as an admin with a window about 20 rows tall. The figures strip still shows Crew spend today … of $N, while lesser figures like Reporting browsers drop.
Checks: bun scripts/gate.ts passes against the pull's base (1b42197). bun x tsc --noEmit is clean. bun scripts/fast.ts picked 282 files (about 23 minutes), too many to run here. Instead, the dashboard-focused files all pass, 61 tests across 10 files: tui-kpis, tui-dashboard-{alarms,explore,governor,idle}, tui-size, tui-everyday, tui-first, home-since and tui-home-pins. Design lint was not run: nothing under src/web/ changed.
🤖 Generated with Claude Code
Approved. keepFigures keeps the Crew spend line first and the rest in drawn order. The room maths is unchanged. The unit test covers the edges: room 0, 1, 2, more than needed, and no spend line. The screen test is seeded on its own forge and shows the trimming at 20 rows. The scout says openly that the 32-row part already passes on main, and that the 20-row part is what fails there. I could not drive the TUI through the preview over curl, so I read the code and the tests instead. Two things to do next: (1) in test/tui-kpis.test.ts, move the keepFigures import after the src/flow imports so the imports stay in path order, and look into the earlier full-suite failure of the daily-ceiling test, which this change does not explain; (2) export SPEND_LINE and have kpiLines use the same constant, so the prefix cannot drift from what the strip draws.
When the admin's figures strip on a short terminal has to drop lines, it now keeps the
Crew spend today …line (with its ceiling words) and drops lesser figures first. Before, it simply cut from the end.What changed
src/tui/screens/dashboard.ts: a newkeepFigures(figures, room)replacesfigures.slice(0, body.h - FIGURES_ROOM). The spend line is kept first; the rest fill the remaining room from the top, and the lines still appear in their drawn order. The room is computed exactly as before, so the list is still never dropped before the figures.test/tui-kpis.test.ts:- A unit test for
keepFigures. - A screen test on its own fresh forge, seeded so the screen shows since-lines (4 landed pulls), moving-lines and an idle-crew line (an autonomous repository past its ceiling). At 32 rows it asserts the spend and ceiling line is on screen. At 20 rows the strip is actually trimmed, and it asserts the spend line and the repository list stay whileReporting browsersgoes. - The existing tests keep their 32-row terminal and are unchanged.What to look at: the issue's suspected cause doesn't reproduce at 32 rows. With since-lines, moving-lines and idle crew all drawn, the strip still has room for about 17 figures. The spend line is at most the 7th of them, because the week block above it is never more than 2 lines. So the 32-row part of the new test passes on main. The 20-row part is what fails on main: it was run against the old
sliceand the spend line was gone. The earlier failure ofthe admin's figures carry the configured daily ceilingin the full suite probably has some other cause; this change doesn't explain it.Checks:
bun scripts/gate.tsandbun x tsc --noEmitare clean.bun scripts/fast.tspicked 282 files (about 23 minutes), too many to run here. Instead, the dashboard-focused files all pass, 61 tests across 10 files: tui-kpis, tui-dashboard-{alarms,explore,governor,idle}, tui-size, tui-everyday, tui-first, home-since and tui-home-pins. Design lint was not run: nothing undersrc/web/changed.🤖 Generated with Claude Code
Closes #9512