Public: anyone can read this; the crew can change it.

Closed deals from earlier years fold into one line per year so a long book stays quick to read #321

opened this

Check · Review · Land · Live — Its check is red. Next: builder, its check is red.

Ready to land

Earlier years in the Closed list now fold into one `<details>` per year, e.g. "2025 · 14 closed · $5,120,000 · commission $128,000". This year's closed and fell-through deals list as before.

7 files · +128 −2

stopped serving, but the check failed deploy a09a542

Check faileddeploy a09a542

Website spec: 3 findings, 3 the edge owns (report only)

Look

1 page beside main · 0 new to this pull

main

at 76d57b2 ·

this pull

In the dark

main

at 76d57b2 ·

this pull

at a09a542 ·

opened this

Earlier years in the Closed list now fold into one <details> per year, e.g. "2025 · 14 closed · $5,120,000 · commission $128,000". This year's closed and fell-through deals list as before.

What changed

  • src/years.ts (new, pure) groups settled deals by the year of the day the Closing date was marked done, or the day the deal fell through. Both days are already in the agent's timezone. Earlier years come newest first.
  • src/pages/clock.ts renders the Closed card from that grouping. The row markup moved unchanged into a closedList helper, so opening a year shows exactly what the list showed before (price, "Closed in N days"). The summaries need no JavaScript.
  • When Find, side or closing narrows the clock, every year that still has a match opens. Find still searches all years.
  • A year's price and commission figures appear only for deals that carry them. Fell-through deals add " · N fell through" to the line and are left out of the money totals.
  • The year-pace and totals lines, the "Closed · N" count and the CSV link are unchanged.
  • Docs: static/app.css gets .closed-year, listed in docs/design/areas/clock.md. There is a README line under "Commission and your year" and a note in docs/TECHNICAL.md.

Tests

  • src/years.test.ts covers the 2025/2026 year boundary, the figures-only-when-carried rule, and Find opening a matching year.
  • With the change in place, src/speed.test.ts (200 deals), readme.test.ts and design.test.ts pass. bun scripts/lint-design.ts printed no complaints.

Not done or not checked

  • bun x tsc --noEmit only printed tsc's usage text because the repo has no tsconfig.json, so there was no type check. scripts/gate.ts and scripts/fast.ts don't exist here either.
  • I did not run the full suite. In the ten or so files I ran that touch the clock, the only failure was sample.test.ts ("on a fresh boot the first reminder for today…"), and it fails the same way on the base branch without my change.
  • The first run of speed.test.ts went over budget while bun install was running in the background. It passed on the rerun.
  • I didn't change the contract or add a migration, and I didn't add a "show/hide all years" control.

To try it Open / with deals closed in earlier years. The preview for this pull shows the folded years. Searching a word from an old deal's address opens its year.

Closes #312

edited this
commented

Earlier years in the Closed list now fold into one <details> per year, e.g. "2025 · 14 closed · $5,120,000 · commission $128,000". This year's closed and fell-through deals list as before.

What changed

  • src/years.ts (new, pure) groups settled deals by the year of the day the Closing date was marked done, or the day the deal fell through. Both days are already in the agent's timezone. Earlier years come newest first.
  • src/pages/clock.ts renders the Closed card from that grouping. The row markup moved unchanged into a closedList helper, so opening a year shows exactly what the list showed before (price, "Closed in N days"). The summaries need no JavaScript.
  • When Find, side or closing narrows the clock, every year that still has a match opens. Find still searches all years.
  • A year's price and commission figures appear only for deals that carry them. Fell-through deals add " · N fell through" to the line and are left out of the money totals.
  • The year-pace and totals lines, the "Closed · N" count and the CSV link are unchanged.
  • Docs: static/app.css gets .closed-year, listed in docs/design/areas/clock.md. There is a README line under "Commission and your year" and a note in docs/TECHNICAL.md.

Tests

  • src/years.test.ts covers the 2025/2026 year boundary, the figures-only-when-carried rule, and Find opening a matching year.
  • With the change in place, src/speed.test.ts (200 deals), readme.test.ts and design.test.ts pass. bun scripts/lint-design.ts printed no complaints.

Not done or not checked

  • bun x tsc --noEmit only printed tsc's usage text because the repo has no tsconfig.json, so there was no type check. scripts/gate.ts and scripts/fast.ts don't exist here either.
  • I did not run the full suite. In the ten or so files I ran that touch the clock, the only failure was sample.test.ts ("on a fresh boot the first reminder for today…"), and it fails the same way on the base branch without my change.
  • The first run of speed.test.ts went over budget while bun install was running in the background. It passed on the rerun.
  • I didn't change the contract or add a migration, and I didn't add a "show/hide all years" control.

To try it Open / with deals closed in earlier years. The preview for this pull shows the folded years. Searching a word from an old deal's address opens its year.

commented

Of the four deploy failures, one was mine and is fixed and pushed; the other three also fail without my change, so I left them alone.

  • Mine, fixed: I had appended .closed-year after the broker-file print block in static/app.css. file.test.ts requires every rule after that block to be scoped to .file-page, so it failed. I moved the rule above the block, and file.test.ts now passes.
  • Fail on main too:

- sample.test.ts ("on a fresh boot the first reminder for today…") and terminal.test.ts ("n declines a reminder…") fail the same way on main here. - The "clock with closed deals … within budget" speed test is machine-load noise. In five cold requests I measured about 38 ms on main and 39 ms with my change, against the 50 ms budget. speed.test.ts passed in three back-to-back runs here, so this looks like a loaded deploy machine, not a cost I added.

I did not re-run the full suite after the CSS move, only file.test.ts and speed.test.ts.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs