refactor: Remove trpc/server dependency from @calcom/atoms#26717
Merged
refactor: Remove trpc/server dependency from @calcom/atoms#26717
Conversation
- Create local types for schedule handlers (CreateScheduleHandlerReturn, DuplicateScheduleHandlerReturn, GetAvailabilityListHandlerReturn, CreateScheduleInput) - Create local GetAvailableSlotsResponse type for slots hook - Update imports in useAtomCreateSchedule, useAtomDuplicateSchedule, useAtomGetAllSchedules, and useAvailableSlots Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
…pendency-from-atoms-2
…om-atoms-2' into refactor/move-trpc-dependency-from-atoms-2
hbjORbj
commented
Jan 11, 2026
| }, | ||
| "./add-members-switch/AddMembersWithSwitchPlatformWrapper": "./add-members-switch/AddMembersWithSwitchPlatformWrapper.tsx", | ||
| "./availability/AvailabilitySettings": "./availability/AvailabilitySettings.tsx", | ||
| "./booker": "./booker/index.ts", |
Contributor
Author
There was a problem hiding this comment.
index.ts file doesn't exist in /booker directory
- Schedule type now includes userId for create/duplicate handlers - Created ScheduleForList type for list handler (uses select without userId) Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
…git-manager.devin.ai/proxy/github.com/calcom/cal.com into refactor/move-trpc-dependency-from-atoms-2
hbjORbj
commented
Jan 11, 2026
| "Either slotUtcStartDate, slotUtcEndDate or eventTypeId should be filled in." | ||
| ); | ||
|
|
||
| export type Slot = { |
Contributor
Author
There was a problem hiding this comment.
Moved to atoms/booker/types
…pendency-from-atoms-2
- fromUser: { id, displayName } (matches IFromUser)
- toUser: { id, username, displayName } (matches IToUser)
Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
…git-manager.devin.ai/proxy/github.com/calcom/cal.com into refactor/move-trpc-dependency-from-atoms-2
Contributor
E2E results are ready! |
Contributor
There was a problem hiding this comment.
1 issue found across 11 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/platform/atoms/hooks/schedules/types.ts">
<violation number="1" location="packages/platform/atoms/hooks/schedules/types.ts:17">
P1: TypeScript operator precedence issue: `[]` binds tighter than `&`, so this creates an intersection of `Omit<Schedule, "userId">` with an array type, not an array of the intersection. Wrap the intersection in parentheses to get the intended array type.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Contributor
Devin AI is addressing Cubic AI's review feedbackA Devin session has been created to address the issues identified by Cubic AI. |
…dlerReturn type Wrap intersection type in parentheses so that [] creates an array of the intersection type rather than an intersection with an array type. Addresses Cubic AI review feedback. Co-Authored-By: unknown <>
Anshumancanrock
pushed a commit
to Anshumancanrock/cal.com
that referenced
this pull request
Jan 12, 2026
) * mv useTeamMembersWithSegment * remove * fix ts error * remove * remove * remove * biome rule * wip * refactor: remove remaining @calcom/trpc/server imports from atoms - Create local types for schedule handlers (CreateScheduleHandlerReturn, DuplicateScheduleHandlerReturn, GetAvailabilityListHandlerReturn, CreateScheduleInput) - Create local GetAvailableSlotsResponse type for slots hook - Update imports in useAtomCreateSchedule, useAtomDuplicateSchedule, useAtomGetAllSchedules, and useAvailableSlots Co-Authored-By: benny@cal.com <sldisek783@gmail.com> * fix * fix: add userId to Schedule type and create ScheduleForList type - Schedule type now includes userId for create/duplicate handlers - Created ScheduleForList type for list handler (uses select without userId) Co-Authored-By: benny@cal.com <sldisek783@gmail.com> * fix * fix * fix * fix * fix: correct fromUser/toUser types in GetAvailableSlotsResponse - fromUser: { id, displayName } (matches IFromUser) - toUser: { id, username, displayName } (matches IToUser) Co-Authored-By: benny@cal.com <sldisek783@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This was referenced Jan 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
trpc/serverImpact
Summary of Changes
Type Migrations:
Slottype to@calcom/atoms/booker/types(removed from trpc/server)GetAvailableSlotsResponsetype withSlotInfotobooker/types.tshooks/schedules/types.ts:Schedule(withuserIdfor create/duplicate handlers)CreateScheduleHandlerReturn,DuplicateScheduleHandlerReturn,GetAvailabilityListHandlerReturnCreateScheduleInputImport Updates:
useAtomCreateSchedule,useAtomDuplicateSchedule,useAtomGetAllSchedulesto use local typesuseAvailableSlots.tsto use localGetAvailableSlotsResponseConfig Changes:
@calcom/trpcimports (not just@calcom/trpc/react)tsconfig.jsonpackage.jsonexportsUpdates since last revision
GetAvailabilityListHandlerReturntype: wrapped intersection type in parentheses so[]creates an array of the intersection type rather than an intersection with an array type (addresses Cubic AI review feedback)Mandatory Tasks (DO NOT REMOVE)