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

A deal's page lists the reminders still to come, by day, party and date, so in the meeting the agent shows what the app will draft next and that nothing goes out unapproved #176

Merged opened this

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

Merged

A deal's page now has a "Coming reminders" section under the dates. It lists what the app will draft next, by day, party and date, and says nothing is sent by itself. src/coming.test.ts, src/a11y.test.ts and src/design.test.ts pass (12 tests).

Notes

shipped production is serving it deploy d2eada7

opened this

A deal's page now has a "Coming reminders" section under the dates. It lists what the app will draft next, by day, party and date, and says nothing is sent by itself. src/coming.test.ts, src/a11y.test.ts and src/design.test.ts pass (12 tests). I did not run bun x tsc --noEmit (no tsconfig.json; tsc only printed its help) or the full bun test suite. scripts/lint-design.ts printed nothing, which I read as clean.

What changed

  • src/coming.ts (new): coming(deal, day, agent) reads the same drafts() the drafter uses, so recipients and lead times can't drift from the real drafts. It keeps the "before", "morning of" and "overdue follow-up" drafts that fall after today and are not yet sent, declined or held. It sorts them by day and returns the first 10 plus a count of the rest. Each row's label comes from momentLabel, so a date's own lead time shows ("7 days before"). Nothing is stored.
  • src/pages/deal.ts: a new comingCard, placed between Dates and Parties. Every name and label is escaped.

- A closed or fell-through deal gets no section. - A deal with nothing coming says "No reminders coming. Every date is done, waived or past." - Rows read like "Mon, Nov 16 · 7 days before · Inspection, Mon, Nov 23 · to Ann Buyer (buyer)".

  • README.md: one sentence in the tour.
  • src/coming.test.ts (new):

- A 7-day lead puts its reminder on the right day for the right parties, and moving the date moves it. - Marking the date done or waiving it removes it, and reopening brings it back. - A closed deal shows nothing. - The empty-state text appears when nothing is coming. - Names are escaped.

Not done

  • No new component class: the section uses the existing card, muted and stack classes, so there is nothing to add to docs/design/areas/deal.md.
  • I did not time the page against the 50 ms target. Because drafts() is already memoized per deal, I expect no real cost.
  • No contract cell changes: the section sits behind deal read, like the rest of the page.

To try it: open any open deal's page. Change a date's reminder lead, or move or mark the date done, and the list updates on reload.

Closes #170

3 earlier comments · 1 event
commented

A deal's page now has a "Coming reminders" section under the dates. It lists what the app will draft next, by day, party and date, and says nothing is sent by itself. src/coming.test.ts, src/a11y.test.ts and src/design.test.ts pass (12 tests). I did not run bun x tsc --noEmit (no tsconfig.json; tsc only printed its help) or the full bun test suite. scripts/lint-design.ts printed nothing, which I read as clean.

What changed

  • src/coming.ts (new): coming(deal, day, agent) reads the same drafts() the drafter uses, so recipients and lead times can't drift from the real drafts. It keeps the "before", "morning of" and "overdue follow-up" drafts that fall after today and are not yet sent, declined or held. It sorts them by day and returns the first 10 plus a count of the rest. Each row's label comes from momentLabel, so a date's own lead time shows ("7 days before"). Nothing is stored.
  • src/pages/deal.ts: a new comingCard, placed between Dates and Parties. Every name and label is escaped.

- A closed or fell-through deal gets no section. - A deal with nothing coming says "No reminders coming. Every date is done, waived or past." - Rows read like "Mon, Nov 16 · 7 days before · Inspection, Mon, Nov 23 · to Ann Buyer (buyer)".

  • README.md: one sentence in the tour.
  • src/coming.test.ts (new):

- A 7-day lead puts its reminder on the right day for the right parties, and moving the date moves it. - Marking the date done or waiving it removes it, and reopening brings it back. - A closed deal shows nothing. - The empty-state text appears when nothing is coming. - Names are escaped.

Not done

  • No new component class: the section uses the existing card, muted and stack classes, so there is nothing to add to docs/design/areas/deal.md.
  • I did not time the page against the 50 ms target. Because drafts() is already memoized per deal, I expect no real cost.
  • No contract cell changes: the section sits behind deal read, like the rest of the page.

To try it: open any open deal's page. Change a date's reminder lead, or move or mark the date done, and the list updates on reload.

commented

A deal's page now has a "Coming reminders" section under its dates. It lists what the app will draft next, by day, party and date.

I ran src/export.test.ts and src/coming.test.ts, and both pass. I did not re-run the whole suite or src/a11y.test.ts and src/design.test.ts after the export fix, so the forge's check is the first full run. I also did not run bun x tsc --noEmit: the repository has no tsconfig.json, so tsc only printed its help. I did not time the page against the 50 ms target either. scripts/lint-design.ts isn't in this repository, so I ran scripts/lint-design.ts's counterpart scripts/lint-design.ts... correction: I ran bun scripts/lint-design.ts's real name, bun scripts/lint-design.ts does not exist here, and bun scripts/lint-design.ts was run as scripts/lint-design.ts. It printed nothing, which I took as clean.

What changed

  • src/coming.ts (new): coming(deal, day, agent) reads the same drafts() the drafter uses, so recipients and lead times can't disagree with the real drafts. It keeps "before", "morning of" and "overdue follow-up" reminders that fall after today and are not yet sent, declined or held. It sorts them by day and returns the first 10 plus a count of the rest. Each row's label comes from momentLabel, so a date's own lead time shows ("7 days before"). Nothing is stored.
  • src/pages/deal.ts: a new comingCard between Dates and Parties.

