fix: display phone numbers and localized timezone in BookingDetailsSheet#27909
fix: display phone numbers and localized timezone in BookingDetailsSheet#27909sean-brydon merged 6 commits intomainfrom
Conversation
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
🤖 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:
|
There was a problem hiding this comment.
1 issue found across 1 file
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="apps/web/modules/bookings/components/BookingDetailsSheet.tsx">
<violation number="1" location="apps/web/modules/bookings/components/BookingDetailsSheet.tsx:454">
P2: `formatToLocalizedTimezone` can return `undefined`, so the display can render `(undefined)` for some locales. Add a fallback to the raw `timeZone` (or offset) when the localized name is missing.</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 |
Paragon: tests updated1 new test generated for this PR. New Tests
DetailsNew Tests
|
… query Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Generated by Paragon from proposal for PR #27909
Tests Added by ParagonThe following test files have been added to this PR:
These tests were generated from an approved test proposal. Generated with Paragon |
…Attendee query" This reverts commit f810ba8.
…git-manager.devin.ai/proxy/github.com/calcom/cal.com into devin/1770923111-fix-booking-details-sheet
There was a problem hiding this comment.
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="packages/lib/dayjs/formatToLocalizedTimezone.test.ts">
<violation number="1" location="packages/lib/dayjs/formatToLocalizedTimezone.test.ts:73">
P3: This test hardcodes the UTC label as "Coordinated Universal Time", but Intl.DateTimeFormat time zone names are implementation-dependent. On some runtimes the canonicalized name (e.g., "UTC") is returned, so this assertion can be flaky. Consider asserting a non-empty value or allowing multiple valid labels instead.</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 |


What does this PR do?
Aligns
BookingDetailsSheetwith the existingbookings-single-view.tsxin two ways:WhoSection – attendee phone numbers: Adds conditional rendering of
attendee.phoneNumberbetween the attendee name and email, matching the pattern inbookings-single-view.tsx.When section – localized timezone: Replaces the raw IANA timezone identifier (e.g.
America/New_York) withformatToLocalizedTimezone()from@calcom/lib/dayjs, which usesIntl.DateTimeFormatto produce a human-readable name (e.g.Eastern Standard Time), matching the existing behaviour inbookings-single-view.tsx. Includes a?? timeZonefallback for the rare case whereIntl.DateTimeFormat.formatToPartsdoesn't return atimeZoneNamepart.Also adds unit tests for
formatToLocalizedTimezonecovering various timezones, locales, and the short/long name options.Type of change
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
BookingDetailsSheet, between the attendee name and email.Things for reviewers to verify
DisplayTimestampnow callsuseLocale()(it was previously a pure render function with no hooks). Confirm this is acceptable given how the component is used.attendee.phoneNumberis available from the existingselectAll()query inget.handler.ts— no backend change was needed sinceselectAll()already includes all Attendee columns.Link to Devin run: https://app.devin.ai/sessions/4c05d1442aea431c909b8b1d6cfcb087
Requested by: @eunjae-lee