* perf: optimize payment app imports to avoid loading entire app store
- Add PaymentServiceMap generation to app-store-cli build process
- Generate payment.services.generated.ts with lazy imports for 6 payment services
- Update handlePayment.ts, deletePayment.ts, handlePaymentRefund.ts to use PaymentServiceMap
- Update getConnectedApps.ts and tRPC payment routers to use PaymentServiceMap
- Follow same pattern as analytics optimization in PR #23372
- Reduces bundle size by avoiding import of 100+ apps when only payment functionality needed
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* Update build.ts
* fix: update payment service test mocking to work with PaymentServiceMap
- Remove obsolete appStoreMock line from bookingScenario.ts since handlePayment now uses PaymentServiceMap
- Update setupVitest.ts to import prismaMock from correct PrismockClient instance
- Add PaymentServiceMap mock following PR #22450 pattern for calendar services
- Ensure MockPaymentService uses consistent externalId across test files
- Fix webhook handler to return 200 status by ensuring payment records are found correctly
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: revert prismaMock import to avoid interfering with other tests' vi.spyOn() calls
- Remove global prismaMock import from setupVitest.ts that was causing 'is not a spy' errors
- Update MockPaymentService to import prismaMock locally to maintain payment test functionality
- Fixes organization and outOfOffice tests while preserving payment service optimization
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: remove E2E conditional check from payment services map generation
- Payment services map now always includes all payment apps regardless of E2E environment
- Ensures payment functionality is consistently available across all environments
- Addresses CI failures caused by conditional payment service loading
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* refactor: use direct PaymentService imports instead of .lib structure
- Update app-store-cli to import directly from lib/PaymentService.ts files
- Modify all payment handlers to access PaymentService directly
- Update test mocks to match new direct import structure
- Remove .lib property access pattern across payment system
- Maintain backward compatibility while improving import efficiency
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: revert chargeCard booking.id parameter additions
- Remove booking.id parameter from chargeCard calls in chargeCard.handler.ts and payments.tsx
- Addresses GitHub feedback to investigate chargeCard signature changes in separate PR
- Keeps all other direct PaymentService import refactor changes intact
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix: improve cancellation email of reschedule RR booking
* fix failing test
* fix: uses same lucky user when rescheduling RR booking also has a fixed host
* chore
* chore
* better message in the cancelled email
* fix
* fix
* add booker rescheduled in reassigned email to old host
* test
* add reassigned subtite
* fix: use same lucky user when reschedule RR booking has a fixed host
* fix: test
* fix: subtitle
---------
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
* feat: add paid, userEmail, and userName filters to insights page
- Add paid filter as MULTI_SELECT with 'Paid'/'Free' options
- Add userEmail filter as TEXT for searching user emails
- Add userName filter as TEXT for searching user names
- Update DummyTableRow type to include new filter columns
- Add backend filtering logic in buildColumnFilterCondition method
- Use existing columns from BookingTimeStatusDenormalized view
- Follow established patterns from /bookings page implementation
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* fix: change paid filter from MULTI_SELECT to SINGLE_SELECT
- Updated useInsightsBookings.ts to use ColumnFilterType.SINGLE_SELECT for paid filter
- Modified buildColumnFilterCondition to handle single select with isSingleSelectFilterValue
- Simplified backend logic to handle single boolean value instead of array
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* fix paid filter
* feat: add rating filter to insights page
- Add rating field to DummyTableRow type
- Add rating column with SINGLE_SELECT filter type
- Add rating options 1-5 in faceted unique values
- Add rating filtering logic in backend service
- Rating filter allows filtering bookings by 1-5 star ratings
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* feat: change rating filter to NUMBER type
- Update rating filter from SINGLE_SELECT to NUMBER in useInsightsBookings.ts
- Remove rating options from useInsightsBookingFacetedUniqueValues.ts since NUMBER filters don't need predefined options
- Add isNumberFilterValue import and implement number filter logic in InsightsBookingBaseService.ts
- Support eq, gt, gte, lt, lte operators for rating number filter
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* refactor: use makeSqlCondition utility for filter logic
- Import makeSqlCondition from @calcom/features/data-table/lib/server
- Replace manual SQL condition building with makeSqlCondition utility for userEmail, userName, and rating filters
- Maintain existing paid filter logic for boolean conversion
- Follow established pattern from InsightsRoutingBaseService
- Cleaner, more maintainable code with consistent filter handling
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* add missing texts
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
* chore: create i18n for platform libraries
* fixup! chore: create i18n for platform libraries
* refactor: use previous version of i18n
* Revert "refactor: use previous version of i18n"
This reverts commit 0181ae1018d99ea6d5455d6dde5f3727e70422e1.
* refactor: use previous version of i18n
---------
Co-authored-by: supalarry <laurisskraucis@gmail.com>
2025-08-27 10:55:57 -03:00
Eunjae LeeGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* feat: replace window.todesktop with official @todesktop/client-core package
- Import platform from @todesktop/client-core in _document.tsx
- Pass isDesktopApp result via window.calIsDesktopApp to stringified function
- Update applyToDesktopClass to use passed-in value instead of window.todesktop
- Maintains existing architecture while using official package API
Co-Authored-By: peer@cal.com <peer@cal.com>
* fix: move ToDesktop detection to client-side to resolve SSR issue
- Remove server-side call to platform.todesktop.isDesktopApp() which always returns false
- Move detection logic to client-side stringified script using same logic as official package
- Maintain client-side detection while ensuring proper functionality in ToDesktop environment
Co-Authored-By: peer@cal.com <peer@cal.com>
* feat: use official platform.todesktop.isDesktopApp() function
- Import platform from @todesktop/client-core in _document.tsx
- Call platform.todesktop.isDesktopApp() directly in stringified script
- Replace duplicated logic with official package function call
- Maintain client-side detection while using official API
Co-Authored-By: peer@cal.com <peer@cal.com>
* feat: properly use official platform.todesktop.isDesktopApp() function
- Call platform.todesktop.isDesktopApp() outside stringified context
- Pass result as template variable to avoid SSR issues
- Now actually uses the official @todesktop/client-core package
- Eliminates duplicated detection logic as requested
Co-Authored-By: peer@cal.com <peer@cal.com>
* fix: add SSR safety guards around platform.todesktop.isDesktopApp() call
- Wrap platform.todesktop.isDesktopApp() in try/catch to prevent SSR crashes
- Return false as fallback if library touches browser globals during SSR
- Addresses keithwillcode's comment about SSR safety concerns
Co-Authored-By: peer@cal.com <peer@cal.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* feat: extract PanelCard from ChartCard for reusability
- Create base PanelCard and PanelCardItem components in UI package
- Refactor ChartCard to use PanelCard as foundation while keeping legend functionality
- Add headerActions prop to PanelCard for extensibility
- Maintain backward compatibility for existing ChartCard usage
- Export PanelCard and PanelCardItem from UI card components
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* chore: update yarn.lock after dependency resolution
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* refactor: rename prop from actions to headerContent
- Rename 'actions' prop to 'headerContent' in PanelCard component
- Update ChartCard to use new 'headerContent' prop name
- More accurate naming since content can be text or other elements, not just buttons
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* clean up
* revert yarn.lock
* fix type error
* type fix
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
* perf: optimize analytics app imports to avoid loading entire app store
- Add analytics service generation to app-store-cli build process
- Generate analytics.services.generated.ts with only analytics apps (dub)
- Update getAnalytics.ts to use AnalyticsServiceMap instead of full appStore
- Add NEXT_PUBLIC_IS_E2E to turbo.json globalEnv for generated files
- Reduces import footprint from 100+ apps to only analytics apps with AnalyticsService
- Follows same pattern as calendar services optimization from PR #22450
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* Reorder cli output
* fix: follow getCalendar pattern in getAnalytics and maintain alphabetical order in turbo.json
- Remove unnecessary object wrapping in getAnalytics.ts to match getCalendar.ts pattern
- Move NEXT_PUBLIC_IS_E2E to correct alphabetical position in turbo.json globalEnv
- Address PR feedback from keithwillcode
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* chore: update yarn.lock after analytics optimization changes
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2025-08-26 18:57:38 -03:00
Keith WilliamsGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Add self-hosted to the ignore-labels list in .github/workflows/labeler.yml
- This prevents the team-label-action from automatically applying the self-hosted label to PRs
- Maintains alphabetical ordering in the comma-separated list
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2025-08-26 20:21:38 +00:00
Benny JooGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Remove '@calcom/ui/*': ['../../packages/ui/components/*'] path mapping from apps/web/tsconfig.json
- Fix imports from '@calcom/ui/componentName' to '@calcom/ui/components/componentName' format
- Preserve direct exports like '@calcom/ui/classNames' and '@calcom/ui/styles'
- Update 200+ files across apps/web, packages/features, packages/app-store, and packages/ui
- Fix localStorage usage to use safe webstorage import
- Remove forbidden 'as any' type casting in favor of proper TypeScript types
- All changes verified to pass TypeScript compilation
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* add data test id for testing
* update tests for creating event type
* add test for creating team event types
* helper function for tests
* update tests
* update tests
* fixup: fix correct data test ids for tabs
* perf: implement quick app store loading optimizations
- Add conditional app store imports in videoClient and handlePayment
- Implement lazy calendar manager pattern in CalendarManager
- Enhance createCachedImport with better concurrency handling
- Create calendar-only registry for common calendar operations
- Add performance instrumentation for debugging
These optimizations reduce initial app store loading time by avoiding
module-level imports and creating smaller, focused registries for
calendar operations.
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: revert getCalendar to use appStore for proper test mocking
- Reverted getCalendar.ts to use main appStore instead of calendarStore
- This ensures test mocking system works properly with existing appStoreMock
- Fixes unit test failures where Google Calendar references were getting null values
- All collective scheduling tests now pass
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* perf: implement CalendarServiceMap for optimized calendar loading
- Add CalendarServiceMap generation following CrmServiceMap pattern
- Update getCalendar.ts to use generated calendar service map
- Remove manual calendar-registry.ts in favor of auto-generated approach
- Reduces calendar initialization from loading 48+ apps to ~10 calendar apps
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: update test mocks for CalendarServiceMap compatibility
- Add missing SelectedCalendar fields (createdAt, updatedAt, lastErrorAt, watchAttempts, etc.)
- Fix CredentialPayload type errors by adding user.email and delegationCredentialId
- Mock CalendarServiceMap to use vi.importActual for real calendar services
- Ensure calendar service tests work with new lazy loading approach
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: resolve CalendarServiceMap test compatibility issues
- Update getCalendarsEvents.test.ts mocks to work with CalendarServiceMap dynamic imports
- Add missing SelectedCalendar fields (createdAt, updatedAt, lastErrorAt, watchAttempts, etc.)
- Fix CredentialPayload type errors by adding user.email and delegationCredentialId
- Use type assertion in getCalendar.ts to resolve credential type conflicts
- Ensure calendar service tests work with new lazy loading approach
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: update test mocking for CalendarServiceMap compatibility
- Add comprehensive vi.mock for calendar.services.generated in delegation-credential tests
- Mock GoogleCalendarService and Office365CalendarService with proper return values
- Update all test files to use await with mockCalendarToHaveNoBusySlots
- Ensure calendar events return expected meetingId, meetingPassword, meetingUrl values
- Fix async/await compatibility issues in booking scenario test utilities
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: resolve TypeScript errors in CalendarServiceMap mocking
- Extract CalendarServiceMap promise to variable to fix 'always true' condition
- Ensure vi.mocked is called on Promise type for proper mockResolvedValue access
- Add await keywords to calendar mock calls in test files
- Maintain existing functionality while making code type-safe
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* Remove Exchange 2013 and 2016
* Mock Exchange in all tests
* Fix tests
* Remove exchange 2013 and 2016 from app store index
* Fix merge error
* Await when getting calendar service
* Fix selectedSlot test
* Add missing variable
* Update openapi.json
* Updated CalendarService imports
* try again
* WIP migrate calendar apps to ES6
* Revert "WIP migrate calendar apps to ES6"
This reverts commit 15bf2c83305e82050779d0bca3380fa9573db1e0.
* Revert changes back to e23991024a5a455c14aa05f100a5b56288db343a
This reverts all calendar service changes that were causing circular dependency issues during builds and E2E tests.
* Remove circular dependency for location constants
* Update yarn.lock with removed package
* Add empty map when running E2E
* Type fies
* Fix merge conflict
* Remove logging statements
* Throw error and reset state if failing to load app
* Revert "Remove Exchange 2013 and 2016"
This reverts commit fedaf6346bd9e4c63337276d5a6f9e8c3943056c.
* Re-introduce exchange{2013,2016}
Revert the removal in app-store/index.ts also.
* Trying to fix tests
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com>
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* fix: add org email into ics
* perf test
* update
* fix: address bot comments on performance tests
- Add validation to randomSleep function to ensure min <= max
- Replace new Date().getTime() with Date.now() for better performance
- Move hardcoded test credentials to environment variables
- Add HTTP timeout to requests in helpers.js
- Improve DOM element checking to be less brittle
- Fix spike test sleep duration from 0.01s to 0.1s
- Make GitHub workflow BASE_URL configurable with inputs
- Fix README filename reference from booking_flow.js to booking.js
- Add documentation for new environment variables
Co-Authored-By: anik@cal.com <adhabal2002@gmail.com>
* Add script and small sec check
* chore: fix script path
* chore: fix script path
* chore: change default url
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Volnei Munhoz <volnei.munhoz@gmail.com>
* refactor: lucky user to service class with DI
* fix: unit test filterHostsByLeadThreshold.test.ts
* fixup! fix: unit test filterHostsByLeadThreshold.test.ts
* fix: get lucky user test missing mocks
* fix: get lucky user hosts not within interval
* chore: bump platform library
* chore: bump platform library
* chore: add DAILY_API_KEY to turborepo.json db seed
* chore: add DAILY_API_KEY to cache-db action
* fixup! chore: add DAILY_API_KEY to cache-db action
* chore: remove log in fixture
* chore: bump platform library
* chore: refactor test team-emails.e2e
* only failing test
* run all api v2 tests
* chore: bump platform library
* revert change to turbo.json and action in cache-db
* chore: use inPerson location in team-emails.e2e
* Revert "fix: remove fallback permssions on organization Id. (#22769)"
This reverts commit 30061c0d58.
Removes the manage permission concept and fallback logic to simplify
permission checking back to direct role-based checks.
* remove manage from workflows
* fix type error and remove manage from components
* e2e tests for availability settings atom
* init tests for booking page
* add data test id for event type card
* update tests for booking page
* add data test ids for playwright tests
* update test coverage for booking page
* refactor: improve most booked & least booked
* add 2 new charts and trpc handlers
* update arg
* update comment
* completed booking filter
* update
* add change in component level and remove unused translations
* current time and accepted status logic handler
* resize some charts
* restore some i18n
* restore i18n
* restore i18n
---------
Co-authored-by: Eunjae Lee <hey@eunjae.dev>
2025-08-25 11:17:07 +00:00
Hariom BalharaGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* feat: add startsWith operator to routing forms
- Implement startsWith operator in BasicConfig.ts for RAQB
- Add custom JsonLogic operation for startsWith evaluation
- Add startsWith support to jsonLogicToPrisma for reporting
- Supports both form field response routing and attribute routing
- Uses case-insensitive matching via normalize function
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* test: add comprehensive unit tests for startsWith operator
- Add tests for operator availability in FormFieldsBaseConfig and AttributesBaseConfig
- Add tests for JsonLogic configuration validation
- Add tests for text widget operator integration
- All 15 tests pass including new startsWith operator tests
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* test: move startsWith operator tests to jsonLogic.test.ts
- Add comprehensive startsWith tests to packages/lib/raqb/jsonLogic.test.ts
- Remove startsWith tests from packages/app-store/routing-forms/__tests__/config.test.ts
- Tests verify case-insensitive matching, edge cases, and falsy value handling
- All tests pass: jsonLogic.test.ts (18 passed) and config.test.ts (12 passed)
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* refactor: remove unused startsWith operator from jsonLogicToPrisma.ts
- Remove startsWith entry from OPERATOR_MAP in jsonLogicToPrisma.ts
- File is currently unused so this cleanup keeps PR focused
- Core startsWith functionality remains intact in jsonLogic.ts and BasicConfig.ts
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* test: add comprehensive edge case tests for startsWith operator
- Add test cases for non-string first argument (haystack) handling
- Cover null, undefined, numbers, booleans, arrays, and objects
- Update startsWith implementation to safely handle non-string inputs
- Ensure operation returns false without throwing runtime errors
- All tests now pass: 19 passed | 1 skipped
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* refactor: improve startsWith operation with type guards and String.prototype.startsWith
- Change argument types from string to unknown for better type safety
- Add type guards to return false when either operand is not a string
- Use String.prototype.startsWith instead of indexOf for cleaner implementation
- Keep existing empty-second check and normalize function calls
- All tests continue to pass: 19 passed | 1 skipped
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* Various fixes
* Remove tooltip
* another string change
* Fix width of custom event name modal to prevent overflow
* Booking questions fixes
* minor string fix
* checkbox alignment
* padding in reassign dialog
* fix: update FormBuilder tests for checkbox UI changes
- Updated test utilities to work with CheckboxField instead of BooleanToggleGroupField
- Fixed badge expectations to check for 'optional' instead of 'required'
- Updated dialog interaction methods to use checkbox.checked instead of button text
- All 13 FormBuilder tests now pass successfully
Fixes failing tests in PR #22727 caused by UI changes from toggle buttons to checkboxes for required field selection.
Co-Authored-By: amit@cal.com <samit91848@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: amit@cal.com <samit91848@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>