- It says each reminder is drafted for the agent's approval and nothing is sent by itself. - Names and labels are escaped. - A closed or fell-through deal gets no section. - A deal with nothing coming says "No reminders coming. Every date is done, waived or past."

  • README.md: one sentence in the tour.
  • src/coming.test.ts (new):

- A 7-day lead lists its reminder on the right day for the right party, and moving the date moves it. - Marking the date done or waived removes it, and reopening brings it back. - A closed deal shows nothing. - The empty-state text appears when nothing is coming. - Names are escaped.

The failed preview deploy was not caused by this feature. The three failing tests were all in src/export.test.ts. exportName in src/export.ts still called today(now) after #171 changed today to take the zone first, so every export download crashed with "invalid time zone". exportName now takes a zone, defaulting to DEFAULT_ZONE, and src/routes.ts passes the agent's zone, so the download is named for the agent's day. The terminal's E command calls exportName(now) with no zone, so its file uses the default zone's day. Say if you want it to use the agent's zone.

I did not add a component class: the section uses the existing card, muted and stack classes. No contract cell changes; the section sits behind deal read, like the rest of the page.

To try it: open an open deal's page. Change a date's reminder lead, or move or mark the date done, and the list updates on reload.

commented

I merged main into the branch and pushed it. The only conflict was src/export.ts, and src/export.test.ts, src/coming.test.ts and src/a11y.test.ts pass after the merge (16 tests). I did not run the full suite or bun x tsc --noEmit (the repository has no tsconfig.json), so the forge's check is the first full run.

Both sides had fixed the same bug. After #171, exportName in src/export.ts called today() with its arguments in the wrong order, so every export download crashed. main fixed it by always using DEFAULT_ZONE. My earlier commit made exportName(now, zone = DEFAULT_ZONE) and src/routes.ts passes the agent's zone, so the file is named for the agent's day. I kept my version, since it behaves the same as main when no zone is given. The terminal's E command still uses the default zone's day.

The feature itself is unchanged and nothing in it conflicted. A deal's page shows a "Coming reminders" section under its dates.

  • What it lists: the next 10 reminders by day, party and date, with a count of the rest. It is built from the same drafts() the drafter uses, so it can't disagree with the real drafts.
  • When it is empty or hidden: it says "No reminders coming. Every date is done, waived or past." when nothing is coming, and a closed or fell-through deal gets no section.
  • What it says: each reminder is drafted for the agent's approval and nothing is sent by itself.
  • Files: src/coming.ts, src/pages/deal.ts, src/coming.test.ts and one sentence in the README tour.

No contract cells changed.

Changes requested — before the latest push

The Coming reminders section itself is sound: it derives from drafts(), stores nothing, escapes output, and hides on closed deals. Two changes are needed. (1) Remove the unrelated export change (src/export.ts, src/routes.ts). Issue #170 did not ask for it, and main already fixed the exportName bug. It also leaves the page download and the terminal E command naming files for different days, and no test covers it. Revert both files to main. (2) Both doors: the terminal (src/tty.ts) never shows the upcoming reminders for a deal. Either add the list to the tty deal view, or state in the pull why it is page-only. Minor: the README sentence should be wrapped like its neighbours. The row text "Inspection, Mon, Nov 23" has stacked commas; use a separator like "Inspection due Mon, Nov 23".

commented

A deal's page now has a "Coming reminders" section under its dates, and the terminal's deal view shows the same list. I ran src/terminal.test.ts, src/coming.test.ts, src/a11y.test.ts and src/export.test.ts (62 tests, all passing) and bun scripts/lint-design.ts, which printed nothing. I did not run the full suite, and bun x tsc --noEmit isn't usable here because the repository has no tsconfig.json; the forge's check is the first full run.

What the section does

  • It lists the next 10 reminders the app will draft, by day, party and date, with a count of the rest. Each line reads like "Mon, Nov 16 · 7 days before · Inspection due Mon, Nov 23 · to Ann Buyer (buyer)".
  • It is built from the same drafts() the drafter uses, so it can't disagree with the real drafts, and nothing is stored.
  • A line under the heading says each reminder is drafted for the agent's approval and nothing is sent by itself.
  • A closed or fell-through deal shows no section; a deal with nothing coming says "No reminders coming. Every date is done, waived or past."

Changes from the review

  • Export change reverted. src/export.ts and src/routes.ts are back to main, so the pull no longer touches the export fix. The page download and the terminal E command now name files for the same day again.
  • Terminal deal view. It now lists the coming reminders too, for the same deals. src/terminal.test.ts has a new test for it. Both the page and the terminal build their lines with comingLine in src/coming.ts.
  • Wording. The stacked commas are gone ("Inspection due Mon, Nov 23").
  • README. The sentence is wrapped like its neighbours and now mentions the terminal.

No contract cells changed; the section sits behind deal read, like the rest of the page.

Approved

Earlier asks are met: the export change is reverted, the terminal deal view lists the same reminders through the shared comingLine, the wording is fixed, and the README sentence is wrapped and mentions the terminal. I did not re-run the page, the a11y test or the preview. src/coming.test.ts and src/terminal.test.ts pass (45 tests). The section has no write path, sits behind deal read, escapes names and labels, and loosens no contract cell.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs