feat: add Flappy Bird game feature#22297
feat: add Flappy Bird game feature#22297Devanshusharma2005 wants to merge 37 commits intocalcom:mainfrom
Conversation
|
@Devanshusharma2005 is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (07/07/25)1 reviewer was added to this PR based on Keith Williams's automation. "Add community label" took an action on this PR • (07/07/25)1 label was added to this PR based on Keith Williams's automation. |
There was a problem hiding this comment.
cubic found 4 issues across 12 files. Review them in cubic.dev
React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai to give specific feedback.
…anshusharma2005/cal into feat/flappy-bird-integration
There was a problem hiding this comment.
cubic found 2 issues across 12 files. Review them in cubic.dev
React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai to give specific feedback.
There was a problem hiding this comment.
cubic found 1 issue across 16 files. Review it in cubic.dev
React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai to give specific feedback.
The merge-base changed after approval.
673054d to
250727f
Compare
Pull request was closed
- Resolved conflicts in 7 files: - apps/api/v2/swagger/documentation.json - apps/web/public/static/locales/en/common.json - docs/api-reference/v2/openapi.json - packages/features/eventtypes/components/locations/Locations.tsx - packages/features/eventtypes/lib/types.ts - packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.ts - packages/prisma/zod/custom/eventtype.ts - Integrated Flappy Bird game feature with main branch video settings structure - Added enableFlappyBirdGame to CalVideoSettings interface and component - Preserved all main branch functionality while adding flappy bird integration - Updated localization strings for flappy bird game feature - Fixed sessionStorage import issue in NavigationItem.tsx
- Removed duplicate enableAutomaticRecordingForOrganizer - Removed duplicate enableAutomaticTranscription - Removed duplicate disableTranscriptionForGuests - Removed duplicate disableTranscriptionForOrganizer - This resolves TypeScript compilation errors from merge conflicts
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/trpc/server/routers/viewer/eventTypes/update.handler.ts (1)
132-143: TrimcalVideoSettingsselection to only what’s usedIn this handler you only check for existence of
eventType.calVideoSettings(Line 632). Consider selecting justidto reduce payload and CPU. If other fields aren’t consumed downstream, this keeps the query lean.Proposed diff:
calVideoSettings: { - select: { - disableRecordingForOrganizer: true, - disableRecordingForGuests: true, - enableAutomaticTranscription: true, - enableAutomaticRecordingForOrganizer: true, - disableTranscriptionForGuests: true, - disableTranscriptionForOrganizer: true, - redirectUrlOnExit: true, - enableFlappyBirdGame: true, - }, + select: { id: true }, },Before applying, verify no consumer relies on those fields from this handler’s return.
apps/web/public/static/locales/en/common.json (1)
3535-3535: Copy tweak (optional): clarify contextConsider clarifying that the waiting is for others to join the call.
Proposed diff:
- "play_while_you_wait": "Play while you wait", + "play_while_you_wait": "Play while you wait for others to join",
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (4)
apps/api/v2/swagger/documentation.json(1 hunks)apps/web/public/static/locales/en/common.json(1 hunks)packages/prisma/schema.prisma(1 hunks)packages/trpc/server/routers/viewer/eventTypes/update.handler.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/prisma/schema.prisma
- apps/api/v2/swagger/documentation.json
🧰 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/trpc/server/routers/viewer/eventTypes/update.handler.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/trpc/server/routers/viewer/eventTypes/update.handler.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/trpc/server/routers/viewer/eventTypes/update.handler.ts
🧠 Learnings (2)
📚 Learning: 2025-08-17T22:00:16.329Z
Learnt from: Udit-takkar
PR: calcom/cal.com#22995
File: packages/trpc/server/routers/viewer/aiVoiceAgent/_router.ts:117-126
Timestamp: 2025-08-17T22:00:16.329Z
Learning: In calcom/cal.com PR #22995, packages/trpc/server/routers/viewer/aiVoiceAgent/_router.ts, the enabled input parameter in the update endpoint is intentionally not forwarded to aiService.updateAgentConfiguration() as the enabled/disabled agent functionality is not required at the moment (per maintainer Udit-takkar). Future reviews should not flag this as missing functionality unless requirements change.
Applied to files:
packages/trpc/server/routers/viewer/eventTypes/update.handler.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:
packages/trpc/server/routers/viewer/eventTypes/update.handler.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). (3)
- GitHub Check: Type check / check-types
- GitHub Check: Tests / Unit
- GitHub Check: Linters / lint
🔇 Additional comments (3)
packages/trpc/server/routers/viewer/eventTypes/update.handler.ts (2)
141-142: AddenableFlappyBirdGameto select — looks correctField is properly added to the
calVideoSettings.selectand will flow through the handler context as expected.
618-623: Confirm upsert mapping includesenableFlappyBirdGameend-to-end – Verified that
- CalVideoSettingsRepository DTO declares
enableFlappyBirdGame?: boolean | nulland bothupsertpaths set it viacalVideoSettings.enableFlappyBirdGame ?? false.- Prisma schema defines
enableFlappyBirdGame Boolean @default(false), and the migration adds the column withNOT NULL DEFAULT false.- Zod schemas in trpc and prisma/zod mark it
optional().nullable()/nullish()and handlers default tofalseon create.apps/web/public/static/locales/en/common.json (1)
3531-3535: New i18n keys for Flappy Bird — looks goodKeys are clearly named, consistent with existing conventions, and placed above the sentinel line to avoid merge conflicts.
Udit-takkar
left a comment
There was a problem hiding this comment.
Type checks are failing
fixed.! |
- Added enableFlappyBirdGame to createCalVideoSettings method type and data - Fixed CalVideoSettings component to remove Badge from flappy bird toggle - This resolves the 'something went wrong' error on event types page - Enables proper creation and updating of event types with flappy bird settings
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (5)
packages/lib/server/repository/eventTypeRepository.ts (1)
722-733: Expose enableFlappyBirdGame in CompleteEventTypeSelect — looks good; consider de-duping the selectSelection is correct. To avoid field drift across repositories, centralize the CalVideoSettings select in a shared constant and reuse it here and elsewhere.
Apply within this segment:
- calVideoSettings: { - select: { - disableRecordingForGuests: true, - disableRecordingForOrganizer: true, - enableAutomaticTranscription: true, - enableAutomaticRecordingForOrganizer: true, - disableTranscriptionForGuests: true, - disableTranscriptionForOrganizer: true, - redirectUrlOnExit: true, - enableFlappyBirdGame: true, - }, - }, + calVideoSettings: { select: CAL_VIDEO_SETTINGS_SELECT },Add once near other selects (e.g., after hashedLinkSelect):
const CAL_VIDEO_SETTINGS_SELECT = { disableRecordingForGuests: true, disableRecordingForOrganizer: true, enableAutomaticTranscription: true, enableAutomaticRecordingForOrganizer: true, disableTranscriptionForGuests: true, disableTranscriptionForOrganizer: true, redirectUrlOnExit: true, enableFlappyBirdGame: true, } satisfies Prisma.CalVideoSettingsSelect;packages/features/eventtypes/components/locations/CalVideoSettings.tsx (1)
15-19: Prop type nullability — OK; align base type to drop the local extensionThis local extension is fine, but since the form writes null via setValueAs, prefer updating the base CalVideoSettings type to accept string | null for redirectUrlOnExit so this component can use CalVideoSettingsType | null directly.
Proposed change outside this file (packages/features/eventtypes/lib/types.ts):
export interface CalVideoSettings { disableRecordingForOrganizer?: boolean; disableRecordingForGuests?: boolean; enableAutomaticTranscription?: boolean; enableAutomaticRecordingForOrganizer?: boolean; disableTranscriptionForGuests?: boolean; disableTranscriptionForOrganizer?: boolean; - redirectUrlOnExit?: string; + redirectUrlOnExit?: string | null; enableFlappyBirdGame?: boolean; }Then here:
-const CalVideoSettings = ({ - calVideoSettings, -}: { - calVideoSettings: (CalVideoSettingsType & { redirectUrlOnExit?: string | null }) | null; -}) => { +const CalVideoSettings = ({ calVideoSettings }: { calVideoSettings: CalVideoSettingsType | null }) => {packages/features/eventtypes/components/locations/Locations.tsx (3)
385-391: Localize link text per guidelines.Replace hardcoded "here" with t("here") to comply with i18n rules for TSX.
- <Link - key="event_type_requires_google_calendar" - className="cursor-pointer text-blue-500 underline" - href="/apps/google-calendar"> - here - </Link>, + <Link + key="event_type_requires_google_calendar" + className="cursor-pointer text-blue-500 underline" + href="/apps/google-calendar" + > + {t("here")} + </Link>,
426-433: Localize "App Store" label.Avoid embedded strings in TSX; use t().
- <Link - key="cant_find_the_right_conferencing_app_visit_our_app_store" - className="cursor-pointer text-blue-500 underline" - href="/apps/categories/conferencing"> - App Store - </Link>, + <Link + key="cant_find_the_right_conferencing_app_visit_our_app_store" + className="cursor-pointer text-blue-500 underline" + href="/apps/categories/conferencing" + > + {t("app_store")} + </Link>,
175-176: Avoid magic string for Cal Video detection.Consider centralizing "integrations:daily" as a constant from @calcom/app-store/locations (if available) to prevent drift and aid refactors.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (7)
apps/api/v2/swagger/documentation.json(1 hunks)apps/web/public/static/locales/en/common.json(1 hunks)docs/api-reference/v2/openapi.json(1 hunks)packages/features/eventtypes/components/locations/CalVideoSettings.tsx(2 hunks)packages/features/eventtypes/components/locations/Locations.tsx(2 hunks)packages/lib/server/repository/eventTypeRepository.ts(2 hunks)packages/trpc/server/routers/viewer/eventTypes/duplicate.handler.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
- apps/api/v2/swagger/documentation.json
- docs/api-reference/v2/openapi.json
- apps/web/public/static/locales/en/common.json
🧰 Additional context used
📓 Path-based instructions (5)
**/*.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/trpc/server/routers/viewer/eventTypes/duplicate.handler.tspackages/lib/server/repository/eventTypeRepository.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/trpc/server/routers/viewer/eventTypes/duplicate.handler.tspackages/features/eventtypes/components/locations/CalVideoSettings.tsxpackages/lib/server/repository/eventTypeRepository.tspackages/features/eventtypes/components/locations/Locations.tsx
**/*.{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/trpc/server/routers/viewer/eventTypes/duplicate.handler.tspackages/features/eventtypes/components/locations/CalVideoSettings.tsxpackages/lib/server/repository/eventTypeRepository.tspackages/features/eventtypes/components/locations/Locations.tsx
**/*.tsx
📄 CodeRabbit inference engine (.cursor/rules/review.mdc)
Always use
t()for text localization in frontend code; direct text embedding should trigger a warning
Files:
packages/features/eventtypes/components/locations/CalVideoSettings.tsxpackages/features/eventtypes/components/locations/Locations.tsx
**/*Repository.ts
📄 CodeRabbit inference engine (.cursor/rules/review.mdc)
Repository files must include
Repositorysuffix, prefix with technology if applicable (e.g.,PrismaAppRepository.ts), and use PascalCase matching the exported class
Files:
packages/lib/server/repository/eventTypeRepository.ts
🧠 Learnings (6)
📚 Learning: 2025-08-17T22:00:16.329Z
Learnt from: Udit-takkar
PR: calcom/cal.com#22995
File: packages/trpc/server/routers/viewer/aiVoiceAgent/_router.ts:117-126
Timestamp: 2025-08-17T22:00:16.329Z
Learning: In calcom/cal.com PR #22995, packages/trpc/server/routers/viewer/aiVoiceAgent/_router.ts, the enabled input parameter in the update endpoint is intentionally not forwarded to aiService.updateAgentConfiguration() as the enabled/disabled agent functionality is not required at the moment (per maintainer Udit-takkar). Future reviews should not flag this as missing functionality unless requirements change.
Applied to files:
packages/trpc/server/routers/viewer/eventTypes/duplicate.handler.ts
📚 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:
packages/features/eventtypes/components/locations/CalVideoSettings.tsxpackages/features/eventtypes/components/locations/Locations.tsx
📚 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:
packages/lib/server/repository/eventTypeRepository.ts
📚 Learning: 2025-09-03T11:54:05.409Z
Learnt from: supalarry
PR: calcom/cal.com#23514
File: apps/api/v2/src/ee/bookings/2024-08-13/services/bookings.service.ts:579-582
Timestamp: 2025-09-03T11:54:05.409Z
Learning: In calcom/cal.com bookings repository methods, when Prisma select uses `eventType: true`, all eventType fields including seatsShowAttendees are automatically included in the selection. Explicit field selection is not required when using `true` for nested relations.
Applied to files:
packages/lib/server/repository/eventTypeRepository.ts
📚 Learning: 2025-09-03T11:54:05.409Z
Learnt from: supalarry
PR: calcom/cal.com#23514
File: apps/api/v2/src/ee/bookings/2024-08-13/services/bookings.service.ts:579-582
Timestamp: 2025-09-03T11:54:05.409Z
Learning: In calcom/cal.com bookings repository methods, when Prisma include uses `eventType: true`, all eventType fields including seatsShowAttendees are automatically included in the selection. Explicit field selection is not required when using `true` for nested relations.
Applied to files:
packages/lib/server/repository/eventTypeRepository.ts
📚 Learning: 2025-08-29T22:57:30.382Z
Learnt from: bandhan-majumder
PR: calcom/cal.com#23454
File: packages/features/form-builder/FormBuilder.tsx:11-11
Timestamp: 2025-08-29T22:57:30.382Z
Learning: FormBuilder.tsx in packages/features/form-builder/ does not have "use client" directive at the top despite using client-side React hooks and event handlers, which suggests it should be a client component.
Applied to files:
packages/features/eventtypes/components/locations/Locations.tsx
🧬 Code graph analysis (2)
packages/features/eventtypes/components/locations/CalVideoSettings.tsx (3)
packages/features/eventtypes/lib/types.ts (2)
CalVideoSettings(241-250)FormValues(78-175)packages/platform/atoms/index.ts (1)
useIsPlatform(7-7)packages/ui/components/badge/index.ts (1)
UpgradeTeamsBadge(2-2)
packages/features/eventtypes/components/locations/Locations.tsx (1)
packages/features/eventtypes/lib/types.ts (1)
CalVideoSettings(241-250)
⏰ 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). (6)
- GitHub Check: Production builds / Build Web App
- GitHub Check: Tests / Unit
- GitHub Check: Production builds / Build API v2
- GitHub Check: Production builds / Build Atoms
- GitHub Check: Production builds / Build API v1
- GitHub Check: Type check / check-types
🔇 Additional comments (4)
packages/trpc/server/routers/viewer/eventTypes/duplicate.handler.ts (1)
48-59: Propagate enableFlappyBirdGame on duplicate — LGTMThe new field is correctly selected under calVideoSettings so it will be preserved when duplicating an event type.
packages/lib/server/repository/eventTypeRepository.ts (1)
1064-1073: Org admin view: enableFlappyBirdGame added — LGTMConsistent with the user view selection; no concerns.
packages/features/eventtypes/components/locations/CalVideoSettings.tsx (1)
127-142: New toggle for Flappy Bird — LGTMUses t() correctly, binds via Controller, and follows existing toggle patterns with UpgradeTeamsBadge.
packages/features/eventtypes/components/locations/Locations.tsx (1)
5-5: LGTM: useFieldArray import is appropriate.Matches the usage below; no issues.
| EventTypeSetupProps, | ||
| FormValues, | ||
| } from "@calcom/features/eventtypes/lib/types"; | ||
| import type { LocationFormValues, EventTypeSetupProps } from "@calcom/features/eventtypes/lib/types"; |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Type import realignment looks good; verify no lingering FormValues usages.
Ensure all references to the old FormValues type were removed/updated across the feature.
Run to confirm no remaining FormValues references:
🏁 Script executed:
#!/bin/bash
rg -nP --type=ts --type=tsx -C1 '\bFormValues\b' packages/features/eventtypesLength of output: 107
🏁 Script executed:
#!/bin/bash
rg -nP -g '*.ts' -g '*.tsx' -C1 '\bFormValues\b' packages/features/eventtypesLength of output: 29317
Replace remaining FormValues usages with specific form value types
The grep search uncovered numerous imports and useFormContext<FormValues>() usages still scattered across packages/features/eventtypes/components (e.g. EventWorkflowsTab.tsx, RequiresConfirmationController.tsx, CustomEventTypeModal.tsx, EventSetupTab.tsx, EventAdvancedTab.tsx, EventAvailabilityTab.tsx, and many more). Remove these generic FormValues references and update each component to use the appropriate specific types exported from packages/features/eventtypes/lib/types.ts (such as LocationFormValues, other subset types).
🤖 Prompt for AI Agents
In packages/features/eventtypes/components/locations/Locations.tsx around line
11, replace any remaining generic FormValues usage with the specific
LocationFormValues type: update the import list to include LocationFormValues
(if not already) and change useFormContext<FormValues>() and any prop/type
annotations that reference the generic FormValues to use LocationFormValues
instead; ensure all handlers, selectors, and default value references expect the
LocationFormValues shape; repeat this pattern for other components found by your
grep (EventWorkflowsTab, RequiresConfirmationController, CustomEventTypeModal,
EventSetupTab, EventAdvancedTab, EventAvailabilityTab, etc.) by importing the
correct subset types from packages/features/eventtypes/lib/types.ts and using
them in useFormContext<> and type annotations.
| {isCalVideo && !isPlatform && ( | ||
| <CalVideoSettings calVideoSettings={eventType.calVideoSettings} /> | ||
| )} |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Pass calVideoSettings defensively and confirm RHF wiring.
eventType.calVideoSettings may be undefined. Prefer a safe default and ensure CalVideoSettings writes to the RHF path (calVideoSettings.*), not just local state.
Apply:
- <CalVideoSettings calVideoSettings={eventType.calVideoSettings} />
+ <CalVideoSettings calVideoSettings={eventType.calVideoSettings ?? {}} />Then verify CalVideoSettings reads/writes RHF state:
🏁 Script executed:
#!/bin/bash
rg -nC2 --type=ts --type=tsx 'CalVideoSettings.*Props|useFormContext|calVideoSettings' packages/features/eventtypes/components/locations/CalVideoSettings.tsxLength of output: 187
🏁 Script executed:
#!/bin/bash
# Search for component implementation and prop definitions
rg -nC3 'CalVideoSettings(' -g 'packages/features/eventtypes/components/locations/CalVideoSettings.tsx'
rg -nC3 'interface.*Props' -g 'packages/features/eventtypes/components/locations/CalVideoSettings.tsx'
# Verify usage of calVideoSettings within component
rg -nC3 'calVideoSettings' -g 'packages/features/eventtypes/components/locations/CalVideoSettings.tsx'
# Check for React Hook Form wiring
rg -nC3 'useFormContext' -g 'packages/features/eventtypes/components/locations/CalVideoSettings.tsx'Length of output: 11190
🏁 Script executed:
#!/bin/bash
# Locate definition of CalVideoSettingsType to verify optionality of its fields
rg -R "CalVideoSettingsType" -n packages/features/eventtypes/lib/types.tsLength of output: 478
🏁 Script executed:
#!/bin/bash
# Locate CalVideoSettingsType definition
rg -n "CalVideoSettingsType" -g "packages/features/eventtypes/lib/types.ts"
# Locate EventType definition and its calVideoSettings property
rg -nC3 "EventType" -g "packages/features/eventtypes/lib/types.ts"
rg -nC3 "calVideoSettings" -g "packages/features/eventtypes/lib/types.ts"
# Inspect Locations.tsx Props for eventType type
rg -nC3 "interface.*Props" -g "packages/features/eventtypes/components/locations/Locations.tsx"Length of output: 6302
Use null as a safe default for calVideoSettings
Change the component invocation to:
- <CalVideoSettings calVideoSettings={eventType.calVideoSettings} />
+ <CalVideoSettings calVideoSettings={eventType.calVideoSettings ?? null} />CalVideoSettings already uses React Hook Form’s Controller on calVideoSettings.*, so the RHF wiring is correct.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| {isCalVideo && !isPlatform && ( | |
| <CalVideoSettings calVideoSettings={eventType.calVideoSettings} /> | |
| )} | |
| {isCalVideo && !isPlatform && ( | |
| <CalVideoSettings calVideoSettings={eventType.calVideoSettings ?? null} /> | |
| )} |
🤖 Prompt for AI Agents
In packages/features/eventtypes/components/locations/Locations.tsx around lines
256-258, the CalVideoSettings prop should use null as a safe default so RHF
Controller paths like calVideoSettings.* exist; change the invocation to pass
eventType.calVideoSettings ?? null (i.e.,
calVideoSettings={eventType.calVideoSettings ?? null}) so undefined is replaced
with null before rendering CalVideoSettings.
E2E results are ready! |
1297d9f to
de5676e
Compare
|
Closing for now since stale + conflicts |
What does this PR do?
Added flappy bird game feature to cal video.
Added a new enableFlappyBirdGame field to the CalVideoSettings schema and model
Created a database migration for the new field
Added the toggle to enable/disable the game in the event type setup page
Created a new FlappyBirdGame component with minimize and close functionality
Integrated the game into the video waiting room component
Added translations for the new feature
Added automatic hiding of the game when participants join the meeting
Visual Demo (For contributors especially)
A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).
Video Demo (if applicable):
Image Demo (if applicable):
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Checklist
Summary by cubic
Added a Flappy Bird game to the video waiting room, with an option to enable or disable it in event settings.