Skip to content

fix: prevent slot availability when calendar services fail #21987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

devin-ai-integration[bot]
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Jun 23, 2025

Summary

Fixes the issue where calendar slots remain available during third-party calendar service outages, which can lead to double bookings.

Changes

  • Modified isTimeSlotAvailable function in isTimeslotAvailable.ts to return false (unavailable) instead of true (available) when scheduleData is null
  • This ensures that when calendar services like Google Calendar fail, slots are blocked rather than appearing available
  • Implements fail-safe behavior as requested to prevent double bookings during service outages

Testing

  • Verified that calendar service failures now block slot generation
  • Confirmed that normal functionality works when calendar services are healthy
  • Ran type checking and linting to ensure code quality

Link to Devin run

https://app.devin.ai/sessions/8f22da9acd494aac93b2d94b9055233e

Requested by: [email protected]


Summary by cubic

Blocked slot availability when calendar services fail, so users can't book during outages and double bookings are prevented.

  • Bug Fixes
    • Changed slot availability logic to mark slots as unavailable if calendar data can't be loaded.

- Change default behavior in isTimeSlotAvailable to return false when scheduleData is null
- Implements fail-safe behavior to prevent double bookings during calendar service outages
- Maintains existing functionality when calendar services are healthy

Co-Authored-By: [email protected] <[email protected]>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sorry, something went wrong.

Copy link

vercel bot commented Jun 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Jun 23, 2025 6:02pm
cal-eu ⬜️ Ignored (Inspect) Visit Preview Jun 23, 2025 6:02pm

- Update test to expect false when scheduleData is null
- Reflects new fail-safe behavior to prevent double bookings during calendar service outages

Co-Authored-By: [email protected] <[email protected]>
Copy link
Contributor Author

Closing due to inactivity for more than 7 days. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants