Skip to content

feat(slots): add functionality to check if booker is a Cal.com user and include their availability when rescheduling#25346

Open
krishvsoni wants to merge 41 commits intocalcom:mainfrom
krishvsoni:cal-4531/reschedule-guest-availability
Open

feat(slots): add functionality to check if booker is a Cal.com user and include their availability when rescheduling#25346
krishvsoni wants to merge 41 commits intocalcom:mainfrom
krishvsoni:cal-4531/reschedule-guest-availability

Conversation

@krishvsoni
Copy link
Copy Markdown

feat(slots): check booker availability when host reschedules if booker is a Cal.com user

What does this PR do?

This PR adds functionality to check if a booking's attendee (booker) is a Cal.com user when the host attempts to reschedule. If the booker is a Cal.com user, their availability (including connected calendars) is included in the slot calculation, ensuring only mutually available time slots are displayed.

Key Changes:

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Chore (dependency updates, tooling changes, etc.)
  • Documentation update

Visual Demo

  • In the video, I compared both cases in the main branch with mine. It shows both users’ availability, and then on the calendar, the days where either user is not available are removed.
    In the video, User A is not available on Monday and User B is not available on Wednesday, so both days are not displayed on the calendar
2025-11-22.16-20-16.mp4

Before:

When a host reschedules a booking, the system only checks the host's availability and ignores the booker's calendar, even if the booker is a Cal.com user with their own availability settings and connected calendars.

After:

When a host reschedules:

  1. System checks if the booker's email belongs to a Cal.com user
  2. If yes, fetches the booker's availability and calendar conflicts
  3. Only displays time slots where both the host and booker are free

How to Verify:

Check the browser console/network tab for the log message:

"Booker is a Cal.com user, including their availability"

This confirms the booker's availability is being checked.

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A - This change is internal logic and doesn't require documentation updates.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

Prerequisites:

  • Two Cal.com users (User A and User B) with different availability/schedules
  • Both users should have connected calendars (Google Calendar, Outlook, etc.)

Test Steps:

  1. Setup Users:

    • User A: Set specific working hours (e.g., 9 AM - 5 PM)
    • User B: Set different working hours (e.g., 10 AM - 6 PM)
    • Add some calendar events to both users' calendars
  2. Create Initial Booking:

    • Login as User A
    • Book a meeting with User B's event type
    • Logout from User A
  3. Test Rescheduling:

    • Login as User B (the host)
    • Navigate to the booking
    • Click "Reschedule"
    • Observe available time slots
  4. Expected Results:

    • Only time slots where BOTH users are free should be displayed
    • If User A has a meeting at 2 PM, that slot should NOT appear
    • If User B has a meeting at 3 PM, that slot should NOT appear
    • Only overlapping availability windows should show slots
  5. Verify Logs:

    • Open browser DevTools (F12)
    • Go to Console tab
    • Look for: "Booker is a Cal.com user, including their availability"
    • Check Network tab for API call to /api/trpc/slots.getSchedule

Edge Cases to Test:

  1. Non-Cal.com User as Booker:

    • Book with a non-Cal.com email (e.g., external guest)
    • Host reschedules
    • Expected: System should work as before (only check host availability)
  2. Team Event:

    • Book a team event where booker is a Cal.com user
    • Any team member tries to reschedule
    • Expected: Booker availability should be included

Environment Variables:

No additional environment variables needed beyond standard Cal.com setup.

Minimal Test Data:

  • 2 Cal.com users with different email addresses
  • At least one event type configured
  • Optional: Connected calendar integrations for realistic testing

Checklist

  • I have read the contributing guide
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have checked if my changes generate no new warnings
  • New and existing unit tests pass locally with my changes

Additional Notes

Technical Implementation:

  • Uses existing findByUidIncludeEventType method from BookingRepository to fetch booking with attendees
  • Uses existing findUsersForAvailabilityCheck to fetch booker's full availability data
  • Integrates seamlessly with existing availability calculation logic
  • No breaking changes to existing functionality

Performance Considerations:

  • Additional database queries only run when rescheduleUid is present
  • Negligible performance impact as it reuses existing availability check infrastructure

Future Enhancements:

  • Could be extended to support multiple bookers in group bookings
  • Could add UI indicator showing that mutual availability is being checked

@krishvsoni krishvsoni requested a review from a team as a code owner November 22, 2025 11:05
@vercel
Copy link
Copy Markdown

vercel bot commented Nov 22, 2025

