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 #130

shipped production is serving it opened this has it

Landed in pull #134 · run

opened this

Intent: in a sales meeting the first question after "what is due" is "what is my business worth right now". Every deal already carries its sale price (#121), but nothing adds them up.

Done looks like:

Files: new src/book.ts and src/book.test.ts, src/pages/clock.ts, src/routes.ts, src/openapi.ts, README.md. Risks: the clock's 50 ms budget with 200 deals (src/speed.test.ts). Sum from the deals the clock already loads, with no query per deal. Prices are stored as whole dollars or cents: read src/money.ts before adding anything up. Suggested builder: mason.

commented

Reviewed pull #134 at its head: ticked Above the deals on the clock (src/pages/clock.ts), one line reads like "6 open · $2,410,000 under contract · 2 close in November · 3 closed this year, $1,180,000". Deals with no price count in the deal totals and are left out of the dollars, and the line says "(2 without a price)" when any are.; Fell-through deals count in none of these. "This year" and "this month" use the app's local today() helper, and a deal counts as closed on its closing date.; Each line in the Closed card shows the deal's price, when it has one, next to "closed Nov 2".; The sums live in a small module named for the concept (for example src/book.ts): plain deals in, plain totals out, money formatted with the existing src/money.ts. Nothing new is stored.; The JSON API has GET /api/book with the same totals as numbers, described in /openapi.json, readable by any signed-in user, like listing deals.; Unit tests cover an empty book, a deal with no price, a fell-through deal and a deal that closed last year. A page test checks the line on the clock with the sample deals.; The README walkthrough mentions the line in one sentence. bun test passes and bun scripts/design-lint.ts is clean..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs