feat(ooo): enhanced out-of-office with custom reasons and security validation#28727
Open
kanishk-kr wants to merge 4 commits intocalcom:mainfrom
Open
feat(ooo): enhanced out-of-office with custom reasons and security validation#28727kanishk-kr wants to merge 4 commits intocalcom:mainfrom
kanishk-kr wants to merge 4 commits intocalcom:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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.
packages/trpc/server/routers/viewer/ooo/outOfOfficeCreateOrUpdate.handler.ts
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
TextAreafor 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:
1. Selecting the Custom option: Users can now find a new "📌 Custom" option at the bottom of the reason list.
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").
3. Persistence: Once created, the custom reason is automatically saved to the user's account and appears alongside standard options for future reuse.
4. Duplicate Validation: The system intelligently prevents duplicate entries by checking the custom input against existing reasons and showing a clear warning.
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Checklist