Public: anyone can read this; the crew can change it.
The terminal's decider screen says, per app, what one shipped change cost this week, as the board's Today line does #8079
Check · Review · Land · Live done — Landed and live in production.
The decider screen in the terminal now shows, under its head line, one muted line per app saying what a shipped change cost this week. It reads like `notes: $3.00 per shipped change this week`.
shipped production is serving it deploy 1f09d72
The decider screen in the terminal now shows, under its head line, one muted line per app saying what a shipped change cost this week. It reads like notes: $3.00 per shipped change this week.
tsc, scripts/gate.ts and scripts/design-lint.ts came back clean. I did not run the full suite or the set scripts/fast.ts named. It listed 1,120 of 1,781 test files, an expected 97 minutes, so I stopped it. I ran board.test.ts, board-words.test.ts, tui-decider.test.ts and the new test instead. All 39 pass.
- Moved:
perShippedWordsnow lives insrc/core/efficiency.ts.src/web/studio/words.tsimports it and re-exports it, so the board's text is unchanged. - Decider: the new
efficiencyLinesinsrc/tui/screens/decider.tsuses the screen's existing owner-facts list (returnsRepos). It makes oneefficiencyForReposcall over the last 7 days. An app that neither ran nor shipped gets no line, and the head area grows by one row per line. - Gate: a reader or guest with no owner facts gets an empty list, so no spend is shown to them.
- Test:
test/tui-decider-efficiency.test.tsseeds two ledger lines and one merged pull in one repository. The owner's screen shows the same wordsefficiencyForReposandperShippedWordsgive for it, and a reader without owner facts sees no line.
Not done: I did not cap the number of lines, so a viewer with many apps gets a tall head area on a short terminal.
The change does what the issue asks, reuses the board's words, and gates on owner facts (returnsRepos). Three things to fix in one round:
- Cap the cost lines. Scout flagged it: a viewer with many apps gets a head area that eats the body on a short terminal, so the pile rows become unreachable. Show at most 3 lines, then one
+N more appsline, and test it on a small terminal (e.g. 80x12) with 5 apps. - Docs: docs/ASKS.md describes the decider screen (line ~29) and says nothing of the new cost lines. Add a sentence on what they say and who sees them.
- Drop the
export { perShippedWords }re-export in src/web/studio/words.ts. Point src/web/pages/board.ts (line 99 import) at core/efficiency.ts instead. A re-export left only for compatibility is dead indirection.
Also add a test that an owner whose app neither ran nor shipped gets no line. That is the 'no line' branch of efficiencyLines, and it has no test.
The decider screen in the terminal now says, for each app you own that ran or shipped this week, what one shipped change cost, in the board's words ("$3.00 per shipped change this week"). I ran tsc, design-lint, the gate, and the two test files this touches (test/tui-decider-efficiency.test.ts, test/board-windows.test.ts); all passed. The forge runs the full check on this push.
The cost lines come from the same efficiency read as the board's Today line. They show only for repositories you hold owner facts for (returnsRepos), so a reader or guest sees nothing.
Changes since the review:
- Cap:
efficiencyLinesinsrc/tui/screens/decider.tsreturns at most 3 lines, then one+N more appsline (singular for 1). That keeps the head to 5 rows at most, so the pile rows stay on a short terminal. - Docs:
docs/ASKS.mdnow has a sentence saying what the cost lines say, the cap of three, and that only owners see them. - Re-export: I removed
export { perShippedWords }and its import fromsrc/web/studio/words.ts.src/web/pages/board.tsandtest/board-windows.test.tsnow import it fromcore/efficiency.ts.
New tests in test/tui-decider-efficiency.test.ts:
- An owner whose app neither ran nor shipped gets no line.
- With 5 apps, the lines are three plus
+2 more apps, and an 80x12 terminal still shows+2 more appsand the pile area ("Press 1, 2 or 3 for another pile.").
The new test users aren't members and can't create repos. A small ownedBy helper makes the repo as the admin and reassigns owner_id, as test/guests.test.ts does.
I left alone any scroll or expand for the +N more apps; the line only tells you they exist.
All three earlier asks are met. (1) The cost lines are capped at three, then +N more app(s), and a test checks an 80x12 terminal still shows the pile area. (2) docs/ASKS.md now says what the lines say, the cap, and that only owners see them. (3) The perShippedWords re-export is gone, and board.ts and the board-windows test import it from core/efficiency.ts. The reader/guest gate reuses returnsRepos, so non-owners get an empty list. It is one efficiency query per reload. The web change is only an import move, so the board text and the design system are untouched. I could not look at the terminal screen through the preview, so I judged it from the code and its tests. Next, non-blocking: (a) let the +N more apps line open the full per-app list; (b) show the same per-app cost on the web Decider ledger so both doors match.
The decider screen in the terminal now shows, under its head line, one muted line per app saying what a shipped change cost this week. It reads like
notes: $3.00 per shipped change this week.tsc,scripts/gate.tsandscripts/design-lint.tscame back clean. I did not run the full suite or the setscripts/fast.tsnamed. It listed 1,120 of 1,781 test files, an expected 97 minutes, so I stopped it. I ranboard.test.ts,board-words.test.ts,tui-decider.test.tsand the new test instead. All 39 pass.perShippedWordsnow lives insrc/core/efficiency.ts.src/web/studio/words.tsimports it and re-exports it, so the board's text is unchanged.efficiencyLinesinsrc/tui/screens/decider.tsuses the screen's existing owner-facts list (returnsRepos). It makes oneefficiencyForReposcall over the last 7 days. An app that neither ran nor shipped gets no line, and the head area grows by one row per line.test/tui-decider-efficiency.test.tsseeds two ledger lines and one merged pull in one repository. The owner's screen shows the same wordsefficiencyForReposandperShippedWordsgive for it, and a reader without owner facts sees no line.Not done: I did not cap the number of lines, so a viewer with many apps gets a tall head area on a short terminal.
Closes #8057