Skip to content

Commit 65fd2f5

Browse files
committed
Update documentation for recent changes
- README.md: add reminder_10_enabled and reminder_5_enabled config keys - CLAUDE.md: note reminder toggle keys in config sheet description - tests/CLAUDE.md: add cli.checkin.test.js to test file list - apps-script/CLAUDE.md: update checkInReservation() entry to reflect bug fix
1 parent 284ad42 commit 65fd2f5

4 files changed

Lines changed: 5 additions & 2 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Six logical "sheets" (Google Sheets in prod, JSON locally):
3636
- **chargers** — config + active session reference
3737
- **sessions** — active/completed charging sessions
3838
- **reservations** — bookings with check-in and no-show data. `released_early` (bool) is stamped `true` when a checked-in session ends before the halfway point of the reservation window, preserving the user's net-new status and daily allotment.
39-
- **config** — key/value settings (grace periods, limits, etc.). Notable keys: `reservation_open_hour` supports `"H:MM"` format (e.g. `"5:45"`), `walkup_net_new_window_minutes` controls Option A priority window.
39+
- **config** — key/value settings (grace periods, limits, etc.). Notable keys: `reservation_open_hour` supports `"H:MM"` format (e.g. `"5:45"`), `walkup_net_new_window_minutes` controls Option A priority window, `reminder_10_enabled` / `reminder_5_enabled` toggle the 10- and 5-minute session-end warnings (both default off).
4040
- **strikes** — per-user no-show strike records
4141
- **suspensions** — temporary bans from strike threshold
4242

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ Key/value settings (strings). Common keys:
125125
- `reservation_open_minute`: earliest local minute for same-day booking.
126126
- `walkup_net_new_window_minutes`: walk-up priority window for net-new users after a slot opens.
127127
- `walkup_returning_window_minutes`: additional walk-up window for returning users before full open access.
128+
- `reminder_10_enabled`: set to `true` to enable the 10-minute session-end warning (default off).
129+
- `reminder_5_enabled`: set to `true` to enable the 5-minute session-end warning (default off).
128130

129131
## Reservation rules
130132
- Same-day only.

apps-script/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Production Google Apps Script code. No build step — files are deployed directl
2424
- `isReturningUser_(userEmail, sessions, reservations, now)` — returns true if the user charged or made a qualifying reservation today. Early-released sessions/reservations do not count.
2525
- `completeReservationForSession_(session, now)` — called on session end; stamps `released_early: true` on the reservation if `now` is before the reservation's halfway point (using the original planned `end_time` before it is overwritten).
2626
- `getReservationConfig_(config)` — parses all reservation settings. Supports `"H:MM"` format in `reservation_open_hour` (e.g. `"5:45"` correctly sets 5:45 AM).
27-
- `checkInReservation()` — early-check-in window uses `earlyStartMinutes` only (not the old `Math.max` conflation with `checkinEarlyMinutes`).
27+
- `checkInReservation()`always delegates session creation to `startSessionForReservation_()` for both early and on-time check-ins. This ensures admin check-ins and reservation-owner check-ins bypass walk-up tier rules correctly. Previously the on-time path called `startSession()` which re-evaluated walk-up rules against the caller's email, breaking admin check-ins.
2828
- `validateReservation_()` — per-day check runs before upcoming-count check so users get the clearer error message first.
2929

3030
## Frontend patterns

tests/CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Jest test suite targeting `cli/engine.js` (business logic) and `apps-script/scri
77
- **cli.policy.test.js** — reservation limits (max upcoming, per-day), no-show strikes, suspensions, early-start rules, prior reservation protection, early/late session-release halfway rule.
88
- **cli.admin.test.js** — admin force-end sessions, reset charger.
99
- **cli.reservation-session.test.js** — check-in lifecycle, session auto-start on check-in, matching reservations to sessions.
10+
- **cli.checkin.test.js** — comprehensive check-in coverage: on-time and early happy paths, timing boundaries, authorization (user/admin/case-insensitive), reservation state guards, active session conflict, suspension, early-start error cases (charger busy, previous reservation grace window), double check-in, return value.
1011
- **ui.test.js** — DOM rendering via jsdom, board data display, action handler behavior, and new mobile-UI features.
1112

1213
## Running tests

0 commit comments

Comments
 (0)