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

A reminder held until tomorrow can be brought back to today with one tap, from the deal's page or the review page #111

Merged opened this

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

Merged

A held reminder now has a Bring back button on the deal's Messages list. The same action is on the API and MCP. I ran bun scripts/lint-design.ts, src/release.test.ts and 11 related suites, and they pass.

Notes

shipped production is serving it deploy d2eada7

opened this

A held reminder now has a Bring back button on the deal's Messages list. The same action is on the API and MCP.

I ran bun scripts/lint-design.ts, src/release.test.ts and 11 related suites, and they pass. I did not run bun x tsc --noEmit: package.json has no typescript, and bun x tsc fetched an unrelated v7 binary that only printed its help. I did not run the full bun test; the forge's check will.

What changed

  • Core: releaseReminder in src/deals.ts deletes the hold row. The reminder goes back into today's list, the review page and the waiting count, with no "Held from" label. It goes through the existing deal update permit, and no contract.json cell changed.
  • Refusals: a reminder that isn't held, or was already sent or declined, is refused with a 409 and a sentence saying why.
  • Web: POST /reminders/release is a plain form that works without JavaScript. It sits next to each "Held until…" line via releaseForm in src/pages/sheet.ts and src/pages/deal.ts. Only people who can change the deal see it.
  • API and MCP: DELETE /api/deals/:id/reminders/hold is documented in src/openapi.ts, and the release_reminder MCP tool is added.
  • Activity: the admin page words it "brought back a held reminder" (audited as reminder.release). It also counts under only=messages.
  • Docs: one README sentence after the Tomorrow sentence, and a paragraph in docs/TECHNICAL.md.
  • Tests: src/release.test.ts covers:

- hold, then bring back, with the reminder back in today's list and the count; - 409 for an unheld, declined or sent reminder; - the Activity wording; - the web form, another origin refused and an anonymous visitor refused; - the API's 409.

I also added release_reminder to the tool list in src/server.test.ts.

Worth knowing

  • On the HTML form, a refusal redirects back to the deal page and shows the sentence as a notice, like every other form here. Only the API returns the 409 status.
  • A hold whose day has already arrived is still a hold, so Bring back clears its "Held from" label too.
  • The hold row carries no edited words today, so nothing is dropped. If the edited-words issue lands first, this delete needs to leave those words alone. I did not check for that.

Not done

  • Terminal key binding. The issue didn't ask for one.

Closes #109

2 earlier comments · 1 event
commented

A held reminder now has a Bring back button on the deal's Messages list. The same action is on the API and MCP.

I ran bun scripts/lint-design.ts, src/release.test.ts and 11 related suites, and they pass. I did not run bun x tsc --noEmit: package.json has no typescript, and bun x tsc fetched an unrelated v7 binary that only printed its help. I did not run the full bun test; the forge's check will.

What changed

  • Core: releaseReminder in src/deals.ts deletes the hold row. The reminder goes back into today's list, the review page and the waiting count, with no "Held from" label. It goes through the existing deal update permit, and no contract.json cell changed.
  • Refusals: a reminder that isn't held, or was already sent or declined, is refused with a 409 and a sentence saying why.
  • Web: POST /reminders/release is a plain form that works without JavaScript. It sits next to each "Held until…" line via releaseForm in src/pages/sheet.ts and src/pages/deal.ts. Only people who can change the deal see it.
  • API and MCP: DELETE /api/deals/:id/reminders/hold is documented in src/openapi.ts, and the release_reminder MCP tool is added.
  • Activity: the admin page words it "brought back a held reminder" (audited as reminder.release). It also counts under only=messages.
  • Docs: one README sentence after the Tomorrow sentence, and a paragraph in docs/TECHNICAL.md.
  • Tests: src/release.test.ts covers:

- hold, then bring back, with the reminder back in today's list and the count; - 409 for an unheld, declined or sent reminder; - the Activity wording; - the web form, another origin refused and an anonymous visitor refused; - the API's 409.

I also added release_reminder to the tool list in src/server.test.ts.

Worth knowing

  • On the HTML form, a refusal redirects back to the deal page and shows the sentence as a notice, like every other form here. Only the API returns the 409 status.
  • A hold whose day has already arrived is still a hold, so Bring back clears its "Held from" label too.
  • The hold row carries no edited words today, so nothing is dropped. If the edited-words issue lands first, this delete needs to leave those words alone. I did not check for that.

Not done

  • Terminal key binding. The issue didn't ask for one.
commented

A held reminder now has a Bring back button on the deal's Messages list, and the same action is available through the API and MCP. The preview failed because I hadn't regenerated contract/openapi.json for the new route. I ran bun run contract:emit and committed the result. src/openapi.test.ts passes locally; I haven't re-run the full suite, so the forge's check on this push is the full confirmation.

What changed

  • Core: releaseReminder in src/deals.ts deletes the hold. The reminder returns to today's list, the review page and the header's waiting count, with no "Held from" label. It goes through the existing deal update permit, and no contract.json cell changed.
  • Refusals: a reminder that isn't held, or was already sent or declined, is refused with a 409 and a sentence saying why. On the HTML form that sentence shows as a notice after redirecting back to the deal page, as every other form here does. Only the API returns the 409 status.
  • Web: POST /reminders/release is a plain form with no JavaScript, placed next to each "Held until…" line. Only people who can change the deal see it.
  • API and MCP: DELETE /api/deals/:id/reminders/hold is documented in src/openapi.ts, and there is a release_reminder MCP tool.
  • Activity: the admin page words it "brought back a held reminder". It also counts under only=messages.
  • Docs: one README sentence after the Tomorrow sentence, and a paragraph in docs/TECHNICAL.md.
  • Tests: src/release.test.ts covers:

- hold, then bring back, with the reminder back in today's list and the count; - 409 for an unheld, declined or sent reminder; - the Activity wording; - the web form, another origin refused and an anonymous visitor refused; - the API's 409.

I also added release_reminder to the tool list in src/server.test.ts.

Not done

  • Terminal key: there is no key for it in the terminal; the issue didn't ask for one.
  • Edited-words issue: this change deletes only the hold row. If the edited-words issue lands first, bringing back must not drop those words, and I haven't checked for that. Whichever lands second rebases.
  • Type check: I didn't run bun x tsc --noEmit. The repo has no typescript dependency, so bun x tsc fetched an unrelated v7 binary that only printed its help.

Try it Open a deal with a reminder due today and tap Tomorrow. It then shows on the deal page as "Held until <day> by <name>". Tap Bring back and it is in Reminders for today again, unlabelled.

Changes requested — before the latest push

The web, API and MCP doors look right: the form is a plain POST, it goes through permit on the deal update cell, no contract cell is loosened, and the 409s are worded. One thing blocks approval.

  1. Both doors: bringing a reminder back works only on the page, the API and MCP. src/tty.ts has no way to do it, although it has h to hold from the reminders list. Someone who holds a reminder in the terminal cannot undo that there. Add a terminal action that calls releaseReminder with the same gate and live-update path as h. It needs a view of held reminders on the terminal, because a held reminder leaves today list. Add a test, and add the terminal key to the README sentence and to docs/TECHNICAL.md. Mason says the issue did not ask for a key, but the review bar is that anything a person can do on the page they can do in tty.
  1. Tests: release_reminder is only checked as a name in the MCP tool list. Add one test that calls it through /mcp: a success after a hold, a 409 error when it is not held, and a refusal for anonymous.
  1. Verification: tsc was not run. Run bun x tsc --noEmit the way the repo does it, or say in the pull why it cannot run. Also confirm that bun scripts/design-lint.ts passes. The pull says lint-design.ts, which is not the name the task gives.

No cell in contract.json changed, which is correct.

commented

A held reminder can now be brought back to today from the deal page, the review page, the API, MCP and the terminal. The last push adds the terminal key, the MCP test and a real type check you asked for.

What changed

  • Page and review: a Bring back button next to each "Held until…" line on the deal's Messages list. It is a plain POST that goes through permit on the deal update cell. Bringing it back deletes the hold, so the reminder returns to Reminders for today, the review page and the waiting count with no "Held from" label.
  • Refusals: a reminder that isn't held, or was already sent or declined, is refused with a 409 and a sentence saying why. On the HTML form the sentence shows as a notice after redirecting back; only the API returns the 409 status.
  • API and MCP: DELETE /api/deals/:id/reminders/hold (documented in src/openapi.ts, with contract/openapi.json regenerated) and a release_reminder MCP tool.
  • Terminal: on the reminders list, H switches to a "Held reminders" list. It shows each reminder's return day, and enter reads it. B brings the one under the cursor back through releaseReminder, so it has the same gate and the same live-update path as h.
  • Activity and docs: the admin Activity page words it "brought back a held reminder". The README sentence after the Tomorrow sentence and docs/TECHNICAL.md both name the terminal keys.
  • Contract: no contract.json cell changed.

Tests

  • src/release.test.ts covers hold then bring back, the 409s, a cross-origin and an anonymous POST refused, and the Activity wording.
  • It also now calls release_reminder through /mcp: success after a hold, an error with "This reminder is not held." when it isn't held, and a refusal for anonymous.
  • src/terminal.test.ts has a new test for H and B, including that anonymous cannot bring one back.

Verification

  • Tests: I ran src/server.test.ts, src/release.test.ts, src/terminal.test.ts, src/a11y.test.ts and src/design.test.ts; all pass. I did not run the full suite; the forge's check does.
  • Type check: the repo has no tsconfig.json or typescript dependency, so bun x tsc --noEmit only prints help. I installed typescript and @types/bun in $TMPDIR and ran tsc --strict on src/server.ts, src/terminal.ts and both test files. It reports 28 errors, the same count as on the previous commit, so none are new. I did not add typescript to the repo.
  • Design lint: there is no scripts/design-lint.ts in this repo; the script is scripts/lint-design.ts, and it passes.

Disagreements

  • Terminal key: the issue didn't ask for one, but I agree with the review bar and added it.
  • Bring-back key: it is B, not b, because b already means "back to dates" in the terminal.
Approved

Earlier asks are met: the terminal now has H (list held) and B (bring back) through releaseReminder, so it has the same permit gate as the page and a guest cannot release (tested); the MCP tool is tested; openapi.json is regenerated. No contract.json cell changed. Non-blocking: the README sentence leaves 'In the terminal, press h' trailing after the new terminal text; fold the two terminal mentions into one.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs