* feat: add calendar cache status dropdown
- Add updatedAt field to CalendarCache schema with migration
- Create tRPC cacheStatus endpoint for fetching cache timestamps
- Add action dropdown to CalendarSwitch for Google Calendar entries
- Display formatted last updated timestamp in dropdown
- Add placeholder for cache deletion functionality
- Include translation strings for dropdown content
The dropdown only appears for Google Calendar integrations that have
active cache entries and provides cache management options for future
extensibility.
Co-Authored-By: zomars@cal.com <zomars@me.com>
* fix: resolve Prisma type incompatibilities in repository files
- Remove problematic satisfies clause in selectedCalendar.ts
- Add missing cacheStatus parameter to ConnectedCalendarList component
- Fixes type errors that were preventing CI from passing
Co-Authored-By: zomars@cal.com <zomars@me.com>
* refactor: integrate cache status into connectedCalendars handler
- Remove separate cacheStatus tRPC endpoint as requested
- Return cache status as separate field in connectedCalendars response
- Update UI components to use cache data from connectedCalendars
- Fix Prisma type incompatibilities in repository files
Co-Authored-By: zomars@cal.com <zomars@me.com>
* fix: resolve Prisma type incompatibilities and fix data flow for cache status
- Fix Prisma.SortOrder usage in membership.ts orderBy clauses
- Remove problematic satisfies clause in selectedCalendar.ts
- Fix TeamSelect type reference in team.ts
- Update SelectedCalendarsSettingsWebWrapper to properly pass cacheStatus data flow
Co-Authored-By: zomars@cal.com <zomars@me.com>
* Discard changes to packages/lib/server/repository/membership.ts
* Discard changes to packages/lib/server/repository/team.ts
* fix: improve calendar cache dropdown with proper formatting and subscription logic
- Fix timestamp HTML entity encoding with interpolation escapeValue: false
- Only show dropdown for subscribed Google calendars (googleChannelId exists)
- Hide delete option when no cache data exists
- Include updatedAt and googleChannelId fields upstream in user repository
- Update data flow to pass subscription status through components
Co-Authored-By: zomars@cal.com <zomars@me.com>
* feat: update SelectedCalendar.updatedAt when Google webhooks trigger cache refresh
- Add updateManyByCredentialId method to SelectedCalendarRepository
- Update fetchAvailabilityAndSetCache to refresh SelectedCalendar timestamps
- Ensure webhook flow updates both CalendarCache and SelectedCalendar records
- Maintain proper timestamp tracking for calendar cache operations
Co-Authored-By: zomars@cal.com <zomars@me.com>
* Add script to automate Tunnelmole webhook setup
Introduces test-gcal-webhooks.sh to start Tunnelmole, extract the public URL, and update GOOGLE_WEBHOOK_URL in the .env file. Handles process management, rate limits, and ensures environment configuration for Google Calendar webhooks.
* Update dev:cron script to use npx tsx
Replaces 'ts-node' with 'npx tsx' in the dev:cron script for running cron-tester.ts, likely to improve compatibility or leverage tsx features.
* Update cache status string and improve CalendarSwitch UI
Renamed 'last_updated' to 'cache_last_updated' in locale file for clarity and updated CalendarSwitch to use the new string. Also added dark mode text color support for cache status display.
* refactor: move cache management to credential-level dropdown with Remove App
- Create CredentialActionsDropdown component consolidating cache and app removal actions
- Add deleteCache tRPC mutation for credential-level cache deletion
- Update connectedCalendars handler to include cacheUpdatedAt at credential level
- Move dropdown from individual CalendarSwitch to credential level in SelectedCalendarsSettingsWebWrapper
- Remove cache-related props from CalendarSwitch component
- Add translation strings for cache management actions
- Consolidate all credential-level actions (cache management + Remove App) in one dropdown
Co-Authored-By: zomars@cal.com <zomars@me.com>
* fix: remove duplicate translation keys in common.json
- Remove duplicate cache-related keys at lines 51-56
- Keep properly positioned keys later in file
- Addresses GitHub comment from zomars about duplicate keys
Co-Authored-By: zomars@cal.com <zomars@me.com>
* fix: rename translation key to cache_last_updated
- Address GitHub comment from zomars
- Rename 'last_updated' to 'cache_last_updated' for specificity
- Update usage in CredentialActionsDropdown component
Co-Authored-By: zomars@cal.com <zomars@me.com>
* fix: remove duplicate last_updated translation key
Co-Authored-By: zomars@cal.com <zomars@me.com>
* fix: add confirmation dialog for cache deletion and use repository pattern
- Add confirmation dialog for destructive cache deletion action
- Replace direct Prisma calls with CalendarCacheRepository pattern
- Add getCacheStatusByCredentialIds method to repository interface
- Fix import paths for UI components
- Address GitHub review comments from zomars
Co-Authored-By: zomars@cal.com <zomars@me.com>
* Update CredentialActionsDropdown.tsx
* Update common.json
* Update common.json
* fix: remove nested div wrapper to resolve HTML structure error
- Remove wrapping div around DisconnectIntegration component
- Fixes nested <p> tag validation error preventing Remove App functionality
- Maintains existing confirmation dialog patterns
Co-Authored-By: zomars@cal.com <zomars@me.com>
* Fix API handler response termination logic
Removed unnecessary return values after setting status in the integrations API handler. This clarifies response handling and prevents returning the response object when not needed. Resolves "API handler should not return a value, received object".
* fix: 400 is correct error code for computing slot for past booking (#22574)
* fix
* add test
* chore: release v5.5.1
* Refactor credential disconnect to use confirmation dialog
Replaces the DisconnectIntegration component with an inline confirmation dialog for removing app credentials. Adds disconnect mutation logic and updates UI to improve user experience and consistency.
* Set default value for CalendarCache.updatedAt
Added a default value of NOW() for the updatedAt column in the CalendarCache table to ensure existing and future rows have a valid timestamp. Updated the Prisma schema to reflect this change and provide compatibility for legacy data and raw inserts.
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Benny Joo <sldisek783@gmail.com>
Co-authored-by: emrysal <me@alexvanandel.com>
* refactor: replace i18n HTTP requests with build-time bundling
- Create translationBundler.ts for build-time translation loading
- Replace HTTP fetch in loadTranslations with file system reads
- Add CalComVersion cache invalidation to prevent stale translations
- Fix TypeScript errors in booking page components
- Eliminate 60s timeout issues by removing network dependency
Resolves translation timeout issues by bundling translations at build time
instead of making runtime HTTP requests to /static/locales/ endpoints.
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: move i18n files back to packages/lib/server with proper imports
- Move i18n.ts and translationBundler.ts back to packages/lib/server/
- Replace all relative imports with @calcom/lib/server/i18n pattern
- Fix LOCALES_PATH to point to correct directory
- Maintain optimized serverless-friendly translation loading
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* refactor: move locale files to packages/lib/server to eliminate circular deps
- Move all locale files from apps/web/public/static/locales to packages/lib/server/locales
- Create copy-locales-static.js script to copy files during build
- Update all references to use new location for build-time access
- Maintain public folder copying for Next.js runtime access
- Update platform atoms, scripts, and config files
- Fix copy script relative path issue
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: update test imports after locale refactor
- Fix import paths in test files updated by pre-commit hooks
- Ensure all tests use correct locale import paths
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: revert import paths from @calcom/web/lib/i18n to @calcom/lib/server/i18n
- Revert all test file imports back to @calcom/lib/server/i18n as requested
- Addresses GitHub comment feedback to stick with packages/lib/server location
- Fixes import paths in 6 test files that were incorrectly changed
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: update vite config alias to use new locale path
- Update @calcom/web/public/static/locales/en/common.json to @calcom/lib/server/locales/en/common.json
- Addresses GitHub comment about updating platform atoms vite config
- Maintains correct path resolution after locale files moved to packages/lib/server
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: update translationBundler path resolution for production builds
- Use process.cwd() instead of __dirname for locale file path resolution
- Ensures locale files can be found in both development and production environments
- Fixes E2E test failures caused by missing locale files in .next/server/chunks/
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: use relative path resolution for locale files in translationBundler
- Change from process.cwd() to __dirname with relative paths
- Ensures locale files can be found in both development and production environments
- Fixes E2E test failures caused by incorrect path resolution in Next.js builds
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: use process.cwd() for locale path resolution in production builds
- Change from __dirname to process.cwd() with relative paths
- Ensures locale files can be found when bundled into Next.js server chunks
- Fixes E2E test failures caused by incorrect path resolution in production environment
- Follows same pattern used in getStaticProps.tsx for cross-package file access
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: use path.resolve pattern from sendVerificationRequest for locale access
- Change from process.cwd() to path.resolve(process.cwd(), '..', '..', 'packages/lib/server/locales')
- Follows same pattern used in sendVerificationRequest.ts for cross-environment file access
- Should resolve E2E test failures by ensuring locale files can be found when bundled into Next.js server chunks
- Pattern navigates up from current working directory to reach packages directory consistently
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: use dynamic monorepo root detection for locale path resolution
- Replace relative path resolution with dynamic monorepo root finder
- Ensures locale files can be found from any working directory (root, apps/web, apps/api/v2)
- Update API v2 i18n config to use new locale path
- Fixes remaining E2E test failures in API v2 and E2E (1/4) test suites
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: use require.resolve(__filename) for robust path resolution in all contexts
- Replace __dirname with require.resolve(__filename) in monorepo root detection
- Ensures locale files can be found when running from any working directory
- Fixes E2E API v2 test failures where __dirname resolves to '.' instead of actual file path
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* Revert "fix: use require.resolve(__filename) for robust path resolution in all contexts"
This reverts commit b37d8226000da8f7d5fb98b83dd0e95a53d45372.
* fix: update copied locale files after translationBundler path resolution fix
- Copy script updated all locale files in public directory
- Ensures E2E tests have access to latest locale files
- Fixes regression where all E2E tests were failing
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* feat: remove existing locale files to establish copy script as single source of truth
- Delete all common.json files from apps/web/public/static/locales/
- Eliminates developer confusion about which files are authoritative
- copy-locales-static.js script now clearly the only mechanism for populating public folder
- packages/lib/server/locales/ remains the definitive source of truth for translations
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* add comment
* refactor: simplify findMonorepoRoot by removing redundant fallback loop
- Remove unnecessary second while loop using process.cwd()
- The first loop from __dirname will always find the monorepo root
- Add clear error message for fail-fast behavior if repo structure is corrupted
- Improves code clarity and maintainability
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* feat: integrate updated translations from main branch
- Restore all common.json files from main branch to apps/web/public/static/locales/
- Overwrite packages/lib/server/locales/ with up-to-date translation content
- Resolve merge conflicts using Benny's safer 2-step approach
- Ensure translation source of truth remains in packages/lib/server/locales/
- Complete safer conflict resolution to eliminate merge conflicts on PR #22422
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* chore: update package.json and yarn.lock after translation integration
- Update dependencies after ts-node installation for pre-commit hooks
- Ensure yarn.lock reflects current dependency state
- Complete translation integration process
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* feat: remove duplicate locale files from apps/web to establish single source of truth
- Delete all common.json files from apps/web/public/static/locales/
- Maintain packages/lib/server/locales/ as the single source of truth for translations
- copy-locales-static.js script will populate public folder during build process
- Complete Benny's safer 2-step approach: restore from main, then remove duplicates
- Resolve merge conflicts and eliminate developer confusion about translation file locations
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: hbjORbj <sldisek783@gmail.com>