-
Notifications
You must be signed in to change notification settings - Fork 11.6k
feat: Custom host location #25916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: Custom host location #25916
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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. |
CarinaWolli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Early review
packages/features/eventtypes/components/locations/HostLocations.tsx
Outdated
Show resolved
Hide resolved
packages/features/eventtypes/components/locations/HostLocations.tsx
Outdated
Show resolved
Hide resolved
Devin AI is resolving merge conflictsThis PR has merge conflicts with the Devin will:
If you prefer to resolve conflicts manually, you can close the Devin session and handle it yourself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 issues found across 16 files
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="packages/features/eventtypes/components/locations/HostLocations.tsx">
<violation number="1" location="packages/features/eventtypes/components/locations/HostLocations.tsx:479">
P1: Mass apply sets location types that require organizer input without saving the required link/address/phone value, so hosts end up with invalid locations.</violation>
</file>
<file name="packages/trpc/server/routers/viewer/eventTypes/heavy/update.handler.ts">
<violation number="1" location="packages/trpc/server/routers/viewer/eventTypes/heavy/update.handler.ts:604">
P2: Host location deletions run before the parent eventType update, so a failure in the subsequent update leaves hostLocation rows permanently deleted while the host update rolls back. Perform the deletions within the same transaction (or as nested deletes inside `data.hosts`) so the operations remain atomic.</violation>
</file>
<file name="packages/features/eventtypes/lib/types.ts">
<violation number="1" location="packages/features/eventtypes/lib/types.ts:37">
P2: Use the existing `EventLocationType["type"]` union for `HostLocation.type` so only supported location identifiers can be assigned, maintaining compile-time validation like the rest of the location models.</violation>
</file>
<file name="packages/features/bookings/lib/service/RegularBookingService.ts">
<violation number="1" location="packages/features/bookings/lib/service/RegularBookingService.ts:1314">
P1: Rule violated: **Avoid Logging Sensitive Information**
Remove the host’s address from the tracing logger payload to avoid leaking PII in logs.</violation>
<violation number="2" location="packages/features/bookings/lib/service/RegularBookingService.ts:1320">
P1: Rule violated: **Avoid Logging Sensitive Information**
Remove the organizer’s phone number from the tracing log to prevent leaking PII.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
apps/web/modules/event-types/components/locations/HostLocations.tsx
Outdated
Show resolved
Hide resolved
packages/features/bookings/lib/service/RegularBookingService.ts
Outdated
Show resolved
Hide resolved
packages/features/bookings/lib/service/RegularBookingService.ts
Outdated
Show resolved
Hide resolved
packages/trpc/server/routers/viewer/eventTypes/heavy/update.handler.ts
Outdated
Show resolved
Hide resolved
Resolved merge conflicts: - apps/web/modules/event-types/components/tabs/setup/EventSetupTab.tsx: Updated imports to use new paths - packages/trpc/server/routers/viewer/eventTypes/types.ts: Merged hostLocationSchema and enablePerHostLocations Additional type fixes: - Added location field to host fallback objects in roundRobinReassignment.ts and roundRobinManualReassignment.ts - Updated getHostsWithLocationOptions.handler.ts to use credentialForCalendarServiceSelect - Added enablePerHostLocations to defaultEvents.ts commons object Co-Authored-By: unknown <>
Change scheduleId handling for existing hosts from 'host.scheduleId ?? null' to 'host.scheduleId === undefined ? undefined : host.scheduleId' so that when the client doesn't provide a scheduleId, the existing value is preserved instead of being cleared to null. Co-Authored-By: unknown <>
joeauyeung
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing my previous feedback @Udit-takkar. I just see prisma queries in packages/trpc/server/routers/viewer/eventTypes/massApplyHostLocation.handler.ts. Let's move these to a repository before approving.
packages/trpc/server/routers/viewer/eventTypes/massApplyHostLocation.handler.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 issues found across 33 files
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="packages/trpc/server/routers/viewer/eventTypes/getHostsWithLocationOptions.schema.ts">
<violation number="1" location="packages/trpc/server/routers/viewer/eventTypes/getHostsWithLocationOptions.schema.ts:4">
P2: `eventTypeId` should be constrained to an integer to match the DB identifier type. Accepting decimals can slip invalid IDs through the schema and break the resolver.</violation>
<violation number="2" location="packages/trpc/server/routers/viewer/eventTypes/getHostsWithLocationOptions.schema.ts:6">
P2: Ensure `limit` is an integer to keep pagination counts valid and predictable.</violation>
</file>
<file name="packages/trpc/server/routers/viewer/eventTypes/heavy/update.handler.ts">
<violation number="1" location="packages/trpc/server/routers/viewer/eventTypes/heavy/update.handler.ts:607">
P2: Host locations are deleted before the event type update runs, so any later validation error leaves hosts with their locations removed even though the update failed. Defer this delete until after the update succeeds or wrap it in the same transaction so the operation is atomic.</violation>
</file>
<file name="apps/web/modules/event-types/components/locations/HostLocations.tsx">
<violation number="1" location="apps/web/modules/event-types/components/locations/HostLocations.tsx:334">
P2: Opening the organizer-input dialog for a different location type reuses the previous location’s saved value because the dialog’s `initialValue` is always derived from `currentLocation`. This pre-fills the dialog with stale/invalid data when switching types.</violation>
</file>
<file name="apps/web/public/static/locales/en/common.json">
<violation number="1" location="apps/web/public/static/locales/en/common.json:4286">
P3: Add singular/plural translations for `location_applied_to_hosts` so "1 host" doesn’t render as "1 hosts".</violation>
</file>
<file name="packages/features/bookings/lib/handleNewBooking/test/per-host-locations.test.ts">
<violation number="1" location="packages/features/bookings/lib/handleNewBooking/test/per-host-locations.test.ts:481">
P2: Limit the Prisma query to the `credentialId` field instead of fetching all columns for `hostLocation`.
(Based on your team's feedback about selecting only the required fields in Prisma queries.) [FEEDBACK_USED]</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
packages/trpc/server/routers/viewer/eventTypes/getHostsWithLocationOptions.schema.ts
Show resolved
Hide resolved
packages/trpc/server/routers/viewer/eventTypes/getHostsWithLocationOptions.schema.ts
Show resolved
Hide resolved
packages/trpc/server/routers/viewer/eventTypes/heavy/update.handler.ts
Outdated
Show resolved
Hide resolved
apps/web/modules/event-types/components/locations/HostLocations.tsx
Outdated
Show resolved
Hide resolved
packages/features/bookings/lib/handleNewBooking/test/per-host-locations.test.ts
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. |
Addresses Cubic AI review feedback (confidence 9/10) to fix '1 hosts' rendering as '1 host' by using i18next plural format with _one and _other suffixes. Co-Authored-By: unknown <>
|
@Udit-takkar I think we should remove the locations that require Booker Input from the custom host location dropdown for now. This is because those locations require Booking Questions to be updated so that we can show an input field there. It doesn't work right now with custom host locations |
hariombalhara
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is just one blocking feedback. We should use UUID data type for id column
| organizerOrFirstDynamicGroupMemberDefaultLocationUrl = result.organizerDefaultLocationUrl; | ||
| perHostCredentialId = result.perHostCredentialId; | ||
|
|
||
| tracingLogger.info("Using per-host location", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a lot of logs in production, this should probably be debug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but we can't see debug logs on axiom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just org only feature so there won't be that many logs
There was a problem hiding this 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 33 files
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="packages/trpc/server/routers/viewer/eventTypes/massApplyHostLocation.schema.ts">
<violation number="1" location="packages/trpc/server/routers/viewer/eventTypes/massApplyHostLocation.schema.ts:4">
P2: `eventTypeId` should be validated as an integer ID to avoid accepting fractional values that will later break the Prisma query.</violation>
</file>
<file name="apps/web/modules/event-types/components/locations/HostLocations.tsx">
<violation number="1" location="apps/web/modules/event-types/components/locations/HostLocations.tsx:760">
P1: Mass apply overwrites each host’s location with `credentialId: null`, so integration-based locations (Zoom, Teams, etc.) lose the required credential and booking will fail after saving.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
packages/trpc/server/routers/viewer/eventTypes/massApplyHostLocation.schema.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. |
Co-Authored-By: unknown <>
What does this PR do?
Fixes: #25709
Screen.Recording.2026-01-14.at.3.59.18.PM.mov
Mandatory Tasks (DO NOT REMOVE)
Summary by cubic
Adds per-host custom locations for round-robin event types so each host can set their own meeting location. Bookings use the organizer’s location, auto-link matching credentials, and fall back to Cal Video when needed.
New Features
Migration
Written for commit 93d41bf. Summary will update on new commits.