Skip to content

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

Merged
hbjORbj merged 27 commits intomainfrom
devin/1767978717-move-webwrappers-to-apps-web
Jan 10, 2026
Merged

refactor: move WebWrapper files from packages/platform to apps/web/modules#26629
hbjORbj merged 27 commits intomainfrom
devin/1767978717-move-webwrappers-to-apps-web

Conversation

@hbjORbj
Copy link
Contributor

@hbjORbj hbjORbj commented Jan 9, 2026

What does this PR do?

Moves WebWrapper files from packages/platform/atoms to apps/web/modules.

Why?

As part of moving components/hooks from packages/features to apps/web, the WebWrapper components in packages/platform/atoms were importing those moved files via @calcom/web. Moving the WebWrapper files to apps/web allows them to import from sibling locations instead of cross-package, unblocking the larger refactoring effort.

Files moved:

  • EventTypeWebWrapper and tab wrappers → apps/web/modules/event-types/components/
  • BookerWebWrapperapps/web/modules/bookings/components/
  • ConferencingAppsViewWebWrapperapps/web/modules/apps/components/
  • SelectedCalendarsSettingsWebWrapperapps/web/modules/calendars/components/
  • AddMembersWithSwitchWebWrapperapps/web/modules/event-types/components/
  • DestinationCalendarSettingsWebWrapperapps/web/components/apps/

Additional changes:

  • Moved sortHosts utility to @calcom/lib/bookings/hostGroupUtils.ts for shared access
  • Added hook exports to @calcom/atoms package.json (useEventTypeForm, useHandleRouteChange, useTabsNavigations)
  • Removed WebWrapper exports from @calcom/atoms package.json

Updates since last revision:

  • Fixed deep relative imports in EventTypeWebWrapper.tsx to use @calcom/atoms package alias instead of traversing outside apps/web (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).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

Run yarn type-check:ci --force and verify event types, booking pages, and settings pages load correctly.

Human Review Checklist

  • Verify sortHosts function move to @calcom/lib/bookings/hostGroupUtils.ts doesn't break existing functionality
  • Confirm no external consumers depend on the deleted @calcom/atoms/booker export
  • Check that @calcom/atoms hook exports resolve correctly

Link to Devin run: https://app.devin.ai/sessions/ffdc374f531f46a399a052a715abe50b
Requested by: @hbjORbj

…dules

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: benny@cal.com <sldisek783@gmail.com>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
@vercel
Copy link

vercel bot commented Jan 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

4 Skipped Deployments
Project Deployment Review Updated (UTC)
api-v2 Ignored Ignored Preview Jan 12, 2026 7:40pm
cal Ignored Ignored Jan 12, 2026 7:40pm
cal-companion Ignored Ignored Preview Jan 12, 2026 7:40pm
cal-eu Ignored Ignored Jan 12, 2026 7:40pm

@pull-request-size pull-request-size bot added size/XL and removed size/L labels Jan 9, 2026
@pull-request-size pull-request-size bot added size/L and removed size/XL labels Jan 9, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 10, 2026

E2E results are ready!

@hbjORbj hbjORbj marked this pull request as ready for review January 10, 2026 11:28
@hbjORbj hbjORbj requested a review from a team as a code owner January 10, 2026 11:28
@hbjORbj hbjORbj requested a review from a team as a code owner January 10, 2026 11:28
@graphite-app graphite-app bot added foundation core area: core, team members only labels Jan 10, 2026
Copy link
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.

1 issue found across 24 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="apps/web/modules/event-types/components/EventTypeWebWrapper.tsx">

<violation number="1" location="apps/web/modules/event-types/components/EventTypeWebWrapper.tsx:29">
P2: These deeply nested relative paths (`../../../../../packages/...`) are fragile and bypass proper package resolution. Since this file is in `apps/web/modules` but imports from `packages/platform/atoms`, consider either:
1. Using the package alias (e.g., `@calcom/atoms/event-types/hooks/useEventTypeForm`) and adding an export if needed
2. Moving these hooks to the web app as part of this refactor

The current approach contradicts the PR goal of reducing cross-package coupling and will break if directory structure changes.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@github-actions
Copy link
Contributor

Devin AI is addressing Cubic AI's review feedback

A Devin session has been created to address the issues identified by Cubic AI.

View Devin Session

…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 <>
@hbjORbj hbjORbj requested a review from keithwillcode January 10, 2026 11:42
@hbjORbj hbjORbj enabled auto-merge (squash) January 10, 2026 11:42
Copy link
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.

1 issue found across 1 file (changes from recent commits).

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="apps/web/modules/event-types/components/EventTypeWebWrapper.tsx">

<violation number="1" location="apps/web/modules/event-types/components/EventTypeWebWrapper.tsx:29">
P1: Deep relative imports traversing outside `apps/web` into `packages/` violate monorepo conventions. Use the package alias `@calcom/atoms/event-types/hooks/useEventTypeForm` instead of relative paths. This pattern is fragile and not used elsewhere in the codebase.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@github-actions
Copy link
Contributor

Devin AI is addressing Cubic AI's review feedback

New feedback has been sent to the existing Devin session.

View Devin Session

hbjORbj and others added 2 commits January 10, 2026 21:18
Addresses Cubic AI review feedback about deep relative imports traversing
outside apps/web into packages/ violating monorepo conventions.

- Update EventTypeWebWrapper.tsx to use @calcom/atoms alias
- Add hook exports to @calcom/atoms package.json

Co-Authored-By: benny@cal.com <sldisek783@gmail.com>
@keithwillcode keithwillcode added this to the v6.1 milestone Jan 10, 2026
@hbjORbj hbjORbj merged commit d3e7554 into main Jan 10, 2026
73 of 76 checks passed
@hbjORbj hbjORbj deleted the devin/1767978717-move-webwrappers-to-apps-web branch January 10, 2026 12:55
Anshumancanrock pushed a commit to Anshumancanrock/cal.com that referenced this pull request Jan 12, 2026
…dules (calcom#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: benny@cal.com <sldisek783@gmail.com>

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

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

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

* 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>
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.

2 participants