Skip to content

Conversation

bandhan-majumder
Copy link
Contributor

@bandhan-majumder bandhan-majumder commented Jul 9, 2025

What does this PR do?

Visual Demo (For contributors especially)

image image image

Light mode

image image image

A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).

Video Demo (if applicable):

https://www.loom.com/share/b5a321de1a624bfd8a6a1c5db011bdb7?sid=0614c919-22a4-40ae-8eef-e6e7ad933aba

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

By confirming a booking and going to the cal video link with having displayLogInOverlay as true

  • Are there environment variables that should be set?
    yes (DAILY_API_KEY)
  • What are the minimal test data to have?
    dailyco api key and two users
  • Any other important info that could help to test that PR
    hardcode displayLogInOverlay to true

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

Summary by cubic

Improved the log in overlay for Cal Video by updating the design, adding clearer guest and sign-in options, and refining text for better user experience.

  • UI Improvements
    • Redesigned the log in overlay with separate sections for joining as a guest or signing in.
    • Added new text strings and input handling for guest names.
    • Improved accessibility and button states.

Signed-off-by: bandhan-majumder <bandhanmajumder16@gmail.com>
Copy link

vercel bot commented Jul 9, 2025

@bandhan-majumder is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLAassistant commented Jul 9, 2025

CLA assistant check
All committers have signed the CLA.

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Jul 9, 2025
@graphite-app graphite-app bot requested a review from a team July 9, 2025 15:08
@github-actions github-actions bot added ⚡ Quick Wins A collection of quick wins/quick fixes that are less than 30 minutes of work ✅ good first issue Good for newcomers 🧹 Improvements Improvements to existing features. Mostly UX/UI labels Jul 9, 2025
Copy link

graphite-app bot commented Jul 9, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (07/09/25)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add community label" took an action on this PR • (07/09/25)

1 label was added to this PR based on Keith Williams's automation.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

cubic reviewed 2 files and found no issues. Review PR in cubic.dev.

@bandhan-majumder
Copy link
Contributor Author

bandhan-majumder commented Jul 10, 2025

hi @Devanshusharma2005 , can I get a review if you get some time

@bandhan-majumder
Copy link
Contributor Author

hey @Udit-takkar , can I get a review on this PR? Please let me know if any change is required.

Copy link
Contributor

coderabbitai bot commented Jul 14, 2025

Walkthrough

The PR adds a call-frame lifecycle to the video view: new state (userNameForCall, isUserNameConfirmed, isCallFrameReady), createCallFrame(userName?) to build/join a DailyIframe with themed options and localized tray labels, and a useEffect to orchestrate join/cleanup. It implements a guest join flow (name input, trim/validate, confirm), gates premium UI until the frame is ready, and reworks LogInOverlay to accept guest name, handle Enter, show loading/errors, and redirect to sign-in. Several English localization strings were added/updated.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15 minutes

Assessment against linked issues

