Skip to content

Conversation

@tomerqodo
Copy link

@tomerqodo tomerqodo commented Jan 21, 2026

Benchmark PR from qodo-benchmark#706


Note

Use API bookingUrl for event type links

  • Plumbs bookingUrl through EventType types and components (lists, detail, Basics tab) and displays URL prefix derived from it
  • Updates copy/share/preview actions in event type screens (iOS/Android/Web) to require and use bookingUrl; shows errors when absent
  • Browser extension now uses bookingUrl for preview/copy/insert with slug fallback; caches and type annotations updated
  • Removes legacy buildEventTypeLink usage from services and screens; adds getUsername helper (no longer used for link building)

UI/Styling polish

  • Standardizes accent color to black in headers, menus, icons, and badges; adds alignment styles for buttons/switches; minor header border removals

Written by Cursor Bugbot for commit 4f49041. Configure here.

dhairyashiil and others added 7 commits January 21, 2026 15:42
Addresses Cubic AI review feedback (confidence 9/10): The username was
hardcoded to 'username' but still used by BasicsTab as a fallback for
URL display when bookingUrl is unavailable. This restores the useEffect
that fetches the actual username from CalComAPIService.getUsername().

Co-Authored-By: unknown <>
Copy link

@cursor cursor bot left a comment

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 3 potential issues.

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

const [conferencingOptions, setConferencingOptions] = useState<ConferencingOption[]>([]);
const [conferencingLoading, setConferencingLoading] = useState(false);
const [eventTypeData, setEventTypeData] = useState<EventType | null>(null);
const [bookingUrl, setBookingUrl] = useState<string>("");
Copy link

Choose a reason for hiding this comment

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

bookingUrl state is never populated from API data

High Severity

The bookingUrl state is initialized to an empty string but setBookingUrl is never called. The applyEventTypeData function loads many fields from the API response but never sets bookingUrl from eventType.bookingUrl. This causes handlePreview and handleCopyLink to always fail with "Booking URL not available" since the empty string is falsy.

Additional Locations (1)

Fix in Cursor Fix in Web

const bookingUrl =
`https://cal.com/${
eventType.users?.[0]?.username || "user"
}/${eventType.slug}`;
Copy link

Choose a reason for hiding this comment

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

Gmail copy button missing bookingUrl fallback logic

Medium Severity

The Gmail integration's copy button handler constructs the booking URL directly without checking eventType.bookingUrl first. The preview button handler was correctly updated to use eventType.bookingUrl || fallback, but the copy button was not, causing inconsistent behavior for org users.

Fix in Cursor Fix in Web

if (!eventType.bookingUrl) {
showErrorAlert("Error", "Booking URL not available for this event type.");
return;
}
Copy link

Choose a reason for hiding this comment

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

Mobile app handlers lack fallback URL unlike extension

Medium Severity

The mobile app's handleCopyLink, _handleShare, and handlePreview functions show an error and return early if eventType.bookingUrl is missing, with no fallback URL construction. The extension code uses eventType.bookingUrl || fallbackUrl pattern. Since bookingUrl is optional in the type definition, event types without this field will fail in the mobile app but work in the extension. Previously, CalComAPIService.buildEventTypeLink() always generated a URL.

Additional Locations (1)

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.

3 participants