Skip to content

Conversation

@dhairyashiil
Copy link
Member

@dhairyashiil dhairyashiil commented Nov 29, 2025

Video:

Screen.Recording.2025-11-29.at.10.00.57.PM.mov
Screen.Recording.2025-11-29.at.10.00.57.PM.mov
  1. tooltip
Screen.Recording.2025-11-29.at.10.04.31.PM.mov
  1. team ooo
Screen.Recording.2025-11-29.at.10.56.30.PM.mov

What does this PR do?

Adds the ability to display Out of Office (OOO) notes publicly on booking pages with a privacy toggle. This feature improves transparency and communication when users are unavailable.

Changes

Database Schema

  • Added showNotePublicly boolean field to OutOfOfficeEntry model (default: false for backward compatibility)
  • Created and applied database migration

Backend (tRPC)

  • Updated outOfOfficeCreateOrUpdate handler to accept and save showNotePublicly field
  • Updated Zod schema validation to include showNotePublicly as optional boolean
  • Modified OOO repository methods to select and return notes and showNotePublicly fields
  • Updated getUserAvailability to propagate OOO notes and visibility through the data flow
  • Enhanced slot generation logic to include notes when publicly visible

Frontend - Settings UI

  • Added "Show note publicly" toggle to Create/Edit OOO Entry modal
  • Toggle positioned next to "Notes" label following Booking Questions UI pattern
  • Shows "Hidden" badge when toggle is OFF, no text when ON
  • Toggle always visible (not dependent on note content)
  • Fixed bug where toggle state wasn't properly loaded when editing existing entries

Frontend - Booking Page

  • Display OOO message on booking page when showNotePublicly is enabled
  • Message shows before redirect information with "OOO Message:" label
  • Only message text is italicized, not the label
  • OOO dates are now selectable even without redirect configured
  • Redirect button only shows when team member is assigned
  • Added scrollable container for long notes (max-height: 120px) to prevent UI overflow
  • Hide 12h/24h time format toggle when viewing OOO dates (optimization: O(1) check)

Use Cases

Scenario 1: OOO with Redirect

  • User selects OOO date on calendar
  • Sees OOO emoji, user name, message, and redirect text
  • Redirect button displayed to book with team member

Scenario 2: OOO without Redirect

  • User selects OOO date on calendar
  • Sees OOO emoji, user name, and message (if public)
  • No redirect button shown
  • Cannot book time slots (blocked)

@dhairyashiil dhairyashiil requested a review from a team as a code owner November 29, 2025 14:37
@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Nov 29, 2025
@vercel
Copy link

vercel bot commented Nov 29, 2025

@dhairyashiil is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added the ❗️ migrations contains migration files label Nov 29, 2025
@keithwillcode keithwillcode added the community-interns The team responsible for reviewing, testing and shipping low/medium community PRs label Nov 29, 2025
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.

2 issues found across 16 files

Prompt for AI agents (all 2 issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/features/availability/lib/getUserAvailability.ts">

<violation number="1" location="packages/features/availability/lib/getUserAvailability.ts:650">
`notes` should only be included in the availability payload when `showNotePublicly` is true; otherwise private notes are leaked to the client despite the privacy toggle.</violation>
</file>

<file name="packages/features/bookings/Booker/components/AvailableTimeSlots.tsx">

<violation number="1" location="packages/features/bookings/Booker/components/AvailableTimeSlots.tsx:196">
`isOOODay` only inspects the first slot, so the time-format toggle disappears even when later slots are bookable on partially OOO days.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

@dhairyashiil dhairyashiil marked this pull request as draft November 29, 2025 15:09
@dhairyashiil dhairyashiil marked this pull request as ready for review November 29, 2025 16:36
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.

1 issue found across 16 files

Prompt for AI agents (all 1 issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/trpc/server/routers/viewer/ooo/outOfOfficeCreateOrUpdate.handler.ts">

<violation number="1" location="packages/trpc/server/routers/viewer/ooo/outOfOfficeCreateOrUpdate.handler.ts:182">
Updating an existing OOO entry without explicitly providing `showNotePublicly` now forces the value back to `false`, so public notes are unintentionally hidden whenever older clients submit updates that omit the new field. Preserve the prior value instead of defaulting to `false` during updates.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

Copy link
Member

@CarinaWolli CarinaWolli left a comment

Choose a reason for hiding this comment

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

  • Remove "OOO message:"
Screenshot 2025-12-05 at 4 01 29 PM
  • Instead of the toggle add a checkbox with "Show note on public booking page"
Screenshot 2025-12-05 at 4 03 05 PM
  • Didn't test, but this also needs to show when there is no redirect

@github-actions github-actions bot marked this pull request as draft December 5, 2025 15:04
- Replace Switch with Checkbox for "show note publicly" option
- Remove "OOO Message:" prefix from displayed notes on booking page
- Update i18n text to "Show note on public booking page"
- Remove unused ooo_message i18n key
@dhairyashiil dhairyashiil marked this pull request as ready for review December 10, 2025 17:45
@dhairyashiil
Copy link
Member Author

done @CarinaWolli , here is the updated video (also shown the case where this work when there is no redirect)

Screen.Recording.2025-12-10.at.11.12.52.PM.mov

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.

1 issue found across 16 files

Prompt for AI agents (all 1 issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/features/settings/outOfOffice/CreateOrEditOutOfOfficeModal.tsx">

<violation number="1" location="packages/features/settings/outOfOffice/CreateOrEditOutOfOfficeModal.tsx:361">
P2: Accessibility issue: The `&lt;label&gt;` element uses `onClick` instead of proper `htmlFor` association. Screen readers won&#39;t announce the relationship between the label and checkbox. Consider adding an `id` to the Checkbox and using `htmlFor` on the label, or use the `CheckboxField` component which has built-in label support.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR


const disabled = away ? !oooInfo?.toUser : isNextMonth ? !hasAvailableSlots : !included || excluded;
// Allow selecting OOO dates even without redirect - they'll see the OOO message
const disabled = away ? false : isNextMonth ? !hasAvailableSlots : !included || excluded;
Copy link
Member

Choose a reason for hiding this comment

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

needs to stay disabled when OOO note is not public
Screenshot 2025-12-11 at 9 46 05 AM

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Screen.Recording.2025-12-11.at.2.33.43.PM.mov

@github-actions github-actions bot marked this pull request as draft December 11, 2025 08:47
@dhairyashiil dhairyashiil marked this pull request as ready for review December 11, 2025 09:05
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.

No issues found across 16 files

Copy link
Member

@CarinaWolli CarinaWolli left a comment

Choose a reason for hiding this comment

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

Nice work, looks great 👏🏻

Copy link
Contributor

@emrysal emrysal left a comment

Choose a reason for hiding this comment

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

Approved!

@CarinaWolli CarinaWolli merged commit 26b4385 into calcom:main Dec 11, 2025
80 of 91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Created by Linear-GitHub Sync community-interns The team responsible for reviewing, testing and shipping low/medium community PRs ❗️ migrations contains migration files ready-for-e2e size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants