Skip to content

refactor: Remove trpc/react dependency from @calcom/atoms#26694

Merged
hbjORbj merged 8 commits intomainfrom
refactor/move-trpc-dependency-from-atoms
Jan 11, 2026
Merged

refactor: Remove trpc/react dependency from @calcom/atoms#26694
hbjORbj merged 8 commits intomainfrom
refactor/move-trpc-dependency-from-atoms

Conversation

@hbjORbj
Copy link
Copy Markdown
Contributor

@hbjORbj hbjORbj commented Jan 10, 2026

What does this PR do?

Decouples trpc from platform atoms by moving the useTeamMembersWithSegment hook into the web app and removing trpc references in atoms. This reduces cross-package coupling with no behavior changes.

  • Refactors
    • Moved useTeamMembersWithSegment to apps/web/modules/event-types/hooks.
    • Exported UseTeamMembersWithSegmentProps and useProcessTeamMembersData from atoms.
    • Removed trpc usage from atoms; platform hook stays as useTeamMembersWithSegmentPlatform.
    • Updated EditWeightsForAllTeamMembers to use the new web hook and corrected platform import path.
    • Replaced TRPC types in AvailabilitySettings with repository types and removed trpc/react from atoms tsconfig.

Impact

Screenshot 2026-01-11 at 7 13 58 PM

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.

How should this be tested?

  • Please use the latest Vercel preview and test please 🙏.

@hbjORbj hbjORbj requested review from a team as code owners January 10, 2026 15:01
@graphite-app graphite-app Bot added the core area: core, team members only label Jan 10, 2026
@hbjORbj hbjORbj marked this pull request as draft January 10, 2026 15:01
@hbjORbj hbjORbj changed the title refactor: move trpc dependency from atoms refactor: Remove TRPC dependency from @calcom/atoms Jan 10, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

@hbjORbj hbjORbj added this to the v6.1 milestone Jan 11, 2026
@hbjORbj hbjORbj changed the title refactor: Remove TRPC dependency from @calcom/atoms refactor: Remove trpc/react dependency from @calcom/atoms Jan 11, 2026
@hbjORbj hbjORbj marked this pull request as ready for review January 11, 2026 10:14
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

@pull-request-size pull-request-size Bot added size/L and removed size/M labels Jan 11, 2026
@hbjORbj hbjORbj requested a review from keithwillcode January 11, 2026 10:37
@hbjORbj hbjORbj enabled auto-merge (squash) January 11, 2026 10:37
@hbjORbj hbjORbj merged commit c826e9c into main Jan 11, 2026
47 of 48 checks passed
@hbjORbj hbjORbj deleted the refactor/move-trpc-dependency-from-atoms branch January 11, 2026 11:02
Anshumancanrock pushed a commit to Anshumancanrock/cal.com that referenced this pull request Jan 12, 2026
…6694)

* mv useTeamMembersWithSegment

* remove

* fix ts error

* remove

* remove

* remove

* biome rule
@vercel vercel Bot temporarily deployed to Preview – cal-companion January 13, 2026 08:08 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants