- 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>
* 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>
* Add `rerouting` to `AssignmentReasonRecorder`
* Pass session email as `rescheduledBy`
* Write reassign reason
* Edit message
* Use `routingFormRoute` when rerouting
* Pass isRerouting & reroutedByEmail to `routingFormRoute` method
* Type fix
* Fix test
* Fix test
* Fix test
* Type fix
* Refactor to use UserRepository
* Show rerouted by email
* Replace isReroutingCase
* Fix rescheduledBy for new tab reschduling
---------
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Hariom <hariombalhara@gmail.com>
* feat: add field type change warning dialog to routing forms
- Add FieldTypeChangeWarningDialog component to prevent field type changes
- Show informative dialog explaining data integrity concerns when users try to change field types
- Provide alternative suggestion to create new field instead of changing existing one
- Add i18n translations for dialog messages
- Integrate dialog into routing form edit page field type selector
- Bypass Teams plan restriction for testing routing forms functionality
- Fix ESLint error by properly handling scrollIntoView in embed mode with disable comment
Prevents data integrity issues by blocking field type changes (e.g. multiselect → text)
that could make existing form responses incompatible and cause data loss.
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* fix: make field type dialog more selective to allow legitimate changes during form creation
- Only show warning dialog when there's actual data integrity risk
- Allow field type changes for new fields or fields without meaningful labels
- Fixes E2E test timeout by not blocking legitimate field type changes
- Maintains data protection for existing fields with real data
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* fix: complete field type dialog implementation with translations and component
- Add FieldTypeChangeWarningDialog component with proper i18n support
- Add all required translation strings for dialog messages
- Ensure dialog only shows for actual data integrity risks
- Allow legitimate field type changes during form creation
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* simplify field type dialog: one button, button replaces SelectField, remove forms page changes
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* use Button component
* feat: restore SelectField with conditional dialog for field type changes
- Restore original SelectField dropdown to allow users to see available field types
- Add conditional logic to show dialog only when different type is selected AND form has responses
- Prevent field type changes by not calling onChange when dialog is shown
- Pass hasFormResponses prop from FormEdit to Field component
- Maintain data integrity while providing clear user guidance
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* controlled value
* convert dialog to tooltip
* Update common.json
* remove unused texts
* allow type changing for new field
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: eunjae@cal.com <hey@eunjae.dev>
* fix error codes in og/image route
* test
* simplify
2025-06-25 11:24:34 -03:00
Joe Au-YeungGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>joe@cal.com <joe@cal.com>Benny Joocubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>Hariom
* Restart form if admin is not org admin
* Show pricing is admin and hosted
* Only show billing specific fields when enabled
* Create user onboarding only if valid valid license when self hosting
* Reset store when org creation is completed
* Create schema for trpc input when creating an org
* Add `organization.createSelfHosted` trpc endpoint
* `createOrganizationFromOnboarding` do not require stripe data
* Create organization without billing if self-hosted admin
* Update organizationOnboarding record as completed
* Handle updating subscription for self hosters
* Refactor `isBillingEnabled` to store
* Type fix
* Fix admin org creation for hosted
* Hide UI from admin
* Add tests
* fix: Fix LicenseKeySingleton mocking in organization tests
- Add proper vi.mock() module-level mocking for LicenseKeySingleton
- Replace incorrect casting syntax with vi.mocked() approach
- Add LicenseKeySingleton mock to hosted tests in intentToCreateOrg.handler.test.ts
- Fix IS_SELF_HOSTED mocking for hosted vs self-hosted test scenarios
- All organization creation tests now pass locally
Co-Authored-By: joe@cal.com <joe@cal.com>
* Fix tests
* Fix tests
* Test fixes
* Type fix
* Type fix
* Type fix
* Update packages/features/ee/organizations/lib/server/createOrganizationFromOnboarding.test.ts
Fix typo
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* fix: Add IS_SELF_HOSTED mocking for E2E organization creation tests
Co-Authored-By: joe@cal.com <joe@cal.com>
* Fix E2E test
* Address feedback
* Type fix
* Fix e2e tests
* Remove unused code
* Small fixes
* fix unit tests
* review fixes
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: joe@cal.com <joe@cal.com>
Co-authored-by: Benny Joo <sldisek783@gmail.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Hariom <hariombalhara@gmail.com>
2025-06-25 16:58:18 +03:00
devin-ai-integration[bot]GitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>morgan@cal.com <morgan@cal.com>
* fix creating user balance
* fix org check if teamId is given
* adjust hasAvailableCredits function
* improve comments
* fix creditBalance.create
* adjust test
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
* add smsSegments to creditExpenseLog
* add download button
* download only data from selected month
* improvements
* improve design
* use repository function
* add tests for credit repository
* fix type error
* fix unit test
* fix type error
* fix unit test
* code clean up
* fix skeleton loader
* remove empty mt
* code clean up
* move csv headers out of function
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Benny Joo <sldisek783@gmail.com>