refactor: move WebWrapper files from packages/platform to apps/web/modules (#26629)

* refactor: move WebWrapper files from packages/platform to apps/web/modules

Move the following WebWrapper files to their appropriate locations in apps/web/modules:
- EventTypeWebWrapper and related tab wrappers to apps/web/modules/event-types/components/wrappers/
- BookerWebWrapper to apps/web/modules/bookings/components/
- ConferencingAppsViewWebWrapper to apps/web/modules/apps/components/
- SelectedCalendarsSettingsWebWrapper to apps/web/modules/calendars/components/
- AddMembersWithSwitchWebWrapper to apps/web/modules/event-types/components/

This reduces the number of files in packages/platform that import from @calcom/web,
improving the separation between platform and web-specific code.

Co-Authored-By: [email protected] <[email protected]>

* fix: move web-specific hooks to apps/web and update imports

Co-Authored-By: [email protected] <[email protected]>

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* add back comments

* fix

* fix

* fix

* fix

* fix: correct relative import paths in moved WebWrapper files

Co-Authored-By: [email protected] <[email protected]>

* final

* fix: use package alias for event-type hooks instead of deeply nested relative paths

- Move sortHosts function to @calcom/lib/bookings/hostGroupUtils.ts for shared access
- Add exports for useEventTypeForm, useHandleRouteChange, useTabsNavigations to @calcom/atoms package.json
- Update EventTypeWebWrapper.tsx to use @calcom/atoms package alias instead of ../../../../../packages/... paths
- Update useEventTypeForm.ts to import sortHosts from @calcom/lib instead of @calcom/web
- Re-export sortHosts from HostEditDialogs.tsx for backward compatibility

This addresses the Cubic AI review feedback about fragile deeply nested relative paths that bypass proper package resolution.

Co-Authored-By: unknown <>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-01-10 12:55:39 +00:00
1 parent cbb56f6a61
commit d3e7554835
30 files changed
+86 -99

No files matched your search

@@ -3,8 +3,8 @@
import { useEffect, Suspense } from "react";
import { InstallAppButton } from "@calcom/app-store/InstallAppButton";
import { DestinationCalendarSettingsWebWrapper } from "@calcom/atoms/destination-calendar/wrappers/DestinationCalendarSettingsWebWrapper";
import { SelectedCalendarsSettingsWebWrapper } from "@calcom/atoms/selected-calendars/wrappers/SelectedCalendarsSettingsWebWrapper";
import { DestinationCalendarSettingsWebWrapper } from "./DestinationCalendarSettingsWebWrapper";
import { SelectedCalendarsSettingsWebWrapper } from "@calcom/web/modules/calendars/components/SelectedCalendarsSettingsWebWrapper";
import AppListCard from "@calcom/web/modules/apps/components/AppListCard";
import { SkeletonLoader } from "@calcom/web/modules/apps/components/SkeletonLoader";
import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
@@ -0,0 +1,31 @@
import { trpc } from "@calcom/trpc/react";
import { AtomsWrapper } from "../../../../packages/platform/atoms/src/components/atoms-wrapper";
import { DestinationCalendarSettings } from "../../../../packages/platform/atoms/destination-calendar/DestinationCalendar";
export const DestinationCalendarSettingsWebWrapper = () => {
const calendars = trpc.viewer.calendars.connectedCalendars.useQuery();
const utils = trpc.useUtils();
const mutation = trpc.viewer.calendars.setDestinationCalendar.useMutation({
onSuccess: () => {
utils.viewer.calendars.connectedCalendars.invalidate();
},
});
if (!calendars.data?.connectedCalendars || calendars.data.connectedCalendars.length < 1) {
return null;
}
return (
<AtomsWrapper>
<DestinationCalendarSettings
connectedCalendars={calendars.data.connectedCalendars}
isPending={mutation.isPending}
destinationCalendar={calendars.data.destinationCalendar}
value={calendars.data.destinationCalendar.externalId}
hidePlaceholder
onChange={mutation.mutate}
/>
</AtomsWrapper>
);
};