Skip to content

Async import of the appStore packages#10

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

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

Conversation

@akshayutture-augment

@akshayutture-augment akshayutture-augment commented Nov 14, 2025

Copy link
Copy Markdown

Test 2


Replicated from ai-code-review-evaluation/cal.com-cursor#2


Note

Cursor Bugbot is generating a summary for commit e043a5e. Configure here.

@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.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

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.

Bug: Async forEach: Unfinished Business

Using forEach with an async callback doesn't wait for promises to complete. The calendar deletion operations will be initiated but not awaited, causing the try-catch block to exit before operations finish and potentially leaving calendar events undeleted.

Fix in Cursor Fix in Web

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.

Bug: Async forEach: Unfinished Business

Using forEach with an async callback doesn't wait for promises to complete. The calendar deletion operations will be initiated but not awaited, causing the try-catch block to exit before operations finish and potentially leaving calendar events undeleted.

Fix in Cursor Fix in Web

.filter((credential) => credential.type.endsWith("_calendar"))
.forEach(async (credential) => {
const calendar = getCalendar(credential);
const calendar = await getCalendar(credential);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Unawaited Async Operations Leave Data Incomplete

Using forEach with an async callback doesn't wait for promises to complete. The calendar deletion operations for recurring events will be initiated but not awaited, potentially leaving calendar events undeleted when cancelling recurring bookings.

Fix in Cursor Fix in Web

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.

Bug: Async forEach leaves operations unawaited.

Using forEach with an async callback doesn't wait for promises to complete. The calendar and video deletion operations will be initiated but not awaited, potentially leaving integrations in an inconsistent state when requesting a reschedule.

Fix in Cursor Fix in Web

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