Commit Graph
7 Commits
Author SHA1 Message Date
Eunjae Lee b7340f7151 feat: add upgrade banners for teams and organizations (#27650) 2026-03-05 18:19:01 +09:00
9a08d2e46c refactor: migrate webhooks page to coss/ui components (#27714)
* chore: pull coss ui

* refactor: migrate webhooks page to coss/ui components

Co-Authored-By: [email protected] <[email protected]>

* refactor: migrate CreateNewWebhookButton to coss/ui Menu components

Co-Authored-By: [email protected] <[email protected]>

* refactor: adjust CreateNewWebhookButton variant and align based on context

Co-Authored-By: [email protected] <[email protected]>

* feat(coss-ui): add list-item components and refactor WebhookListItem to use them

Co-Authored-By: [email protected] <[email protected]>

* refactor(webhooks): match prototype – remove docs link, flatten list, show user in item

Co-Authored-By: [email protected] <[email protected]>

* update css vars

* refactor(webhooks): migrate WebhookForm.tsx to coss-ui components

Co-Authored-By: [email protected] <[email protected]>

* fix(webhooks): add FormProvider for useFormContext in child components

Co-Authored-By: [email protected] <[email protected]>

* restore prev form

* swap form components

* mc

* use coss button everywhere

* fix ts errors

* refactor(webhooks): replace SettingsHeaderWithBackButton with coss-ui CardFrame in edit/new views

Co-Authored-By: [email protected] <[email protected]>

* refactor(webhooks): split into two CardFrames with Card/CardPanel

Co-Authored-By: [email protected] <[email protected]>

* refactor(webhooks): wrap WebhookTestDisclosure in Card/CardPanel

Co-Authored-By: [email protected] <[email protected]>

* refactor(webhooks): migrate WebhookTestDisclosure to coss-ui CardFrame

Co-Authored-By: [email protected] <[email protected]>

* mc

* mc

* refactor(webhooks): update skeletons to use coss-ui CardFrame pattern

Co-Authored-By: [email protected] <[email protected]>

* mc

* refactor(webhooks): improve new webhook skeleton to match actual UI layout

Co-Authored-By: [email protected] <[email protected]>

* imrpove form skeleton

* optimise card header

* refactor: improve base ui react-hook-form compatibility

* update string

* use coss ui alert dialog

* use coss toast

* feat(webhooks): add user filter to webhooks list

Co-Authored-By: [email protected] <[email protected]>

* fix(webhooks): resolve lint warnings in filter component

Co-Authored-By: [email protected] <[email protected]>

* refactor(webhooks): filter after new button, icon+badge only

Co-Authored-By: [email protected] <[email protected]>

* improve switch

* remove unneeded toast

* refactor(webhooks): enhance WebhooksFilter component with anchor reference

* mc

* fix(webhooks): update Switch component to use checked prop instead of defaultChecked

* fix(webhooks): prevent Suspense boundary error on webhook edit save

Co-Authored-By: [email protected] <[email protected]>

* fix(webhooks): add optimistic state for Switch toggle in WebhookListItem

Co-Authored-By: [email protected] <[email protected]>

* fix(webhooks): disable switch during pending mutation to prevent rapid-toggle race

Co-Authored-By: [email protected] <[email protected]>

* fix(webhooks): guard toggle with isPending check instead of disabled prop

Co-Authored-By: [email protected] <[email protected]>

* fix toggle

* mc

* mc

* fix(webhooks): navigate before revalidation to prevent Suspense re-suspension

Co-Authored-By: [email protected] <[email protected]>

* mc

* fix(webhooks): use render prop for Cancel button navigation

Co-Authored-By: [email protected] <[email protected]>

* fix(webhooks): simplify Cancel button with explicit conditional rendering

Co-Authored-By: [email protected] <[email protected]>

* fix(webhooks): sort list by id to prevent resorting on toggle

Co-Authored-By: [email protected] <[email protected]>

* mc

* mc

* show filter only if user is >1

* refactor(webhooks): move ListItem components to shared directory

* feat: reintroduce avatars

* remove unneeded translations

* remove unneeded useMemo

* add clickable +n badge

* mc

* mc

* add tooltips and docs link

* animated tooltips

* refactor(WebhookForm): replace hardcoded text with translation keys for better localization

* refactor(WebhookListItem): manage active state with useEffect and improve toggle error handling

* mc

* update toast position + re-pull coss ui components

* refactor: rename onEditWebhook to onEditWebhookAction to prevent warnings

* feat: enhance WebhookListItem with edit link and mobile support

* mc

* remove unneded component

* refactor: simplify webhook toggle logic in WebhookListItem component

* fix: update edit link logic in WebhookListItem and add editHref to webhooks-view

* wip

* feat: implement webhook version selection in WebhookForm

* update list item

* fix issue with delete button perrmission

* sort webhooks by ID in WebhooksList component

* mc

* refactor: enhance Webhook components with improved header and skeleton loading logic

* refactor: rename files for clarity

* display the edit button

* re-pull coss ui components

* fix ts error

* refactor: simplify permission checks in WebhookListItem component

* improve skeletons

* fix ts errors

* rename onEditWebhook

* fix: update SheetContent variant in ActiveUserBreakdown component

* fix e2e

* feat: add data-testid attribute to confirmation button in DeleteWebhookDialog

* remove unnecessary file

* refactor: allow passing the aria-label attribute to the button that removes a chip

* refactor: rename onEditWebhook to onEditWebhookAction to prevent warnings

* refactor: add webhook version select to event-type dialog and extract shared WebhookVersionCTA component

Co-Authored-By: [email protected] <[email protected]>

* fix: restore toast notification on webhook toggle in event-types tab

Co-Authored-By: [email protected] <[email protected]>

* implement the coss ui dialog

* refactor(webhooks): use shared WebhookListItem in event type tab and coss-ui Dialog

* remove unneeded lastItem prop

* re-pull coss ui components

* Merge remote-tracking branch 'origin/main' into style/improve-webhooks

Co-Authored-By: unknown <>

* refactor: extract AppHeader component and move page title outside CardFrame

Co-Authored-By: unknown <>

* refactor: show user header for every webhook group and remove CardFrame wrapper

Co-Authored-By: unknown <>

* fix: wrap each user webhook group in CardFrame with CardFrameHeader

Co-Authored-By: unknown <>

* fix: add dashed border to Empty state matching coss prototype

Co-Authored-By: unknown <>

* mc

* fix: only show New button in header when webhooks exist

Co-Authored-By: unknown <>

* refactor: move page title/description/back button out of CardFrame on new/edit webhook pages

Co-Authored-By: unknown <>

* refactor: render webhook form header outside flex-col gap wrapper

Co-Authored-By: unknown <>

* refactor: move header outside div wrapper in webhook form skeleton

Co-Authored-By: unknown <>

* mc

* skeleton improvements

* refactor: move AppHeader component to @coss/ui/shared/app-header

Co-Authored-By: unknown <>

* fix the webhook dialog on event-types settings

* make the webhook clickable for event types

* remove hardcoded string

---------

Co-authored-by: pasqualevitiello <[email protected]>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: [email protected] <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Keith Williams <[email protected]>
2026-03-04 12:56:15 +00:00
5d65a0f091 fix: hide cal branding for orgs/teams (#27643)
* fix: hide branding for teams

* fix: remove unused organizationId and username fields from profiles select

Addresses Cubic AI review feedback (confidence 9/10) to select only
the profile fields that are actually used. The organizationId and
username fields were fetched but never referenced in this function.

Co-Authored-By: unknown <>

* fix: unit tests

* fix: add prisma named export to test mock

Co-Authored-By: [email protected] <[email protected]>

* Add tests: packages/features/profile/lib/hideBranding.test.ts

Generated by Paragon from proposal for PR #27643

* chore: implement cubic feedback

* fix: merge conflicts

* fix: unit tests

* fixup

* refactor: implement DI pattern for event type service

* fix: atoms build

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-02-25 20:53:01 +09:00
4081d11fbe feat: workflow auto translation (#27087)
* feat: workflow auto translation

* tests: add unit tests

* refactor: tests and workflow

* fix: type err

* fix: type err

* fix: remove redundant index on WorkflowStepTranslation

The @@index on [workflowStepId, field, targetLocale] duplicates the @@unique
constraint on the same columns. A unique index already provides efficient
lookups, so the separate @@index adds storage overhead and write latency
without benefit.

Addresses Cubic AI review feedback (confidence 9/10).

Co-Authored-By: unknown <>

* fix: correct locale mapping when translation API returns null

Map translations with their corresponding locales before filtering to
preserve correct locale-to-translation associations. Previously, filtering
out null translations would reindex the array, causing incorrect locale
mappings when any translation in the batch failed.

Also fixes pre-existing lint warnings:
- Move exports to end of file
- Add explicit return type to processTranslations
- Replace ternary with if-else for upsertMany selection

Co-Authored-By: [email protected] <[email protected]>

* fix: address review feedback for workflow auto-translation

- Add change detection before creating translation tasks
- Rename userLocale to sourceLocale in task props for clarity
- Show source language in UI with new translation key
- Extract SUPPORTED_LOCALES to shared translationConstants.ts
- Fix locale mapping bug in translateEventTypeData.ts
- Add WhatsApp translation support
- Abstract translation lookup into shared translationLookup.ts helper
- Restore if-else readability for SCANNING_WORKFLOW_STEPS

Co-authored-by: Udit Takkar <[email protected]>
Co-Authored-By: unknown <>

* fix: update test to use sourceLocale instead of userLocale

Co-Authored-By: unknown <>

* refactor: feedback

* fix: handle first time

* fix: tests

* fix: tests

* fix: address Cubic AI review feedback (confidence 9/10 issues)

- WhatsApp translation: Apply variable substitution using getSMSMessageWithVariables
  and clear contentSid when using translated body to ensure Twilio uses the
  translated text instead of the original template

- update.handler.ts: Change sourceLocale assignment from ?? to || for consistency
  with tasker payload behavior (line 481)

- ITranslationService.ts: Rename methods from plural to singular naming:
  - getWorkflowStepTranslations -> getWorkflowStepTranslation
  - getEventTypeTranslations -> getEventTypeTranslation
  Updated all call sites and tests accordingly

Co-Authored-By: unknown <>

* fix: address Cubic AI review feedback (confidence 9/10+ issues)

- Fix getSMSMessageWithVariables to handle WHATSAPP_ATTENDEE action for
  locale and timezone (confidence 9/10)
- Remove WhatsApp translation feature that set contentSid to undefined
  since Twilio ignores body parameter for WhatsApp and requires
  pre-approved Message Templates (confidence 10/10)

Co-Authored-By: unknown <>

* fix: translatio

* Add tests: packages/features/eventTypeTranslation/repositories/EventTypeTranslationRepository.test.ts

Generated by Paragon from proposal for PR #27087

* Add tests: packages/features/tasker/tasks/translateWorkflowStepData.test.ts

Generated by Paragon from proposal for PR #27087

* chore: nit

* chore: verfied atg

* fix: set sourceLocale for new steps, add shouldDirty to checkbox, remove spec docs

- Set sourceLocale fallback in addedSteps mapping to fix stale detection mismatch
- Add { shouldDirty: true } to autoTranslateEnabled checkbox onChange
- Remove specs/workflow-translation/ directory (planning docs, not for repo)

Co-authored-by: Udit Takkar <[email protected]>
Co-Authored-By: unknown <>

* chore: add specs back

* fix: type error

* fix: type error

* fix: type err

* fix: tests

* refactor: feedback

* fix: type err

* refactor

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Udit Takkar <[email protected]>
Co-authored-by: Udit Takkar <[email protected]>
2026-02-25 01:03:55 +05:30
e3a9f54ba5 feat: Configure cancellation reason (#26872)
* feat: Configure cancellation reason

* fix: use enums

* tests: add unit tests

* fix: type error

* chore: remove duplicate dialog

* fix: type erro

* refator: improvements

* refator: improvements

---------

Co-authored-by: Keith Williams <[email protected]>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-02-24 13:35:51 -03:00
48cbb94af2 feat: add webhook trigger when routing form fallback route is hit (#27588)
* feat: add no users found fallback action for routing forms

- Add NoUsersFoundFallbackActionType enum with CustomPageMessage and ExternalRedirectUrl options
- Add noUsersFoundFallbackAction field to zodNonRouterRoute schema
- Add NoUsersFoundFallback UI component in RouteBuilder for configuring fallback action
- Update handleResponse to return noUsersFoundFallbackAction when no team members match
- Add i18n translation keys for new UI strings

Co-Authored-By: [email protected] <[email protected]>

* refactor: change fallback to use same action options as main route

- Replace noUsersFoundFallbackAction with fallbackAction that has same structure as main action
- Add action dropdown and input fields to fallback attributes query builder section
- Support Event redirect, External URL, and Custom page options in fallback
- Remove separate NoUsersFoundFallback toggle component
- Update handleResponse to return fallbackAction

Co-Authored-By: [email protected] <[email protected]>

* fix: ensure fallbackAction type is always defined in onChange handlers

Co-Authored-By: [email protected] <[email protected]>

* fix: add guards for route.fallbackAction in onChange handlers

Co-Authored-By: [email protected] <[email protected]>

* fix: only return fallbackAction when no users are found

Co-Authored-By: [email protected] <[email protected]>

* refactor: restructure fallback section to mirror main route structure

Co-Authored-By: [email protected] <[email protected]>

* fix: ensure backwards compatibility for existing routes with fallbackAttributesQueryValue

Co-Authored-By: [email protected] <[email protected]>

* fix: initialize fallbackAction with main event type for backwards compatibility

Co-Authored-By: [email protected] <[email protected]>

* fix: include fallbackAction in getRoutesToSave to persist changes

Co-Authored-By: [email protected] <[email protected]>

* fix: use fallbackAction in getRoutedUrl when no team members found

Co-Authored-By: [email protected] <[email protected]>

* fix: use i18n for fallback label and add tests for fallback action

Co-Authored-By: [email protected] <[email protected]>

* fix: do not trigger fallback action when CRM contact owner is found

Co-Authored-By: [email protected] <[email protected]>

* fix: prioritize fallbackAction over fallbackAttributesQueryValue

When a route has a fallbackAction configured, skip the
fallbackAttributesQueryValue to ensure the fallbackAction is triggered
when no team members are found. This maintains backwards compatibility
by only using fallbackAttributesQueryValue when fallbackAction is not set.

Also treats teamMemberIdsMatchingAttributeLogic being null (routing couldn't
run, e.g., missing orgId) the same as an empty array for the purpose of
triggering the fallbackAction.

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: extract RouteActionSelector shared component for action selection UI

Co-Authored-By: [email protected] <[email protected]>

* fix: add i18n string for default custom page message

Co-Authored-By: [email protected] <[email protected]>

* feat: add webhook trigger when routing form fallback route is hit

- Add ROUTING_FORM_FALLBACK_HIT to WebhookTriggerEvents enum in Prisma schema
- Add new trigger to routing-forms webhook triggers in constants
- Add translation string for the new webhook trigger
- Implement triggerFallbackWebhook function in formSubmissionUtils.ts
- Call webhook trigger from handleResponse.ts when fallback action is used

Co-Authored-By: [email protected] <[email protected]>

* fix: remove webhook object from error log to avoid exposing secrets

Co-Authored-By: [email protected] <[email protected]>

* revert: remove webhook trigger changes (to be moved to separate PR)

Co-Authored-By: [email protected] <[email protected]>

* feat: add webhook trigger when routing form fallback route is hit

- Add ROUTING_FORM_FALLBACK_HIT to WebhookTriggerEvents enum in Prisma schema
- Add new trigger to routing-forms webhook triggers in constants
- Add translation string for the new webhook trigger
- Implement triggerFallbackWebhook function in formSubmissionUtils.ts
- Call webhook trigger from handleResponse.ts when fallback action is used

Co-Authored-By: [email protected] <[email protected]>

* fix: remove webhook object from error log to avoid exposing secrets

Co-Authored-By: [email protected] <[email protected]>

* fix: add ROUTING_FORM_FALLBACK_HIT to PayloadBuilderFactory trigger mapping

Co-Authored-By: [email protected] <[email protected]>

* style: apply biome formatting fixes

Co-Authored-By: [email protected] <[email protected]>

* fix: restore removed comments in RouteBuilder

Co-Authored-By: [email protected] <[email protected]>

* chore: add prisma migration for ROUTING_FORM_FALLBACK_HIT enum value

Co-Authored-By: [email protected] <[email protected]>

* fix: add ROUTING_FORM_FALLBACK_HIT to FormTriggerEvents type union

Co-Authored-By: [email protected] <[email protected]>

* test: add test coverage for triggerFallbackWebhook function

Co-Authored-By: [email protected] <[email protected]>

* refactor: consolidate fallback webhook firing with form submission webhooks

Move ROUTING_FORM_FALLBACK_HIT webhooks into the same Promise.all() batch
as FORM_SUBMITTED / FORM_SUBMITTED_NO_EVENT, eliminating redundant
getWebhooks/getWebhookTargetEntity/getOrgIdFromMemberOrTeamId calls.

- Add fallbackAction parameter to _onFormSubmission and onSubmissionOfFormResponse
- Remove triggerFallbackWebhook function and all its usages/imports
- Move getFallbackAction() earlier in handleResponse.ts and pass result through
- Update all tests to verify batched webhook behavior

Co-Authored-By: [email protected] <[email protected]>

* Add UI option for trigger

* feat: persist fallbackAction on queued form responses

When a routing form response is queued, the fallbackAction determined
during routing is now stored on the QueuedFormResponse record. When
the queued response is later converted to a real FormResponse, the
stored fallbackAction is passed to onSubmissionOfFormResponse so the
ROUTING_FORM_FALLBACK_HIT webhook fires correctly.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* test: add coverage for fallbackAction in queued form response flow

Verify that fallbackAction is persisted when queuing and passed through
to onSubmissionOfFormResponse when the queued response is converted.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <[email protected]>
2026-02-23 16:44:41 -05:00
Benny Joo 648ad72a54 refactor: extract dedicated @calcom/i18n package (#28141) 2026-02-23 13:30:12 +00:00