-
Notifications
You must be signed in to change notification settings - Fork 11.7k
feat(companion): add Daily.co video deep linking support #27205
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: main
Are you sure you want to change the base?
Conversation
- Add @daily-co/react-native-daily-js SDK and dependencies - Configure deep linking for app.cal.com/video/* URLs - Add video call screen with Daily SDK integration - Add camera/microphone permissions for iOS and Android - Add utility functions for video URL handling Co-Authored-By: peer@cal.com <peer@cal.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: peer@cal.com <peer@cal.com>
Co-Authored-By: peer@cal.com <peer@cal.com>
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.
4 issues found across 6 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="companion/utils/deep-links.ts">
<violation number="1" location="companion/utils/deep-links.ts:176">
P2: Use the configured Cal.com base URL instead of hard-coding `app.cal.com`, otherwise self-hosted deep links will never match.</violation>
<violation number="2" location="companion/utils/deep-links.ts:191">
P2: Extract the host from `getCalWebUrl()` when validating video URLs so self-hosted domains are supported.</violation>
</file>
<file name="companion/app/video/[bookingUid].tsx">
<violation number="1" location="companion/app/video/[bookingUid].tsx:64">
P2: URL validation is too permissive; `hostname.includes("daily.co")` will accept non‑Daily domains. Restrict to exact Daily hostnames (e.g., `daily.co` or subdomains ending with `.daily.co`).</violation>
<violation number="2" location="companion/app/video/[bookingUid].tsx:65">
P1: Cal.com video deep links will always fail validation because the path check is performed on hostname. Check the pathname instead so `app.cal.com/video/*` is accepted.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| export function extractBookingUidFromVideoUrl(url: string): string | null { | ||
| try { | ||
| const urlObj = new URL(url); | ||
| if (urlObj.hostname === "app.cal.com" && urlObj.pathname.startsWith("/video/")) { |
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.
P2: Extract the host from getCalWebUrl() when validating video URLs so self-hosted domains are supported.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At companion/utils/deep-links.ts, line 191:
<comment>Extract the host from `getCalWebUrl()` when validating video URLs so self-hosted domains are supported.</comment>
<file context>
@@ -163,3 +163,40 @@ export async function openCancelBookingInWeb(bookingUid: string): Promise<void>
+export function extractBookingUidFromVideoUrl(url: string): string | null {
+ try {
+ const urlObj = new URL(url);
+ if (urlObj.hostname === "app.cal.com" && urlObj.pathname.startsWith("/video/")) {
+ const pathParts = urlObj.pathname.split("/");
+ // URL format: /video/{bookingUid}
</file context>
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.
Devin ignore this. for now we only provide support for companion for our own apps, not self-hosters. maybe later
Devin AI is addressing Cubic AI's review feedbackNew feedback has been sent to the existing Devin session. ✅ Pushed commit |
…URLs Co-Authored-By: peer@cal.com <peer@cal.com>
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.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="companion/app/video/[bookingUid].tsx">
<violation number="1" location="companion/app/video/[bookingUid].tsx:66">
P2: `hostname.includes("cal.com")` is overly permissive and will accept spoofed domains like `cal.com.evil.com`. Restrict the hostname to trusted Cal domains before allowing `/video/` paths.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Devin AI is addressing Cubic AI's review feedbackNew feedback has been sent to the existing Devin session. ✅ No changes pushed |
…fing (#27239) Co-authored-by: cubic-dev-ai[bot] <1082092+cubic-dev-ai[bot]@users.noreply.github.com>
… Expo Go Co-Authored-By: peer@cal.com <peer@cal.com>
Co-Authored-By: peer@cal.com <peer@cal.com>
…t Compiler Co-Authored-By: peer@cal.com <peer@cal.com>
…nfig Co-Authored-By: peer@cal.com <peer@cal.com>
What does this PR do?
Adds native video call support to the Cal.com companion app by integrating the Daily.co React Native SDK and configuring deep linking for
app.cal.com/video/*URLs.When users tap a Cal.com video link on their mobile device, the app will now open natively and join the video call using the Daily SDK instead of opening in a web browser.
Changes:
@daily-co/react-native-daily-jsSDK and required dependenciesapp/video/[bookingUid].tsxthat fetches the booking to get the Daily meeting URL and joins the calldeep-links.tsUpdates since last revision
/video/in the hostname instead of the pathnamecal.com.evil.comis now rejected)await import()) to defer SDK loading until the video screen is actually rendered. Added fallback UI with "Open in Browser" button for environments where native modules aren't available (Expo Go, web)."use no memo"directive alone wasn't sufficient to exclude the file from React Compiler. Added asourcesfilter inbabel.config.jsto explicitly excludeapp/video/[bookingUid].tsxfrom compilation since dynamicimport()expressions are not yet supported by the compiler.Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
https://app.cal.com/video/{bookingUid}) on the deviceImportant notes:
apple-app-site-associationfile to be hosted onapp.cal.com/.well-known/meetingUrlorlocationfieldChecklist for reviewers
meetingUrlorlocationfieldloadDailySDK()- this defers SDK loading to prevent startup crashesapp.cal.comis hardcoded indeep-links.tsand video screen URL validation - self-hosted instances will need adjustmentLink to Devin run: https://app.devin.ai/sessions/a7772bf3d12d43bebc665dfbdffd54d0
Requested by: @PeerRich