Repository navigation
Description
Needs your OK: this changes the note in the Build tab's slot editor once a slot people hold has moved, to say they'll be emailed and when. Swap pipeline:proposed for pipeline:ready to have it built.
What happens
When an organizer opens a slot that people hold, the editor (SlotEditor in src/components/build-wysiwyg/SlotEditor.tsx) shows a note above its fields, added in #524. With reminders on, it reads: "2 people are signed up for this slot. If you change its date or time, we'll email them to let them know."
The note depends only on the count when the page loaded and on the reminders setting. When the organizer does change the date, the rail says "Saved" and the note still says "If you change…". Nothing says an email is now on its way, or when. In the walkthrough, the organizer couldn't tell whether the people on the slot would hear about the move.
What actually happens on main. The email does go, but later, and not from the page:
- The move is recorded.
updateSlotinsrc/services/slots.tswrites aslot.rescheduledactivity row when the slot's time (slot_at) changes. - The worker sends it. The worker (
pnpm worker) looks for moves every 2 minutes (slot-changes.dispatch,src/jobs/slot-changes.ts). Once a slot has stayed put for 10 minutes (SLOT_CHANGE_SETTLE_MINUTES), each person holding it gets a "Time changed: · " email with the slot's new details and their link to change or cancel. So it goes 10 to 12 minutes after the last change. With no worker running, nothing is sent. - Only to people who could get a reminder (
notifiableRulesinsrc/jobs/notify-rules.ts): reminders are on, they gave an email and haven't unsubscribed, the signup is open or closed, and the slot is still ahead. - Moved back, nothing sent. A slot put back where people were last told before the email goes sends nothing.
- Only the reminder date moves a slot.
slot_atcomes from the reminder date field and the time field paired with it (findReminderFieldsinsrc/lib/reminder-fields.ts). Changing another date field sends nothing.
To see it: create a signup by hand, give its slot a date next month, and publish it. From its public page, sign up for that slot as pat@example.com. Back in the Build tab, open the slot, change its date, and read the note after "Saved" shows.
Fix, in outline
- Change the note once a move has saved. With reminders on, when the slot's reminder date, or its paired time, differs from when the page loaded and the save has succeeded, the note reads: "You moved this slot. We'll email the 2 people signed up in about 10 minutes, with the new details."
- Moved back, first note back. If the organizer puts the date back, the note goes back to "If you change…". That matches the worker, which sends nothing for a slot moved back.
- Take the wait from the constant. Build "10 minutes" from
SLOT_CHANGE_SETTLE_MINUTES, as the help article does, so the note can't drift from the job. - Use the server's rule for which fields move a slot:
findReminderFields, so a change to another date field doesn't promise an email.
Watch for
- Screen readers. The note is a
role="note"(InlineNote), so a change to its text isn't announced. Announce the new line through a polite status, without making the whole note live. - The count is a snapshot.
takencomes fromcommittedBySlotwhen the page loaded, and includes people who unsubscribed, who get no email. Participants aren't told when the organizer moves their slot to a new date or time #524 accepted this for the first note. - Tests that pin the wording:
SlotEditor.test.tsx. - Overlap with Check the page when Publish and share is pressed #580, which changes
SlotEditor.tsx. Whichever lands second has a small merge. - CHANGELOG entry.
Choices this makes
- Wording, as above. Default: as written. It says what happened, who hears, and when, in the note the organizer already reads.
- Reminders off: the note stays as it is. Default: unchanged. "Reminders are off, so we won't email them if you change it." is still true after a move.
- Compare with the page as it loaded, not with the server's record. Default: the page as it loaded. The editor can tell without a new request. The cost: after a reload within the 10 minutes, the note says "If you change…" again, though the email still goes. Reading recent moves from the activity log would close that gap, at the price of a new query on the Build page.
- No question before a move saves. Default: none. Edits save as you type; the note tells, it doesn't ask.
Done when
- With reminders on, changing a held slot's date shows the new note once the save succeeds, with the count and "about 10 minutes".
- Changing the date back shows the first note again.
- Changing a date field that isn't the reminder field leaves the first note.
- With reminders off, the note doesn't change.
- Unit tests cover all four.
pnpm lint && pnpm typecheck && pnpm knip && pnpm testpass.
Found by the UX walkthrough (scenario O4) on 2026-10-24, and checked against the code on main at 4ed27a9.
Generated by Claude Code
Activity