Skip to content

Async import of the appStore packages#10

Open
ShashankFC wants to merge 1 commit into
appstore-sync-refactor-basefrom
appstore-async-improvements
Open

Async import of the appStore packages#10
ShashankFC wants to merge 1 commit into
appstore-sync-refactor-basefrom
appstore-async-improvements

Conversation

@ShashankFC

@ShashankFC ShashankFC commented Jan 22, 2026

Copy link
Copy Markdown

Test 2nn

Summary by CodeRabbit

Release Notes

  • Refactor
    • Improved reliability of calendar event operations during booking creation, updates, and cancellations.
    • Enhanced video meeting provisioning for better performance and stability.
    • Streamlined payment processing to ensure proper app loading before transactions.

✏️ Tip: You can customize this high-level summary in your review settings.

nn---n*Replicated from [ai-code-review-evaluation/cal.com-coderabbit#2](https://github.com/ai-code-review-evaluation/cal.com-coderabbit/pull/2)*

Note

Medium Risk
Touches core booking lifecycle integration hooks (calendar/video/payment) and changes sync calls to async, which can introduce missed awaits or altered execution ordering during cancellations/reschedules.

Overview
Refactors appStore to return dynamic import() promises for each integration, switching integration loading from eager module imports to lazy async resolution.

Updates calendar/video/payment codepaths to await app modules and services: getCalendar becomes async, videoClient adapter creation is async, and booking/event flows (create/update/delete/reschedule/cancel + payment refund/delete/create) now await calendar instances and payment apps before invoking integration methods.

Written by Cursor Bugbot for commit e043a5e. Configure here.

@AI-Code-Review-Evals AI-Code-Review-Evals deleted a comment from cursor Bot Jan 23, 2026
@AI-Code-Review-Evals AI-Code-Review-Evals deleted a comment from cursor Bot Jan 23, 2026
@ShashankFC

Copy link
Copy Markdown
Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

if (bookingRef.uid) {
if (bookingRef.type.endsWith("_calendar")) {
const calendar = getCalendar(credentialsMap.get(bookingRef.type));
const calendar = await getCalendar(credentialsMap.get(bookingRef.type));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Async forEach callbacks cause unhandled rejections and bypass try-catch

High Severity

The forEach callback was changed from synchronous to async, but Array.forEach does not await promises returned by async callbacks. This makes all calendar/video deletion operations fire-and-forget. In the vital and wipemycalother files, this also completely bypasses the surrounding try-catch block — rejected promises from getCalendar or deleteEvent become unhandled promise rejections instead of being caught. A for...of loop with await (as correctly done elsewhere in this PR, e.g., handleCancelBooking.ts line 480) is needed.

Additional Locations (2)

Fix in Cursor Fix in Web

@AI-Code-Review-Evals AI-Code-Review-Evals deleted a comment from cursor Bot Feb 12, 2026
@AI-Code-Review-Evals AI-Code-Review-Evals deleted a comment from cursor Bot Feb 12, 2026
@AI-Code-Review-Evals AI-Code-Review-Evals deleted a comment from cursor Bot Feb 12, 2026
@AI-Code-Review-Evals AI-Code-Review-Evals deleted a comment from cursor Bot Feb 12, 2026
@AI-Code-Review-Evals AI-Code-Review-Evals deleted a comment from cursor Bot Feb 12, 2026
@AI-Code-Review-Evals AI-Code-Review-Evals deleted a comment from cursor Bot Feb 12, 2026
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.

2 participants