Skip to content

Comments

fix: respect hideCalendarNotes setting during booking reschedule#25945

Merged
pedroccastro merged 14 commits intomainfrom
devin/fix-hide-calendar-notes-reschedule-1765911722
Jan 13, 2026
Merged

fix: respect hideCalendarNotes setting during booking reschedule#25945
pedroccastro merged 14 commits intomainfrom
devin/fix-hide-calendar-notes-reschedule-1765911722

Conversation

@Ryukemeister
Copy link
Contributor

What does this PR do?

Fixes an issue where the hideCalendarNotes setting was not being respected during booking rescheduling in API v2. When rescheduling an event with hideCalendarNotes: true, the notes were incorrectly becoming visible again in the ICS file.

Root cause: After the CalendarManager properly hides notes by replacing additionalNotes with "Notes have been hidden by the organizer", the code was resetting evt.description back to eventType.description, which contains the original notes. This reset was happening after calendar events were already created/updated.

Fix: Remove the three description reset lines that were overriding the hidden notes:

  • Two in the reschedule flow (after eventManager.reschedule())
  • One in the new booking flow (after eventManager.create())

The removed code comments claimed the reset was "for sending emails", but email templates use evt.additionalNotes, not evt.description, so this reset was unnecessary and harmful.

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A - no documentation changes needed.
  • 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 an event type with hideCalendarNotes: true
  2. Book the event type with some notes in the booking
  3. Verify the initial ICS file shows "Notes have been hidden by the organizer" instead of the actual notes
  4. Reschedule the booking
  5. Verify the rescheduled ICS file still shows "Notes have been hidden by the organizer" (previously it would show the original notes)

Human Review Checklist

  • Verify email templates use additionalNotes and not description for rendering notes
  • Confirm no other code paths depend on evt.description being reset after calendar event creation
  • Consider adding test coverage for the hideCalendarNotes + reschedule scenario

Link to Devin run: https://app.devin.ai/sessions/186c0904faad49b8a2944d2f71fea937
Requested by: rajiv@cal.com (@Ryukemeister)

Remove description reset lines that were overriding the hideCalendarNotes
setting after calendar events were created/updated. The CalendarEventBuilder
already properly sets hideCalendarNotes, and the CalendarManager respects
this flag by replacing additionalNotes with 'Notes have been hidden by the
organizer'. The description reset was incorrectly restoring the original
notes, causing them to become visible again in ICS files after rescheduling.

This fix removes three description reset lines:
- After eventManager.reschedule() in the reschedule flow
- After the reschedule video call details extraction
- After eventManager.create() in the new booking flow

Co-Authored-By: rajiv@cal.com <sahalrajiv6900@gmail.com>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@vercel
Copy link

vercel bot commented Dec 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

4 Skipped Deployments
Project Deployment Review Updated (UTC)
api-v2 Ignored Ignored Preview Jan 11, 2026 4:44am
cal Ignored Ignored Jan 11, 2026 4:44am
cal-companion Ignored Ignored Preview Jan 11, 2026 4:44am
cal-eu Ignored Ignored Jan 11, 2026 4:44am

@Ryukemeister Ryukemeister changed the title fix: respect hideCalendarNotes setting during booking reschedule fix: respect hideCalendarNotes setting during booking reschedule Dec 16, 2025
@pull-request-size pull-request-size bot added size/M and removed size/S labels Dec 17, 2025
@Ryukemeister Ryukemeister marked this pull request as ready for review December 17, 2025 17:02
@Ryukemeister Ryukemeister requested a review from a team as a code owner December 17, 2025 17:02
@graphite-app graphite-app bot added consumer core area: core, team members only labels Dec 17, 2025
@graphite-app graphite-app bot requested a review from a team December 17, 2025 17:02
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 4 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/bookings/lib/service/RegularBookingService.ts">

