-
Notifications
You must be signed in to change notification settings - Fork 0
fix(companion): event type links for org user #68
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
base: cursor_combined_20260121_qodo_grep_cursor_copilot_1_base_fixcompanion_event_type_links_for_org_user_pr706
Are you sure you want to change the base?
Conversation
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 <>
There was a problem hiding this 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>(""); |
There was a problem hiding this comment.
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)
| const bookingUrl = | ||
| `https://cal.com/${ | ||
| eventType.users?.[0]?.username || "user" | ||
| }/${eventType.slug}`; |
There was a problem hiding this comment.
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.
| if (!eventType.bookingUrl) { | ||
| showErrorAlert("Error", "Booking URL not available for this event type."); | ||
| return; | ||
| } |
There was a problem hiding this comment.
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.
Benchmark PR from qodo-benchmark#706
Note
Use API
bookingUrlfor event type linksbookingUrlthroughEventTypetypes and components (lists, detail, Basics tab) and displays URL prefix derived from itbookingUrl; shows errors when absentbookingUrlfor preview/copy/insert with slug fallback; caches and type annotations updatedbuildEventTypeLinkusage from services and screens; addsgetUsernamehelper (no longer used for link building)UI/Styling polish
Written by Cursor Bugbot for commit 4f49041. Configure here.