Loop 002 — Barber blocks time off; client cancels with their own link

2026-11-15 · The barber can now block a lunch break, a day off or a week away from the phone, and clients can no longer book those times. Client self-cancel was already there; now the client's page also says who cancelled.

Why

The barber needs to block time off (a lunch break or a whole day) so clients cannot book it, and a client must be able to cancel their own booking with a link they get after booking.

This was a test run with the owner unavailable. Every new choice is assumed (D14–D20 in DECISIONS.md). The second half of the request already worked from Loop 001: the booking link shown after booking (also inside the calendar file) cancels in two taps. This loop checked it again in a real browser and filled one gap.

What changed

Block time form on a 390px phone: date, a Whole day checkbox, From 12:00 and To 13:00, Repeat until, a private label set to Lunch, and a Block this time button.
Block time: lunch is prefilled for the day shown.
Time blocked confirmation: Tuesday 17 November 12:00 to 13:00, Lunch; 1 booking is inside this time, Jordan Lee at 12:30 with a phone link and Cancel; Remove this block button.
Saved. The booking inside the block is kept and named.
Barber day view: Jordan Lee at 12:30 outlined in red with the text Inside blocked time, call to move or cancel; below it the Blocked list with 12:00 to 13:00 Lunch and a Remove link, and a Block time button.
Day view: bookings first, the flagged one in red, then blocks.
Client booking page for Tuesday 17 November: free times jump from 11:30 to 13:00; 12:00 and 12:30 are not offered and no label is shown.
Client view: 12:00 and 12:30 are gone, with no label.
Client day strip where Wednesday 18 November shows Closed like the Sundays.
A whole day off shows Closed.
Client manage page titled Cancelled by the shop, the struck-through booking, the message The shop cancelled this booking, and a Book another time button.
The client's link after the barber cancelled.

Checks

CommandResultNotes
npm run format:checkpassedPrettier: all files formatted.
npm run lintpassed0 warnings (a first run flagged two optional chains in the new test; fixed).
npm run typecheckpassedtsc strict, app and e2e projects.
npm testpassed56/56 (37 from Loop 001 plus 19 new): overlap edges, off-grid blocks, whole days, ranges, Closed days, form validation, block store, HTTP create/list/remove, cross-site and signed-out refusals, flagged bookings, manage page wording.
npm run test:e2epassed5/5 in Chromium at 390px: the Loop 001 flows (including client cancel from the link) plus lunch block, day off, Closed day, stale link refused, barber cancel shown to the client, remove block; and blocking and unblocking with JavaScript disabled.
lint_diagramspassed5 diagrams in ARCHITECTURE.md and PRODUCT.md, no issues.
CI workflownot_runNo remote; the owner said never push.

What is left