feat: v2 toggle transcription settings#23836
Conversation
Walkthrough
Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts (1)
2380-2383: Fix stray “+” causing a syntax error.The leading “+” before expect will fail the test.
- +expect(updatedEventType.hidden).toBe(false); + expect(updatedEventType.hidden).toBe(false);
🧹 Nitpick comments (4)
packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.ts (3)
159-161: Clarify trigger semantics for auto‑transcription.Current wording is ambiguous versus UI text. If intent is “start once first participant joins,” update description accordingly (or align to “when organizer joins” if that’s the rule).
Proposed doc tweak:
- description: "If true, enables the automatic transcription for the event whenever someone joins the call", + description: "If true, starts transcription automatically when the first participant joins the call",
166-168: Tighten guest description language.Minor copy edit for clarity.
- description: "If true, the guests will not be able to receive transcription of the meeting", + description: "If true, guests will not receive in‑call transcription",
173-175: Tighten organizer description language.Minor copy edit for clarity.
- description: "If true, the organizer will not be able to receive transcription of the meeting", + description: "If true, the organizer will not receive in‑call transcription",apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts (1)
2069-2072: Add create‑path coverage for new transcription fields.Extend the existing “should create event type with cal video settings” test to set and assert the three new flags.
calVideoSettings: { disableRecordingForGuests: true, disableRecordingForOrganizer: true, enableAutomaticRecordingForOrganizer: true, + enableAutomaticTranscription: true, + disableTranscriptionForGuests: false, + disableTranscriptionForOrganizer: false, }, @@ - expect(createdEventType.calVideoSettings?.enableAutomaticRecordingForOrganizer).toEqual(true); + expect(createdEventType.calVideoSettings?.enableAutomaticRecordingForOrganizer).toEqual(true); + expect(createdEventType.calVideoSettings?.enableAutomaticTranscription).toEqual(true); + expect(createdEventType.calVideoSettings?.disableTranscriptionForGuests).toEqual(false); + expect(createdEventType.calVideoSettings?.disableTranscriptionForOrganizer).toEqual(false);Also applies to: 2092-2094
📜 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.
📒 Files selected for processing (2)
apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts(2 hunks)packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.ts(1 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 useinclude, always useselect
Ensure thecredential.keyfield is never returned from tRPC endpoints or APIs
Files:
packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.tsapps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.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/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.tsapps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.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/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.tsapps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts
🧠 Learnings (3)
📓 Common learnings
Learnt from: supalarry
PR: calcom/cal.com#23364
File: apps/api/v2/src/ee/event-types/event-types_2024_06_14/transformers/internal-to-api/internal-to-api.spec.ts:295-296
Timestamp: 2025-08-27T13:32:46.887Z
Learning: In calcom/cal.com, when transforming booking fields from internal to API format, tests in organizations-event-types.e2e-spec.ts already expect name field label and placeholder to be empty strings ("") rather than undefined. PR changes that set these to explicit empty strings are typically fixing implementation to match existing test expectations rather than breaking changes.
📚 Learning: 2025-08-27T13:32:46.887Z
Learnt from: supalarry
PR: calcom/cal.com#23364
File: apps/api/v2/src/ee/event-types/event-types_2024_06_14/transformers/internal-to-api/internal-to-api.spec.ts:295-296
Timestamp: 2025-08-27T13:32:46.887Z
Learning: In calcom/cal.com, when transforming booking fields from internal to API format, tests in organizations-event-types.e2e-spec.ts already expect name field label and placeholder to be empty strings ("") rather than undefined. PR changes that set these to explicit empty strings are typically fixing implementation to match existing test expectations rather than breaking changes.
Applied to files:
apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts
📚 Learning: 2025-08-21T13:44:06.805Z
Learnt from: supalarry
PR: calcom/cal.com#23217
File: apps/api/v2/src/ee/event-types/event-types_2024_06_14/services/output-event-types.service.ts:93-94
Timestamp: 2025-08-21T13:44:06.805Z
Learning: In apps/api/v2/src/ee/event-types/event-types_2024_06_14/event-types.repository.ts, repository functions that use explicit Prisma select clauses (like getEventTypeWithSeats) are used for specific purposes and don't need to include all EventType fields like bookingRequiresAuthentication. These methods don't feed into the general OutputEventTypesService_2024_06_14 flow.
Applied to files:
apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts
🔇 Additional comments (3)
apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts (2)
1144-1147: Sanity of test inputs looks fine.Update payload includes the three new transcription flags and exercises the update path properly.
Consider adding a Create test that sets these flags to catch regressions in the create path, too (see suggestion below).
1280-1288: LGTM on assertions for new flags.The optional chaining protects against undefined and mirrors the request body.
packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.ts (1)
127-176: ```shell
#!/bin/bash
set -euo pipefailecho "PWD: $(pwd)"
echo
echo "1) Search repo (ignore .gitignore) for calVideoSettings / DB keys / UI key names"
rg -n -uu -S 'calVideoSettings|cal_video_settings|cal_video|enableAutomaticTranscription|disableTranscriptionForGuests|disableTranscriptionForOrganizer|redirectUrlOnExit' -C3 || true
echo
echo "2) Search for event-type create/update service / repository / prisma usage"
rg -n -uu -S 'EventTypeService|EventTypeRepository|createEventType|create.*EventType|prisma.*event' -C3 || true
echo
echo "3) Search for prisma schema / migrations mentioning cal_video"
rg -n -uu -S 'cal_video' packages || true
echo
echo "4) Narrow search under packages/platform for any mapping/transformer files mentioning calVideoSettings"
rg -n -uu -S 'calVideoSettings|cal_video_settings|CalVideoSettings' packages/platform -C3 || true</blockquote></details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
E2E results are ready! |
Linear CAL-6410