<violation number="1" location="packages/features/bookings/lib/service/RegularBookingService.ts:2050">
P1: This reset at line 2050 happens BEFORE `eventManager.reschedule()`, which means the calendar events will be created with the original description (notes visible) rather than the hidden notes. According to the PR description, the fix should remove resets that override hidden notes, not add a new one before the reschedule call. Additionally, there&#39;s still a reset at line 2071 after the reschedule flow that should likely be removed per the PR goals.</violation>
</file>

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

"add_input": "Add an Input",
"disable_notes": "Hide notes in calendar",
"disable_notes_description": "For privacy reasons, additional inputs and notes will be hidden in the calendar entry. They will still be sent to your email. <0>Learn more</0>",
"notes_hidden_by_organizer": "Notes have been hidden by the organizer",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is not being anywhere right now, its for later

!shouldSkipAttendeeEmailWithSettings(eventTypeMetadata, organizationSettings, EmailType.RESCHEDULED)
) {
emailsAndSMSToSend.push(sendEmail(() => new AttendeeRescheduledEmail(calendarEvent, person)));
emailsAndSMSToSend.push(
Copy link
Contributor Author

@Ryukemeister Ryukemeister Dec 22, 2025

Choose a reason for hiding this comment

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

this is not a breaking change or change in logic, it was simply missing for the rescheduling logic. if you checkout line 395 of email manager here we were already implementing this when create a new booking, it was simply missing when rescheduling

() =>
new AttendeeRescheduledEmail(
{
...calendarEvent,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

same comment as above, missing logic

): Promise<EventResult<NewCalendarEventType>> => {
const formattedEvent = formatCalEvent(rawCalEvent);

if (formattedEvent.hideCalendarNotes) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is again not a logic change or breaking change, it was simply missing for rescheduling logic. if you checkout line 308 of the same function here its already present for create booking, it was simply missing for rescheduling

Copy link
Contributor

@pedroccastro pedroccastro left a comment

Choose a reason for hiding this comment

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

Hey @Ryukemeister, nice work on this! The core fix looks solid 👍
One thing: sendRescheduledSeatEmailAndSMS (line ~380) doesn't have the hideCalendarNotes handling yet, but the other reschedule functions do. Should we add the same pattern there for consistency?

@github-actions
Copy link
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 Dec 30, 2025
}
// This gets overridden when updating the event - to check if notes have been hidden or not. We just reset this back
// to the default description when we are sending the emails.
evt.description = eventType.description;
Copy link
Contributor

Choose a reason for hiding this comment

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

why not eventType.description ?? evt.description like before?

Copy link
Contributor Author

@Ryukemeister Ryukemeister Jan 6, 2026

Choose a reason for hiding this comment

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

because evt.description comes the description property in the Booking table and that is where we store the additional notes (even tho the name of the field is description). so say if there's an event type with no description in that eventType.description will be undefined and hence it will fallback to evt.description which is the additional notes. as a result we will end up having additional notes twice.

@Ryukemeister
Copy link
Contributor Author

Hey @Ryukemeister, nice work on this! The core fix looks solid 👍 One thing: sendRescheduledSeatEmailAndSMS (line ~380) doesn't have the hideCalendarNotes handling yet, but the other reschedule functions do. Should we add the same pattern there for consistency?

hey Pedro, nice catch. ideally we should add it there as well, let me check and see if i've missed it. thanks!

@Ryukemeister
Copy link
Contributor Author

hey @pedroccastro, implemented the feedback that you gave. should be good now, thanks!

Copy link
Contributor

@pedroccastro pedroccastro left a comment

Choose a reason for hiding this comment

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

Hey @Ryukemeister! The changes look solid 👍

The updateEvent() change mirrors the existing pattern in createEvent() and the email handling covers all three reschedule functions

For a potential follow-up:
sendAddGuestsEmails / sendAddGuestsEmailsAndSMS don't have the hideCalendarNotes check for new guests. Not blocking, but flagging as they affect the same feature in other flows

@pedroccastro pedroccastro merged commit 851aa30 into main Jan 13, 2026
47 checks passed
@pedroccastro pedroccastro deleted the devin/fix-hide-calendar-notes-reschedule-1765911722 branch January 13, 2026 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consumer core area: core, team members only ready-for-e2e size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants