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

small: The review page's finished screen says how many were sent and declined this round #251

Merged opened this

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

Merged

When the review queue is empty, /reminders/today now adds a line such as "You approved 3 and declined 1 today." after the old sentence. With nothing approved or declined today, the page shows only the old sentence. The review, settled and speed tests pass; I could not run bun x tsc --noEmit or scripts/design-lint.ts.

Notes

shipped production is serving it deploy d2eada7

opened this

When the review queue is empty, /reminders/today now adds a line such as "You approved 3 and declined 1 today." after the old sentence. With nothing approved or declined today, the page shows only the old sentence. The review, settled and speed tests pass; I could not run bun x tsc --noEmit or scripts/design-lint.ts.

  • Counts: the new src/settled.ts reads them in one query over reminder.sent_at and reminder_declined.at, limited to the last two days. It keeps only the rows that fall on the agent's own "today" in their zone. done= in the query string does not affect the count.
  • Wording: the old sentence is kept in front of the new line, so the existing "All of today's reminders are sent or declined" check still holds. The line says "today", not "this morning", because the count covers the whole day.
  • Wiring: src/pages/review.ts takes an optional settled and shows the line. src/routes.ts computes it only when the queue is empty, so a page with drafts pays nothing. The counts are agent-wide, so a Find query that empties the queue also shows them.
  • Tests: src/review.test.ts approves one draft and declines another, then checks the finished screen shows both counts and ignores a bogus done=9. src/settled.test.ts covers the line's wording.
  • Not run: bun x tsc --noEmit printed only the TypeScript help text. The clone has no TypeScript in node_modules, so bun x fetched a different tsc that rejected the command. scripts/design-lint.ts does not exist in this clone, and I added no CSS or components.
  • Not done: there are no contract.json changes and no new dependency. I did not add a separate speed test; the existing src/speed.test.ts passes.

To try it, approve or decline the day's drafts on /reminders/today, or open /reminders/today?q=zzzz after settling any.

Closes #244

commented

When the review queue is empty, /reminders/today now adds a line such as "You approved 3 and declined 1 today." after the old sentence. With nothing approved or declined today, the page shows only the old sentence. The review, settled and speed tests pass; I could not run bun x tsc --noEmit or scripts/design-lint.ts.

  • Counts: the new src/settled.ts reads them in one query over reminder.sent_at and reminder_declined.at, limited to the last two days. It keeps only the rows that fall on the agent's own "today" in their zone. done= in the query string does not affect the count.
  • Wording: the old sentence is kept in front of the new line, so the existing "All of today's reminders are sent or declined" check still holds. The line says "today", not "this morning", because the count covers the whole day.
  • Wiring: src/pages/review.ts takes an optional settled and shows the line. src/routes.ts computes it only when the queue is empty, so a page with drafts pays nothing. The counts are agent-wide, so a Find query that empties the queue also shows them.
  • Tests: src/review.test.ts approves one draft and declines another, then checks the finished screen shows both counts and ignores a bogus done=9. src/settled.test.ts covers the line's wording.
  • Not run: bun x tsc --noEmit printed only the TypeScript help text. The clone has no TypeScript in node_modules, so bun x fetched a different tsc that rejected the command. scripts/design-lint.ts does not exist in this clone, and I added no CSS or components.
  • Not done: there are no contract.json changes and no new dependency. I did not add a separate speed test; the existing src/speed.test.ts passes.

To try it, approve or decline the day's drafts on /reminders/today, or open /reminders/today?q=zzzz after settling any.

commented

I merged main into the branch and pushed it; the review, settled and speed tests pass. I did not run the full suite or bun x tsc --noEmit. tsc wasn't usable in this clone last time, and I didn't retry it. There is no scripts/fast.ts, so I picked the test files myself.

The only conflict was the import block in src/routes.ts. main added narrowPeople to the people.ts import, and this branch added the settledOn import from settled.ts. I kept both, so nothing else changed. The pull description from my earlier message still holds.

Approved

Counts come from sent_at and the declined record, not the query string; read-only query, no contract change, no dependency, output escaped. Minor nits, not blocking: review.ts calls settledLine twice; the test has a loose before/after assertion. The preview did not show the sentence to my unauthenticated curl, so I judged from the tests.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs