fix: hide cal branding on platform workflows#27385
Conversation
E2E results are ready! |
…from-workflow-reminder-emails
…from-workflow-reminder-emails
…from-workflow-reminder-emails
…from-workflow-reminder-emails
…from-workflow-reminder-emails
…from-workflow-reminder-emails
…from-workflow-reminder-emails
Copy of PR #27385 - Hides Cal branding in workflow and reminder emails for platform bookings by using platformClientId from booking metadata. Co-Authored-By: lauris@cal.com <lauris.skraucis@gmail.com>
…from-workflow-reminder-emails
…from-workflow-reminder-emails
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/user-bookings.e2e-spec.ts">
<violation number="1" location="apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/user-bookings.e2e-spec.ts:432">
P2: Remove `it.only` so the full test suite executes; leaving it will skip all other tests.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/user-bookings.e2e-spec.ts
Outdated
Show resolved
Hide resolved
Devin AI is addressing Cubic AI's review feedbackA Devin session has been created to address the issues identified by Cubic AI. |
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="apps/api/v2/src/ee/bookings/2024-08-13/services/input.service.ts">
<violation number="1">
P2: Dropping platformClientId from metadata means bookings created via platform no longer carry the platform marker unless the caller manually includes it. This breaks downstream branding hiding that relies on metadata.platformClientId. Preserve the previous merge so platformClientId is always propagated.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Devin AI is addressing Cubic AI's review feedbackNew feedback has been sent to the existing Devin session. ✅ No changes pushed (confidence score not found for this issue - skipping per instructions) |
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="apps/api/v2/src/ee/bookings/2024-08-13/services/input.service.ts">
<violation number="1" location="apps/api/v2/src/ee/bookings/2024-08-13/services/input.service.ts:195">
P2: The logic to inject `platformClientId` into metadata appears to be missing in `transformInputCreateRecurringBooking` (lines 463+), even though that method accepts `platformClientId` as an argument.
Ensure this field is propagated for recurring bookings as well to consistently hide branding across all workflow types.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Devin AI is addressing Cubic AI's review feedbackNew feedback has been sent to the existing Devin session. ✅ Pushed commit |
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="apps/api/v2/src/ee/bookings/2024-08-13/services/input.service.ts">
<violation number="1" location="apps/api/v2/src/ee/bookings/2024-08-13/services/input.service.ts:533">
P2: User-supplied `metadata` can inject a fake `platformClientId` to bypass branding checks (since the code only overwrites it if the system value is truthy).
System-derived `platformClientId` should be authoritative. If the system value is undefined (regular booking), the `platformClientId` key should be removed from `metadata` to prevent spoofing.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
apps/api/v2/src/ee/bookings/2024-08-13/services/input.service.ts
Outdated
Show resolved
Hide resolved
Devin AI is addressing Cubic AI's review feedbackNew feedback has been sent to the existing Devin session. ✅ Pushed commit |
31a592e to
307ec1c
Compare
volnei
left a comment
There was a problem hiding this comment.
could you add some tests?
Fixes #27334
Summary by cubic
Hides Cal branding in workflow and reminder emails for platform bookings by using platformClientId from booking metadata. Aligns with CAL-7145 to remove branding in platform workflow reminder emails.
Written for commit 27be579. Summary will update on new commits.