Skip to content

Conversation

@tomerqodo
Copy link

Benchmark PR from qodo-benchmark#706

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 <>
Copilot AI review requested due to automatic review settings January 21, 2026 18:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for organization-specific booking URLs by introducing a bookingUrl field to the EventType interface. The change ensures that event types belonging to organization users display and use the correct booking URL (e.g., i.cal.com/org/user/event) instead of constructing it manually from username and slug.

Changes:

  • Added bookingUrl optional field to EventType interface and all related type definitions
  • Updated all booking URL construction logic to prefer bookingUrl over manually constructed URLs
  • Removed buildEventTypeLink function and refactored getUsername helper in API service
  • Updated UI components to display and use the booking URL from the API response

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
companion/services/types/event-types.types.ts Added bookingUrl optional field to EventType interface
companion/services/calcom.ts Removed buildEventTypeLink, refactored getUsername with error handling
companion/extension/lib/linkedin.ts Updated buildBookingUrl to prefer bookingUrl field
companion/extension/entrypoints/content.ts Added bookingUrl to event type interfaces and updated URL construction logic (with one inconsistency)
companion/extension/entrypoints/background/index.ts Added biome-ignore comment for Safari compatibility
companion/components/event-type-list-item/EventTypeListItemParts.tsx Added getDisplayUrl helper to parse and display booking URLs
companion/components/event-type-list-item/EventTypeListItem.tsx Passed bookingUrl prop to child components
companion/components/event-type-list-item/EventTypeListItem.ios.tsx Passed bookingUrl prop to child components
companion/components/event-type-detail/tabs/*.tsx Added redundant style props and updated Switch wrapper styling
companion/components/event-type-detail/tabs/BasicsTab.tsx Added URL parsing logic to display proper domain prefix
companion/components/Header.tsx Changed active filter colors from blue to black, added redundant style props
companion/app/profile-sheet.tsx Removed border from profile header
companion/app/profile-sheet.ios.tsx Removed border from profile header
companion/app/(tabs)/(event-types)/index.tsx Updated handlers to use bookingUrl with error handling, added redundant style props
companion/app/(tabs)/(event-types)/index.ios.tsx Updated handlers to use bookingUrl, removed unused imports
companion/app/(tabs)/(event-types)/event-type-detail.tsx Added bookingUrl state and updated handlers (state never populated)
companion/app/(tabs)/(bookings)/index.tsx Changed filter color from blue to black, added redundant style props
companion/app/(tabs)/(bookings)/index.ios.tsx Changed filter colors from blue to black
companion/app/(tabs)/(availability)/availability-detail.tsx Changed icon color from blue to black

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

/>
<TouchableOpacity
className="min-w-[60px] flex-row items-center justify-center gap-1 rounded-lg bg-black px-2.5 py-2"
style={{ flexDirection: "row", alignItems: "center", justifyContent: "center" }}
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The style prop duplicates the flexDirection, alignItems, and justifyContent properties that are already set in the className. The className already includes "flex-row items-center justify-center", which applies these same styles. This duplication is redundant and could lead to confusion.

Suggested change
style={{ flexDirection: "row", alignItems: "center", justifyContent: "center" }}

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

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The copy button handler is not using the bookingUrl field from the eventType. Unlike the preview button handler above (lines 1081-1085), this handler constructs the URL manually. This should check for eventType.bookingUrl first, similar to the pattern used in other places in this PR.

Suggested change
const bookingUrl =
const bookingUrl =
eventType.bookingUrl ||

Copilot uses AI. Check for mistakes.
Comment on lines 179 to 182
const [eventTypeData, setEventTypeData] = useState<EventType | null>(null);
const [bookingUrl, setBookingUrl] = useState<string>("");
const [saving, setSaving] = useState(false);
const [beforeEventBuffer, setBeforeEventBuffer] = useState("No buffer time");
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The bookingUrl state is declared but never populated from the fetched event type data. The applyEventTypeData function (which loads event type data into state) does not extract the bookingUrl field from the EventType object. This means the preview and copy link handlers will always show "Booking URL not available" errors even when the API returns a valid bookingUrl. The bookingUrl should be extracted from the fetched event type data, similar to how other fields are loaded.

Suggested change
const [eventTypeData, setEventTypeData] = useState<EventType | null>(null);
const [bookingUrl, setBookingUrl] = useState<string>("");
const [saving, setSaving] = useState(false);
const [beforeEventBuffer, setBeforeEventBuffer] = useState("No buffer time");
const [eventTypeData, setEventTypeData] = useState<(EventType & { bookingUrl?: string }) | null>(null);
const [bookingUrl, setBookingUrl] = useState<string>("");
const [saving, setSaving] = useState(false);
const [beforeEventBuffer, setBeforeEventBuffer] = useState("No buffer time");
useEffect(() => {
if (eventTypeData?.bookingUrl) {
setBookingUrl(eventTypeData.bookingUrl);
}
}, [eventTypeData]);

Copilot uses AI. Check for mistakes.
<View
className={`flex-row items-center pr-4 ${!isLast ? "border-b border-[#E5E5E5]" : ""}`}
style={{ minHeight: 44 }}
style={{ minHeight: 44, flexDirection: "row", alignItems: "center" }}
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The style prop duplicates the flexDirection and alignItems properties that are already set in the className. The className already includes "flex-row items-center", which applies these same styles. This duplication is redundant and could lead to confusion.

Suggested change
style={{ minHeight: 44, flexDirection: "row", alignItems: "center" }}
style={{ minHeight: 44 }}

Copilot uses AI. Check for mistakes.
<View
className={`flex-row items-center pr-4 ${!isLast ? "border-b border-[#E5E5E5]" : ""}`}
style={{ height }}
style={{ height, flexDirection: "row", alignItems: "center" }}
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The style prop duplicates the flexDirection and alignItems properties that are already set in the className. The className already includes "flex-row items-center", which applies these same styles. This duplication is redundant and could lead to confusion.

Suggested change
style={{ height, flexDirection: "row", alignItems: "center" }}
style={{ height }}

Copilot uses AI. Check for mistakes.
Comment on lines +68 to +69
flexDirection: "row",
alignItems: "center",
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The style prop duplicates the flexDirection and alignItems properties that are already set in the className. The className already includes "flex-row items-center", which applies these same styles. This duplication is redundant and could lead to confusion.

Suggested change
flexDirection: "row",
alignItems: "center",

Copilot uses AI. Check for mistakes.
<View
className={`flex-row items-center pr-4 ${!isLast ? "border-b border-[#E5E5E5]" : ""}`}
style={{ height: 44 }}
style={{ height: 44, flexDirection: "row", alignItems: "center" }}
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The style prop duplicates the flexDirection and alignItems properties that are already set in the className. The className already includes "flex-row items-center", which applies these same styles. This duplication is redundant and could lead to confusion.

Suggested change
style={{ height: 44, flexDirection: "row", alignItems: "center" }}
style={{ height: 44 }}

Copilot uses AI. Check for mistakes.
<View
className={`flex-row items-center pr-4 ${!isLast ? "border-b border-[#E5E5E5]" : ""}`}
style={{ height }}
style={{ height, flexDirection: "row", alignItems: "center" }}
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The style prop duplicates the flexDirection and alignItems properties that are already set in the className. The className already includes "flex-row items-center", which applies these same styles. This duplication is redundant and could lead to confusion.

Suggested change
style={{ height, flexDirection: "row", alignItems: "center" }}
style={{ height }}

Copilot uses AI. Check for mistakes.
<Text className="text-[16px] font-semibold text-[#007AFF]">
<AppPressable
className="flex-row items-center gap-1 px-2 py-2"
style={{ flexDirection: "row", alignItems: "center" }}
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The style prop duplicates the flexDirection and alignItems properties that are already set in the className. The className already includes "flex-row items-center", which applies these same styles. This duplication is redundant and could lead to confusion.

Suggested change
style={{ flexDirection: "row", alignItems: "center" }}

Copilot uses AI. Check for mistakes.
Comment on lines +1273 to +1276
<AppPressable
className="flex-row items-center gap-1 px-2 py-2"
style={{ flexDirection: "row", alignItems: "center" }}
>
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The style prop duplicates the flexDirection and alignItems properties that are already set in the className. The className already includes "flex-row items-center", which applies these same styles. This duplication is redundant and could lead to confusion.

Suggested change
<AppPressable
className="flex-row items-center gap-1 px-2 py-2"
style={{ flexDirection: "row", alignItems: "center" }}
>
<AppPressable className="flex-row items-center gap-1 px-2 py-2">

Copilot uses AI. Check for mistakes.
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