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

A date from another year says its year, so the Closed list never shows last November's sale as "closed Sun, Nov 9" the day before Nov 9 #201

Closed opened this
Closed without merging

A date from another year now says its year: 58 Larkspur Way reads "closed Sun, Nov 9, 2025" in the Closed list, the deal page's "All done · closed …" line and the terminal's closed list. A date in the current year reads exactly as before. bun test passes (651 pass, 0 fail).

Notes

stopped closed without shipping deploy 404f1f7

opened this

A date from another year now says its year: 58 Larkspur Way reads "closed Sun, Nov 9, 2025" in the Closed list, the deal page's "All done · closed …" line and the terminal's closed list. A date in the current year reads exactly as before.

bun test passes (651 pass, 0 fail). I couldn't run tsc (it printed its help text instead of checking) or bun scripts/gate.ts, which doesn't exist in this repository. scripts/design-lint.ts isn't there either, and I touched nothing under src/web/.

What changed

  • spoken() in src/dates.ts takes the agent's today, so it never reads the server clock. It adds the year when the date's calendar year differs from that today. The tests pin both forms, including Dec 31 to Jan 1 across the agent's time zone.
  • src/pages/clock.ts, src/pages/progress.ts and src/terminal.ts pass the agent's today in.

Why the check was red

  • The failure was not in this change. week.page.test.ts ("lists overdue and coming dates…") already failed on the base commit 6140d93, before any of this work.
  • #193 put time and place into the /week sheet's labels for inspections and walkthroughs. #194's sample deals then gave those appointments times and places, so the sheet's label ("Inspection period ends · 10:30 am · 77 Harbor View Dr, Unit 4B") no longer appeared word for word on the clock's This week card, which doesn't show them.
  • The test was wrong, not the code: it now compares each row's label up to the first " · ". That is the one test I edited.

What I chose not to do

  • I did not add time and place to the clock card to match the sheet. That would be a feature, and the issue doesn't ask for it.
  • No contract.json cell changed.

How to try it

  • Boot the app, sign in and open /. The Closed list shows "closed Sun, Nov 9, 2025" for 58 Larkspur Way, and the deal's own page shows the same year in its "All done · closed …" line.
  • Run bun test src/dates.test.ts src/progress.test.ts src/week.page.test.ts.

🤖 Generated with Claude Code

Closes #197

2 earlier comments
commented

A date from another year now says its year: 58 Larkspur Way reads "closed Sun, Nov 9, 2025" in the Closed list, the deal page's "All done · closed …" line and the terminal's closed list. A date in the current year reads exactly as before.

bun test passes (651 pass, 0 fail). I couldn't run tsc (it printed its help text instead of checking) or bun scripts/gate.ts, which doesn't exist in this repository. scripts/design-lint.ts isn't there either, and I touched nothing under src/web/.

What changed

  • spoken() in src/dates.ts takes the agent's today, so it never reads the server clock. It adds the year when the date's calendar year differs from that today. The tests pin both forms, including Dec 31 to Jan 1 across the agent's time zone.
  • src/pages/clock.ts, src/pages/progress.ts and src/terminal.ts pass the agent's today in.

Why the check was red

  • The failure was not in this change. week.page.test.ts ("lists overdue and coming dates…") already failed on the base commit 6140d93, before any of this work.
  • #193 put time and place into the /week sheet's labels for inspections and walkthroughs. #194's sample deals then gave those appointments times and places, so the sheet's label ("Inspection period ends · 10:30 am · 77 Harbor View Dr, Unit 4B") no longer appeared word for word on the clock's This week card, which doesn't show them.
  • The test was wrong, not the code: it now compares each row's label up to the first " · ". That is the one test I edited.

What I chose not to do

  • I did not add time and place to the clock card to match the sheet. That would be a feature, and the issue doesn't ask for it.
  • No contract.json cell changed.

How to try it

  • Boot the app, sign in and open /. The Closed list shows "closed Sun, Nov 9, 2025" for 58 Larkspur Way, and the deal's own page shows the same year in its "All done · closed …" line.
  • Run bun test src/dates.test.ts src/progress.test.ts src/week.page.test.ts.

🤖 Generated with Claude Code

commented

A date from another year now says its year, so 58 Larkspur Way reads "closed Sun, Nov 9, 2025". I couldn't find a cause for the preview's 503, and I can't see the preview itself. I merged current main into the branch and pushed.

The 503

  • It means one of the schema reads behind /healthz threw (src/health.ts). This pull adds no migration and doesn't touch that file.
  • On a fresh data directory the app boots here and /healthz returns 200 every time. The migration-resume tests in the deploy log passed.
  • The earlier note on this pull said the first deploy had failed the same way with no schema or health change. The failure may come from the preview's environment, such as the data it boots on, but I can't confirm that.
  • The branch was one commit behind main, which now has #199's overlap flagging. I merged it in; there were no conflicts.
  • After the merge, bun test gives 656 pass and 0 fail.
  • If the preview 503s again, its deploy log's /healthz body names the failed check (profile, deals, dates or waiting), and that points at the preview's database rather than at this code.

What the pull does

  • spoken() in src/dates.ts takes the agent's today and adds the year when the date is in a different calendar year, in the agent's own time zone. Dates in the current year read exactly as before.
  • The Closed list, the deal page's "All done · closed …" line and the terminal's closed list all use it. Tests pin both forms, including Dec 31 to Jan 1 across time zones.
  • One edit to an existing test: src/week.page.test.ts compared full row labels, but the /week sheet adds an appointment's time and place, which the clock card doesn't show. It now compares the label before the first " · ". That test was already failing on main before this pull.
  • No contract.json cell is loosened.

Not run: tsc printed its help text instead of checking, and scripts/gate.ts and scripts/design-lint.ts don't exist in this repo. I touched nothing under src/web/.

Try it: open / signed in and look at the Closed list, or run bun test src/dates.test.ts src/progress.test.ts src/week.page.test.ts.

🤖 Generated with Claude Code

commented

Declined: I can't find a cause in this pull, so I changed nothing and pushed nothing. The preview's 503 looks like the forge's deploy environment rather than this branch. Run log: https://forge.open-platform.sh/trevato/deal-clock/runs/01m6z9k84azbr47tvjc85aek7a

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs