Repository navigation
Conversation
On a review page grouped by a date field, each date's group now has Remove day, which deletes that date's slots, folded or not. The page then says "Removed Sat, Apr 6 and its 4 slots." with Undo, which puts the slots back with their values, spots, places and closed state. The notices' one-tap fixes and Remove day now share one status line and one Undo, for whichever was last: a small client provider around the card's notices and slot list holds it, lifted out of NoticeFixes, while the rows stay server-rendered. Remove day is offered only for a group with a date, of up to 500 slots, and not for a date whose slots are the only filled-in ones, as the draft would then open in the builder and lose its Undo. The server finds the day again on fresh data by the same rule the page groups by, and removes nothing unless it has exactly the slots the page showed, so a slot moved or added there meanwhile, by another tab or an AI assistant, is refused. Slots are deleted through the per-slot loop the empty-slot fix already used, now shared, and Undo goes through the same undo action as a fix. It refuses once the date field is gone or no longer a date, or a slot is on that date again. A slot editor left open on a removed day closes. Undo writes review.fix_undone with kind remove_day; the remove itself is recorded by each slot's slot.deleted row. The help page names the button and its walkthrough removes a date and undoes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BTvMvHZ4i4FWQFAsxcr5Zm
The page's first load grows from 113.7 to 114.1 kB with the Remove day button and the shared change line it moves out of the notices' island, so its budget goes from 114 to 115 kB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BTvMvHZ4i4FWQFAsxcr5Zm
…-page change Code-review fixes for Remove day. Slots now go all together or not at all. A new service, deleteDraftSlots, deletes several of a draft's slots in one transaction under the signup lock. It refuses a signup that is no longer a draft, including one published while it waited, a slot that isn't the signup's any more, and any slot someone has signed up for, and writes one slot.deleted row with a bulk payload. Remove day and the empty-slot fix both use it, so neither can stop partway any more, and the "Removed 2 of the 4 slots" wording is gone. The page no longer sends every slot id of a day. It sends a short fingerprint of them, which the server works out again from the slots as they are now. The day is named by the group header's own formatter, now shared from src/lib/slot-label.ts, for both the button's name and the done text, and the request reuses the slot-field RefSchema. A slot left open with unsaved changes is saved before a fix, Remove day or Undo is made, as choosing another slot saves it. If that save is refused, the slot stays open saying why and the change isn't made. The slot list closes an open slot whose row is missing only when every row is drawn, so a slot that is merely folded away stays open. A refused Remove day now says why under its own button and takes focus. If the day has gone from the page that came back, the message moves to the card's line. Remove day records a new review.slots_edited event with kind remove_day, next to its Undo's review.fix_undone. The telemetry doc, the privacy page and the changelog say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BTvMvHZ4i4FWQFAsxcr5Zm
Owner
Author
|
Tophat: pass, in the running app with made-up data (
Code review on this PR. Fixed in a120590:
Checks on a120590: lint, typecheck, knip, unit (1550), Generated by Claude Code |
This was referenced Oct 21, 2026
Owner
Author
|
Closing without merging, as part of the redesign in #498. The branch stays: Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #504 (part 2 of 3; part 1 is #535, "People for each slot" comes next). Part of #498. Stacked on #535; the diff here is only Remove day.
What changes
When a draft's slots are grouped by a date field, each day on the review page has Remove day. It removes that day and all its slots, then says "Removed Thu, Jun 6 and its 2 slots." with Undo, which puts them all back.
<summary>would toggle the group, and axe flags it as nested-interactive.How it works
NoticeFixesinto a small provider,ReviewChanges.tsx. The notices' one-tap fixes and Remove day share one line and one last-action Undo. A Remove day refusal shows under the button that was pressed.removeDayActiongoes throughrunFixtoremoveDraftDayinsrc/services/draft-fixes.ts, which:loadDraft, so it works on drafts only and refuses viewers;deleteDraftSlotsservice insrc/services/slots.tsruns in one transaction. It re-checks under the signup lock that the signup is still a draft, so a publish landing mid-way loses nothing. It refuses unknown or booked slots and writes oneslot.deletedrow{ bulk: true, slotIds, count }. "Remove it" (empty slots, Fix four kinds of draft problem in one tap on the review page, with Undo #533) uses it too, so neither can stop partway.undoDraftFixActionlike every fix and restores throughaddSlotsBulk, closing again any slots that were closed. It's refused ("That changed again since…") when the date field is gone or no longer a date, or any slot is on that date again. That last check also stops a second Undo.groupKeyOfinsrc/lib/slot-label.ts, andformatGroupLabelmoved beside it, so the page, the button and the server group and name days the same way.review.slots_edited { kind: 'remove_day' }is written after a Remove day, and Undo writesreview.fix_undone { kind: 'remove_day' }.docs/telemetry.mdand the privacy page say so.Budget
/app/signups/[id]: 114 → 115 kB (measured 114.5). The first load now includes the button and the shared change line that moved out of the notices' island.Help
"Create and publish your first signup": "If your slots are grouped by date, choose Remove day under a date to remove it and all its slots. Right after, Undo puts them back." A new walkthrough test removes a day, checks that its rows are gone and that Undo has focus, then undoes and reloads.
Checks
pnpm lint && pnpm typecheck && pnpm knip && pnpm test: pass (1550)pnpm test:db: pass (611), including the new delete service's tests and the action testspnpm build && pnpm budgets: passTophat and the code-review fixes are in the comments.
🤖 Generated with Claude Code
https://claude.ai/code/session_01BTvMvHZ4i4FWQFAsxcr5Zm