Skip to content

fix(companion): event type links for org user#5

Open
tomerqodo wants to merge 7 commits intoaugment_full_base_fixcompanion_event_type_links_for_org_user_pr5from
augment_full_head_fixcompanion_event_type_links_for_org_user_pr5
Open

fix(companion): event type links for org user#5
tomerqodo wants to merge 7 commits intoaugment_full_base_fixcompanion_event_type_links_for_org_user_pr5from
augment_full_head_fixcompanion_event_type_links_for_org_user_pr5

Conversation

@tomerqodo
Copy link
Copy Markdown

Benchmark PR from agentic-review-benchmarks#5

dhairyashiil and others added 7 commits January 25, 2026 12:01
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 <>
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Jan 26, 2026

🤖 Augment PR Summary

Summary: Updates Companion + extension event-type link handling to work for organization users by relying on API-provided booking URLs.

Changes:

  • Introduced optional bookingUrl on EventType and propagated it through event type list/detail components
  • Updated copy/share/preview actions in the Event Types screens to use eventType.bookingUrl (with user-facing errors when missing)
  • Adjusted the browser extension’s event type payload typing and several booking-link builders to prefer bookingUrl
  • Removed CalComAPIService.buildEventTypeLink and kept a simplified getUsername helper
  • UI tweaks: switched various accents from blue to black and added explicit row alignment styles for menus/switch rows/buttons

Technical Notes: bookingUrl supports org-specific base domains (e.g. {org}.cal.com), avoiding incorrect cal.com/{username}/{slug} assumptions.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

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

Choose a reason for hiding this comment

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

bookingUrl is introduced as state, but I don’t see setBookingUrl used anywhere, so it will remain empty and handlePreview/handleCopyLink will always hit the “Booking URL not available” error path. Should this be set from the loaded/saved event type data (e.g., eventTypeData.bookingUrl)?

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

const bookingUrl = `https://cal.com/${
eventType.users?.[0]?.username || "user"
}/${eventType.slug}`;
const bookingUrl =
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 copy-to-clipboard handler still hardcodes https://cal.com/{username}/{slug} and ignores eventType.bookingUrl, so org/team booking domains can still be copied incorrectly here (unlike the preview handler above).

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

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