Claude Opus 5.5 · Balanced
fix-handle-collective-multiple-host-on-destinationcalendar-cal-com
cal.com · TypeScript · S · 30–99 lines · 6 files
The normal review, with one generalist agent. Judge: Claude Haiku 5.5.
- Gold bugs found
- 6 of 9
- Comments published
- 6
- Comments matching a bug
- 6
- Comments not matching
- 0
- Cost of this PR
- $0.961
Published comments (6)
TypeError on Google Meet bookings with no destination calendar — Every Google Meet booking without a destination calendar crashes, because `mainHostDestinationCalendar` is undefined when `evt.destinationCalendar` is null or empty. Use optional chaining with `mainHostDestinationCalendar?.integration`.
Collective hosts' destination calendars dropped when organizer has none — When neither the event type nor `organizerUser` has a destination calendar, `destinationCalendar` is `null`, so `evt.destinationCalendar?.push(...teamDestinationCalendars)` silently does nothing. Default to `[]`, or assign `teamDestinationCalendars` when the array is missing.
Org `slug` condition inverted: set only when team billing is enabled — This reverses the previous behavior: with billing on, the org gets its final `slug` before payment, and with billing off, it gets none. Restore the `!IS_TEAM_BILLING_ENABLED` check for `slug` and keep `requestedSlug` only when billing is enabled.
Video booking references lose their credentialId — Use `result.credentialId` for both calendar and non-calendar results.
Update fallback compares externalId to a falsy id, so calendarId is always undefined — This branch runs only when `externalCalendarId` is falsy, so the `find` never matches, updates get no `calendarId`, and the old destination-calendar fallback is lost. Fall back to the destination calendar's `externalId` (first entry or the one matching this credential), then `primary`. **Also found in:** - `packages/app-store/googlecalendar/lib/CalendarService.ts:315-317`
Recurring calendar deletes repeat for every calendar reference — Because the block ignores the current `reference`, it deletes every remaining booking's event across all `_calendar` credentials once per reference. This repeats API calls and still uses only each booking's first `_calendar` reference.