Skip to content

refactor(livechat): replace any types with proper TypeScript interfaces in store#38339

Open
Agarwalchetan wants to merge 8 commits intoRocketChat:developfrom
Agarwalchetan:refactor/livechat-typescript-types
Open

refactor(livechat): replace any types with proper TypeScript interfaces in store#38339
Agarwalchetan wants to merge 8 commits intoRocketChat:developfrom
Agarwalchetan:refactor/livechat-typescript-types

Conversation

@Agarwalchetan
Copy link
Copy Markdown
Contributor

@Agarwalchetan Agarwalchetan commented Jan 26, 2026

fixes #38337 refactor(livechat): replace any types in Livechat store with proper TypeScript interfaces

This PR improves TypeScript type safety in the Livechat store by replacing all 19 any type annotations in StoreState with explicit, well-defined TypeScript types.

The changes are type-only, introduce no runtime behavior changes, and significantly improve IDE autocompletion, maintainability, and compile-time error detection.


Changes

1. Introduced Livechat-specific type definitions

Added a new types.ts file to centralize Livechat-related interfaces:

  • Alert – UI alert notification structure
  • LivechatConfigMessages – i18n/config message definitions (with index signature)
  • LivechatResource – typed resource map
  • FileUploadConfig – file upload configuration
  • QueueInfo – visitor queue metadata
  • IncomingCallAlert – incoming call alert details

2. Replaced any usages in StoreState

Updated packages/livechat/src/store/index.tsx to replace all any annotations with proper types, reusing existing shared typings where available.

Highlights:

  • Reused core types from @rocket.chat/core-typings (IMessage, ILivechatTrigger, Serialized)
  • Introduced explicit unions (number | boolean, string | number)
  • Fixed optional vs nullable state inconsistencies
  • Removed tri-state booleans by explicitly initializing defaults

Updated Store Type Definitions

Modified index.tsx with the following type improvements:

Property Before After Source
config.messages any LivechatConfigMessages Custom type
config.triggers any[] ILivechatTrigger[] @rocket.chat/core-typings
config.resources any LivechatResource Custom type
config.settings.fileUpload any FileUploadConfig Custom type
config.settings.allowSwitchingDepartments any boolean Primitive
config.settings.showConnecting any boolean Primitive
config.settings.limitTextLength any number | boolean Primitive union
messages any[] (Serialized & { token?: string })[] @rocket.chat/core-typings + extension
alerts any[] Alert[] Custom type
unread any number | null Primitive
incomingCallAlert any IncomingCallAlert | null Custom type
businessUnit any string | null Primitive
modal any boolean Primitive
agent any Agent Local definition
lastReadMessageId any string | number Primitive union
triggerAgent any Agent Local definition
queueInfo any QueueInfo Custom type

Total: 19 any annotations replaced with proper types


Scope

  • Files changed:

    • packages/livechat/src/store/index.tsx
    • packages/livechat/src/store/types.ts (new)
  • Runtime behavior: unchanged

  • Breaking changes: none


Benefits

  • Stronger type safety across the Livechat store
  • Improved IDE autocompletion and developer experience
  • Earlier detection of state-related bugs at compile time
  • More maintainable and self-documenting state definitions

Summary by CodeRabbit

  • New Features

    • Incoming call alerts now show caller info.
    • Improved queue display and file upload options.
    • Additional hidden system message types and broader message handling.
  • Refactor

    • Stricter, more consistent state and configuration typing for live chat.
    • Safer handling when agent or message type is missing, reducing rendering issues.

…es in store

- Created types.ts with custom interfaces (Alert, QueueInfo, FileUploadConfig, etc.)
- Replaced 19 any type annotations in StoreState interface
- Imported existing types from @rocket.chat/core-typings (IMessage, ILivechatTrigger)
- Fixed typo: LivechatHiddenSytemMessageType -> LivechatHiddenSystemMessageType
- Improved type safety with index signatures and union types
- Made modal a required boolean with explicit initialization
- All changes maintain existing runtime behavior while adding compile-time type checking
@Agarwalchetan Agarwalchetan requested review from a team as code owners January 26, 2026 11:41
@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot Bot commented Jan 26, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 26, 2026

⚠️ No Changeset found

Latest commit: fb34a2b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 26, 2026

Caution

Review failed

The head commit changed during the review from 0605b67 to a30f65e.

Walkthrough

Replaces numerous any types across livechat with precise TypeScript interfaces and adds a new types.ts. Minor runtime adjustments: canRenderMessage accepts optional type, formatAgent returns undefined for missing agent, displayAlert uses immutable update, and upsertMessage enforces a stricter parameter shape.

Changes