@krishvsoni is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Nov 22, 2025
@github-actions github-actions bot added $200 bookings area: bookings, availability, timezones, double booking Medium priority Created by Linear-GitHub Sync ✨ feature New feature or request 💎 Bounty A bounty on Algora.io 🧹 Improvements Improvements to existing features. Mostly UX/UI labels Nov 22, 2025
@krishvsoni krishvsoni changed the title feat(slots): add functionality to check if booker is a Cal.com user …nd include their availability when rescheduling feat(slots): add functionality to check if booker is a Cal.com user and include their availability when rescheduling Nov 22, 2025
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.

1 issue found across 1 file

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="packages/trpc/server/routers/viewer/slots/util.ts">

<violation number="1" location="packages/trpc/server/routers/viewer/slots/util.ts:1078">
Rule violated: **Avoid Logging Sensitive Information**

Remove the booker’s email from the log payload to avoid emitting personally identifiable information in logs.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 2, 2025

This PR has been marked as stale due to inactivity. If you're still working on it or need any help, please let us know or update the PR to keep it active.

@github-actions github-actions bot added the Stale label Dec 2, 2025
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 1 file

@krishvsoni
Copy link
Copy Markdown
Author

@anikdhabal could you please review the changes I’ve submitted? Let me know if anything needs adjustment

@github-actions github-actions bot removed the Stale label Dec 3, 2025
@krishvsoni krishvsoni requested a review from a team as a code owner December 26, 2025 11:17
@github-actions github-actions bot added ❗️ migrations contains migration files ❗️ .env changes contains changes to env variables labels Dec 26, 2025
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Dec 26, 2025

CLA assistant check
All committers have signed the CLA.

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.

6 issues found across 1022 files

Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed.

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name=".env.example">

<violation number="1" location=".env.example:515">
P2: Ad tracking features should default to disabled (`=0` or empty) in `.env.example`, consistent with other feature flags like `GOOGLE_LOGIN_ENABLED=false` and `ORGANIZATIONS_ENABLED=`. Self-hosters copying this example would have tracking enabled by default, which may not be desired for privacy-conscious deployments.</violation>
</file>

<file name=".github/workflows/labeler.yml">

<violation number="1" location=".github/workflows/labeler.yml:23">
P1: Secrets context is not available in job-level `if:` conditionals. This condition will not work as expected. Consider using a different approach, such as checking the secret in a step or using a repository variable to gate this job.</violation>

<violation number="2" location=".github/workflows/labeler.yml:26">
P2: Using `@main` for a third-party action is a security risk. Pin to a specific commit SHA (e.g., `equitybee/team-label-action@abc123...`) to prevent unexpected changes or supply chain attacks.</violation>
</file>

<file name=".github/workflows/pr.yml">

<violation number="1" location=".github/workflows/pr.yml:275">
P0: Bug: Reference to renamed job `needs.changes` should be `needs.prepare`. The `changes` job was renamed to `prepare` but this reference wasn&#39;t updated, which will cause the condition to malfunction.</violation>

<violation number="2" location=".github/workflows/pr.yml:283">
P1: The new failure detection only checks for `failure` results, but per team policy, `skipped` (and `cancelled`) jobs should also block merges. All required checks must run and succeed before a PR can merge.

