feat(ooo): implement custom reusable reasons and public status messages#28726
Closed
kanishk-kr wants to merge 3 commits into
Closed
feat(ooo): implement custom reusable reasons and public status messages#28726kanishk-kr wants to merge 3 commits into
kanishk-kr wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
2 issues 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:105">
P1: `reasonId` is accepted without ownership/visibility validation, allowing OOO entries to reference other users’ or disabled reasons.</violation>
<violation number="2" location="packages/trpc/server/routers/viewer/ooo/outOfOfficeCreateOrUpdate.handler.ts:109">
P2: Whitespace-only `customReason` is accepted and can create blank OutOfOfficeReason records because trimmed text is not validated as non-empty.</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.
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 feat: custom OOO reason #27943
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