Repository navigation
Conversation
Once a change to a held slot's reminder date, or the time paired with it, has saved, the note in its editor reads "You moved this slot. We'll email the 2 people signed up in about 10 minutes, with the new details." in place of "If you change its date or time…", and a polite status says the same line to screen readers. The wait is SLOT_CHANGE_SETTLE_MINUTES. The Build tab compares the values the page loaded with those the server last accepted, through the instant slot_at is built from (date, paired time, 12:00 for none), so a change to another date field, a slot put back where it was, or one moved into the past keeps the first note, as the worker sends nothing for those. Reminders off: unchanged. Translated into Swedish and German; the Build tab's budget goes to 152 kB for the new check and message. Fixes #599. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YZ9SSJa9cz4jcAL1B4QLi
Tophat: passedI ran 1ac0906 locally with
For the owner (UX): the change is the wording of a slot editor's note. Once an organizer saves a new date or time for a slot that people hold, the note stops saying "If you change its date or time…". It now says the slot moved, who will be emailed, and roughly when. The note goes back to the first wording when the slot is put back, moved into the past, or has reminders off. It's a page-session state: when I reloaded the page after a move, the note was back to "If you change…" even though the email was still on its way. The PR describes this design (it compares with the values the page loaded). Screenshots:
Screenshots are in https://claude.ai/code/session_016YZ9STa5aTQAkze9LZqK5N. Generated by Claude Code |
richshaw
left a comment
There was a problem hiding this comment.
Review: passed (round 1)
This fixes #599 the way its outline asks. slotMoved in useBuildState compares each slot's instant as the page loaded it with the instant from savedValues, which is only written after a PATCH, add, duplicate or reorder refetch succeeds, so the note never runs ahead of the server and a refused value can't flip it. slotInstantOf follows extractSlotAt step by step: the date field the reminder ref names, pairedTimeField for its time, 12:00 when there's no valid time, null without a real date, all in UTC. state.reminderFieldRef is the stored reminderFromFieldRef gated on sendReminders (reminderFieldFrom, kept in step with field changes by mirrorFieldChange), so it matches findReminderFields on the server, and a change to another date field can't promise an email. The past-slot case matches notifiableRules, which only emails about a slot still ahead. The status span mounts empty with the editor and fills on a move, so it's announced once while the note stays a plain role="note". The wait comes from SLOT_CHANGE_SETTLE_MINUTES through an ICU plural. Every "Done when" item is met and has a test: the new note after a saved move (and not while the save is pending), back to the first note when the date is put back, unchanged for another date field, unchanged with reminders off. It also tests the paired time and a slot moved into the past. The message is translated into sv and de, and both translated-from records were updated.
Blocking (0)
Optional (1):
useBuildState.tsslotMoved: it compares with the page as loaded, not with what participants were last told. So the note is wrong in two cases. After a reload it shows the first note though an email is still pending. And if a slot was moved before the page loaded and is then put back to that loaded value, the note shows "If you change…" while the worker may still email about the earlier move. The issue chose this trade-off ("Compare with the page as it loaded"), and the PR and CHANGELOG say so. No change needed.
Earlier threads: none. Copilot couldn't review (quota).
Checks: CI is green on 1ac0906 (lint-type-test, e2e, CodeQL). The tophat passed on 1ac0906, the head, so no runtime code changed since. Its neighbour check saw the worker send the "Time changed" email about 11 minutes after the move, as the note says. A trial merge with main (git merge-tree) is clean. Locally I read the diff, extractSlotAt / findReminderFields / pairedTimeField, every place that writes savedValues, and reminderFieldFrom / mirrorFieldChange, and went through the repo checklist. No services, schema, help or legal pages are touched.
Why the owner: it's UX, and it raises a budget. Once an organizer saves a new date or time for a slot people hold, the slot editor's note changes to "You moved this slot. We'll email the 2 people signed up in about 10 minutes, with the new details." It goes back to the first note if the slot is put back, moved into the past, or reminders are off. budgets.json raises /app/signups/[id]/build from 151.6 to 152 kB, about 0.5 kB for the check, the message and the status line. #1077, #1076 and #1068 also raise this budget, so whichever lands second gets a one-line conflict. The tophat's screenshots to look at are 1079-after-move, 1079-after-move-phone, 1079-sv-moved-phone, 1079-moved-back, 1079-moved-past and 1079-reminders-off.
https://claude.ai/code/session_016YZ9STg3kL2NGVvvB8ZHAR
Generated by Claude Code
Owner: Build page size limit raise approvedThe owner approved, in a live session, raising the This covers the size limit only. The change itself still waits at https://claude.ai/code/session_016YZ9SS7PCSeTVXMcS859ee Generated by Claude Code |
Fixes #599.
Merge order: #1077, #1076 and #1068 also raise the
/app/signups/[id]/buildbudget inbudgets.json, so whichever of them lands second has a one-line conflict there.The problem
When an organizer opens a slot that people hold, its editor says "If you change its date or time, we'll email them to let them know." After the organizer changes the date and the rail says "Saved", the note still says the same thing. Nothing tells them that an email is now on its way, or when.
The fix
New note once a move has saved (
SlotEditor.tsx). With reminders on, the note now reads: "You moved this slot. We'll email the 2 people signed up in about 10 minutes, with the new details." (For one person: "the person signed up".) The minutes come fromSLOT_CHANGE_SETTLE_MINUTESthrough an ICU plural, so the note can't drift from the worker.Screen readers. A visually hidden
role="status"says the moved line when it appears. The note itself stays a plainrole="note", so it isn't read out whole on every change.Which changes count (
slotMovedinuseBuildState.ts). The tab compares the values the page loaded with the values the server last accepted (thesavedValuesmap that A refused cell edit in the builder stays on screen and blocks the rest of the row, and a later save says "Saved" #514 keeps). It compares them throughslotInstantOf(build-shared/slot-instant.ts), which uses the same ruleextractSlotAtbuildsslot_atwith:pairedTimeFieldpairs with it;Because it reads what has saved, the note never runs ahead of the server, and a refused value never flips it.
When the first note stays. The first note stays in each case where the worker sends nothing:
Decisions the issue didn't make:
notifiableRulesonly emails about a slot that is still ahead, so the moved note there would promise an email that never goes.formatDuration. Importingformat-durationinto the Build tab reshuffled a shared chunk. That added 0.2 kB to/app/signups/newand to/s/[slug]/c/[id], which pushed both over budget.slotInstantOflives underbuild-shared/, notsrc/lib/reminder-fields.ts. Inreminder-fields.tsit would ship in that module's chunk to participant pages too.Budget.
/app/signups/[id]/buildgoes from 151.6 to 152 kB. The page measured 152.0 kB with this change and 151.5 kB onmainin the same container, so the check, the note's message and the status line cost about 0.5 kB. No other page moved.Translations. Swedish and German translations of
organizer.build.editor.moved, marked withmark-translated.mjs.en.d.json.tswas rewritten by the build.CHANGELOG entry under Changed.
The help article "Create and publish your first signup" already says the email goes "about {SLOT_CHANGE_DELAY} after your last change", so it needs no change.
affected-articles.mjsnames no article.Translation review
A different model reviewed
organizer.build.editor.movedin sv and de againsteditor.signedUp, the glossaries and the number rules. It checked every plural branch for 1, 2, 5 and 1234 people and for 1, 10 and 60 minutes. No findings. Neither language changed after the review. The moved state has no screenshot intranslation:screenshots, so the review was done from the keys, the English and the neighbouring messages.Tests
New tests:
slot-instant.test.ts: the date with its paired time, 12:00 for a slot with no time or an invalid time, null without a real date, and another date field ignored.useBuildState.test.ts→slotMoved:SlotEditor.test.tsx:Run in this session, all passing:
pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test: 249 files, 3779 tests.pnpm build && pnpm budgets: every page within budget after the raise above.pnpm test:e2eforbuild-tab-language,precompiled-messagesandorganizerin chromium: 63 passed. The mobile-safari project couldn't launch its browser in this container (running as root without a sandbox), and CI runs chromium only.Before merging
Nothing to run. This waits for the owner because it changes the Build tab's wording (UX) and raises a budget.
Generated by Claude Code