Skip to content

Comments

feat: new workflow variable booking title#24308

Merged
CarinaWolli merged 5 commits intocalcom:mainfrom
dhairyashiil:feat/new-workflow-variable-booking-title
Nov 7, 2025
Merged

feat: new workflow variable booking title#24308
CarinaWolli merged 5 commits intocalcom:mainfrom
dhairyashiil:feat/new-workflow-variable-booking-title

Conversation

@dhairyashiil
Copy link
Member

What does this PR do?

Visual Demo

New.workflow.variable.for.the.booking.title.main.mov

@vercel
Copy link

vercel bot commented Oct 6, 2025

@dhairyashiil is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Oct 6, 2025
@graphite-app graphite-app bot requested a review from a team October 6, 2025 21:11
@github-actions github-actions bot added Low priority Created by Linear-GitHub Sync workflows area: workflows, automations ✨ feature New feature or request labels Oct 6, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 6, 2025

Walkthrough

Adds a new workflow variable for booking title across reminder templates. The custom template VariablesType now includes an optional bookingTitle and replaces {BOOKING_TITLE} in template text. Email and SMS reminder scheduling pass bookingTitle into template variables; WhatsApp reminder uses reminder.booking.title as the eventName source. DYNAMIC_TEXT_VARIABLES now includes "booking_title". No control-flow changes.

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning Although the main focus is on adding BOOKING_TITLE, the PR also alters the WhatsApp reminder logic by swapping the eventName source from eventType to booking.title, which falls outside the linked issue objectives and represents an unrelated change. Please extract the WhatsApp eventName source update into a separate PR or clearly update the objectives to include this change.
✅ Passed checks (4 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly and succinctly summarizes the primary change by indicating the addition of the new workflow variable booking title and follows conventional commit styling, making it directly related to the changeset.
Linked Issues Check ✅ Passed The PR implements the new workflow variable BOOKING_TITLE by adding bookingTitle to the VariablesType in customTemplate, updating DYNAMIC_TEXT_VARIABLES, and populating the field in both email and SMS scheduling modules, satisfying the shared objectives from [#24291, CAL-6528].
Description Check ✅ Passed The description references the relevant issues being fixed and provides a visual demo link, confirming it is on-topic and related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 620f893 and d41fdc9.

📒 Files selected for processing (1)
  • packages/features/ee/workflows/lib/reminders/templates/customTemplate.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

**/*.ts: For Prisma queries, only select data you need; never use include, always use select
Ensure the credential.key field is never returned from tRPC endpoints or APIs

Files:

  • packages/features/ee/workflows/lib/reminders/templates/customTemplate.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

Flag excessive Day.js use in performance-critical code; prefer native Date or Day.js .utc() in hot paths like loops

Files:

  • packages/features/ee/workflows/lib/reminders/templates/customTemplate.ts
**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

Flag default exports and encourage named exports. Named exports provide better tree-shaking, easier refactoring, and clearer imports. Exempt main components like pages, layouts, and components that serve as the primary export of a module.

Files:

  • packages/features/ee/workflows/lib/reminders/templates/customTemplate.ts
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Install dependencies / Yarn install & cache

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@keithwillcode keithwillcode added the community-interns The team responsible for reviewing, testing and shipping low/medium community PRs label Oct 6, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6b24513 and 620f893.

📒 Files selected for processing (6)
  • packages/features/ee/workflows/api/scheduleEmailReminders.ts (1 hunks)
  • packages/features/ee/workflows/api/scheduleSMSReminders.ts (1 hunks)
  • packages/features/ee/workflows/api/scheduleWhatsappReminders.ts (2 hunks)
  • packages/features/ee/workflows/lib/constants.ts (1 hunks)
  • packages/features/ee/workflows/lib/reminders/emailReminderManager.ts (1 hunks)
  • packages/features/ee/workflows/lib/reminders/templates/customTemplate.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

**/*.ts: For Prisma queries, only select data you need; never use include, always use select
Ensure the credential.key field is never returned from tRPC endpoints or APIs

Files:

  • packages/features/ee/workflows/api/scheduleSMSReminders.ts
  • packages/features/ee/workflows/api/scheduleEmailReminders.ts
  • packages/features/ee/workflows/lib/reminders/emailReminderManager.ts
  • packages/features/ee/workflows/lib/constants.ts
  • packages/features/ee/workflows/api/scheduleWhatsappReminders.ts
  • packages/features/ee/workflows/lib/reminders/templates/customTemplate.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

Flag excessive Day.js use in performance-critical code; prefer native Date or Day.js .utc() in hot paths like loops

Files:

  • packages/features/ee/workflows/api/scheduleSMSReminders.ts
  • packages/features/ee/workflows/api/scheduleEmailReminders.ts
  • packages/features/ee/workflows/lib/reminders/emailReminderManager.ts
  • packages/features/ee/workflows/lib/constants.ts
  • packages/features/ee/workflows/api/scheduleWhatsappReminders.ts
  • packages/features/ee/workflows/lib/reminders/templates/customTemplate.ts
**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

Flag default exports and encourage named exports. Named exports provide better tree-shaking, easier refactoring, and clearer imports. Exempt main components like pages, layouts, and components that serve as the primary export of a module.

Files:

  • packages/features/ee/workflows/api/scheduleSMSReminders.ts
  • packages/features/ee/workflows/api/scheduleEmailReminders.ts
  • packages/features/ee/workflows/lib/reminders/emailReminderManager.ts
  • packages/features/ee/workflows/lib/constants.ts
  • packages/features/ee/workflows/api/scheduleWhatsappReminders.ts
  • packages/features/ee/workflows/lib/reminders/templates/customTemplate.ts
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Install dependencies / Yarn install & cache
🔇 Additional comments (6)
packages/features/ee/workflows/lib/constants.ts (1)

78-78: LGTM!

The addition of "booking_title" to the DYNAMIC_TEXT_VARIABLES array correctly exposes the new workflow variable for use in templates.

packages/features/ee/workflows/api/scheduleEmailReminders.ts (1)

202-202: LGTM!

The bookingTitle variable is correctly added to the email template variables, sourced from reminder.booking.title, which aligns with the PR objective to expose the booking title in workflow templates.

packages/features/ee/workflows/lib/reminders/emailReminderManager.ts (1)

143-143: LGTM!

The bookingTitle is correctly initialized from evt.title with a safe fallback to an empty string, following the same pattern as eventName on line 142.

packages/features/ee/workflows/api/scheduleWhatsappReminders.ts (1)

84-84: Verify the behavioral change for WhatsApp reminders.

The event source for WhatsApp reminders has been changed from reminder.booking?.eventType?.title to reminder.booking.title on lines 84 and 98. This aligns with the PR objective to use the booking title, but please confirm this behavioral change is intentional and that existing WhatsApp reminders will display the expected title.

Also applies to: 98-98

packages/features/ee/workflows/api/scheduleSMSReminders.ts (1)

151-151: LGTM!

The bookingTitle variable is correctly added to the SMS template variables, consistent with the email implementation.

packages/features/ee/workflows/lib/reminders/templates/customTemplate.ts (1)

31-31: LGTM!

The optional bookingTitle field is correctly added to the VariablesType interface.

pallava-joshi
pallava-joshi previously approved these changes Oct 10, 2025
Copy link
Contributor

@pallava-joshi pallava-joshi left a comment

Choose a reason for hiding this comment

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

tested locally. working fine

@github-actions
Copy link
Contributor

github-actions bot commented Oct 10, 2025

E2E results are ready!

name: userName,
attendeeName: attendeeName || "",
eventName: reminder.booking?.eventType?.title,
eventName: reminder.booking.title,
Copy link
Contributor

Choose a reason for hiding this comment

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

Going to request changes here to get feedback from @CarinaWolli on whether overwriting this value is what we wanted versus another new one

@github-actions github-actions bot marked this pull request as draft October 24, 2025 21:04
Copy link
Member

@CarinaWolli CarinaWolli left a comment

Choose a reason for hiding this comment

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

I think we need to solve this differently.

At the moment {EVENT_NAME} uses the value from evt.title in almost all places. And evt.title is already the booking title (it's not the event type title).

So I think we should start with changing the description to "The booking title"
Screenshot 2025-10-27 at 4 22 20 PM

We only use eventName: reminder.booking.eventType?.title || "", in the cron endpoints, but they are deprecated and not used anymore

@dhairyashiil before implementing this, could you double check if this is correct?

@dhairyashiil
Copy link
Member Author

@dhairyashiil before implementing this, could you double check if this is correct?

Yes I checked it. You are right, it’s the booking title. As you said, I reverted the changes and, for now, only updated the description of the event name variable to ‘The booking title’.

@dhairyashiil dhairyashiil marked this pull request as ready for review November 2, 2025 19:17
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.

2 issues found across 2 files

Prompt for AI agents (all 2 issues)

Understand the root cause of the following 2 issues and fix them.


<file name="apps/web/public/static/locales/en/common.json">

<violation number="1" location="apps/web/public/static/locales/en/common.json:1759">
This PR introduces the concept of a `booking title`, but the feature is incomplete. The Prisma query in `packages/features/ee/workflows/lib/getWorkflowReminders.ts` does not select the `title` field from the `Booking` model. Code that consumes this data in `scheduleEmailReminders.ts` expects `booking.title` to exist, but it will be undefined, causing the feature to silently fail.</violation>

<violation number="2" location="apps/web/public/static/locales/en/common.json:1759">
The i18n key `event_name_info` was changed to &quot;The booking title&quot;, but this key is used in `packages/features/eventtypes/components/tabs/advanced/CustomEventTypeModal.tsx` where it describes an event type name. This change introduces inconsistent and incorrect text in the UI. A new i18n key should be created for &quot;booking title&quot; to avoid this cross-file conflict.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

"email_subject": "Email subject",
"add_dynamic_variables": "Add dynamic text variables",
"event_name_info": "The event type name",
"event_name_info": "The booking title",
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Nov 2, 2025

Choose a reason for hiding this comment

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

This PR introduces the concept of a booking title, but the feature is incomplete. The Prisma query in packages/features/ee/workflows/lib/getWorkflowReminders.ts does not select the title field from the Booking model. Code that consumes this data in scheduleEmailReminders.ts expects booking.title to exist, but it will be undefined, causing the feature to silently fail.

Prompt for AI agents
Address the following comment on apps/web/public/static/locales/en/common.json at line 1759:

<comment>This PR introduces the concept of a `booking title`, but the feature is incomplete. The Prisma query in `packages/features/ee/workflows/lib/getWorkflowReminders.ts` does not select the `title` field from the `Booking` model. Code that consumes this data in `scheduleEmailReminders.ts` expects `booking.title` to exist, but it will be undefined, causing the feature to silently fail.</comment>

<file context>
@@ -1756,7 +1756,7 @@
   &quot;email_subject&quot;: &quot;Email subject&quot;,
   &quot;add_dynamic_variables&quot;: &quot;Add dynamic text variables&quot;,
-  &quot;event_name_info&quot;: &quot;The event type name&quot;,
+  &quot;event_name_info&quot;: &quot;The booking title&quot;,
   &quot;event_date_info&quot;: &quot;The event date&quot;,
   &quot;event_duration_info&quot;: &quot;The event duration&quot;,
</file context>
Fix with Cubic

"email_subject": "Email subject",
"add_dynamic_variables": "Add dynamic text variables",
"event_name_info": "The event type name",
"event_name_info": "The booking title",
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Nov 2, 2025

Choose a reason for hiding this comment

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

The i18n key event_name_info was changed to "The booking title", but this key is used in packages/features/eventtypes/components/tabs/advanced/CustomEventTypeModal.tsx where it describes an event type name. This change introduces inconsistent and incorrect text in the UI. A new i18n key should be created for "booking title" to avoid this cross-file conflict.

Prompt for AI agents
Address the following comment on apps/web/public/static/locales/en/common.json at line 1759:

<comment>The i18n key `event_name_info` was changed to &quot;The booking title&quot;, but this key is used in `packages/features/eventtypes/components/tabs/advanced/CustomEventTypeModal.tsx` where it describes an event type name. This change introduces inconsistent and incorrect text in the UI. A new i18n key should be created for &quot;booking title&quot; to avoid this cross-file conflict.</comment>

<file context>
@@ -1756,7 +1756,7 @@
   &quot;email_subject&quot;: &quot;Email subject&quot;,
   &quot;add_dynamic_variables&quot;: &quot;Add dynamic text variables&quot;,
-  &quot;event_name_info&quot;: &quot;The event type name&quot;,
+  &quot;event_name_info&quot;: &quot;The booking title&quot;,
   &quot;event_date_info&quot;: &quot;The event date&quot;,
   &quot;event_duration_info&quot;: &quot;The event duration&quot;,
</file context>
Fix with Cubic

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 1 file

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="apps/web/public/static/locales/en/common.json">

<violation number="1" location="apps/web/public/static/locales/en/common.json:1759">
This change introduces a UI inconsistency. The variable `{Event type title}` is now described as &quot;The booking title&quot;, but its name and underlying logic still refer to the event type&#39;s title. This will mislead users trying to customize event names.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

"email_subject": "Email subject",
"add_dynamic_variables": "Add dynamic text variables",
"event_name_info": "The event type name",
"event_name_info": "The booking title",
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Nov 2, 2025

Choose a reason for hiding this comment

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

This change introduces a UI inconsistency. The variable {Event type title} is now described as "The booking title", but its name and underlying logic still refer to the event type's title. This will mislead users trying to customize event names.

Prompt for AI agents
Address the following comment on apps/web/public/static/locales/en/common.json at line 1759:

<comment>This change introduces a UI inconsistency. The variable `{Event type title}` is now described as &quot;The booking title&quot;, but its name and underlying logic still refer to the event type&#39;s title. This will mislead users trying to customize event names.</comment>

<file context>
@@ -1756,7 +1756,7 @@
   &quot;email_subject&quot;: &quot;Email subject&quot;,
   &quot;add_dynamic_variables&quot;: &quot;Add dynamic text variables&quot;,
-  &quot;event_name_info&quot;: &quot;The event type name&quot;,
+  &quot;event_name_info&quot;: &quot;The booking title&quot;,
   &quot;event_date_info&quot;: &quot;The event date&quot;,
   &quot;event_duration_info&quot;: &quot;The event duration&quot;,
</file context>
Fix with Cubic

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.

No issues found across 1 file

@CarinaWolli CarinaWolli dismissed keithwillcode’s stale review November 7, 2025 14:08

not relevant anymore

@CarinaWolli CarinaWolli merged commit 584c991 into calcom:main Nov 7, 2025
31 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Created by Linear-GitHub Sync community-interns The team responsible for reviewing, testing and shipping low/medium community PRs ✨ feature New feature or request Low priority Created by Linear-GitHub Sync ready-for-e2e size/XS workflows area: workflows, automations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New workflow variable for the booking title

4 participants