Objective (issues) Addressed Explanation
Redesign login screen to match Figma design (#21754, CAL-5910)
Add guest join flow with user name input and validation (#21754, CAL-5910)
Require user name confirmation before joining and show errors on join failures (#21754, CAL-5910)
Update/add localization strings for new UI elements (#21754, CAL-5910)

Out-of-scope changes

Code Change (file) Explanation
Added recording/transcription localization entries (apps/web/public/static/locales/en/common.json) Localization keys for "record", "transcribe", "transcription_powered_by_ai", and "start_or_stop_recording" are unrelated to the login-screen redesign and guest-join objectives in the linked issues.
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🔭 Outside diff range comments (1)
packages/lib/server/locales/en/common.json (1)

649-661: Potential duplication with existing “continue_as_guest” and semantic overlap

The new keys:

"continue_as_guest": "Continue as Guest",
"join_as_guest": "Join as Guest",
"ideal_for_one_time_calls": "Ideal for one-time calls",

all describe the guest-join action. Unless the UI explicitly needs two different verbs (“Continue” vs “Join”), consider consolidating to a single key to avoid unnecessary translation effort and future maintenance confusion.

If both are really needed, add developer comments in the JSON explaining the contextual difference.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cee30c5 and ba60eb3.

📒 Files selected for processing (2)
  • apps/web/modules/videos/views/videos-single-view.tsx (6 hunks)
  • packages/lib/server/locales/en/common.json (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Install dependencies / Yarn install & cache
  • GitHub Check: Security Check
🔇 Additional comments (5)
apps/web/modules/videos/views/videos-single-view.tsx (5)

45-50: Well-structured state management for user flow control.

The state initialization properly handles the fallback logic and correctly ties the confirmation state to the overlay display condition.


51-126: Excellent refactoring of call frame creation logic.

The extraction into a useCallback improves code organization and reusability. The error handling with fallback to existing instance is a good defensive programming practice.


175-185: Good defensive rendering practice.

Conditioning the transcription UI on isCallFrameReady prevents potential runtime errors from accessing the call frame before it's initialized.


349-403: Excellent UI implementation with clear user flows.

The redesigned overlay provides a clean separation between guest and sign-in options, with proper input validation, loading states, and accessibility features like autoFocus.


278-278: Effect dependency is correct
I verified that startingTime (derived from props.startTime) is included in the useEffect dependency array in apps/web/modules/videos/views/videos-single-view.tsx. The effect will re-run whenever the start time changes, so no changes are needed here.

Likely an incorrect or invalid review comment.

@bandhan-majumder
Copy link
Contributor Author

@kart1ka @anikdhabal @Udit-takkar
can this pr get approved

Copy link
Contributor

@kart1ka kart1ka left a comment

Choose a reason for hiding this comment

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

the login flow is broken when I try to login from the meeting link. See the video attached.

https://cap.link/2jweebxx0f72sa4

Can you please check and fix it?

@kart1ka kart1ka marked this pull request as draft August 11, 2025 17:10
@bandhan-majumder
Copy link
Contributor Author

bandhan-majumder commented Aug 12, 2025

fixed @kart1ka . Thank you so much for pointing that out.

@bandhan-majumder bandhan-majumder marked this pull request as ready for review August 12, 2025 02:57
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
apps/web/modules/videos/views/videos-single-view.tsx (1)

404-404: Encode callback URL to prevent security issues.

The callbackUrl parameter should be URL-encoded to prevent broken URLs and potential security issues.

Apply this fix to properly encode the callback URL:

-                (window.location.href = `${WEBAPP_URL}/auth/login?callbackUrl=${WEBAPP_URL}/video/${bookingUid}`)
+                (window.location.href = `${WEBAPP_URL}/auth/login?callbackUrl=${encodeURIComponent(`${WEBAPP_URL}/video/${bookingUid}`)}`)
🧹 Nitpick comments (1)
apps/web/modules/videos/views/videos-single-view.tsx (1)

53-118: Comprehensive call frame creation with localization.

The createCallFrame callback properly:

  • Configures Daily theme and layout
  • Handles optional userName parameter
  • Adds localized tray buttons for team plans
  • Includes proper error handling with fallback

However, there's redundant userName setting on Line 109.

Remove the redundant setUserName call since userName is already passed in the createFrame options:

-        if (userName) {
-          callFrame.setUserName(userName);
-        }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c7e6fa8 and cf15f5e.

📒 Files selected for processing (1)
  • apps/web/modules/videos/views/videos-single-view.tsx (7 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.tsx

📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)

Always use t() for text localization in frontend code; direct text embedding should trigger a warning

Files:

  • apps/web/modules/videos/views/videos-single-view.tsx
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)

Flag excessive Day.js use in performance-critical code; prefer native Date or Day.js .utc() in hot paths like loops

Files:

  • apps/web/modules/videos/views/videos-single-view.tsx
🧠 Learnings (3)
📚 Learning: 2025-08-08T10:26:13.352Z
Learnt from: Udit-takkar
PR: calcom/cal.com#22919
File: packages/features/calAIPhone/providers/retellAI/services/PhoneNumberService.ts:212-220
Timestamp: 2025-08-08T10:26:13.352Z
Learning: In calcom/cal.com PR #22919, packages/features/calAIPhone/providers/retellAI/services/PhoneNumberService.ts should include the phone number in client-facing HttpError messages (e.g., in updatePhoneNumber/getPhoneNumber catch blocks). Do not suggest redacting the phone number from these errors unless requirements change (per maintainer: Udit-takkar).

Applied to files:

  • apps/web/modules/videos/views/videos-single-view.tsx
📚 Learning: 2025-07-21T21:33:23.371Z
Learnt from: Anshumancanrock
PR: calcom/cal.com#22570
File: apps/web/modules/signup-view.tsx:253-253
Timestamp: 2025-07-21T21:33:23.371Z
Learning: In signup-view.tsx, when checking if redirectUrl contains certain strings, using explicit && checks (redirectUrl && redirectUrl.includes()) is preferred over optional chaining (redirectUrl?.includes()) to ensure the result is always a boolean rather than potentially undefined. This approach provides cleaner boolean contracts for downstream conditional logic.

Applied to files:

  • apps/web/modules/videos/views/videos-single-view.tsx
📚 Learning: 2025-07-28T11:50:23.946Z
Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-28T11:50:23.946Z
Learning: Applies to **/*.tsx : Always use `t()` for text localization in frontend code; direct text embedding should trigger a warning

Applied to files:

  • apps/web/modules/videos/views/videos-single-view.tsx
🧬 Code Graph Analysis (1)
apps/web/modules/videos/views/videos-single-view.tsx (2)
apps/web/modules/videos/cal-video-premium-features.tsx (1)
  • CalVideoPremiumFeatures (163-247)
packages/ui/components/form/index.ts (1)
  • Input (21-21)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (16)
apps/web/modules/videos/views/videos-single-view.tsx (16)

7-7: Import added for useCallback.

The import for useCallback is correctly added to support the new memoized callback functions in this component.


21-21: Import added for Input component.

The Input component is correctly imported from the UI form library for use in the LogInOverlay guest name input field.


30-30: Translation hook correctly added.

The useLocale hook is properly utilized to support localization throughout the component, following the coding guidelines for frontend text localization.


47-51: Well-designed state management for call flow.

The new state variables provide clear lifecycle management:

  • userNameForCall: tracks the name to use for the call
  • isUserNameConfirmed: gates call creation until name is confirmed
  • isCallFrameReady: controls premium feature rendering

The initial state logic correctly handles override/logged-in names and overlay display preferences.


120-148: Smart call frame lifecycle management.

The useEffect properly gates call creation when displayLogInOverlay is true but userName isn't confirmed, preventing premature joins. The cleanup function correctly destroys the call frame and resets state.


150-162: Clean guest joining handlers.

Both callback functions are well-implemented with proper validation and state updates. The handleJoinAsGuest correctly returns false for empty names instead of logging errors, improving the user experience.


166-177: Proper gating of premium features.

The premium features are correctly rendered only after isCallFrameReady is true, ensuring the Daily frame is properly initialized before adding premium controls.


201-210: Correct overlay rendering logic.

The LogInOverlay is properly gated by both displayLogInOverlay and !isUserNameConfirmed, ensuring it only appears when needed for the guest flow.


269-269: Proper dependency array for ProgressBar effect.

The addition of startingTime to the dependency array ensures the effect re-runs when the start time changes, which is correct behavior.


289-293: Well-designed LogInOverlay props interface.

The props interface correctly supports both guest joining and signed-in user flows with proper optional callbacks and user name handling.


300-304: Appropriate state initialization for overlay.

The local state is well-initialized with sensible defaults and proper error handling state management.


305-326: Robust guest joining handler with error handling.

The handleContinueAsGuest function includes proper validation, loading states, error handling, and user feedback. The error message fallback using localization is a good practice.


328-345: Excellent keyboard and input handling.

The Enter key handler and input change handler provide good UX with proper state management and error clearing on input changes.


354-374: Well-structured guest input section.

The guest joining section is properly structured with clear labeling, placeholder text using localization, proper input handling, and loading state management.


377-385: User-friendly error display.

The error handling UI provides clear visual feedback with proper styling for both light and dark modes.


390-408: Complete sign-in flow implementation.

The sign-in section is properly implemented with clear messaging and correct redirect URL construction.

@bandhan-majumder
Copy link
Contributor Author

bandhan-majumder commented Aug 12, 2025

There is one more issue I am facing while leaving the call, the default redirect page is not show when I sign in through modal and gets redirected.

edit: this is the default behaviour and Cal currently has this (next comment mentions this)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

♻️ Duplicate comments (2)
apps/web/modules/videos/views/videos-single-view.tsx (2)

405-413: URL-encode callbackUrl before redirect

The callbackUrl should be encoded to prevent breaking the login URL and to avoid injection via query params.

-              onClick={() =>
-                (window.location.href = `${WEBAPP_URL}/auth/login?callbackUrl=${WEBAPP_URL}/video/${bookingUid}`)
-              }>
+              onClick={() => {
+                const callbackUrl = encodeURIComponent(`${WEBAPP_URL}/video/${bookingUid}`);
+                window.location.href = `${WEBAPP_URL}/auth/login?callbackUrl=${callbackUrl}`;
+              }}>

153-154: Effect dependencies missing loggedInUserName/overrideName

The effect branches on loggedInUserName and overrideName but they’re not in the dependency array. If either becomes available later (e.g., hydration or async props), the effect won’t re-run and the call may not be created as expected.

-  }, [displayLogInOverlay, isUserNameConfirmed, userNameForCall, createCallFrame]);
+  }, [
+    displayLogInOverlay,
+    isUserNameConfirmed,
+    userNameForCall,
+    createCallFrame,
+    loggedInUserName,
+    overrideName
+  ]);
🧹 Nitpick comments (4)
apps/web/modules/videos/views/videos-single-view.tsx (4)

319-331: Avoid double-confirm pathway; rely on onJoinAsGuest only

After removing the optional onUserNameConfirmed, calling only onJoinAsGuest keeps the state single-sourced from the parent.

-      onJoinAsGuest(trimmedName);
-      onUserNameConfirmed?.();
+      onJoinAsGuest(trimmedName);
       setIsOpen(false);

108-110: Remove redundant userName set on callFrame

You already pass userName to createFrame; calling setUserName again is unnecessary.

-        if (userName) {
-          callFrame.setUserName(userName);
-        }

50-51: Auto-confirm name when already known (logged-in or overrideName)

This tightens the contract and avoids showing the overlay logic in edge cases. Parent gating covers it, but making the initial state explicit improves readability and reduces surprises.

-  const [isUserNameConfirmed, setIsUserNameConfirmed] = useState<boolean>(!displayLogInOverlay);
+  const [isUserNameConfirmed, setIsUserNameConfirmed] = useState<boolean>(
+    !displayLogInOverlay || !!loggedInUserName || !!overrideName
+  );

496-503: Localize aria-label text

Front-end rule: wrap user-facing text in t(). The aria-label here uses plain English strings.

-            aria-label={`${open ? "close" : "open"} booking description sidebar`}
+            aria-label={`${open ? t("close") : t("open")} ${t("booking_description_sidebar")}`}

Also consider localizing the alt attributes for the logos above (Line 188, 198).

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cf15f5e and cb302a9.

📒 Files selected for processing (1)
  • apps/web/modules/videos/views/videos-single-view.tsx (7 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.tsx

📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)

Always use t() for text localization in frontend code; direct text embedding should trigger a warning

Files:

  • apps/web/modules/videos/views/videos-single-view.tsx
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)

Flag excessive Day.js use in performance-critical code; prefer native Date or Day.js .utc() in hot paths like loops

Files:

  • apps/web/modules/videos/views/videos-single-view.tsx
🧠 Learnings (3)
📚 Learning: 2025-08-08T10:26:13.352Z
Learnt from: Udit-takkar
PR: calcom/cal.com#22919
File: packages/features/calAIPhone/providers/retellAI/services/PhoneNumberService.ts:212-220
Timestamp: 2025-08-08T10:26:13.352Z
Learning: In calcom/cal.com PR #22919, packages/features/calAIPhone/providers/retellAI/services/PhoneNumberService.ts should include the phone number in client-facing HttpError messages (e.g., in updatePhoneNumber/getPhoneNumber catch blocks). Do not suggest redacting the phone number from these errors unless requirements change (per maintainer: Udit-takkar).

Applied to files:

  • apps/web/modules/videos/views/videos-single-view.tsx
📚 Learning: 2025-07-21T21:33:23.371Z
Learnt from: Anshumancanrock
PR: calcom/cal.com#22570
File: apps/web/modules/signup-view.tsx:253-253
Timestamp: 2025-07-21T21:33:23.371Z
Learning: In signup-view.tsx, when checking if redirectUrl contains certain strings, using explicit && checks (redirectUrl && redirectUrl.includes()) is preferred over optional chaining (redirectUrl?.includes()) to ensure the result is always a boolean rather than potentially undefined. This approach provides cleaner boolean contracts for downstream conditional logic.

Applied to files:

  • apps/web/modules/videos/views/videos-single-view.tsx
📚 Learning: 2025-07-28T11:50:23.946Z
Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-28T11:50:23.946Z
Learning: Applies to **/*.tsx : Always use `t()` for text localization in frontend code; direct text embedding should trigger a warning

Applied to files:

  • apps/web/modules/videos/views/videos-single-view.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Install dependencies / Yarn install & cache
  • GitHub Check: Codacy Static Code Analysis

@bandhan-majumder
Copy link
Contributor Author

bandhan-majumder commented Aug 12, 2025

The video call leaving redirect screen behaviour when I am joining with a callback url after signing in, is the behaviour Cal has currently too . This is not changed. So the changes are ready to review and not needed to change the prementioned behaviour. Log is fixed though.

https://www.loom.com/share/6b82be46510141e6805476c5569ffb81?sid=0b020760-d6dd-49b8-ab34-722593ba06ef

@kart1ka

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (7)
apps/web/modules/videos/views/videos-single-view.tsx (7)

87-88: Hard-coded strings require localization.

The label and tooltip strings "Record" and "Start or stop recording" are user-visible but not wrapped in t(). According to the frontend coding guidelines, all text should be localized.


97-98: Hard-coded strings require localization.

The label and tooltip strings "Transcribe" and "Transcription powered by AI" are user-visible but not wrapped in t().


117-117: Add missing t dependency to useCallback.

The createCallFrame function uses t() for localization but doesn't include it in the dependency array. This could lead to stale translations if the locale changes.


201-210: Simplify overlay rendering conditions.

The overlay is currently rendered for logged-in users and when overrideName is present, which contradicts the PR objectives. The component should only render for actual guest users.


286-293: Remove unused props from LogInOverlayProps interface.

With proper gating in the parent component, the overlay should only be shown to guests. The isLoggedIn, loggedInUserName, and overrideName props are unnecessary.


300-301: Simplify overlay state management.

Since the overlay should only be shown to guests (after parent gating), the isOpen state can default to true and the userName can start empty.


404-404: URL encode the callback parameter to prevent injection.

The callbackUrl is directly concatenated into the URL without encoding, which could cause issues if the bookingUid contains special characters.

-                (window.location.href = `${WEBAPP_URL}/auth/login?callbackUrl=${WEBAPP_URL}/video/${bookingUid}`)
+                (window.location.href = `${WEBAPP_URL}/auth/login?callbackUrl=${encodeURIComponent(`${WEBAPP_URL}/video/${bookingUid}`)}`)
🧹 Nitpick comments (3)
apps/web/modules/videos/views/videos-single-view.tsx (3)

108-110: Remove redundant setUserName call.

The userName is already passed to createFrame({ userName }) on line 80, making the explicit call to callFrame.setUserName(userName) redundant.

-        if (userName) {
-          callFrame.setUserName(userName);
-        }

121-123: Consider simplifying the overlay gating logic.

The current condition checks three separate variables to determine if the overlay should block call creation. This could be simplified by initializing isUserNameConfirmed based on these conditions.

Initialize isUserNameConfirmed to handle authenticated users automatically:

-  const [isUserNameConfirmed, setIsUserNameConfirmed] = useState<boolean>(!displayLogInOverlay);
+  const [isUserNameConfirmed, setIsUserNameConfirmed] = useState<boolean>(
+    !displayLogInOverlay || !!loggedInUserName || !!overrideName
+  );

Then simplify the effect guard:

-    if (displayLogInOverlay && !loggedInUserName && !overrideName && !isUserNameConfirmed) {
+    if (!isUserNameConfirmed) {
       return;
     }

152-154: Inconsistent return value for validation failure.

The function returns false when validation fails but doesn't return anything on success, creating an inconsistent API.

   const trimmedName = guestName.trim();
   if (!trimmedName) {
     return false;
   }
 
   setUserNameForCall(trimmedName);
   setIsUserNameConfirmed(true);
+  return true;
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb302a9 and 44c3082.

📒 Files selected for processing (1)
  • apps/web/modules/videos/views/videos-single-view.tsx (7 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.tsx

📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)

Always use t() for text localization in frontend code; direct text embedding should trigger a warning

Files:

  • apps/web/modules/videos/views/videos-single-view.tsx
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)

Flag excessive Day.js use in performance-critical code; prefer native Date or Day.js .utc() in hot paths like loops

Files:

  • apps/web/modules/videos/views/videos-single-view.tsx
🧠 Learnings (3)
📚 Learning: 2025-08-08T10:26:13.352Z
Learnt from: Udit-takkar
PR: calcom/cal.com#22919
File: packages/features/calAIPhone/providers/retellAI/services/PhoneNumberService.ts:212-220
Timestamp: 2025-08-08T10:26:13.352Z
Learning: In calcom/cal.com PR #22919, packages/features/calAIPhone/providers/retellAI/services/PhoneNumberService.ts should include the phone number in client-facing HttpError messages (e.g., in updatePhoneNumber/getPhoneNumber catch blocks). Do not suggest redacting the phone number from these errors unless requirements change (per maintainer: Udit-takkar).

Applied to files:

  • apps/web/modules/videos/views/videos-single-view.tsx
📚 Learning: 2025-07-21T21:33:23.371Z
Learnt from: Anshumancanrock
PR: calcom/cal.com#22570
File: apps/web/modules/signup-view.tsx:253-253
Timestamp: 2025-07-21T21:33:23.371Z
Learning: In signup-view.tsx, when checking if redirectUrl contains certain strings, using explicit && checks (redirectUrl && redirectUrl.includes()) is preferred over optional chaining (redirectUrl?.includes()) to ensure the result is always a boolean rather than potentially undefined. This approach provides cleaner boolean contracts for downstream conditional logic.

Applied to files:

  • apps/web/modules/videos/views/videos-single-view.tsx
📚 Learning: 2025-07-28T11:50:23.946Z
Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-28T11:50:23.946Z
Learning: Applies to **/*.tsx : Always use `t()` for text localization in frontend code; direct text embedding should trigger a warning

Applied to files:

  • apps/web/modules/videos/views/videos-single-view.tsx
🔇 Additional comments (2)
apps/web/modules/videos/views/videos-single-view.tsx (2)

319-323: Good error handling implementation.

The error handling now properly displays user-facing error messages, addressing previous review feedback. The implementation correctly uses localized error messages and clears loading state.


377-385: Well-implemented error display UI.

The error display component provides clear visual feedback with appropriate styling for both light and dark modes. Good UX improvement.

@kart1ka
Copy link
Contributor

kart1ka commented Aug 12, 2025

The video call leaving redirect screen behaviour when I am joining with a callback url after signing in, is the behaviour Cal has currently too . This is not changed. So the changes are ready to review and not needed to change the prementioned behaviour. Log is fixed though.

loom.com/share/6b82be46510141e6805476c5569ffb81?sid=0b020760-d6dd-49b8-ab34-722593ba06ef

@kart1ka

The login issue still persists. See the video attached.

https://cap.link/1n98cyqex8g6vh9

@kart1ka kart1ka marked this pull request as draft August 12, 2025 15:53
@bandhan-majumder
Copy link
Contributor Author

bandhan-majumder commented Aug 12, 2025

@kart1ka
I have already addressed it and it does not appear now : ). I have retested it and rerecorded the behaviour. Am I missing something?

My guess is:
When we are clicking on the button second time, the first onclick is not completed and that shows the red msg. It actually takes a bit time to login locally. Also, even after the message, it tries to login without fail.

https://www.loom.com/share/de067c03636a420ca5a48a2ada2f87ea

@bandhan-majumder
Copy link
Contributor Author

@kart1ka
It's ready for review already. If the above loom and the explanation looks good to u, please consider it reviewing.

@bandhan-majumder
Copy link
Contributor Author

@kart1ka WDYT

@bandhan-majumder
Copy link
Contributor Author

bandhan-majumder commented Aug 15, 2025

The local development is too slow. It's in the issue section now too here. That's taking time while signing up and upon double clicking, it's showing that.

@bandhan-majumder bandhan-majumder marked this pull request as ready for review August 15, 2025 08:06
@bandhan-majumder
Copy link
Contributor Author

@kart1ka can you please check once. The last time it caused because of the slow environment. I have added a loom where it did not happen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cal video community Created by Linear-GitHub Sync ✅ good first issue Good for newcomers i18n area: i18n, translations 🧹 Improvements Improvements to existing features. Mostly UX/UI Low priority Created by Linear-GitHub Sync ⚡ Quick Wins A collection of quick wins/quick fixes that are less than 30 minutes of work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Design improvements for log in screen for cal video
7 participants