Public: anyone can read this; the crew can change it.
The day before a showing, a "see you tomorrow" confirmation naming the time and address waits on the desk for the agent to approve #79
Check · Review · Land · Live done — Landed and live in production.
Booking a showing now drafts a "see you tomorrow" confirmation for the agent to approve, due at 8:00 the day before in their profile time zone. The full bun test run (366 tests) passes. The design lint printed nothing.
shipped production is serving it deploy aba151a
1 earlier comment · 1 event
Booking a showing now drafts a "see you tomorrow" confirmation for the agent to approve, due at 8:00 the day before in their profile time zone. The full bun test run (366 tests) passes. The design lint printed nothing. I ran no type check, because the repo has no tsconfig.json and tsc only printed its help text. scripts/gate.ts and scripts/fast.ts don't exist here, so I ran the whole suite instead.
What changed
- Wording: The text reads "I'll see you tomorrow at 10:00 AM at 12 Example St. If the time no longer works, just reply and we'll find another." The email has the same line with a greeting and "Best,". Both name the time in the agent's zone and carry the agent's signature. The address is left out when there isn't one, and a text too long for
MAX_BODY.textdrops the address. - Channel and numbering: The draft goes by
channelFor, so STOP and "Email only" are respected. Confirmations are numbered 400–499 insrc/drafts.ts, below the after-showing note (500) and answers (1000), and the plan shows them as "Before the showing". - Timing and moves: A showing less than a day ahead gets the draft at once, worded "today", and a showing already past gets none. Moving the showing rewrites the unsent draft with the new time and due time. Cancelling removes it. A confirmation already sent gives way to a new one for a second showing, and one approved and held for 8:00 is left alone, as the after-showing note already is.
- Holds and ordering: The confirmation is not held behind the showing's own hold. The cadence follow-ups still wait for the showing as before, and the after-showing note is unchanged.
bookShowingno longer pushes a due confirmation back to scheduled.respaceignores the 400s. A confirmation is never made due once its showing has started. - Qualified/lost, reopen: A qualified or lost lead gets none; its unsent one is skipped. Reopening the lead plans it again from the showing. A lead reachable nowhere gets none.
- Display and data: The desk and terminal say "Before the showing — confirmation ready", and the terminal's plan and skip/restore messages use the same label. The sample lead Ethan Brooks has a showing tomorrow, and README step 7 describes what appears the day before.
- Tests:
src/before-showing.test.tscovers each box in the issue, including a script-laden address coming out escaped. - One existing test edited:
src/showings.test.tsasserted that the lead was absent from the desk the day before the showing. That is no longer true, because the confirmation is due then. It now asserts that the only message ready is the confirmation and that no follow-up is.
What I chose not to do
- I changed no
contract.jsoncell and added no dependency or migration. - #58 (custom cadence days) also touches
leads.tsscheduling, so expect a small merge there.
How to try it: Open the sample Ethan Brooks on a fresh desk to see the confirmation, then press "Book a showing" on another lead to see it appear.
🤖 Generated with Claude Code
Mostly sound: no contract cell changed, no new door, tests cover the boxes, address escaped, length capped. One real defect to fix.
- (medium) A confirmation that is already
dueis never withdrawn once its showing starts.advancein src/leads.ts stops a scheduled one becoming due aftershowing.at <= now, but adueone the agent has not yet approved stays on the desk through and after the showing. The agent can then send "I will see you tomorrow at 10:00 AM" for a showing that is over. Fix: inadvance(or on the desk/lead read path) drop or skip an unsent 400-499 message whose showing time has passed, and add a test that turns the clock past the showing and expects it gone from the desk. - (low) The body says "tomorrow"/"today" fixed at draft time. If the agent approves it the next day, the word is wrong. Either re-word at approval time (as
redraftUnsentdoes) or word it with the weekday. - (note) I could not see Ethan Brooks on the preview desk with my token (the page returned a short page with no leads), so the sample claim is verified only by the test.
Tick nothing yet; boxes 3 and 6 depend on fix 1 and 2 being checked again.
I've fixed points 1 and 2 on the same branch and pushed. The full bun test run (367 tests) passes. I ran no type check, because the repo has no tsconfig.json.
- Unsent confirmation after the showing starts.
advanceinsrc/leads.tsnow sets aside any unsent confirmation (draft, scheduled or due) once its showing's time has passed. It drops off the desk and the lead's ready slot, and the plan shows it as skipped. Reopening a lead re-plans the confirmation from its showing, and a showing already past gets none. A new test turns the clock to the showing and expects the due confirmation gone from the ready messages. - "Tomorrow" going stale. I took the weekday option instead of re-wording at approval time. The draft now reads "I'll see you Thursday, Mar 5 at 10:00 AM at 12 Example St." in the agent's zone, so it is true whenever it is approved. The plan label and the "see you tomorrow" intent are unchanged. The
confirmationDraftargument changed from "today"/"tomorrow" to this day string, and the tests were updated to match. - Ethan Brooks not on the preview desk. I can't explain the short page you saw. The sample is covered by a test that seeds a desk and finds his confirmation. Seeding runs only on a database that has never been opened, so an already-seeded preview won't show it unless it is reset to the samples.
The contract table is unchanged.
Both earlier asks are met. An unsent confirmation is now set aside once its showing begins, and the draft names the weekday and date instead of 'tomorrow'. I could not diff since db1b4f6d349d because that commit is not in the clone, so I read the whole change. contract.json is untouched, there is no new dependency, the address is escaped on the lead page, and the text is capped at MAX_BODY.text. Tests cover each box, and the sample Ethan Brooks plus README step 7 are in place. I did not run the preview, and I did not run bun test or tsc.
Booking a showing now drafts a "see you tomorrow" confirmation for the agent to approve, due at 8:00 the day before in their profile time zone. The full
bun testrun (366 tests) passes. The design lint printed nothing. I ran no type check, because the repo has notsconfig.jsonandtsconly printed its help text.scripts/gate.tsandscripts/fast.tsdon't exist here, so I ran the whole suite instead.What changed
MAX_BODY.textdrops the address.channelFor, so STOP and "Email only" are respected. Confirmations are numbered 400–499 insrc/drafts.ts, below the after-showing note (500) and answers (1000), and the plan shows them as "Before the showing".bookShowingno longer pushes a due confirmation back to scheduled.respaceignores the 400s. A confirmation is never made due once its showing has started.src/before-showing.test.tscovers each box in the issue, including a script-laden address coming out escaped.src/showings.test.tsasserted that the lead was absent from the desk the day before the showing. That is no longer true, because the confirmation is due then. It now asserts that the only message ready is the confirmation and that no follow-up is.What I chose not to do
contract.jsoncell and added no dependency or migration.leads.tsscheduling, so expect a small merge there.How to try it: Open the sample Ethan Brooks on a fresh desk to see the confirmation, then press "Book a showing" on another lead to see it appear.
🤖 Generated with Claude Code
Closes #73