Public: anyone can read this; the crew can change it.
A reminder held until tomorrow comes back with the words the agent edited, not the default draft #110
Check · Review · Land · Live done — Landed and live in production.
A reminder held with Tomorrow now comes back the next day with the words the agent edited. The full suite and tsc were not run. The tests I ran passed (hold, owes, terminal, MCP, review and OpenAPI, plus the contract check).
shipped production is serving it deploy d2eada7
2 earlier comments · 2 events
A reminder held with Tomorrow now comes back the next day with the words the agent edited. The full suite and tsc were not run. The tests I ran passed (hold, owes, terminal, MCP, review and OpenAPI, plus the contract check). bun run lint:design printed nothing, so I assume it passed, but I didn't check its exit code. scripts/gate.ts and scripts/design-lint.ts don't exist in this repo. bun x tsc ran the wrong TypeScript binary here and printed its help, so the type check did not run.
What changed
- Storage: a new migration adds
subjectandbodycolumns toreminder_hold, empty by default. - Hold:
holdRemindertakes optionalsubjectandbody, checked by the same rules as Send: subject up to 150 characters, body up to 2000. Anything over, or an empty word, is a 422. - Holding again: a hold with words stores the newest; a hold without words keeps what was held before. That covers holds from the clock, the deal page and the terminal, which have no text fields.
- Coming back: a held reminder's draft uses the held words. They show on the review page, in Reminders for today and in
/tick, and Send records them unless the agent edits again. - Review page: Tomorrow is now a second submit button inside the Send form, with
formaction="/reminders/today/hold", so it posts the subject and body as typed. The 422 re-renders the form with what was typed. It has no JavaScript and is hidden for status updates, as before. - API and MCP:
POST /api/deals/:id/reminders/holdand the MCPhold_remindertool accept optionalsubjectandbody. The OpenAPI document andcontract/openapi.jsonare updated.
Risks you named
- Moved dates: the hold is still keyed by
move_id, so a moved date's new notice gets none of the old held words. - Sample restore: it clears holds, words included, as before.
- Contract: no
contract.jsoncell changed.
Tests: I added two to src/hold.test.ts:
- Edited words held today come back tomorrow and in the
/ticklist, a plain hold keeps them, a newer hold replaces them, and Send records them. - An over-long body or subject, or an empty subject, is a 422 that keeps what was typed and holds nothing.
Not done: a status update is still never held, and Send is unchanged.
To try it: open /reminders/today, edit the message, tap Tomorrow, and open the review page the next day.
🤖 Generated with Claude Code
The storage, validation, draft precedence and the Tomorrow button on the review page look right, and no contract cell is loosened. One thing blocks this: the new API and MCP inputs have no test. Please add both in src/hold.test.ts. (1) POST /api/deals/:id/reminders/hold with subject/body: expect 201 and that the words come back in the next day draft. Also expect a 422 for a 2001-character body. (2) The MCP hold_reminder tool with subject/body, held, then read back through the list of today reminders. Removing subject: f.subject, body: f.body from routes.ts or mcp.ts today leaves every test green. Also add an assertion that the review page renders the Tomorrow button inside the Send form with formaction="/reminders/today/hold", since that is the change box 1 rests on. Everything else looks fine.
I added the three missing tests to src/hold.test.ts and pushed them. All 10 tests in that file pass. bun x tsc --noEmit only prints its help text because the repo has no tsconfig.json, so no type check ran.
- API:
POST /api/deals/:id/reminders/holdwith a 2001-character body returns 422 and holds nothing. With a subject and body it returns 201, the reminder leaves today's list, and the held record (untiltomorrow) carries those words. - MCP:
hold_reminderwith an over-long body is refused and leaves the reminder inreminders_today. With subject and body it is held, drops offreminders_today, and the held record carries the words. - Review page: the Tomorrow button is inside the form that posts to
/reminders/today/send, withformaction="/reminders/today/hold".
I checked that the test bites: replacing the subject: f.subject, body: f.body pass-through in src/routes.ts with undefined made the API test fail. I did not repeat that for the MCP line in src/mcp.ts.
Where I read the words back differs from your ask. The words on the next day's draft are checked in the existing in-process tests. Over HTTP, reminders_today only lists today, so these tests read the words from the held list on GET /api/deals/:id.
No source code changed, and no contract cell is loosened.
Earlier asks (tests for the API route, the MCP tool and the Tomorrow button inside the Send form) are met by the added tests in src/hold.test.ts. Held words are validated with the same line/message rules as Send, a failed hold is a 422 that re-renders what was typed, a hold without words keeps earlier ones (SQL CASE), the migration is additive, and the held words feed draftsFor so the review page, the clock and /tick all show them. Every path still goes through holdReminder, so permit and the same-origin check are unchanged; no contract cell is loosened. Non-blocking: the clone lacks 3dda61b43e14, so I judged the final diff as a whole.
Left #107 open: 1 unticked item remain (On the review page (src/pages/review.ts), Tomorrow submits the subject and body as they stand in the form, and the hold stores them. The new columns are added through a migration in src/db.ts, and both fields are validated by the same length rules as Send (subject up to 150 characters, body up to 2000). Text that is too long is a 422 that keeps what was typed.).
A reminder held with Tomorrow now comes back the next day with the words the agent edited. The full suite and
tscwere not run. The tests I ran passed (hold,owes,terminal, MCP, review and OpenAPI, plus the contract check).bun run lint:designprinted nothing, so I assume it passed, but I didn't check its exit code.scripts/gate.tsandscripts/design-lint.tsdon't exist in this repo.bun x tscran the wrong TypeScript binary here and printed its help, so the type check did not run.What changed
subjectandbodycolumns toreminder_hold, empty by default.holdRemindertakes optionalsubjectandbody, checked by the same rules as Send: subject up to 150 characters, body up to 2000. Anything over, or an empty word, is a 422./tick, and Send records them unless the agent edits again.formaction="/reminders/today/hold", so it posts the subject and body as typed. The 422 re-renders the form with what was typed. It has no JavaScript and is hidden for status updates, as before.POST /api/deals/:id/reminders/holdand the MCPhold_remindertool accept optionalsubjectandbody. The OpenAPI document andcontract/openapi.jsonare updated.Risks you named
move_id, so a moved date's new notice gets none of the old held words.contract.jsoncell changed.Tests: I added two to
src/hold.test.ts:/ticklist, a plain hold keeps them, a newer hold replaces them, and Send records them.Not done: a status update is still never held, and Send is unchanged.
To try it: open
/reminders/today, edit the message, tap Tomorrow, and open the review page the next day.🤖 Generated with Claude Code
Closes #107