Skip to content

fix: intersect guest availability during rescheduling flow #16378#28663

Draft
nyazsrhana-arch wants to merge 2 commits intocalcom:mainfrom
nyazsrhana-arch:main
Draft

fix: intersect guest availability during rescheduling flow #16378#28663
nyazsrhana-arch wants to merge 2 commits intocalcom:mainfrom
nyazsrhana-arch:main

Conversation

@nyazsrhana-arch
Copy link
Copy Markdown

This PR addresses issue #16378 by ensuring that only overlapping time slots between the host and the guest are displayed during the rescheduling process.

Changes Made

  • Modified getHostsAndGuests.ts to include id for guests.
  • Created getSharedAvailability.ts to handle the intersection logic between host and guest slots.

Screenshot_2026-03-29-22-33-45-262_com termux
Verification

  • Successfully ran unit tests in a mobile development environment (Termux).
  • Result: 2/2 tests passed. (See attached screenshot).

/claim #16378

@nyazsrhana-arch nyazsrhana-arch requested a review from a team as a code owner March 29, 2026 20:03
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Copy link
Copy Markdown
Contributor

@Ryukemeister Ryukemeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey there, thank you for your contribution. I think this PR is still not complete, because even if the function getSharedAvailabilitySlots worked perfectly, there's no code connecting it to the booker or rescheduling UI. there are also no test cases present, hence i'll shift this into draft. please ping me when this is complete.

@@ -0,0 +1,17 @@
export function getSharedAvailabilitySlots(hostSlots: any[], guestSlots: any[]) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this being used anywhere, seems to be dead code. @nyazsrhana-arch can you confirm this?


type BookingInput = {
attendees?: { email: string; name: string }[] | null;
attendees: { id?: number; email: string; name: string }[] | null;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be a breaking change, what was the reason behind making attendees not optional?

@Ryukemeister Ryukemeister marked this pull request as draft April 1, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants