Skip to content

feat(ooo): implement custom reusable reasons and public status messages#28726

Closed
kanishk-kr wants to merge 3 commits into
calcom:mainfrom
kanishk-kr:feat/custom-ooo-status-reasons
Closed

feat(ooo): implement custom reusable reasons and public status messages#28726
kanishk-kr wants to merge 3 commits into
calcom: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 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:

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

@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.

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.

@kanishk-kr kanishk-kr closed this Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants