Skip to content

Conversation

@hbjORbj
Copy link
Contributor

@hbjORbj hbjORbj commented Jan 8, 2026

What does this PR do?

Moves TRPC-driven UI out of packages/features into apps/web/modules, removing circular dependencies and stabilizing builds.

Impact:

  • Removes 55 @calcom/trpc imports from packages/features

Key changes:

  • Migrated hooks (useBookings, useCalendars, useSlots, etc.) from @calcom/features to @calcom/web/modules
  • Moved auth, schedules, apps data, booking audit components, and Formbricks helpers
  • Defined ICalendarSwitchProps interface directly in @calcom/ui to fix circular dependency
  • Made UseCalendarsReturnType, useScheduleForEventReturnType, and WrappedBookerPropsMain generic to remove @calcom/trpc imports from @calcom/features
  • Moved test utilities from packages/features/test to tests/libs

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.

devin-ai-integration bot and others added 30 commits January 5, 2026 17:08
…ircular dependency

- Migrate UserTableUser and MemberPermissions types to packages/features/users/types/user-table.ts
- Migrate useGeo hook to packages/features/geo/GeoContext.tsx
- Migrate buildLegacyRequest to packages/lib/buildLegacyCtx.ts
- Migrate Calendar component to packages/features/calendars/weeklyview/components/
- Move test utilities (bookingScenario, fixtures) to packages/features/test/
- Update all imports in packages/features to use new locations
- Add re-exports in apps/web for backward compatibility

Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
- Delete original calendar component files in apps/web (keep only re-export stubs)
- Migrate OutOfOfficeInSlots to packages/features/bookings/components
- Convert apps/web OutOfOfficeInSlots to re-export stub
- Fix className vs class issue in Calendar.tsx
- Fix @calcom/trpc import violation in user-table.ts by using structural type

Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
…tes type

Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
…from-features-1767632135' into devin/remove-calcom-web-imports-from-features-1767632135
- Move bookingScenario utilities to tests/libs/bookingScenario
- Move fixtures to tests/libs/fixtures
- Update all imports in packages/features test files to use new location
- Update all imports in apps/web test files to use new location
- Eliminates duplication of test utilities between packages/features and apps/web

Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
devin-ai-integration bot and others added 4 commits January 19, 2026 08:33
Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
…rom hook files

Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
};
});

const noop = () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

redundant

devin-ai-integration bot and others added 10 commits January 19, 2026 10:40
…flow

Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
… types

Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
…c import

Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
… apps/web

- Remove @calcom/trpc import from @calcom/features/bookings/Booker/types.ts
- Make UseCalendarsReturnType and useScheduleForEventReturnType generic
- Make WrappedBookerPropsMain and related types generic
- Add concrete types in apps/web/modules/bookings/types.ts using RouterOutputs
- Update all usage sites in apps/web to import from local types file

Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
- Fix useSegments import path in bookings-view.tsx (use @calcom/web/modules)
- Fix useFlags import path in team-invite-view.tsx (use @calcom/web/modules)
- Revert BookerWebWrapperAtomProps to not include WrappedBookerProps (internal props)
- Change invalidate return type to Promise<unknown> for React Query compatibility

Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
…s/index.tsx, Booker.tsx, and Booker.test.tsx

Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
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