perf: create quarantine tRPC router for app-store dependent handlers#23555
perf: create quarantine tRPC router for app-store dependent handlers#23555keithwillcode wants to merge 19 commits intomainfrom
Conversation
- Created new quarantine router at packages/trpc/server/routers/viewer/quarantine/ - Moved 28+ handlers that import from @calcom/app-store to quarantine router - Organized handlers into subdirectories: apps, payments, eventTypes, bookings, me, misc - Updated all import paths and router registrations - Removed moved handlers from original routers - Registered quarantine router in main viewer router - Updated all client-side references to use quarantine.appRoutingForms and quarantine.appBasecamp3 This isolates all app-store dependencies into a single quarantine router for easier management and assessment. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
- Created API route at apps/web/pages/api/trpc/quarantine/[trpc].ts - Added 'quarantine' to ENDPOINTS array in packages/trpc/react/shared.ts - Updated resolveEndpoint functions in both Pages and App Router tRPC clients - Added support for 4-segment paths like viewer.quarantine.appRoutingForms.forms - Quarantine router is now fully accessible via tRPC client calls Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
…p3 handler types - Update 23 frontend files to use quarantine router paths (e.g. trpc.viewer.quarantine.updateProfile) - Fix basecamp3 handler type compatibility by passing explicit context structure - Remove forbidden 'as any' type casting for proper type safety - All handlers properly moved with git mv to preserve file history Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
- Update PrismaClient import from @calcom/prisma/client to @calcom/prisma - Ensures type compatibility with tRPC context prisma client - Fixes remaining TypeScript errors in quarantine router Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
- Move 71+ handlers from original routers to quarantine using git mv operations - Update all frontend imports to use quarantine router paths - Clean up original routers by removing moved handlers and imports - Fix import paths in moved handlers for new directory structure - Add nested routers (appRoutingForms, appBasecamp3) to quarantine - Update tRPC client configuration to support 4-part router paths - Create quarantine API endpoint at /api/trpc/quarantine/[trpc].ts - Preserve file history through proper git move operations - Remove duplicate handlers from apps, payments, eventTypes, bookings, me routers - Fix localStorage import and remove unused handler cache types - Resolve basecamp3 handler Prisma type compatibility issues Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
…g context - Import bookingsProcedure in quarantine router for handlers that need booking context - Fix API routes to use viewerRouter instead of bookingsRouter to access quarantine router - Update RerouteDialog test mocks to use quarantine router paths - Resolve remaining TypeScript errors and test compatibility issues Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
- Update all remaining frontend components to use quarantine router paths - Fix import references in test files and component wrappers - Ensure all app-store dependent handlers are properly routed through quarantine - Complete the quarantine router implementation with all necessary changes Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
…arantine router - Fix TestFormDialog.test.tsx mock to use quarantine router path for findTeamMembersMatchingAttributeLogicOfRoute - Update next/navigation mock to include useSearchParams, useParams, and ReadonlyURLSearchParams - Update btcpayserver, hitpay, and paypal setup pages to use quarantine.saveKeys instead of apps.updateAppCredentials - All 13 TestFormDialog tests now passing locally Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
…uter paths - Update AppPage, CalendarListContainer, ConnectCalendars, ConnectedVideoStep components - Update installed-category-view to use quarantine router for integrations and conferencing apps - Update alby, make, wipemycalother, zapier setup pages to use quarantine.saveKeys - Update EventAppsTab, InstantEventController, EventWebhooksTab, webhook-edit-view - Update AdditionalCalendarSelector and EventTypeWebWrapper components - Complete quarantine router implementation with all client-side calls updated Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
…e correct router paths - Move eventTypes.get mock back to main viewer router (not moved to quarantine) - Update locationOptions mock to use quarantine router path - Fix test failures for components using quarantine router handlers Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
- Update outOfOffice.handler.test.ts to import from quarantine/misc - Update confirm.handler.test.ts to import from quarantine/bookings - Update editLocation.handler.test.ts to import from quarantine/bookings - Resolves test failures due to moved handlers in quarantine router Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
- Update relative path from ../quarantine to ../../quarantine - Resolves test import error for editLocation.handler.test.ts Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
…heck - Replace non-null assertion with safe conditional check in embed.ts - Change any type to unknown type in embed.test.ts for better type safety - Prefix unused variable with underscore in EmbedElement.test.ts - Add proper null check for custom element in EmbedElement.test.ts These fixes address pre-existing lint issues that were blocking the required CI check. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
…-router-1756917282
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
E2E results are ready! |
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
…isma/client to @calcom/prisma/enums - Update eventTypes/update.handler.ts to import WorkflowTriggerEvents from @calcom/prisma/enums - Update me/checkForInvalidAppCredentials.ts to import MembershipRole from @calcom/prisma/enums - Integrate latest changes from main branch into quarantine router files Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
|
Closing in favor of smaller PRs like #23664 |
What does this PR do?
This PR creates a new "quarantine" tRPC router to isolate all handlers that import from
@calcom/app-store. The goal is to separate app-store dependencies for easier management and assessment.Key changes:
packages/trpc/server/routers/viewer/quarantine/_router.tsx@calcom/app-storetrpc.viewer.appRoutingForms.*totrpc.viewer.quarantine.appRoutingForms.*(and similar forappBasecamp3)apps/,payments/,eventTypes/,bookings/,me/,misc/Requested by: @keithwillcode
Link to Devin run: https://app.devin.ai/sessions/f451fc6dd4da49f2adc2bae6b8a3932e
Visual Demo (For contributors especially)
N/A - This is an internal API restructuring without UI changes.
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
/api/trpc/quarantine/[trpc].tsendpoint exists and routes correctlyappById,toggle,saveKeys, etc.)appRoutingForms.*)appBasecamp3.*)quarantine.appRoutingForms.*) work in the actual UIappRoutingFormsorappBasecamp3references that weren't updatedEnvironment setup: Standard Cal.com development environment with app-store integrations enabled.
Critical Review Points
appRoutingFormsandappBasecamp3were updated to use quarantine pathsScope concerns: This PR touches 59 files with 5000+ line changes. The large scope increases risk of subtle integration issues that may not surface until runtime.
Checklist