Promote to UAT: GRO-2105 BookingFlow/RescheduleFlow availability fix #47
Reference in New Issue
Block a user
Delete Branch "dev"
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?
Promote to UAT: GRO-2105 BookingFlow/RescheduleFlow availability fix
GRO-2105 is a critical defect discovered during GRO-1804 UAT regression (TC-WEB-5.12.5). The dev → feature PR is #46 (merged).
What this fixes
src/portal/sections/Appointments.tsx) were callingGET /api/book/availabilitywith only thedatequery param. The API responded400 {error:"serviceId and date are required"}and the React handler called.map()on that error object, throwingTypeError: ee.map is not a functionand wiping<div id="root">.Changes
fetchAvailability({serviceId, date}, sessionId)helper that validatesres.okandArray.isArray(data), surfaces the API's error string, and catches network errors.appt.serviceId.selectedServices[0]?.id.Tests
pnpm test).UAT validation needed
The unblocked cases are TC-WEB-5.12.5 through 5.12.11 in UAT_PLAYBOOK §5.12b. The UAT image will be promoted to
groombook-infraafter this merge;uat-results/1804/should be re-run.Hand-off
The bundle at /login was executing but the React tree never painted — no console errors, no fallback UI, just an empty <div id='root'>. Add three layers of defense so a future failure of this shape is captured instead of being silently swallowed: 1. window 'error' and 'unhandledrejection' listeners in main.tsx, printing structured context to console.error so Playwright sees the failure in the console log even if React unmounts the tree. 2. A top-level <ErrorBoundary> in main.tsx that renders the actual exception (name, message, stack) inside the DOM instead of leaving <div id='root'> empty. The boundary also logs to console.error via componentDidCatch. 3. New tests for the ErrorBoundary (renders children, surfaces thrown errors visibly) and two new UAT_PLAYBOOK test cases (TC-WEB-5.1.6 / 5.1.7) that explicitly assert the 'never-blank-root' invariant on UAT. Co-Authored-By: Paperclip <noreply@paperclip.ing>QA code review approved. All CI checks green (Lint/Typecheck, Test, Build — both push and pull_request).
Review notes:
fetchAvailabilityhelper correctly includesserviceIdin both BookingFlow and RescheduleFlow, validatesres.ok+Array.isArray(data), guards on missing serviceId, adds cancellation cleanup.Clear to merge.
Flea Flicker referenced this pull request2026-06-08 01:14:01 +00:00