(Based on your team&#39;s feedback about treating &#39;skipped&#39; as non-success for merge requirements.) [FEEDBACK_USED]</violation>
</file>

<file name="apps/api/v2/src/ee/bookings/2024-08-13/services/booking-location.service.ts">

<violation number="1" location="apps/api/v2/src/ee/bookings/2024-08-13/services/booking-location.service.ts:110">
P1: Rule violated: **Avoid Logging Sensitive Information**

This log statement serializes the entire `loc` object which can contain PII such as phone numbers and physical addresses. Instead of logging the full object, log only the non-sensitive `loc.type` field to debug unsupported location types.</violation>
</file>

Reply to cubic to teach it or ask questions. Tag @cubic-dev-ai to re-run a review.

TRIGGER_DEV_PROJECT_REF=

GOOGLE_ADS_ENABLED=1 # To enable Google Ads tracking (gclid)
LINKEDIN_ADS_ENABLED=1 # To enable LinkedIn Ads tracking (li_fat_id)
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 26, 2025

Choose a reason for hiding this comment

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

P2: Ad tracking features should default to disabled (=0 or empty) in .env.example, consistent with other feature flags like GOOGLE_LOGIN_ENABLED=false and ORGANIZATIONS_ENABLED=. Self-hosters copying this example would have tracking enabled by default, which may not be desired for privacy-conscious deployments.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .env.example, line 515:

<comment>Ad tracking features should default to disabled (`=0` or empty) in `.env.example`, consistent with other feature flags like `GOOGLE_LOGIN_ENABLED=false` and `ORGANIZATIONS_ENABLED=`. Self-hosters copying this example would have tracking enabled by default, which may not be desired for privacy-conscious deployments.</comment>

<file context>
@@ -509,4 +509,7 @@ SEED_PLATFORM_OAUTH_CLIENT_SECRET=
+TRIGGER_DEV_PROJECT_REF=
+
+GOOGLE_ADS_ENABLED=1      # To enable Google Ads tracking (gclid)
+LINKEDIN_ADS_ENABLED=1    # To enable LinkedIn Ads tracking (li_fat_id)
</file context>
Fix with Cubic

if: ${{ secrets.EQUITY_BEE_TEAM_LABELER_ACTION_TOKEN != '' }}
steps:
- uses: actions/checkout@v4
- uses: equitybee/team-label-action@main
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 26, 2025

Choose a reason for hiding this comment

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

P2: Using @main for a third-party action is a security risk. Pin to a specific commit SHA (e.g., equitybee/team-label-action@abc123...) to prevent unexpected changes or supply chain attacks.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/labeler.yml, line 26:

<comment>Using `@main` for a third-party action is a security risk. Pin to a specific commit SHA (e.g., `equitybee/team-label-action@abc123...`) to prevent unexpected changes or supply chain attacks.</comment>

<file context>
@@ -14,7 +14,20 @@ jobs:
+    if: ${{ secrets.EQUITY_BEE_TEAM_LABELER_ACTION_TOKEN != &#39;&#39; }}
+    steps:
+      - uses: actions/checkout@v4
+      - uses: equitybee/team-label-action@main
+        with:
+          repo-token: ${{ secrets.EQUITY_BEE_TEAM_LABELER_ACTION_TOKEN }}
</file context>
Fix with Cubic

contents: read
pull-requests: write
runs-on: ubuntu-latest
if: ${{ secrets.EQUITY_BEE_TEAM_LABELER_ACTION_TOKEN != '' }}
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 26, 2025

Choose a reason for hiding this comment

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

P1: Secrets context is not available in job-level if: conditionals. This condition will not work as expected. Consider using a different approach, such as checking the secret in a step or using a repository variable to gate this job.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/labeler.yml, line 23:

<comment>Secrets context is not available in job-level `if:` conditionals. This condition will not work as expected. Consider using a different approach, such as checking the secret in a step or using a repository variable to gate this job.</comment>

<file context>
@@ -14,7 +14,20 @@ jobs:
+      contents: read
+      pull-requests: write
+    runs-on: ubuntu-latest
+    if: ${{ secrets.EQUITY_BEE_TEAM_LABELER_ACTION_TOKEN != &#39;&#39; }}
+    steps:
+      - uses: actions/checkout@v4
</file context>
Fix with Cubic

# Use jq to list jobs with result == "failure"
echo '${{ toJson(needs) }}' > /tmp/needs.json
cat /tmp/needs.json
failures=$(jq -r 'to_entries | map(select(.value.result=="failure")) | .[].key' /tmp/needs.json || true)
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 26, 2025

Choose a reason for hiding this comment

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

P1: The new failure detection only checks for failure results, but per team policy, skipped (and cancelled) jobs should also block merges. All required checks must run and succeed before a PR can merge.

(Based on your team's feedback about treating 'skipped' as non-success for merge requirements.)

View Feedback

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/pr.yml, line 283:

<comment>The new failure detection only checks for `failure` results, but per team policy, `skipped` (and `cancelled`) jobs should also block merges. All required checks must run and succeed before a PR can merge.

(Based on your team&#39;s feedback about treating &#39;skipped&#39; as non-success for merge requirements.) </comment>

<file context>
@@ -264,18 +271,18 @@ jobs:
+          # Use jq to list jobs with result == &quot;failure&quot;
+          echo &#39;${{ toJson(needs) }}&#39; &gt; /tmp/needs.json
+          cat /tmp/needs.json
+          failures=$(jq -r &#39;to_entries | map(select(.value.result==&quot;failure&quot;)) | .[].key&#39; /tmp/needs.json || true)
+          if [ -n &quot;$failures&quot; ]; then
+            echo &quot; Failed jobs: $failures&quot;
</file context>

✅ Addressed in 279723a

needs.build-companion.result != 'success'
)
- name: Dump dependent job results and fail only on 'failure'
if: needs.changes.outputs.has-files-requiring-all-checks == 'true'
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 26, 2025

Choose a reason for hiding this comment

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

P0: Bug: Reference to renamed job needs.changes should be needs.prepare. The changes job was renamed to prepare but this reference wasn't updated, which will cause the condition to malfunction.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/pr.yml, line 275:

<comment>Bug: Reference to renamed job `needs.changes` should be `needs.prepare`. The `changes` job was renamed to `prepare` but this reference wasn&#39;t updated, which will cause the condition to malfunction.</comment>

<file context>
@@ -264,18 +271,18 @@ jobs:
-            needs.build-companion.result != &#39;success&#39;
-          )
+      - name: Dump dependent job results and fail only on &#39;failure&#39;
+        if: needs.changes.outputs.has-files-requiring-all-checks == &#39;true&#39;
+        run: |
+          echo &#39;Dependent job results:&#39;
</file context>
Suggested change
if: needs.changes.outputs.has-files-requiring-all-checks == 'true'
if: needs.prepare.outputs.has-files-requiring-all-checks == 'true'

✅ Addressed in 57fbd58

if (loc.type === "attendeePhone") return loc.phone;
if (loc.type === "attendeeDefined") return loc.location;

this.logger.log(
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 26, 2025

Choose a reason for hiding this comment

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

P1: Rule violated: Avoid Logging Sensitive Information

This log statement serializes the entire loc object which can contain PII such as phone numbers and physical addresses. Instead of logging the full object, log only the non-sensitive loc.type field to debug unsupported location types.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/api/v2/src/ee/bookings/2024-08-13/services/booking-location.service.ts, line 110:

<comment>This log statement serializes the entire `loc` object which can contain PII such as phone numbers and physical addresses. Instead of logging the full object, log only the non-sensitive `loc.type` field to debug unsupported location types.</comment>

<file context>
@@ -0,0 +1,118 @@
+    if (loc.type === &quot;attendeePhone&quot;) return loc.phone;
+    if (loc.type === &quot;attendeeDefined&quot;) return loc.location;
+
+    this.logger.log(
+      `Booking location service getLocationValue - loc ${JSON.stringify(
+        loc
</file context>
Fix with Cubic

…e the appropriate output from the prepare job
@github-actions
Copy link
Copy Markdown
Contributor

Devin AI is resolving merge conflicts

This PR has merge conflicts with the main branch. A Devin session has been created to automatically resolve them.

View Devin Session

Devin will:

  1. Merge the latest main into this branch
  2. Resolve any conflicts intelligently
  3. Run lint/type checks to ensure validity
  4. Push the resolved changes

If you prefer to resolve conflicts manually, you can close the Devin session and handle it yourself.

@github-actions
Copy link
Copy Markdown
Contributor

Devin AI is resolving merge conflicts

This PR has merge conflicts with the main branch. The existing Devin session has been notified to resolve them.

View Devin Session

Devin will:

  1. Merge the latest main into this branch
  2. Resolve any conflicts intelligently
  3. Run lint/type checks to ensure validity
  4. Push the resolved changes

If you prefer to resolve conflicts manually, you can close the Devin session and handle it yourself.

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

Devin AI is resolving merge conflicts

This PR has merge conflicts with the main branch. The existing Devin session has been notified to resolve them.

View Devin Session

Devin will:

  1. Merge the latest main into this branch
  2. Resolve any conflicts intelligently
  3. Run lint/type checks to ensure validity
  4. Push the resolved changes

If you prefer to resolve conflicts manually, you can close the Devin session and handle it yourself.

@github-actions
Copy link
Copy Markdown
Contributor

Devin AI is resolving merge conflicts

This PR has merge conflicts with the main branch. A Devin session has been created to automatically resolve them.

View Devin Session

Devin will:

  1. Merge the latest main into this branch
  2. Resolve any conflicts intelligently
  3. Run lint/type checks to ensure validity
  4. Push the resolved changes

If you prefer to resolve conflicts manually, you can close the Devin session and handle it yourself.

Resolved conflicts in:
- .github/workflows/pr.yml: Took upstream trust-check and conditional job failure logic
- packages/embeds/embed-core/src/embed-iframe.ts: Took upstream guard for document.body
- packages/lib/package.json: Combined upstream exact versions with PR's @trigger.dev/sdk addition
- packages/prisma/package.json: Combined PR's ts-node in dependencies with upstream exact versions
- packages/trpc/server/routers/viewer/slots/util.ts: Combined upstream blocked hosts filtering with PR's booker availability checking
- yarn.lock: Took upstream version

Co-Authored-By: unknown <>
@github-actions
Copy link
Copy Markdown
Contributor

Devin AI is resolving merge conflicts

This PR has merge conflicts with the main branch. The existing Devin session has been notified to resolve them.

View Devin Session

Devin will:

  1. Merge the latest main into this branch
  2. Resolve any conflicts intelligently
  3. Run lint/type checks to ensure validity
  4. Push the resolved changes

If you prefer to resolve conflicts manually, you can close the Devin session and handle it yourself.

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.

3 issues found across 17 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/testing/src/lib/bookingScenario/expects.ts">

<violation number="1" location="packages/testing/src/lib/bookingScenario/expects.ts:720">
P2: bookerReschedule flag ignored; test now accepts any email type for old organizer, weakening scenario coverage</violation>
</file>

<file name=".github/workflows/labeler.yml">

<violation number="1" location=".github/workflows/labeler.yml:26">
P1: Unpinned third‑party action in pull_request_target receives secret token, enabling supply-chain/secret exfiltration risk</violation>
</file>

<file name="packages/trpc/server/routers/viewer/slots/util.ts">

<violation number="1" location="packages/trpc/server/routers/viewer/slots/util.ts:1225">
P2: Booker availability is dropped in fallback round‑robin recalculations, so fallback slots ignore booker conflicts</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

if: ${{ secrets.EQUITY_BEE_TEAM_LABELER_ACTION_TOKEN != '' }}
steps:
- uses: actions/checkout@v4
- uses: equitybee/team-label-action@main
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 12, 2026

Choose a reason for hiding this comment

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

P1: Unpinned third‑party action in pull_request_target receives secret token, enabling supply-chain/secret exfiltration risk

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/labeler.yml, line 26:

<comment>Unpinned third‑party action in pull_request_target receives secret token, enabling supply-chain/secret exfiltration risk</comment>

<file context>
@@ -14,7 +14,20 @@ jobs:
+    if: ${{ secrets.EQUITY_BEE_TEAM_LABELER_ACTION_TOKEN != '' }}
+    steps:
+      - uses: actions/checkout@v4
+      - uses: equitybee/team-label-action@main
+        with:
+          repo-token: ${{ secrets.EQUITY_BEE_TEAM_LABELER_ACTION_TOKEN }}
</file context>
Fix with Cubic

prevOrganizer,
bookerReschedule,

bookerReschedule: _bookerReschedule,
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 12, 2026

Choose a reason for hiding this comment

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

P2: bookerReschedule flag ignored; test now accepts any email type for old organizer, weakening scenario coverage

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/testing/src/lib/bookingScenario/expects.ts, line 720:

<comment>bookerReschedule flag ignored; test now accepts any email type for old organizer, weakening scenario coverage</comment>

<file context>
@@ -712,62 +712,115 @@ export function expectCalendarEventCreationFailureEmails({
   prevOrganizer,
-  bookerReschedule,
+   
+  bookerReschedule: _bookerReschedule,
 }: {
   emails: Fixtures["emails"];
</file context>
Fix with Cubic

});

if (bookerWithCredentials) {
allHosts = [
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 12, 2026

Choose a reason for hiding this comment

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

P2: Booker availability is dropped in fallback round‑robin recalculations, so fallback slots ignore booker conflicts

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/trpc/server/routers/viewer/slots/util.ts, line 1225:

<comment>Booker availability is dropped in fallback round‑robin recalculations, so fallback slots ignore booker conflicts</comment>

<file context>
@@ -1181,6 +1205,35 @@ export class AvailableSlotsService {
+      });
+
+      if (bookerWithCredentials) {
+        allHosts = [
+          ...allHosts,
+          {
</file context>
Fix with Cubic

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 3, 2026

Devin AI is resolving merge conflicts

This PR has merge conflicts with the main branch. A Devin session has been created to automatically resolve them.

View Devin Session

Devin will:

  1. Merge the latest main into this branch
  2. Resolve any conflicts intelligently
  3. Run lint/type checks to ensure validity
  4. Push the resolved changes

If you prefer to resolve conflicts manually, you can close the Devin session and handle it yourself.

@CharlesWong
Copy link
Copy Markdown

Implemented in #28371

/claim #25346

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bookings area: bookings, availability, timezones, double booking 💎 Bounty A bounty on Algora.io community Created by Linear-GitHub Sync ❗️ .env changes contains changes to env variables ✨ feature New feature or request 🧹 Improvements Improvements to existing features. Mostly UX/UI Medium priority Created by Linear-GitHub Sync ❗️ migrations contains migration files size/L $200

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CAL-4531] Take into account guest's availability when rescheduling

5 participants