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

Add a date offers the dates contracts usually add, like HOA documents review, survey or repair request deadline, so the agent picks one instead of typing it #153

Merged opened this

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

Merged

Add a date now suggests six common extra dates, and an exact match gets that date's reminder lead. The new tests and the neighbouring suites (a11y, deals, server, openapi, lead) pass. Two checks didn't run, and I skipped the /openapi.json part because the API has no add-a-date endpoint.

Notes

shipped production is serving it deploy d2eada7

opened this

Add a date now suggests six common extra dates, and an exact match gets that date's reminder lead. The new tests and the neighbouring suites (a11y, deals, server, openapi, lead) pass. Two checks didn't run, and I skipped the /openapi.json part because the API has no add-a-date endpoint.

What changed

  • src/deadlines.ts holds SUGGESTED_DATES, the six labels from the issue, each with a suggested lead in days. leadOfLabel returns the entry's lead on an exact, case-sensitive match and the default of 3 otherwise.
  • addDeadline in src/deals.ts stores that lead. Label validation is unchanged, and these stay custom dates with no new Kind.
  • The What field on a deal's page is still a plain text input that submits what was typed. It now has list="suggested-dates" and a <datalist> with options escaped. The label and the page's JavaScript are unchanged.
  • The add_date MCP description in src/mcp.ts lists the suggested labels and says an exact match sets a suitable lead.
  • src/suggested.test.ts covers three things:

- The datalist is on a deal's page and its options are escaped. - The MCP tool list names the suggestions. - An exact label gets its lead, while a typed or differently cased one keeps the default.

Leads I chose The issue left the numbers open, so these are my picks:

LabelLead (days)
Seller disclosures due3
HOA documents review ends5
Survey due5
Repair request deadline2
Home warranty ordered3
Lead paint inspection ends3

Not done

  • /openapi.json: there is no add-a-date endpoint in the API today (only PATCH and DELETE on a date), so there is no body to document. I didn't add one, since that would be a new feature.
  • Checks I couldn't run:

- bun scripts/gate.ts doesn't exist in this repo. - bun x tsc --noEmit can't run because there is no tsconfig.json. - bun scripts/lint-design.ts is clean. - I ran targeted tests, not the full suite.

🤖 Generated with Claude Code

Closes #131

1 earlier comment · 1 event
commented

Add a date now suggests six common extra dates, and an exact match gets that date's reminder lead. The new tests and the neighbouring suites (a11y, deals, server, openapi, lead) pass. Two checks didn't run, and I skipped the /openapi.json part because the API has no add-a-date endpoint.

What changed

  • src/deadlines.ts holds SUGGESTED_DATES, the six labels from the issue, each with a suggested lead in days. leadOfLabel returns the entry's lead on an exact, case-sensitive match and the default of 3 otherwise.
  • addDeadline in src/deals.ts stores that lead. Label validation is unchanged, and these stay custom dates with no new Kind.
  • The What field on a deal's page is still a plain text input that submits what was typed. It now has list="suggested-dates" and a <datalist> with options escaped. The label and the page's JavaScript are unchanged.
  • The add_date MCP description in src/mcp.ts lists the suggested labels and says an exact match sets a suitable lead.
  • src/suggested.test.ts covers three things:

- The datalist is on a deal's page and its options are escaped. - The MCP tool list names the suggestions. - An exact label gets its lead, while a typed or differently cased one keeps the default.

Leads I chose The issue left the numbers open, so these are my picks:

LabelLead (days)
Seller disclosures due3
HOA documents review ends5
Survey due5
Repair request deadline2
Home warranty ordered3
Lead paint inspection ends3

Not done

  • /openapi.json: there is no add-a-date endpoint in the API today (only PATCH and DELETE on a date), so there is no body to document. I didn't add one, since that would be a new feature.
  • Checks I couldn't run:

- bun scripts/gate.ts doesn't exist in this repo. - bun x tsc --noEmit can't run because there is no tsconfig.json. - bun scripts/lint-design.ts is clean. - I ran targeted tests, not the full suite.

🤖 Generated with Claude Code

Approved

Clean. The datalist is a plain list of escaped options, the lead lookup is exact-match with the default as fallback, label validation is unchanged, and the MCP description lists the suggestions. No contract.json cell is loosened and no new door was added. The add-a-date write still goes through addDeadline, which is gated as before. The API has no add-a-date endpoint, so there is no openapi body to document. Adding one would be a new feature.

commented

Left #131 open: 1 unticked item remain (The suggestions do the same for the add-a-date tool over MCP, through its description, and the API's add-a-date body in /openapi.json. Validation of the label (length, required) stays as it is.).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs