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

A date marked done says the day it was done and whether that was early, on time or late #132

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

A done date now reads "Done Oct 30 · 3 days early", "Done Nov 2 · on time" or "Done Nov 4 · 2 days late", on the deal's page sheet and the client timeline. The new tests and the neighbouring suites I ran pass, but I did not run the full bun test.

Notes

shipped production is serving it deploy d2eada7

opened this

A done date now reads "Done Oct 30 · 3 days early", "Done Nov 2 · on time" or "Done Nov 4 · 2 days late", on the deal's page sheet and the client timeline. The new tests and the neighbouring suites I ran pass, but I did not run the full bun test. bun x tsc --noEmit has no tsconfig.json to check in this repo, so I couldn't run it. The forge runs the full check on this push.

  • Wording: a new doneLine(due, doneOn) in src/dates.ts builds the text (singular "1 day late" included). The sheet's dueLine and the timeline row both use it. The timeline row shows it in place of the bare "Done" status word.
  • done_on: every date on a deal view now carries done_on, the day it was marked done as YYYY-MM-DD, or null. It is worked out from done_at with today(new Date(done_at)), the same helper the CSV and closedOn use. That avoids the midnight-UTC off-by-one. The JSON API and the MCP deal read return it automatically, and /openapi.json describes it. I regenerated contract/openapi.json.
  • Reopening: markDone already sets done_at to null on reopen, so done_on clears with it. Marking done again records the new day.
  • Tests: src/doneon.test.ts covers early, on time, late, one day late, and reopened then done again. It also checks the wording on the deal page sheet and the timeline page.

Not done:

  • Design lint: the issue names bun scripts/design-lint.ts, but the script here is scripts/lint-design.ts. I ran that and it printed nothing, which I'm reading as clean.
  • Docs: I didn't add anything to docs/TECHNICAL.md; the only doc change is the regenerated /openapi.json contract.
  • Behaviour: nothing else changed.

Closes #115

commented

A done date now reads "Done Oct 30 · 3 days early", "Done Nov 2 · on time" or "Done Nov 4 · 2 days late", on the deal's page sheet and the client timeline. The new tests and the neighbouring suites I ran pass, but I did not run the full bun test. bun x tsc --noEmit has no tsconfig.json to check in this repo, so I couldn't run it. The forge runs the full check on this push.

  • Wording: a new doneLine(due, doneOn) in src/dates.ts builds the text (singular "1 day late" included). The sheet's dueLine and the timeline row both use it. The timeline row shows it in place of the bare "Done" status word.
  • done_on: every date on a deal view now carries done_on, the day it was marked done as YYYY-MM-DD, or null. It is worked out from done_at with today(new Date(done_at)), the same helper the CSV and closedOn use. That avoids the midnight-UTC off-by-one. The JSON API and the MCP deal read return it automatically, and /openapi.json describes it. I regenerated contract/openapi.json.
  • Reopening: markDone already sets done_at to null on reopen, so done_on clears with it. Marking done again records the new day.
  • Tests: src/doneon.test.ts covers early, on time, late, one day late, and reopened then done again. It also checks the wording on the deal page sheet and the timeline page.

Not done:

  • Design lint: the issue names bun scripts/design-lint.ts, but the script here is scripts/lint-design.ts. I ran that and it printed nothing, which I'm reading as clean.
  • Docs: I didn't add anything to docs/TECHNICAL.md; the only doc change is the regenerated /openapi.json contract.
  • Behaviour: nothing else changed.
Approved

Clean. doneLine is one small helper reused by the sheet and the timeline. done_on is derived from done_at with the same today() helper the CSV uses, so reopen clears it. Output is escaped, no contract cell changed, and no new dependency. Tests cover early, on time, late, 1 day late, reopen and the page wording. The openapi contract is updated in both places.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs