Public: anyone can read this; the crew can change it.
The clock opens with the agent's book in one line: open deals, dollars under contract, closing this month, and closed this year with its sales volume #134
Check · Review · Land · Live done — Landed and live in production.
The clock now opens with a one-line book under its heading, for example "6 open · $2,410,000 under contract · 2 close in November · 3 closed this year, $1,180,000". It adds "(N without a price)" when any counted deal has no price.
shipped production is serving it deploy d2eada7
1 earlier comment · 1 event
The clock now opens with a one-line book under its heading, for example "6 open · $2,410,000 under contract · 2 close in November · 3 closed this year, $1,180,000". It adds "(N without a price)" when any counted deal has no price.
What changed
src/book.ts(new):tally(deals, on)turns plain deals into plain totals, andbookLineformats them withdollarsfromsrc/money.ts.
- It sums the deals the clock already loads, so there is no extra query. - Fell-through deals count in none of it, and a closed deal counts on its closing date. - "Closing this month" counts open deals only.
src/pages/clock.ts: the line sits under the summary, and each Closed line shows the price next to "closed Nov 2" when the deal has one.GET /api/book(src/routes.ts): the same totals as numbers, readable by anyone who can list deals.contract/openapi.jsonis regenerated so/openapi.jsondescribes it.- Docs: one sentence in the README walkthrough, and a line in
docs/TECHNICAL.md.
Tests
src/book.test.tscovers an empty book, a deal with no price, a fell-through deal, a deal that closed last year, and the month boundary.src/book.page.test.tschecks the line on the clock with the sample deals, and/api/bookagainst it.- I ran those with
src/speed.test.ts,src/openapi.test.tsandsrc/contract.test.ts, and all pass. bun scripts/lint-design.tsis clean.- I did not run
bun x tsc --noEmit: the repository has notsconfig.json, so it only prints the compiler's help. I did not run the whole suite either, since the forge runs it on push.
Choices
src/routes.tsalready imports abookfromics.ts, so my function is namedtally. The first version clashed with it silently, and/api/bookanswered{}.- The line counts the whole book, not the current Find or side narrowing.
- I added no dependency, no stored state and no permission change.
To try it
Open / signed in and read the line under "The clock". Then call GET /api/book.
Untracked dotfiles in the clone (.bashrc, .claude/ and others) were already there, and I did not commit them.
🤖 Generated with Claude Code
Two changes, both small. The line, the API and the unit tests look right; no contract cell is loosened (GET /api/book uses deal/list).
- Both doors: the terminal (src/terminal.ts, which already calls listDeals for the clock view) does not show the book line. Show bookLine(tally(...), today()) at the top of the terminal clock view, gated exactly as the list is, and add a test in src/terminal.test.ts.
- Tests: box 3 (price next to closed Nov 2 in the Closed card) has no test; reverting that clock.ts change would leave everything green. Add a page test with a closed deal that has a price and one that has none. Also test the (N without a price) note on the page.
Both changes from the review are in and pushed to the same branch.
Terminal. The terminal's clock view (d) now opens with the book line, bookLine(tally(...), today()), right under the heading. It is built from the same listDeals result as the list, so a refused read shows the refusal and no line. Nothing else on that screen moved.
Tests. A new src/book.closed.test.ts seeds two closed deals this year, one priced at $612,000 and one with no price. It checks:
- Closed card: the priced row reads
closed <day> · $612,000, and the unpriced row has no$. Dropping the price fromclock.tswould fail this test. - Without-a-price note: the clock's line ends with
(N without a price). - Terminal: the screen contains exactly the line
bookLinegives for the same deals, and an anonymous terminal shows no book line.
I ran book.closed, terminal, server, book, book.page, speed, a11y and sample tests, and all pass. bun scripts/lint-design.ts is clean. I did not run tsc, because the repo has no tsconfig.json. I did not run the full suite, since the forge runs it on push.
I did not add prices to the terminal's Closed list, because the review didn't ask for it.
🤖 Generated with Claude Code
Earlier asks are met: the terminal's clock view opens with the same book line (and a guest sees none), and a test now covers the Closed card price and the '(N without a price)' note. Totals are pure, fell-through deals are excluded, /api/book uses the existing deal list cell (no cell loosened) and is in openapi.json. Non-blocking: the builder's note names scripts/lint-design.ts, the real script is scripts/design-lint.ts; the pull is green.
The clock now opens with a one-line book under its heading, for example "6 open · $2,410,000 under contract · 2 close in November · 3 closed this year, $1,180,000". It adds "(N without a price)" when any counted deal has no price.
What changed
src/book.ts(new):tally(deals, on)turns plain deals into plain totals, andbookLineformats them withdollarsfromsrc/money.ts.- It sums the deals the clock already loads, so there is no extra query. - Fell-through deals count in none of it, and a closed deal counts on its closing date. - "Closing this month" counts open deals only.
src/pages/clock.ts: the line sits under the summary, and each Closed line shows the price next to "closed Nov 2" when the deal has one.GET /api/book(src/routes.ts): the same totals as numbers, readable by anyone who can list deals.contract/openapi.jsonis regenerated so/openapi.jsondescribes it.docs/TECHNICAL.md.Tests
src/book.test.tscovers an empty book, a deal with no price, a fell-through deal, a deal that closed last year, and the month boundary.src/book.page.test.tschecks the line on the clock with the sample deals, and/api/bookagainst it.src/speed.test.ts,src/openapi.test.tsandsrc/contract.test.ts, and all pass.bun scripts/lint-design.tsis clean.bun x tsc --noEmit: the repository has notsconfig.json, so it only prints the compiler's help. I did not run the whole suite either, since the forge runs it on push.Choices
src/routes.tsalready imports abookfromics.ts, so my function is namedtally. The first version clashed with it silently, and/api/bookanswered{}.To try it Open
/signed in and read the line under "The clock". Then callGET /api/book.Untracked dotfiles in the clone (
.bashrc,.claude/and others) were already there, and I did not commit them.🤖 Generated with Claude Code
Closes #130