Skip to content

feat(ooo): enhanced out-of-office with custom reasons and security validation#28727

Open
kanishk-kr wants to merge 4 commits intocalcom:mainfrom
kanishk-kr:feat/custom-ooo-status-reasons
Open

feat(ooo): enhanced out-of-office with custom reasons and security validation#28727
kanishk-kr wants to merge 4 commits intocalcom:mainfrom
kanishk-kr:feat/custom-ooo-status-reasons

Conversation

@kanishk-kr
Copy link
Copy Markdown

What does this PR do?

This PR enhances the Out-of-Office (OOO) functionality by enabling personalized, REUSABLE reasons and a clear public-facing status message for booking pages.

  • Persistent Custom Reasons: Users can input a custom emoji and reason (e.g., "Client Visit", "Focus Day"), which are then saved to their account for future selection.

  • Public Status Message: Replaced generic notes with a prominent TextArea for public status. Populated notes are automatically flagged for public display (showNotePublicly: true).

  • Enhanced Booking Page UI: Visitors now see a professional status card with the specific reason, emoji, and public note, instead of a generic "Unavailable" icon.

  • Duplicate Prevention: Added frontend validation to avoid creating custom reasons that already exist in the standard list.

  • Fixes Feature Request: Custom Out of Office Status #27886

  • Fixes CAL-7199

Visual Demo

Video Demo:

Screen.Recording.2026-04-03.at.5.27.16.PM.mov

Image Demo:

Before (Predefined Only) After (Custom + Public Status)
5 fixed options New dropdown with "📌 Custom" and persistent user reasons
Generic "Unavailable" display Styled card with Emoji, Reason, and custom note

1. Selecting the Custom option: Users can now find a new "📌 Custom" option at the bottom of the reason list.

Screenshot 2026-04-03 at 5 10 07 PM

2. Creating a new reason: When "Custom" is selected, fields appear to choose an emoji and type a personalized reason (e.g., "Out of station").

Screenshot 2026-04-03 at 5 10 49 PM

3. Persistence: Once created, the custom reason is automatically saved to the user's account and appears alongside standard options for future reuse.

Screenshot 2026-04-03 at 5 11 03 PM Screenshot 2026-04-03 at 5 11 20 PM

4. Duplicate Validation: The system intelligently prevents duplicate entries by checking the custom input against existing reasons and showing a clear warning.

Screenshot 2026-04-03 at 5 11 48 PM

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code.
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. (N/A)
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  1. Create OOO: Go to OOO settings, select "Custom", and enter something like "🌴 Off-site Workshop".
  2. Add Note: Fill the Notes field with "On-site with the engineering team. Back on Monday!".
  3. Verify Public Page: Open your public booking link during that OOO time. You should see the workshop status card.
  4. Test Reuse: Start a new OOO entry; verify "Off-site Workshop" is now an option in your list.
  5. Validation: Try typing "Vacation" in the custom input. Verify it correctly warns that it already exists in the list.

Checklist

  • 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

@github-actions github-actions bot added Low priority Created by Linear-GitHub Sync 🧹 Improvements Improvements to existing features. Mostly UX/UI labels Apr 3, 2026
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 3, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
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 10 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


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

<violation number="1" location="packages/trpc/server/routers/viewer/ooo/outOfOfficeCreateOrUpdate.handler.ts:153">
P2: Validation allows user-owned reasons even when `enabled` is false, so disabled custom reasons can still be used via direct id despite the list endpoint filtering them out.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

@kanishk-kr
Copy link
Copy Markdown
Author

@calcom/Foundation Could you please review this PR and add the 'run-ci' label so CI checks can run? Thank you!

@github-actions
Copy link
Copy Markdown
Contributor

This PR has been marked as stale due to inactivity. If you're still working on it or need any help, please let us know or update the PR to keep it active.

@github-actions github-actions bot added the Stale label Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧹 Improvements Improvements to existing features. Mostly UX/UI Low priority Created by Linear-GitHub Sync size/L Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Custom Out of Office Status

2 participants