Skip to content

Code Review Bench PR #26717 - refactor: Remove trpc/server dependency from @calcom/atoms#15

Open
tomerqodo wants to merge 2 commits intobase_pr_26717_20260125_4345from
corrupted_pr_26717_20260125_4345
Open

Code Review Bench PR #26717 - refactor: Remove trpc/server dependency from @calcom/atoms#15
tomerqodo wants to merge 2 commits intobase_pr_26717_20260125_4345from
corrupted_pr_26717_20260125_4345

Conversation

@tomerqodo
Copy link

Code Review Bench PR calcom#26717

Original PR Title: refactor: Remove trpc/server dependency from @calcom/atoms
Original PR Description: ## What does this PR do?

  • Decouples the atoms package from trpc/server

Impact

Screenshot 2026-01-12 at 4 04 37 AM

Summary of Changes

Type Migrations:

  • Moved Slot type to @calcom/atoms/booker/types (removed from trpc/server)
  • Added GetAvailableSlotsResponse type with SlotInfo to booker/types.ts
  • Created local types in hooks/schedules/types.ts:
    • Schedule (with userId for create/duplicate handlers)
    • CreateScheduleHandlerReturn, DuplicateScheduleHandlerReturn, GetAvailabilityListHandlerReturn
    • CreateScheduleInput

Import Updates:

  • Updated useAtomCreateSchedule, useAtomDuplicateSchedule, useAtomGetAllSchedules to use local types
  • Updated useAvailableSlots.ts to use local GetAvailableSlotsResponse

Config Changes:

  • Updated Biome rule to block ALL @calcom/trpc imports (not just @calcom/trpc/react)
  • Removed trpc paths from atoms tsconfig.json
  • Updated package.json exports

Updates since last revision

  • Fixed TypeScript operator precedence issue in GetAvailabilityListHandlerReturn type: 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)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A - I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

Original PR URL: calcom#26717

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant