What does this PR do?

When a host reschedules a booking, this PR checks if any attendees (guests) are Cal.com users. If they are, their existing bookings are fetched as busy times and included in the available slots calculation — ensuring the host can only reschedule to times that work for both parties.

Problem

Currently, when a host reschedules, the system doesn’t check the guest’s availability. If the guest is a Cal.com user, this can result in scheduling conflicts.

Solution (minimal, focused changes)

  1. UserRepository.findUsersByEmails() — Looks up Cal.com users by attendee emails
  2. BookingRepository.findAcceptedBookingsByUserIdsOrEmails() — Fetches accepted bookings for those users within the date range
  3. getUserAvailability — Accepts optional guestBusyTimes in initialData
  4. slots/util.ts — Orchestrates the flow: when rescheduleUid is present, fetches guest busy times and passes them through

Design decisions

  • Graceful degradation: If guest availability lookup fails, rescheduling still works (logged as warning)
  • Only Cal.com users: Non-Cal.com guests are skipped (we cannot check their calendar)
  • Excludes current booking: The booking being rescheduled is excluded from busy time calculation
  • No UI changes: The existing reschedule UI automatically respects the filtered slots

Files changed (5 files)

  • packages/features/users/repositories/UserRepository.ts
  • packages/features/bookings/repositories/BookingRepository.ts
  • packages/features/availability/lib/getUserAvailability.ts
  • packages/trpc/server/routers/viewer/slots/util.ts
  • apps/web/playwright/reschedule-guest-availability.e2e.ts

E2E coverage added

Added end-to-end coverage for host reschedule + guest availability in:

  • apps/web/playwright/reschedule-guest-availability.e2e.ts

Scenarios covered:

  1. Guest conflict blocks conflicting slots
  2. All guests available allows successful reschedule
  3. External (non-Cal.com) guest does not affect reschedule
  4. Multiple guests (mixed Cal.com + external)
  5. Original booking is excluded from self-conflict during reschedule

Visual demo

/claim #16378

Fixes #16378

Claim

Total prize pool $200
Total paid $0
Status Pending
Submitted February 15, 2026
Last updated February 15, 2026

Contributors

LA

Lawrence Kwan

@MrLawrenceKwan

100%

Sponsors

CA

Cal.com, Inc.

@cal

$200