Cohort / File(s) Summary
Store type updates
packages/livechat/src/store/index.tsx
Replaced ~19 any usages with concrete types (messages, triggers, resources, alerts, fileUpload, settings, unread, incomingCallAlert, businessUnit, modal, agent, lastReadMessageId, triggerAgent, queueInfo). Renamed LivechatHiddenSytemMessageTypeLivechatHiddenSystemMessageType; set initial modal to false.
New public types
packages/livechat/src/store/types.ts
Added exported interfaces/types: Alert, LivechatConfigMessages, LivechatResource, FileUploadConfig, QueueInfo, IncomingCallAlert.
Agent definition tweak
packages/livechat/src/definitions/agents.d.ts
Made Agent.ts timestamp (ts) optional (ts?: number).
Message rendering change
packages/livechat/src/helpers/canRenderMessage.ts
canRenderMessage now accepts optional t?: string and returns true when t is falsy (messages without a type render by default).
Agent formatting
packages/livechat/src/helpers/formatAgent.ts
formatAgent now accepts `AgentType
Alert immutability
packages/livechat/src/lib/connection.ts
displayAlert typed to Alert and updates alerts immutably (creates new array instead of push).
Upsert message typing
packages/livechat/src/lib/triggerUtils.ts
upsertMessage signature tightened to a specific object shape (_id, msg?, token, u, ts, trigger); call to upsert casts message to any with comment explaining the cast.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰
I hopped through types with eager paws,
Replaced each any with clearer laws.
Alerts now nest without a shove,
Agents tidy, messages love—
A patched-up burrow, neat and bright. ✨

🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (670 files):

⚔️ .github/actions/docker-image-size-tracker/action.yml (content)
⚔️ .github/workflows/ci-test-e2e.yml (content)
⚔️ .github/workflows/ci-test-unit.yml (content)
⚔️ .github/workflows/ci.yml (content)
⚔️ apps/meteor/.eslintrc.json (content)
⚔️ apps/meteor/.scripts/run-ha.ts (content)
⚔️ apps/meteor/CHANGELOG.md (content)
⚔️ apps/meteor/app/2fa/server/twoFactorRequired.ts (content)
⚔️ apps/meteor/app/api/server/ApiClass.ts (content)
⚔️ apps/meteor/app/api/server/definition.ts (content)
⚔️ apps/meteor/app/api/server/helpers/parseJsonQuery.ts (content)
⚔️ apps/meteor/app/api/server/index.ts (content)
⚔️ apps/meteor/app/api/server/lib/eraseTeam.spec.ts (content)
⚔️ apps/meteor/app/api/server/lib/eraseTeam.ts (content)
⚔️ apps/meteor/app/api/server/lib/isValidQuery.ts (content)
⚔️ apps/meteor/app/api/server/lib/rooms.ts (content)
⚔️ apps/meteor/app/api/server/middlewares/logger.ts (content)
⚔️ apps/meteor/app/api/server/router.ts (content)
⚔️ apps/meteor/app/api/server/v1/channels.ts (content)
⚔️ apps/meteor/app/api/server/v1/chat.ts (content)
⚔️ apps/meteor/app/api/server/v1/custom-sounds.ts (content)
⚔️ apps/meteor/app/api/server/v1/groups.ts (content)
⚔️ apps/meteor/app/api/server/v1/im.ts (content)
⚔️ apps/meteor/app/api/server/v1/misc.ts (content)
⚔️ apps/meteor/app/api/server/v1/rooms.ts (content)
⚔️ apps/meteor/app/api/server/v1/teams.ts (content)
⚔️ apps/meteor/app/api/server/v1/users.ts (content)
⚔️ apps/meteor/app/apps/server/bridges/oauthApps.ts (content)
⚔️ apps/meteor/app/authentication/server/startup/index.js (content)
⚔️ apps/meteor/app/authorization/server/functions/canDeleteMessage.ts (content)
⚔️ apps/meteor/app/authorization/server/functions/canSendMessage.ts (content)
⚔️ apps/meteor/app/cloud/server/functions/getWorkspaceLicense.ts (content)
⚔️ apps/meteor/app/cloud/server/functions/syncWorkspace/announcementSync.ts (content)
⚔️ apps/meteor/app/cloud/server/functions/syncWorkspace/fetchWorkspaceSyncPayload.ts (content)
⚔️ apps/meteor/app/cloud/server/functions/syncWorkspace/handleCommsSync.ts (content)
⚔️ apps/meteor/app/cloud/server/functions/syncWorkspace/legacySyncWorkspace.ts (content)
⚔️ apps/meteor/app/cors/server/cors.ts (content)
⚔️ apps/meteor/app/crowd/server/crowd.ts (content)
⚔️ apps/meteor/app/file-upload/server/methods/sendFileMessage.ts (content)
⚔️ apps/meteor/app/integrations/server/api/api.ts (content)
⚔️ apps/meteor/app/lib/server/functions/cleanRoomHistory.ts (content)
⚔️ apps/meteor/app/lib/server/functions/createRoom.ts (content)
⚔️ apps/meteor/app/lib/server/functions/deleteMessage.ts (content)
⚔️ apps/meteor/app/lib/server/functions/notifications/email.js (content)
⚔️ apps/meteor/app/lib/server/functions/saveUser/saveNewUser.ts (content)
⚔️ apps/meteor/app/lib/server/functions/saveUser/saveUser.ts (content)
⚔️ apps/meteor/app/lib/server/functions/saveUserIdentity.ts (content)
⚔️ apps/meteor/app/lib/server/functions/setEmail.ts (content)
⚔️ apps/meteor/app/lib/server/functions/setRealName.ts (content)
⚔️ apps/meteor/app/lib/server/functions/setStatusText.ts (content)
⚔️ apps/meteor/app/lib/server/lib/RateLimiter.js (content)
⚔️ apps/meteor/app/lib/server/lib/index.ts (content)
⚔️ apps/meteor/app/lib/server/lib/validateCustomMessageFields.ts (content)
⚔️ apps/meteor/app/lib/server/methods/saveSetting.ts (content)
⚔️ apps/meteor/app/lib/server/methods/setRealName.ts (content)
⚔️ apps/meteor/app/livechat/server/api/v1/customField.ts (content)
⚔️ apps/meteor/app/livechat/server/business-hour/BusinessHourManager.ts (content)
⚔️ apps/meteor/app/livechat/server/business-hour/Helper.ts (content)
⚔️ apps/meteor/app/livechat/server/business-hour/Single.ts (content)
⚔️ apps/meteor/app/livechat/server/lib/RoutingManager.ts (content)
⚔️ apps/meteor/app/livechat/server/lib/contacts/resolveContactConflicts.spec.ts (content)
⚔️ apps/meteor/app/livechat/server/lib/contacts/resolveContactConflicts.ts (content)
⚔️ apps/meteor/app/livechat/server/lib/contacts/updateContact.spec.ts (content)
⚔️ apps/meteor/app/livechat/server/lib/contacts/updateContact.ts (content)
⚔️ apps/meteor/app/message-pin/server/pinMessage.ts (content)
⚔️ apps/meteor/app/metrics/server/lib/collectMetrics.ts (content)
⚔️ apps/meteor/app/metrics/server/lib/metrics.ts (content)
⚔️ apps/meteor/app/push/server/push.ts (content)
⚔️ apps/meteor/app/slashcommands-help/server/server.ts (content)
⚔️ apps/meteor/app/slashcommands-join/server/server.ts (content)
⚔️ apps/meteor/app/slashcommands-status/server/status.ts (content)
⚔️ apps/meteor/app/statistics/server/functions/sendUsageReport.spec.ts (content)
⚔️ apps/meteor/app/statistics/server/functions/sendUsageReport.ts (content)
⚔️ apps/meteor/app/statistics/server/lib/SAUMonitor.ts (content)
⚔️ apps/meteor/app/statistics/server/lib/statistics.ts (content)
⚔️ apps/meteor/app/threads/server/methods/followMessage.ts (content)
⚔️ apps/meteor/app/threads/server/methods/unfollowMessage.ts (content)
⚔️ apps/meteor/app/ui-utils/client/lib/RoomHistoryManager.ts (content)
⚔️ apps/meteor/app/user-status/server/methods/setUserStatus.ts (content)
⚔️ apps/meteor/app/utils/rocketchat.info (content)
⚔️ apps/meteor/client/components/ABAC/ABACUpsellModal/__snapshots__/ABACUpsellModal.spec.tsx.snap (content)
⚔️ apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx (content)
⚔️ apps/meteor/client/components/CreateDiscussion/DefaultParentRoomField.tsx (content)
⚔️ apps/meteor/client/components/GenericUpsellModal/__snapshots__/GenericUpsellModal.spec.tsx.snap (content)
⚔️ apps/meteor/client/components/RoomAutoComplete/RoomAutoComplete.tsx (content)
⚔️ apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleOption.tsx (content)
⚔️ apps/meteor/client/components/UserAutoCompleteMultiple/UserAvatarChip.spec.tsx (content)
⚔️ apps/meteor/client/components/UserAutoCompleteMultiple/UserAvatarChip.tsx (content)
⚔️ apps/meteor/client/components/UserAutoCompleteMultiple/__snapshots__/UserAvatarChip.spec.tsx.snap (content)
⚔️ apps/meteor/client/components/deviceManagement/DeviceManagementTable/DeviceManagementTable.tsx (content)
⚔️ apps/meteor/client/components/message/toolbar/items/actions/Timestamp/TimestampPicker/__snapshots__/TimestampPicker.spec.tsx.snap (content)
⚔️ apps/meteor/client/components/message/toolbar/useNewDiscussionMessageAction.tsx (content)
⚔️ apps/meteor/client/hooks/useRoomIcon.spec.tsx (content)
⚔️ apps/meteor/client/hooks/useRoomIcon.tsx (content)
⚔️ apps/meteor/client/lib/chats/flows/uploadFiles.ts (content)
⚔️ apps/meteor/client/lib/e2ee/rocketchat.e2e.room.ts (content)
⚔️ apps/meteor/client/lib/e2ee/rocketchat.e2e.ts (content)
⚔️ apps/meteor/client/sidebar/RoomList/SidebarItemTemplateWithData.tsx (content)
⚔️ apps/meteor/client/sidebar/hooks/usePreventDefault.ts (content)
⚔️ apps/meteor/client/views/account/deviceManagement/DeviceManagementAccountTable/DeviceManagementAccountRow.tsx (content)
⚔️ apps/meteor/client/views/account/tokens/AccountTokensTable/AccountTokensTable.tsx (content)
⚔️ apps/meteor/client/views/admin/ABAC/ABACAttributesTab/__snapshots__/AttributesForm.spec.tsx.snap (content)
⚔️ apps/meteor/client/views/admin/ABAC/ABACRoomsTab/__snapshots__/DeleteRoomModal.spec.tsx.snap (content)
⚔️ apps/meteor/client/views/admin/customSounds/AddCustomSound.tsx (content)
⚔️ apps/meteor/client/views/admin/customSounds/EditCustomSound.tsx (content)
⚔️ apps/meteor/client/views/admin/customSounds/EditSound.tsx (content)
⚔️ apps/meteor/client/views/admin/deviceManagement/DeviceManagementAdminTable/DeviceManagementAdminRow.tsx (content)
⚔️ apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx (content)
⚔️ apps/meteor/client/views/admin/permissions/UsersInRole/UsersInRoleTable/__snapshots__/UsersInRoleTable.spec.tsx.snap (content)
⚔️ apps/meteor/client/views/admin/viewLogs/AnalyticsReports.tsx (content)
⚔️ apps/meteor/client/views/admin/workspace/VersionCard/modals/RegisterWorkspaceSetupModal/RegisterWorkspaceSetupStepTwoModal.tsx (content)
⚔️ apps/meteor/client/views/audit/components/forms/DateRangePicker.tsx (content)
⚔️ apps/meteor/client/views/e2e/EnterE2EPasswordModal/__snapshots__/EnterE2EPasswordModal.spec.tsx.snap (content)
⚔️ apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/AppLogsFilter.tsx (content)
⚔️ apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/AppLogsFilterOptions.tsx (content)
⚔️ apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/CompactFilterOptions.tsx (content)
⚔️ apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/__snapshots__/AppLogsFilterCompact.spec.tsx.snap (content)
⚔️ apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/__snapshots__/AppLogsFilterContextualBar.spec.tsx.snap (content)
⚔️ apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/__snapshots__/AppLogsFilterExpanded.spec.tsx.snap (content)
⚔️ apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/__snapshots__/DateTimeModal.spec.tsx.snap (content)
⚔️ apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/__snapshots__/ExportLogsModal.spec.tsx.snap (content)
⚔️ apps/meteor/client/views/marketplace/AppsPage/AppsPageContent.tsx (content)
⚔️ apps/meteor/client/views/mediaCallHistory/CallHistoryPageFilters.tsx (content)
⚔️ apps/meteor/client/views/navigation/sidebar/hooks/usePreventDefault.ts (content)
⚔️ apps/meteor/client/views/navigation/sidepanel/SidepanelItem/RoomSidePanelItem.tsx (content)
⚔️ apps/meteor/client/views/navigation/sidepanel/omnichannel/InquireSidePanelItem.tsx (content)
⚔️ apps/meteor/client/views/omnichannel/analytics/DateRangePicker.tsx (content)
⚔️ apps/meteor/client/views/omnichannel/cannedResponses/components/CannedResponseForm.tsx (content)
⚔️ apps/meteor/client/views/omnichannel/cannedResponses/contextualBar/CannedResponse/__snapshots__/CannedResponseList.spec.tsx.snap (content)
⚔️ apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/steps/__snapshots__/MessageStep.spec.tsx.snap (content)
⚔️ apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/steps/__snapshots__/RecipientStep.spec.tsx.snap (content)
⚔️ apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/steps/__snapshots__/RepliesStep.spec.tsx.snap (content)
⚔️ apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/steps/__snapshots__/ReviewStep.spec.tsx.snap (content)
⚔️ apps/meteor/client/views/omnichannel/departments/DepartmentsTable/DepartmentItemMenu.tsx (content)
⚔️ apps/meteor/client/views/omnichannel/managers/ManagersTable.tsx (content)
⚔️ apps/meteor/client/views/omnichannel/modals/ForwardChatModal.tsx (content)
⚔️ apps/meteor/client/views/room/Header/Omnichannel/QuickActions/hooks/useQuickActions.tsx (content)
⚔️ apps/meteor/client/views/room/Header/RoomToolbox/RoomToolbox.tsx (content)
⚔️ apps/meteor/client/views/room/ImageGallery/hooks/useImagesList.ts (content)
⚔️ apps/meteor/client/views/room/body/__snapshots__/RoomInviteBody.spec.tsx.snap (content)
⚔️ apps/meteor/client/views/room/body/hooks/useHasNewMessages.ts (content)
⚔️ apps/meteor/client/views/room/composer/ComposerBoxPopupUser.tsx (content)
⚔️ apps/meteor/client/views/room/composer/ComposerUserActionIndicator/ComposerUserActionIndicator.tsx (content)
⚔️ apps/meteor/client/views/room/composer/messageBox/MessageBoxActionsToolbar/hooks/useCreateDiscussionAction.tsx (content)
⚔️ apps/meteor/client/views/room/contextualBar/RoomFiles/RoomFilesWithData.tsx (content)
⚔️ apps/meteor/client/views/room/contextualBar/RoomFiles/hooks/useFilesList.ts (content)
⚔️ apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/__snapshots__/InviteUsers.spec.tsx.snap (content)
⚔️ apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersItem.tsx (content)
⚔️ apps/meteor/client/views/room/contextualBar/RoomMembers/__snapshots__/RoomMembers.spec.tsx.snap (content)
⚔️ apps/meteor/client/views/room/contextualBar/Threads/hooks/useLegacyThreadMessageListScrolling.ts (content)
⚔️ apps/meteor/client/views/room/modals/FileUploadModal/__snapshots__/FileUploadModal.spec.tsx.snap (content)
⚔️ apps/meteor/client/views/root/hooks/loggedIn/useForceLogout.ts (content)
⚔️ apps/meteor/definition/externals/meteor/meteor.d.ts (content)
⚔️ apps/meteor/ee/app/livechat-enterprise/server/api/contacts.ts (content)
⚔️ apps/meteor/ee/app/livechat-enterprise/server/business-hour/Multiple.ts (content)
⚔️ apps/meteor/ee/app/livechat-enterprise/server/outboundcomms/rest.ts (content)
⚔️ apps/meteor/ee/server/api/audit.ts (content)
⚔️ apps/meteor/ee/server/api/roles.ts (content)
⚔️ apps/meteor/ee/server/api/sessions.ts (content)
⚔️ apps/meteor/ee/server/apps/communication/rest.ts (content)
⚔️ apps/meteor/ee/server/hooks/federation/index.ts (content)
⚔️ apps/meteor/ee/server/lib/deviceManagement/session.ts (content)
⚔️ apps/meteor/ee/server/local-services/instance/service.ts (content)
⚔️ apps/meteor/ee/server/services/CHANGELOG.md (content)
⚔️ apps/meteor/ee/server/services/package.json (content)
⚔️ apps/meteor/imports/personal-access-tokens/server/api/methods/generateToken.ts (content)
⚔️ apps/meteor/imports/personal-access-tokens/server/api/methods/regenerateToken.ts (content)
⚔️ apps/meteor/imports/personal-access-tokens/server/api/methods/removeToken.ts (content)
⚔️ apps/meteor/jest.config.ts (content)
⚔️ apps/meteor/lib/errors/CloudWorkspaceAccessError.ts (content)
⚔️ apps/meteor/lib/errors/CloudWorkspaceConnectionError.ts (content)
⚔️ apps/meteor/lib/errors/CloudWorkspaceError.ts (content)
⚔️ apps/meteor/lib/errors/CloudWorkspaceLicenseError.ts (content)
⚔️ apps/meteor/lib/errors/CloudWorkspaceRegistrationError.ts (content)
⚔️ apps/meteor/package.json (content)
⚔️ apps/meteor/packages/meteor-run-as-user/lib/collection.overwrites.js (content)
⚔️ apps/meteor/packages/meteor-run-as-user/lib/common.js (content)
⚔️ apps/meteor/packages/meteor-run-as-user/package.js (content)
⚔️ apps/meteor/packages/rocketchat-mongo-config/server/index.js (content)
⚔️ apps/meteor/server/hooks/sauMonitorHooks.ts (content)
⚔️ apps/meteor/server/lib/cas/loginHandler.ts (content)
⚔️ apps/meteor/server/lib/dataExport/exportRoomMessagesToFile.ts (content)
⚔️ apps/meteor/server/lib/eraseRoom.ts (content)
⚔️ apps/meteor/server/lib/logger/logPayloads.ts (content)
⚔️ apps/meteor/server/lib/rooms/roomTypes/direct.ts (content)
⚔️ apps/meteor/server/lib/shouldBreakInVersion.ts (content)
⚔️ apps/meteor/server/methods/messageSearch.ts (content)
⚔️ apps/meteor/server/methods/saveUserProfile.ts (content)
⚔️ apps/meteor/server/modules/listeners/listeners.module.ts (content)
⚔️ apps/meteor/server/services/device-management/events.ts (content)
⚔️ apps/meteor/server/services/device-management/service.ts (content)
⚔️ apps/meteor/server/services/import/service.ts (content)
⚔️ apps/meteor/server/services/meteor/service.ts (content)
⚔️ apps/meteor/server/services/room/service.ts (content)
⚔️ apps/meteor/server/services/sauMonitor/events.ts (content)
⚔️ apps/meteor/server/services/sauMonitor/service.ts (content)
⚔️ apps/meteor/server/services/upload/service.ts (content)
⚔️ apps/meteor/server/settings/federation-service.ts (content)
⚔️ apps/meteor/server/settings/misc.ts (content)
⚔️ apps/meteor/server/startup/callHistoryTestData.ts (content)
⚔️ apps/meteor/server/startup/migrations/xrun.ts (content)
⚔️ apps/meteor/server/startup/serverRunning.ts (content)
⚔️ apps/meteor/tests/data/livechat/custom-fields.ts (content)
⚔️ apps/meteor/tests/data/livechat/department.ts (content)
⚔️ apps/meteor/tests/data/livechat/users.ts (content)
⚔️ apps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.ts (content)
⚔️ apps/meteor/tests/e2e/image-upload.spec.ts (content)
⚔️ apps/meteor/tests/e2e/message-mentions.spec.ts (content)
⚔️ apps/meteor/tests/e2e/omnichannel/omnichannel-chat-transfers.spec.ts (content)
⚔️ apps/meteor/tests/e2e/omnichannel/omnichannel-departaments.spec.ts (content)
⚔️ apps/meteor/tests/e2e/page-objects/auth.ts (content)
⚔️ apps/meteor/tests/e2e/page-objects/fragments/composer.ts (content)
⚔️ apps/meteor/tests/e2e/page-objects/fragments/home-flextab.ts (content)
⚔️ apps/meteor/tests/e2e/page-objects/fragments/index.ts (content)
⚔️ apps/meteor/tests/e2e/page-objects/fragments/menu.ts (content)
⚔️ apps/meteor/tests/e2e/page-objects/fragments/modals/index.ts (content)
⚔️ apps/meteor/tests/e2e/page-objects/fragments/table.ts (content)
⚔️ apps/meteor/tests/e2e/page-objects/fragments/toolbar.ts (content)
⚔️ apps/meteor/tests/e2e/page-objects/home-channel.ts (content)
⚔️ apps/meteor/tests/e2e/page-objects/omnichannel/omnichannel-contact-center/omnichannel-contact-center-chats.ts (content)
⚔️ apps/meteor/tests/e2e/page-objects/omnichannel/omnichannel-departments.ts (content)
⚔️ apps/meteor/tests/e2e/page-objects/omnichannel/omnichannel-livechat.ts (content)
⚔️ apps/meteor/tests/e2e/utils/test.ts (content)
⚔️ apps/meteor/tests/end-to-end/api/chat.ts (content)
⚔️ apps/meteor/tests/end-to-end/api/custom-sounds.ts (content)
⚔️ apps/meteor/tests/end-to-end/api/incoming-integrations.ts (content)
⚔️ apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts (content)
⚔️ apps/meteor/tests/end-to-end/api/livechat/07-queue.ts (content)
⚔️ apps/meteor/tests/end-to-end/api/livechat/contacts.ts (content)
⚔️ apps/meteor/tests/end-to-end/api/settings.ts (content)
⚔️ apps/meteor/tests/end-to-end/apps/video-conferences.ts (content)
⚔️ apps/meteor/tests/mocks/data.ts (content)
⚔️ apps/meteor/tests/unit/app/lib/server/functions/setUsername.spec.ts (content)
⚔️ apps/meteor/tests/unit/definition/rest/v1/teams/TeamsConvertToChannelProps.spec.ts (content)
⚔️ apps/meteor/tests/unit/definition/rest/v1/teams/TeamsDeleteProps.spec.ts (content)
⚔️ apps/meteor/tests/unit/definition/rest/v1/teams/TeamsLeaveProps.spec.ts (content)
⚔️ apps/meteor/tests/unit/definition/rest/v1/teams/TeamsRemoveMemberProps.spec.ts (content)
⚔️ apps/meteor/tests/unit/server/lib/dataExport/exportRoomMessagesToFile.spec.ts (content)
⚔️ apps/meteor/tests/unit/server/services/instance/service.tests.ts (content)
⚔️ apps/meteor/tests/unit/server/users/saveUserIdentity.spec.ts (content)
⚔️ apps/uikit-playground/CHANGELOG.md (content)
⚔️ apps/uikit-playground/package.json (content)
⚔️ docker-compose-ci.yml (content)
⚔️ docker-compose-local.yml (content)
⚔️ ee/apps/account-service/CHANGELOG.md (content)
⚔️ ee/apps/account-service/package.json (content)
⚔️ ee/apps/account-service/src/Account.ts (content)
⚔️ ee/apps/account-service/src/lib/utils.ts (content)
⚔️ ee/apps/account-service/src/service.ts (content)
⚔️ ee/apps/authorization-service/CHANGELOG.md (content)
⚔️ ee/apps/authorization-service/package.json (content)
⚔️ ee/apps/authorization-service/src/service.ts (content)
⚔️ ee/apps/ddp-streamer/CHANGELOG.md (content)
⚔️ ee/apps/ddp-streamer/package.json (content)
⚔️ ee/apps/ddp-streamer/src/Client.ts (content)
⚔️ ee/apps/ddp-streamer/src/DDPStreamer.ts (content)
⚔️ ee/apps/ddp-streamer/src/service.ts (content)
⚔️ ee/apps/omnichannel-transcript/CHANGELOG.md (content)
⚔️ ee/apps/omnichannel-transcript/package.json (content)
⚔️ ee/apps/omnichannel-transcript/src/service.ts (content)
⚔️ ee/apps/presence-service/CHANGELOG.md (content)
⚔️ ee/apps/presence-service/package.json (content)
⚔️ ee/apps/presence-service/src/service.ts (content)
⚔️ ee/apps/queue-worker/CHANGELOG.md (content)
⚔️ ee/apps/queue-worker/package.json (content)
⚔️ ee/apps/queue-worker/src/service.ts (content)
⚔️ ee/packages/abac/CHANGELOG.md (content)
⚔️ ee/packages/abac/package.json (content)
⚔️ ee/packages/federation-matrix/CHANGELOG.md (content)
⚔️ ee/packages/federation-matrix/docker-compose.test.yml (content)
⚔️ ee/packages/federation-matrix/package.json (content)
⚔️ ee/packages/federation-matrix/src/FederationMatrix.ts (content)
⚔️ ee/packages/federation-matrix/src/api/_matrix/invite.ts (content)
⚔️ ee/packages/federation-matrix/src/events/index.ts (content)
⚔️ ee/packages/federation-matrix/src/events/message.ts (content)
⚔️ ee/packages/federation-matrix/src/services/MatrixMediaService.ts (content)
⚔️ ee/packages/federation-matrix/tests/end-to-end/permissions.spec.ts (content)
⚔️ ee/packages/federation-matrix/tsconfig.build.json (content)
⚔️ ee/packages/federation-matrix/tsconfig.json (content)
⚔️ ee/packages/license/CHANGELOG.md (content)
⚔️ ee/packages/license/package.json (content)
⚔️ ee/packages/media-calls/CHANGELOG.md (content)
⚔️ ee/packages/media-calls/package.json (content)
⚔️ ee/packages/media-calls/src/base/BaseAgent.ts (content)
⚔️ ee/packages/media-calls/src/definition/IMediaCallAgent.ts (content)
⚔️ ee/packages/media-calls/src/definition/common.ts (content)
⚔️ ee/packages/media-calls/src/internal/SignalProcessor.ts (content)
⚔️ ee/packages/media-calls/src/internal/agents/CallSignalProcessor.ts (content)
⚔️ ee/packages/media-calls/src/internal/agents/UserActorAgent.ts (content)
⚔️ ee/packages/media-calls/src/server/BroadcastAgent.ts (content)
⚔️ ee/packages/media-calls/src/server/CallDirector.ts (content)
⚔️ ee/packages/media-calls/src/sip/Session.ts (content)
⚔️ ee/packages/media-calls/src/sip/providers/IncomingSipCall.ts (content)
⚔️ ee/packages/media-calls/src/sip/providers/OutgoingSipCall.ts (content)
⚔️ ee/packages/network-broker/CHANGELOG.md (content)
⚔️ ee/packages/network-broker/package.json (content)
⚔️ ee/packages/network-broker/src/NetworkBroker.ts (content)
⚔️ ee/packages/omni-core-ee/CHANGELOG.md (content)
⚔️ ee/packages/omni-core-ee/package.json (content)
⚔️ ee/packages/omnichannel-services/CHANGELOG.md (content)
⚔️ ee/packages/omnichannel-services/package.json (content)
⚔️ ee/packages/omnichannel-services/src/OmnichannelTranscript.ts (content)
⚔️ ee/packages/pdf-worker/CHANGELOG.md (content)
⚔️ ee/packages/pdf-worker/package.json (content)
⚔️ ee/packages/presence/CHANGELOG.md (content)
⚔️ ee/packages/presence/package.json (content)
⚔️ ee/packages/presence/src/Presence.ts (content)
⚔️ ee/packages/ui-theming/package.json (content)
⚔️ ee/packages/ui-theming/src/hooks/useThemeMode.ts (content)
⚔️ package.json (content)
⚔️ packages/agenda/src/Agenda.ts (content)
⚔️ packages/api-client/CHANGELOG.md (content)
⚔️ packages/api-client/package.json (content)
⚔️ packages/apps-engine/CHANGELOG.md (content)
⚔️ packages/apps-engine/deno-runtime/deno.jsonc (content)
⚔️ packages/apps-engine/deno-runtime/handlers/api-handler.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/app/construct.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/app/handleInitialize.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/app/handleOnDisable.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/app/handleOnEnable.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/app/handleOnInstall.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/app/handleOnPreSettingUpdate.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/app/handleOnSettingUpdated.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/app/handleOnUninstall.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/app/handleOnUpdate.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/app/handleSetStatus.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/app/handleUploadEvents.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/app/handler.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/lib/assertions.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/listener/handler.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/outboundcomms-handler.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/scheduler-handler.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/slashcommand-handler.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/tests/api-handler.test.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/tests/scheduler-handler.test.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/tests/uikit-handler.test.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/tests/videoconference-handler.test.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/uikit/handler.ts (content)
⚔️ packages/apps-engine/deno-runtime/handlers/videoconference-handler.ts (content)
⚔️ packages/apps-engine/deno-runtime/main.ts (content)
⚔️ packages/apps-engine/package.json (content)
⚔️ packages/apps/CHANGELOG.md (content)
⚔️ packages/apps/package.json (content)
⚔️ packages/core-services/CHANGELOG.md (content)
⚔️ packages/core-services/package.json (content)
⚔️ packages/core-services/src/LocalBroker.ts (content)
⚔️ packages/core-services/src/events/Events.ts (content)
⚔️ packages/core-services/src/types/IFederationMatrixService.ts (content)
⚔️ packages/core-services/src/types/IUploadService.ts (content)
⚔️ packages/core-services/src/types/ServiceClass.ts (content)
⚔️ packages/core-typings/CHANGELOG.md (content)
⚔️ packages/core-typings/package.json (content)
⚔️ packages/core-typings/src/IBanner.ts (content)
⚔️ packages/core-typings/src/ILivechatAgent.ts (content)
⚔️ packages/core-typings/src/IMessage/MessageAttachment/Files/FileAttachmentProps.ts (content)
⚔️ packages/core-typings/src/IMessage/MessageAttachment/Files/index.ts (content)
⚔️ packages/core-typings/src/IMessage/MessageAttachment/MessageAttachment.ts (content)
⚔️ packages/core-typings/src/IStats.ts (content)
⚔️ packages/core-typings/src/IUpload.ts (content)
⚔️ packages/core-typings/src/cloud/WorkspaceLicensePayload.ts (content)
⚔️ packages/core-typings/src/cloud/WorkspaceSyncPayload.ts (content)
⚔️ packages/core-typings/src/cloud/index.ts (content)
⚔️ packages/core-typings/src/mediaCalls/IMediaCall.ts (content)
⚔️ packages/core-typings/src/utils.ts (content)
⚔️ packages/cron/CHANGELOG.md (content)
⚔️ packages/cron/package.json (content)
⚔️ packages/cron/src/index.ts (content)
⚔️ packages/ddp-client/CHANGELOG.md (content)
⚔️ packages/ddp-client/__examples__/simple.ts (content)
⚔️ packages/ddp-client/package.json (content)
⚔️ packages/ddp-client/src/ClientStream.ts (content)
⚔️ packages/ddp-client/src/Connection.ts (content)
⚔️ packages/ddp-client/src/DDPSDK.ts (content)
⚔️ packages/ddp-client/src/types/streams.ts (content)
⚔️ packages/ddp-client/tsconfig.json (content)
⚔️ packages/eslint-config/package.json (content)
⚔️ packages/eslint-config/standard/index.js (content)
⚔️ packages/fuselage-ui-kit/.eslintrc.json (content)
⚔️ packages/fuselage-ui-kit/CHANGELOG.md (content)
⚔️ packages/fuselage-ui-kit/package.json (content)
⚔️ packages/fuselage-ui-kit/src/blocks/VideoConferenceBlock/VideoConferenceBlock.tsx (content)
⚔️ packages/fuselage-ui-kit/src/elements/ButtonElement.tsx (content)
⚔️ packages/fuselage-ui-kit/src/elements/ChannelsSelectElement/ChannelsSelectElement.tsx (content)
⚔️ packages/fuselage-ui-kit/src/elements/ChannelsSelectElement/MultiChannelsSelectElement.tsx (content)
⚔️ packages/fuselage-ui-kit/src/elements/IconButtonElement.tsx (content)
⚔️ packages/fuselage-ui-kit/src/elements/MultiStaticSelectElement.tsx (content)
⚔️ packages/fuselage-ui-kit/src/elements/OverflowElement.tsx (content)
⚔️ packages/fuselage-ui-kit/src/elements/StaticSelectElement.tsx (content)
⚔️ packages/fuselage-ui-kit/src/elements/TabElement.tsx (content)
⚔️ packages/fuselage-ui-kit/src/elements/UsersSelectElement/MultiUsersSelectElement.tsx (content)
⚔️ packages/fuselage-ui-kit/src/elements/UsersSelectElement/UsersSelectElement.tsx (content)
⚔️ packages/gazzodown/CHANGELOG.md (content)
⚔️ packages/gazzodown/package.json (content)
⚔️ packages/http-router/CHANGELOG.md (content)
⚔️ packages/http-router/package.json (content)
⚔️ packages/http-router/src/Router.ts (content)
⚔️ packages/i18n/CHANGELOG.md (content)
⚔️ packages/i18n/package.json (content)
⚔️ packages/i18n/src/locales/da.i18n.json (content)
⚔️ packages/i18n/src/locales/de.i18n.json (content)
⚔️ packages/i18n/src/locales/en.i18n.json (content)
⚔️ packages/i18n/src/locales/fi.i18n.json (content)
⚔️ packages/i18n/src/locales/hi-IN.i18n.json (content)
⚔️ packages/i18n/src/locales/hu.i18n.json (content)
⚔️ packages/i18n/src/locales/nb.i18n.json (content)
⚔️ packages/i18n/src/locales/nn.i18n.json (content)
⚔️ packages/i18n/src/locales/pl.i18n.json (content)
⚔️ packages/i18n/src/locales/pt-BR.i18n.json (content)
⚔️ packages/i18n/src/locales/ru.i18n.json (content)
⚔️ packages/i18n/src/locales/sv.i18n.json (content)
⚔️ packages/i18n/src/locales/zh.i18n.json (content)
⚔️ packages/i18n/tsconfig.json (content)
⚔️ packages/instance-status/CHANGELOG.md (content)
⚔️ packages/instance-status/package.json (content)
⚔️ packages/instance-status/src/index.ts (content)
⚔️ packages/jest-presets/package.json (content)
⚔️ packages/livechat/.eslintrc.json (content)
⚔️ packages/livechat/CHANGELOG.md (content)
⚔️ packages/livechat/package.json (content)
⚔️ packages/livechat/src/components/App/App.tsx (content)
⚔️ packages/livechat/src/components/Messages/MessageList/index.js (content)
⚔️ packages/livechat/src/components/Messages/TypingDots/index.tsx (content)
⚔️ packages/livechat/src/definitions/agents.d.ts (content)
⚔️ packages/livechat/src/entry.ts (content)
⚔️ packages/livechat/src/helpers/canRenderMessage.ts (content)
⚔️ packages/livechat/src/helpers/formatAgent.ts (content)
⚔️ packages/livechat/src/hooks/livechatRoomSubscriptionHooks.ts (content)
⚔️ packages/livechat/src/hooks/useRoomMessagesSubscription.ts (content)
⚔️ packages/livechat/src/lib/connection.ts (content)
⚔️ packages/livechat/src/lib/hooks.ts (content)
⚔️ packages/livechat/src/lib/transcript.ts (content)
⚔️ packages/livechat/src/lib/triggerUtils.ts (content)
⚔️ packages/livechat/src/store/index.tsx (content)
⚔️ packages/logger/package.json (content)
⚔️ packages/media-signaling/package.json (content)
⚔️ packages/media-signaling/src/definition/call/IClientMediaCall.ts (content)
⚔️ packages/media-signaling/src/definition/signals/client/answer.ts (content)
⚔️ packages/media-signaling/src/definition/signals/client/request-call.ts (content)
⚔️ packages/media-signaling/src/definition/signals/server/notification.ts (content)
⚔️ packages/media-signaling/src/lib/Call.ts (content)
⚔️ packages/media-signaling/src/lib/Session.ts (content)
⚔️ packages/media-signaling/src/lib/TransportWrapper.ts (content)
⚔️ packages/message-parser/CHANGELOG.md (content)
⚔️ packages/message-parser/package.json (content)
⚔️ packages/message-parser/src/grammar.pegjs (content)
⚔️ packages/message-parser/tests/link.test.ts (content)
⚔️ packages/mock-providers/CHANGELOG.md (content)
⚔️ packages/mock-providers/package.json (content)
⚔️ packages/mock-providers/src/MockedAppRootBuilder.tsx (content)
⚔️ packages/model-typings/CHANGELOG.md (content)
⚔️ packages/model-typings/package.json (content)
⚔️ packages/model-typings/src/models/IAbacAttributesModel.ts (content)
⚔️ packages/model-typings/src/models/ILivechatContactsModel.ts (content)
⚔️ packages/model-typings/src/models/ILivechatCustomFieldModel.ts (content)
⚔️ packages/model-typings/src/models/IMediaCallsModel.ts (content)
⚔️ packages/model-typings/src/models/ISmarshHistoryModel.ts (content)
⚔️ packages/model-typings/src/models/IUploadsModel.ts (content)
⚔️ packages/model-typings/src/models/IUsersModel.ts (content)
⚔️ packages/models/CHANGELOG.md (content)
⚔️ packages/models/package.json (content)
⚔️ packages/models/src/models/LivechatContacts.ts (content)
⚔️ packages/models/src/models/LivechatCustomField.ts (content)
⚔️ packages/models/src/models/MediaCalls.ts (content)
⚔️ packages/models/src/models/Uploads.ts (content)
⚔️ packages/models/src/models/Users.ts (content)
⚔️ packages/omni-core/CHANGELOG.md (content)
⚔️ packages/omni-core/package.json (content)
⚔️ packages/rest-typings/CHANGELOG.md (content)
⚔️ packages/rest-typings/package.json (content)
⚔️ packages/rest-typings/src/default/index.ts (content)
⚔️ packages/rest-typings/src/v1/assets.ts (content)
⚔️ packages/rest-typings/src/v1/auth.ts (content)
⚔️ packages/rest-typings/src/v1/autotranslate/AutotranslateGetSupportedLanguagesParamsGET.ts (content)
⚔️ packages/rest-typings/src/v1/autotranslate/AutotranslateSaveSettingsParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/autotranslate/AutotranslateTranslateMessageParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/banners.ts (content)
⚔️ packages/rest-typings/src/v1/calendar/CalendarEventCreateProps.ts (content)
⚔️ packages/rest-typings/src/v1/calendar/CalendarEventDeleteProps.ts (content)
⚔️ packages/rest-typings/src/v1/calendar/CalendarEventImportProps.ts (content)
⚔️ packages/rest-typings/src/v1/calendar/CalendarEventInfoProps.ts (content)
⚔️ packages/rest-typings/src/v1/calendar/CalendarEventListProps.ts (content)
⚔️ packages/rest-typings/src/v1/calendar/CalendarEventUpdateProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsAddAllProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsArchiveProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsConvertToTeamProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsCreateProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsDeleteProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsFilesListProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsGetAllUserMentionsByChannelProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsGetIntegrationsProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsHistoryProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsInviteProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsJoinProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsKickProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsLeaveProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsListProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsMessagesProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsModeratorsProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsOnlineProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsOpenProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsRenameProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsRolesProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsSetAnnouncementProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsSetCustomFieldsProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsSetDefaultProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsSetDescriptionProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsSetJoinCodeProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsSetPurposeProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsSetReadOnlyProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsSetTopicProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsSetTypeProps.ts (content)
⚔️ packages/rest-typings/src/v1/channels/ChannelsUnarchiveProps.ts (content)
⚔️ packages/rest-typings/src/v1/cloud.ts (content)
⚔️ packages/rest-typings/src/v1/customUserStatus.ts (content)
⚔️ packages/rest-typings/src/v1/directory.ts (content)
⚔️ packages/rest-typings/src/v1/dm/DmCloseProps.ts (content)
⚔️ packages/rest-typings/src/v1/dm/DmCreateProps.ts (content)
⚔️ packages/rest-typings/src/v1/dm/DmFileProps.ts (content)
⚔️ packages/rest-typings/src/v1/dm/DmHistoryProps.ts (content)
⚔️ packages/rest-typings/src/v1/dm/DmLeaveProps.ts (content)
⚔️ packages/rest-typings/src/v1/dm/DmMembersProps.ts (content)
⚔️ packages/rest-typings/src/v1/dm/DmMessagesProps.ts (content)
⚔️ packages/rest-typings/src/v1/e2e.ts (content)
⚔️ packages/rest-typings/src/v1/e2e/e2eGetUsersOfRoomWithoutKeyParamsGET.ts (content)
⚔️ packages/rest-typings/src/v1/e2e/e2eSetUserPublicAndPrivateKeysParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/e2e/e2eUpdateGroupKeyParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/email-inbox.ts (content)
⚔️ packages/rest-typings/src/v1/emojiCustom.ts (content)
⚔️ packages/rest-typings/src/v1/federation/FederationAddServerProps.ts (content)
⚔️ packages/rest-typings/src/v1/federation/FederationJoinExternalPublicRoomProps.ts (content)
⚔️ packages/rest-typings/src/v1/federation/FederationPublicRoomsProps.ts (content)
⚔️ packages/rest-typings/src/v1/federation/FederationRemoveServerProps.ts (content)
⚔️ packages/rest-typings/src/v1/federation/FederationVerifyMatrixIdProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/BaseProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsAddAllProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsArchiveProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsConvertToTeamProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsCountersProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsCreateProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsDeleteProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsFilesProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsGetIntegrationsProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsHistoryProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsLeaveProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsListProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsMembersProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsMessagesProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsOnlineProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsRenameProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsRolesProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsSetAnnouncementProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsSetCustomFieldsProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsSetDescriptionProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsSetEncryptedProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsSetPurposeProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsSetReadOnlyProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsSetTopicProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsSetTypeProps.ts (content)
⚔️ packages/rest-typings/src/v1/groups/GroupsUnarchiveProps.ts (content)
⚔️ packages/rest-typings/src/v1/import/DownloadPendingAvatarsParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/import/DownloadPendingFilesParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/import/DownloadPublicImportFileParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/import/GetCurrentImportOperationParamsGET.ts (content)
⚔️ packages/rest-typings/src/v1/import/GetImportFileDataParamsGET.ts (content)
⚔️ packages/rest-typings/src/v1/import/GetImportProgressParamsGET.ts (content)
⚔️ packages/rest-typings/src/v1/import/GetLatestImportOperationsParamsGET.ts (content)
⚔️ packages/rest-typings/src/v1/import/ImportAddUsersParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/import/ImportersListParamsGET.ts (content)
⚔️ packages/rest-typings/src/v1/import/StartImportParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/import/UploadImportFileParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/integrations/IntegrationsCreateProps.ts (content)
⚔️ packages/rest-typings/src/v1/integrations/IntegrationsGetProps.ts (content)
⚔️ packages/rest-typings/src/v1/integrations/IntegrationsHistoryProps.ts (content)
⚔️ packages/rest-typings/src/v1/integrations/IntegrationsListProps.ts (content)
⚔️ packages/rest-typings/src/v1/integrations/IntegrationsRemoveProps.ts (content)
⚔️ packages/rest-typings/src/v1/integrations/IntegrationsUpdateProps.ts (content)
⚔️ packages/rest-typings/src/v1/integrations/hooks/IntegrationHooksAddProps.ts (content)
⚔️ packages/rest-typings/src/v1/integrations/hooks/IntegrationHooksRemoveProps.ts (content)
⚔️ packages/rest-typings/src/v1/invites.ts (content)
⚔️ packages/rest-typings/src/v1/ldap.ts (content)
⚔️ packages/rest-typings/src/v1/licenses.ts (content)
⚔️ packages/rest-typings/src/v1/mailer/MailerParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/mailer/MailerUnsubscribeParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/misc.ts (content)
⚔️ packages/rest-typings/src/v1/moderation/ReportInfoParams.ts (content)
⚔️ packages/rest-typings/src/v1/omnichannel.ts (content)
⚔️ packages/rest-typings/src/v1/push.ts (content)
⚔️ packages/rest-typings/src/v1/roles.ts (content)
⚔️ packages/rest-typings/src/v1/server-events/ServerEventsAuditSettingsParamsGET.ts (content)
⚔️ packages/rest-typings/src/v1/statistics.ts (content)
⚔️ packages/rest-typings/src/v1/subscriptionsEndpoints.ts (content)
⚔️ packages/rest-typings/src/v1/teams/TeamsAddMembersProps.ts (content)
⚔️ packages/rest-typings/src/v1/teams/TeamsConvertToChannelProps.ts (content)
⚔️ packages/rest-typings/src/v1/teams/TeamsDeleteProps.ts (content)
⚔️ packages/rest-typings/src/v1/teams/TeamsLeaveProps.ts (content)
⚔️ packages/rest-typings/src/v1/teams/TeamsRemoveMemberProps.ts (content)
⚔️ packages/rest-typings/src/v1/teams/TeamsRemoveRoomProps.ts (content)
⚔️ packages/rest-typings/src/v1/teams/TeamsUpdateMemberProps.ts (content)
⚔️ packages/rest-typings/src/v1/teams/TeamsUpdateProps.ts (content)
⚔️ packages/rest-typings/src/v1/users.ts (content)
⚔️ packages/rest-typings/src/v1/users/UserCreateParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/users/UserDeactivateIdleParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/users/UserLogoutParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/users/UserRegisterParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/users/UserSetActiveStatusParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/users/UsersAutocompleteParamsGET.ts (content)
⚔️ packages/rest-typings/src/v1/users/UsersCheckUsernameAvailabilityParamsGET.ts (content)
⚔️ packages/rest-typings/src/v1/users/UsersInfoParamsGet.ts (content)
⚔️ packages/rest-typings/src/v1/users/UsersListStatusParamsGET.ts (content)
⚔️ packages/rest-typings/src/v1/users/UsersListTeamsParamsGET.ts (content)
⚔️ packages/rest-typings/src/v1/users/UsersSendConfirmationEmailParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/users/UsersSetAvatarParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/users/UsersSetPreferenceParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/users/UsersUpdateOwnBasicInfoParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/users/UsersUpdateParamsPOST.ts (content)
⚔️ packages/rest-typings/src/v1/videoConference/VideoConfCancelProps.ts (content)
⚔️ packages/rest-typings/src/v1/videoConference/VideoConfInfoProps.ts (content)
⚔️ packages/rest-typings/src/v1/videoConference/VideoConfJoinProps.ts (content)
⚔️ packages/rest-typings/src/v1/videoConference/VideoConfListProps.ts (content)
⚔️ packages/rest-typings/src/v1/videoConference/VideoConfStartProps.ts (content)
⚔️ packages/storybook-config/package.json (content)
⚔️ packages/tools/src/index.ts (content)
⚔️ packages/tools/src/isRecord.spec.ts (content)
⚔️ packages/tools/src/isRecord.ts (content)
⚔️ packages/tracing/package.json (content)
⚔️ packages/ui-avatar/CHANGELOG.md (content)
⚔️ packages/ui-avatar/package.json (content)
⚔️ packages/ui-client/.eslintrc.json (content)
⚔️ packages/ui-client/CHANGELOG.md (content)
⚔️ packages/ui-client/package.json (content)
⚔️ packages/ui-client/src/components/Modal/GenericModal/GenericModal.tsx (content)
⚔️ packages/ui-client/src/components/Wizard/__snapshots__/Wizard.spec.tsx.snap (content)
⚔️ packages/ui-client/src/components/Wizard/__snapshots__/WizardActions.spec.tsx.snap (content)
⚔️ packages/ui-client/src/components/Wizard/useWizard.tsx (content)
⚔️ packages/ui-client/src/hooks/useLicense.ts (content)
⚔️ packages/ui-client/src/views/setupWizard/providers/SetupWizardProvider.tsx (content)
⚔️ packages/ui-client/src/views/setupWizard/steps/AdminInfoStep.tsx (content)
⚔️ packages/ui-client/src/views/setupWizard/steps/RegisterServerStep.tsx (content)
⚔️ packages/ui-composer/package.json (content)
⚔️ packages/ui-composer/src/MessageComposer/__snapshots__/MessageComposer.spec.tsx.snap (content)
⚔️ packages/ui-contexts/.eslintrc.json (content)
⚔️ packages/ui-contexts/CHANGELOG.md (content)
⚔️ packages/ui-contexts/package.json (content)
⚔️ packages/ui-contexts/src/hooks/useLogout.ts (content)
⚔️ packages/ui-kit/package.json (content)
⚔️ packages/ui-kit/tsconfig.json (content)
⚔️ packages/ui-video-conf/CHANGELOG.md (content)
⚔️ packages/ui-video-conf/package.json (content)
⚔️ packages/ui-video-conf/src/VideoConfMessage/__snapshots__/VideoConfMessage.spec.tsx.snap (content)
⚔️ packages/ui-video-conf/src/VideoConfPopup/__snapshots__/VideoConfPopup.spec.tsx.snap (content)
⚔️ packages/ui-voip/.eslintrc.json (content)
⚔️ packages/ui-voip/CHANGELOG.md (content)
⚔️ packages/ui-voip/package.json (content)
⚔️ packages/ui-voip/src/context/MediaCallProvider.tsx (content)
⚔️ packages/ui-voip/src/context/useDesktopNotifications.ts (content)
⚔️ packages/ui-voip/src/context/useMediaSession.ts (content)
⚔️ packages/ui-voip/src/context/useMediaSessionInstance.ts (content)
⚔️ packages/ui-voip/src/context/useTonePlayer.ts (content)
⚔️ packages/ui-voip/src/hooks/VoipPopupDraggable/DraggableCore.ts (content)
⚔️ packages/ui-voip/src/hooks/VoipPopupDraggable/useDraggable.stories.tsx (content)
⚔️ packages/ui-voip/src/hooks/useDevicePermissionPrompt.tsx (content)
⚔️ packages/ui-voip/src/views/CallHistoryContextualbar/__snapshots__/CallHistoryContextualbar.spec.tsx.snap (content)
⚔️ packages/ui-voip/src/views/MediaCallWidget/__snapshots__/MediaCallWidget.spec.tsx.snap (content)
⚔️ packages/ui-voip/src/views/PermissionFlow/__snapshots__/PermissionFlowModal.spec.tsx.snap (content)
⚔️ packages/web-ui-registration/.eslintrc.json (content)
⚔️ packages/web-ui-registration/CHANGELOG.md (content)
⚔️ packages/web-ui-registration/package.json (content)
⚔️ packages/web-ui-registration/src/ResetPasswordForm.tsx (content)
⚔️ packages/web-ui-registration/src/components/LoginSwitchLanguageFooter.tsx (content)
⚔️ yarn.lock (content)

These conflicts must be resolved before merging into develop.
Resolve conflicts locally and push changes to this branch.
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: replacing any types with proper TypeScript interfaces in the livechat store, which is accurately reflected in all the changes across multiple files.
Linked Issues check ✅ Passed All coding objectives from issue #38337 are met: 19 any annotations replaced with proper types, livechat-specific interfaces introduced in types.ts, core types reused, and changes remain type-only with no runtime modifications.
Out of Scope Changes check ✅ Passed All changes are scoped to the stated objective of replacing any types with proper TypeScript interfaces; supporting changes to helper functions and connection.ts are necessary consequences of the stricter typing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@KevLehman KevLehman added the area: ui/ux Related to UI/UX, frontend code, accessibility, and user interaction label Jan 26, 2026
@dougfabris
Copy link
Copy Markdown
Member

@MartinSchoeler could you take a look on this one?

@Agarwalchetan
Copy link
Copy Markdown
Contributor Author

Hi! Just checking in to see if this PR looks okay or if any changes are needed. Happy to make updates if required.

@KevLehman KevLehman added the valid A valid contribution where maintainers will review based on priority label Feb 14, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.45%. Comparing base (508b4a1) to head (fb34a2b).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #38339      +/-   ##
===========================================
- Coverage    70.51%   70.45%   -0.07%     
===========================================
  Files         3176     3176              
  Lines       111139   111139              
  Branches     20050    20055       +5     
===========================================
- Hits         78367    78298      -69     
- Misses       30721    30802      +81     
+ Partials      2051     2039      -12     
Flag Coverage Δ
e2e 60.25% <ø> (-0.22%) ⬇️
e2e-api 47.71% <ø> (-0.06%) ⬇️
unit 71.52% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Fix Alert creation in connection.ts to use proper Alert type
- Make Agent.ts property optional as not always provided by API
- Update upsertMessage to accept properly typed message object
- Update formatAgent to handle undefined input explicitly
- Fix canRenderMessage to handle messages without type property

These fixes address all 9 TypeScript errors revealed by CI after
replacing any types in the store with proper interfaces.
@Agarwalchetan Agarwalchetan force-pushed the refactor/livechat-typescript-types branch from 93fe35a to a9e7dfc Compare February 16, 2026 16:54
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
packages/livechat/src/helpers/canRenderMessage.ts (1)

34-37: Remove inline comment per coding guidelines.

Line 36 contains an explanatory comment. The early-return pattern is self-explanatory given the optional parameter.

Proposed fix
 export const canRenderMessage = ({ t }: { t?: string }) => {
 	if (!t) {
-		return true; // Messages without a type should be rendered
+		return true;
 	}

As per coding guidelines: **/*.{ts,tsx,js}: "Avoid code comments in the implementation".

packages/livechat/src/lib/triggerUtils.ts (1)

77-84: as any cast undermines the type-safety goal of this PR.

The explicit parameter type is a good step, but casting to any at the call site negates the benefit—the upsert helper receives an untyped value. Consider narrowing the cast to a more specific type (e.g., as IMessage) or adjusting the upsert generic signature to accept this shape, so that at least some type checking is preserved at the boundary.

Also, the inline comment on line 81 should be removed per coding guidelines. As per coding guidelines, **/*.{ts,tsx,js}: Avoid code comments in the implementation.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0955f73 and a9e7dfc.

📒 Files selected for processing (5)
  • packages/livechat/src/definitions/agents.d.ts
  • packages/livechat/src/helpers/canRenderMessage.ts
  • packages/livechat/src/helpers/formatAgent.ts
  • packages/livechat/src/lib/connection.ts
  • packages/livechat/src/lib/triggerUtils.ts
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • packages/livechat/src/lib/triggerUtils.ts
  • packages/livechat/src/definitions/agents.d.ts
  • packages/livechat/src/helpers/canRenderMessage.ts
  • packages/livechat/src/lib/connection.ts
  • packages/livechat/src/helpers/formatAgent.ts
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to **/*.{ts,tsx,js} : Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 37496
File: packages/apps-engine/src/server/runtime/deno/ProcessMessenger.ts:5-5
Timestamp: 2025-11-16T14:23:18.933Z
Learning: In TypeScript, when a constant is used with `typeof` in a type position (e.g., `type Message = SomeType | typeof SOME_CONSTANT`), it's a type-level operation that doesn't require the runtime value. In such cases, `import type { SOME_CONSTANT }` is correct and appropriate.
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to **/*.{ts,tsx,js} : Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests

Applied to files:

  • packages/livechat/src/definitions/agents.d.ts
🧬 Code graph analysis (2)
packages/livechat/src/lib/triggerUtils.ts (1)
apps/meteor/client/meteor/minimongo/LocalCollection.ts (1)
  • upsert (563-592)
packages/livechat/src/lib/connection.ts (2)
packages/livechat/src/lib/room.js (1)
  • alert (89-89)
packages/livechat/src/store/types.ts (1)
  • Alert (6-13)
🔇 Additional comments (6)
packages/livechat/src/lib/connection.ts (3)

5-5: Good use of import type for the Alert interface.

Since Alert is only used in a type position (the parameter annotation on displayAlert), import type is the correct choice here — it ensures the import is erased at compile time.


62-65: Clean refactor: strong typing + immutable update.

Replacing the mutable .push() with an immutable spread is a solid improvement — it avoids mutating the store's state array in place, which aligns better with the store's setState pattern. The Alert parameter type ensures all call sites pass valid alert objects.


67-81: Call sites conform to the Alert interface.

Both handleConnected and handleDisconnected pass objects that satisfy the Alert interface correctly (id, children, plus the appropriate optional flags).

packages/livechat/src/helpers/formatAgent.ts (1)

13-31: LGTM!

Clean handling of the undefined case. The narrowing via if (!agent) is correct and the return type is properly inferred.

packages/livechat/src/definitions/agents.d.ts (1)

3-16: Remove duplicate username property on line 9.

username: string is declared twice (lines 4 and 9) in the Agent type definition. TypeScript will fail to compile with duplicate property keys in object type literals—this prevents the code from building.

packages/livechat/src/lib/triggerUtils.ts (1)

77-77: u typed as AgentPromise allows null — is that intentional?

AgentPromise is { username: string } | Serialized<ILivechatAgent> | null. A null sender on a message object is likely invalid. If the caller is expected to resolve the agent before calling upsertMessage, consider excluding null from this field's type (e.g., u: NonNullable<AgentPromise>).

- Fix prettier formatting in formatAgent.ts (indentation)
- Fix import order in connection.ts (type imports after local)
- Fix prettier formatting in triggerUtils.ts (multiline params)
- Fix alert ID type cast in connection.ts
- Update Agent type to match AgentType interface:
  - Add emails, phone, customFields with proper structure
  - Make username optional (not always provided by API)
  - Remove duplicate username field
@Agarwalchetan Agarwalchetan force-pushed the refactor/livechat-typescript-types branch from 2f9497e to 653b51b Compare February 16, 2026 17:10
- Fix formatAgent.ts prettier indentation (proper tabs)
- Remove unused AgentType definition
- Update Agent type to support phone as string or array
- Add phone type check in formatAgent (string vs array)
- Fix alert ID filtering with proper type assertion
- Import Agent type in formatAgent

All lint and typecheck tests now pass locally.
@Agarwalchetan Agarwalchetan force-pushed the refactor/livechat-typescript-types branch from d742a02 to 0605b67 Compare February 16, 2026 17:25
Agarwalchetan and others added 4 commits February 16, 2026 22:55
Resolved conflicts between our improved type-safe code and develop:
- clearAlerts: kept our version with proper alert ID type assertion
- displayAlert: kept our version with await and immutable array spread

Both methods now properly handle types and async operations.
- Fix import order in formatAgent.ts (regular before type imports)
- Fix prettier indentation in formatAgent.ts (proper tabs)
- Add type cast in triggerUtils.ts for agent as AgentPromise

All lint and typecheck tests now pass.
Ran prettier --write on formatAgent.ts to fix indentation issues that were causing CI lint failures.
@Agarwalchetan
Copy link
Copy Markdown
Contributor Author

Hi, just a gentle follow-up on this PR in case it got buried.
Please let me know if any changes or clarifications are needed.
Happy to update accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui/ux Related to UI/UX, frontend code, accessibility, and user interaction valid A valid contribution where maintainers will review based on priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(livechat): replace any types in Livechat store with proper TypeScript interfaces

3 participants