- Import extractUserContext function from @/lib/extract-user-context
- Extract user context from request in intercept method
- Add user context to logger output using spread operator
- Follow same pattern as exception filters for consistency
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: morgan@cal.com <morgan@cal.com>
* Revert "chore: add test for updateProfilePhotoGoogle (#22169)"
This reverts commit 67032ddaf1.
* Revert "fix: Process base64 avatar image (#22165)"
This reverts commit d8d8bc4d00.
* feat: adds timezone indicator on insights informing user that user settings timezone is used instead of browser timezone
* added i18 helper for translation
* chore: use entities.decodeHTML instead of custom decoder
* feat(insights): align TimezoneBadge with new timeZone prop flow
* chore
* chore: smaller icon
* do not escape value
---------
Co-authored-by: Kartik Saini <41051387+kart1ka@users.noreply.github.com>
Co-authored-by: Eunjae Lee <hey@eunjae.dev>
* feat: enhance API v2 exception filters with user context for improved Axiom observability
- Add extractUserContext utility to safely extract user/org/team context from request
- Enhance all 5 exception filters (HTTP, TRPC, Prisma, Zod, Calendar) with user context
- Include userId, userEmail, organizationId, teamId in Axiom logs when available
- Improve observability for debugging and monitoring authenticated requests
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* chore: update yarn.lock from lint-staged hooks
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: use request.organization instead of request.organizationId
- Address GitHub comment feedback from ThyMinimalDev
- Extract organization ID from organization object for consistency
- Follows same pattern as user and team extraction
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: revert to using request.organizationId as requested in GitHub comment
- Change back from request.organization to request.organizationId
- This aligns with how auth strategies actually populate the request object
- Addresses GitHub comment from ThyMinimalDev
Co-Authored-By: morgan@cal.com <morgan@cal.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: morgan@cal.com <morgan@cal.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* fix: status code or router embed rate limiting
* fix: type err
* fix: handle api v2
* fix: status code
* chore: remove unused
* chore: update unit test
* chore: unit test
* refactor: make res required
* chore: remove unused
* chore: add a wrapper in getserversideprops
* chore: remlove log
* Add ratelLimiting unit test
---------
Co-authored-by: Hariom <hariombalhara@gmail.com>
* fix: Use WEBAPP_URL_FOR_OAUTH to be able to use http://localhost:3000
for local testing
* In case of JSON.parse crash that could happen if zoom reponsed with xml
* Fix cases where auto_recording and default_password_for_scheduled_meetings could be nullish
* perf: optimize slot conflict checking from O(n²) to O(n log n)
- Replace nested mapping with pre-sorted busy slots for faster lookups
- Use early termination when busy slots are sorted by start time
- Maintain exact same interface and behavior as original checkForConflicts
- All existing tests pass, preserving edge case handling
- Reduces complexity from O(available slots × busy slots) to O(n log n)
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* refactor: move O(n log n) optimization to checkForConflicts function
- Replace inline optimization with optimized checkForConflicts function
- Maintain same performance while improving code architecture
- Avoid duplication of conflict checking logic
- Keep all existing interfaces and behavior unchanged
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* test: add comprehensive unit tests for checkForConflicts function
- Add 20 additional test cases covering edge cases and boundary conditions
- Test multiple busy periods scenarios and complex overlaps
- Comprehensive currentSeats handling scenarios
- Timezone and cross-day boundary testing
- Performance testing with large datasets
- Fix invalid date generation in test data that was causing NaN conflicts
- Achieve near 100% coverage of all conflict scenarios documented in function comments
- Verify behavioral equivalence between original O(n²) and optimized O(n log n) implementations
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* Simple, safe performance tweak
* Explicitly define the input of busy to be either Date or Dayjs, not string
* EventBusyDate must ALWAYS be a type that supports valueOf
* Revert "EventBusyDate must ALWAYS be a type that supports valueOf"
This reverts commit 35b572266219d64c22db3c3e24b0cb6ca7a901a6.
* Revert "Explicitly define the input of busy to be either Date or Dayjs, not string"
This reverts commit 902f29708e4b7990a4e5e2865cab2f18ab3e44f0.
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>