PR #127 merged: fix: resolve 3 Sentry production errors
Summary
Fixes three production issues from Sentry:
Stack overflow on /cleaner/payments/connect (Fixes TIDY-LINKER-2Y)
Wayfinder route functions called at module-level in breadcrumb declarations caused RangeError: Maximum call stack size exceeded on Chrome Mobile iOS. Moved breadcrumbs inside component functions across 8 cleaner pages so routes are evaluated lazily.
Resend rate limit on /admin/nudge/bulk (Fixes TIDY-LINKER-2X)
Bulk nudge sent emails synchronously in a tight loop, hitting Resend's 5 req/sec limit. All 5 nudge mailables now implement ShouldQueue and dispatch to the notifications queue.
N+1 query on /cleaner/availability (Fixes TIDY-LINKER-26)
getCalendarMonth() ran ~93 queries (3 per day x 31 days). Refactored to pre-load all slots, overrides, and booked jobs upfront (3 queries total). New computeAvailableSlots() method operates on pre-loaded collections.
Test plan
- 93 tests passed (375 assertions)
- Pint, Prettier, ESLint clean
-
npm run buildclean - Deploy and verify Sentry issues stop recurring
- Test bulk nudge — emails should queue instead of sending inline
- Test /cleaner/payments/connect on mobile Safari/Chrome iOS
- Test /cleaner/availability loads without N+1 warnings