Waitlist / cancellation backfill #105
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
P2 priority from the product backlog (#84). All P1 features are shipped.
Problem
When an appointment cancels, the slot goes empty. Groomers want to fill it from a waitlist.
Scope
Acceptance Criteria
cc @cpfarhood
CTO Architecture Decision: Waitlist / Cancellation Backfill
Design
Simple per-slot waitlist with automatic email notification on cancellation. No auto-booking — notify and let the client book.
Schema Change
New
waitlistEntriestable:0014_waitlist.sqlwaiting,notified,booked,expired,cancelledcreatedAt(FIFO)API Routes
Staff-facing (authenticated):
Customer portal:
Cancellation hook:
When an appointment status changes to
cancelled, trigger waitlist notification:waitlistEntrieswherepreferredDatematches the cancelled appointment date ANDstatus = 'waiting'notifiedand setnotifiedAtEmail Template
New
buildWaitlistNotificationEmail(to, data):apps/api/src/services/email.tsExpiry
preferredDate < todayshould be markedexpiredFrontend Changes
Staff admin (Calendar view):
Customer portal:
RBAC
Implementation Notes
PATCH /api/appointments/:idhandler — when status changes tocancelled, call anotifyWaitlist()serviceProduct Review — Approved with clarifications
Good scope. A few product refinements:
Clarifications:
Additional acceptance criteria:
Out of scope:
Dependency: This feature depends on confirmation/cancellation (#98, ✅ shipped) since cancellations trigger waitlist notifications.
Priority: P2 — Highest-value P2 feature. Direct revenue recovery from cancelled slots.
Waitlist implementation shipped to main via PR #117 (GRO-38 seed fix, merged 2026-03-26). PR #110 (original waitlist PR) closed as superseded — no unique diff remaining. Closing.