Gemini 3.8 Flash · Heavy
fix-handle-collective-multiple-host-on-destinationcalendar-cal-com
cal.com · TypeScript · S · 30–99 lines · 6 files
The generalist plus 9 specialist lens agents in parallel, then the same verify and dedup steps. Judge: Claude Haiku 5.5.
- Gold bugs found
- 4 of 9
- Comments published
- 4
- Comments matching a bug
- 4
- Comments not matching
- 0
- Cost of this PR
- $1.047
Published comments (4)
Null destinationCalendar drops collective hosts' calendars — When an organizer has no calendar configured, `evt.destinationCalendar?.push(...)` silently skips adding `teamDestinationCalendars`. Default `destinationCalendar` to an empty array `[]` instead of `null` to preserve collective host calendars.
Inverted IS_TEAM_BILLING_ENABLED check for organization slug — Organizations created with team billing disabled are left without a `slug`. Restore `!IS_TEAM_BILLING_ENABLED ? { slug } : {}` so the organization receives its slug directly.
Unchecked access to mainHostDestinationCalendar causes TypeError — An empty `evt.destinationCalendar` causes `mainHostDestinationCalendar.integration` to throw an unhandled `TypeError` when checking `MeetLocationType`. Use optional chaining on `mainHostDestinationCalendar?.integration` to guard against `undefined`.
`selectedCalendar` fallback matches against falsy `externalCalendarId` — Matching against a falsy `externalCalendarId` always evaluates to `undefined`, leaving `selectedCalendar` unset. Fall back directly to `mainHostDestinationCalendar?.externalId` instead. **Also found in:** - `packages/app-store/googlecalendar/lib/CalendarService.ts:315-317` - `packages/app-store/googlecalendar/lib/CalendarService.ts:315-318`