Skip to content

Conversation

@gabriellsh
Copy link
Member

@gabriellsh gabriellsh commented Dec 16, 2025

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • New Features
    • New Call History page with browsing, filtering, debounced search, sorting and pagination
    • Filters for direction (inbound/outbound) and call status; localized UI text
    • Integrated Call History link in the navigation bar and contextual side panels for details and user info
    • Detailed call list showing contact type (internal/external/unknown), duration, status, time/date, and contextual actions (e.g., voice call)
    • New table and row layouts for improved call-history display and interactions

✏️ Tip: You can customize this high-level summary in your review settings.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 16, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Dec 16, 2025

⚠️ No Changeset found

Latest commit: 50a74af

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
Contributor

coderabbitai bot commented Dec 16, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds a Call History feature: new route and page, React Query data fetching with filters/sorting/pagination, table and row components, contextual bars, NavBar integration, UI kit updates, i18n keys, and API surface exports across Meteor app and ui-voip package.

Changes

Cohort / File(s) Summary
NavBar & routing
apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsMenu.tsx, apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsWithCall.tsx, apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsWithData.tsx, apps/meteor/client/NavBarV2/NavBarVoipGroup/NavBarVoipGroup.tsx, apps/meteor/client/startup/routes.tsx
Threaded new optional callHistoryItem prop through NavBar components; added NavBar item for call history; registered /call-history/:tab?/:historyId? route and extended router paths.
Call History page & filters
apps/meteor/client/views/mediaCallHistory/CallHistoryPage.tsx, apps/meteor/client/views/mediaCallHistory/CallHistoryPageFilters.tsx
New CallHistoryPage with react-query fetching, debounced search, filters, sorting, pagination; added useCallHistoryPageFilters and presentational filter component.
Contextual bars & internal actions
apps/meteor/client/views/mediaCallHistory/MediaCallHistoryContextualbar.tsx, apps/meteor/client/views/mediaCallHistory/MediaCallHistoryContextualbarRoom.tsx, apps/meteor/client/views/mediaCallHistory/MediaCallHistoryInternal.tsx, apps/meteor/client/views/mediaCallHistory/useMediaCallInternalHistoryActions.ts
Refactored contextual bar to prop-driven API and added room wrapper; MediaCallHistoryInternal gains room/user-info props; useMediaCallInternalHistoryActions refactored to accept an options object and new fields (openRoomId, messageRoomId, openUserInfo).
Row components & table UI (ui-voip)
packages/ui-voip/src/views/MediaCallHistoryTable/MediaCallHistoryTable.tsx, .../CallHistoryTableRow.tsx, .../CallHistoryTableDirection.tsx, .../CallHistoryTableStatus.tsx, .../CallHistoryTableUnknownContact.tsx, packages/ui-voip/src/views/MediaCallHistoryTable/MediaCallHistoryTable.stories.tsx, packages/ui-voip/src/views/MediaCallHistoryTable/index.ts
Added MediaCallHistoryTable and related row/cell components (direction, status, unknown contact), types and storybook story; exports aggregated via new index.
Row wrappers (Meteor)
apps/meteor/client/views/mediaCallHistory/CallHistoryRowExternalUser.tsx, apps/meteor/client/views/mediaCallHistory/CallHistoryRowInternalUser.tsx, apps/meteor/client/views/mediaCallHistory/CallHistoryRowUnknownUser.tsx
New per-contact row components that render CallHistoryTableRow with appropriate menus/actions and click handlers.
UI-voip components & exports
packages/ui-voip/src/components/CallHistoryExternalUser.tsx, packages/ui-voip/src/components/index.ts, packages/ui-voip/src/index.ts, packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryContextualbar.tsx
CallHistoryExternalUser gains optional showIcon prop; exported new components from package index; replaced local imports with shared component barrel.
Message payload helper
packages/ui-voip/src/ui-kit/getHistoryMessagePayload.ts
Added getCallDurationText helper and refactored getFormattedCallDuration to use it.
UI client MultiSelect changes
packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustom.tsx, packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustomList.tsx
Extended OptionProp with optional structured icon field and added rendering with color mapping.
i18n
packages/i18n/src/locales/en.i18n.json
Added translation keys: All_directions, Call_history, Ended, Inbound, Search_calls, Time_slash_Date, Not_answered, Unknown, Outbound.
Misc. room integration
apps/meteor/client/views/room/providers/hooks/useCoreRoomRoutes.ts
Switched tab component import to MediaCallHistoryContextualbarRoom; no public API change.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant NavBar
    participant Router
    participant CallHistoryPage
    participant ReactQuery
    participant Server
    participant MediaTable
    participant ContextBar

    User->>NavBar: Click "Call history"
    NavBar->>Router: navigate('/call-history')
    Router->>CallHistoryPage: mount
    CallHistoryPage->>ReactQuery: query call-history.list(filters, sort, page)
    ReactQuery->>Server: GET /v1/call-history.list
    Server-->>ReactQuery: return data
    ReactQuery-->>CallHistoryPage: data ready
    CallHistoryPage->>MediaTable: render rows

    User->>MediaTable: click row
    MediaTable->>ContextBar: open(details for historyId)
    ContextBar->>Server: fetch call-history.info(historyId)
    Server-->>ContextBar: details
    ContextBar->>User: render details & actions (voiceCall, openUserInfo)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

  • Focus areas:
    • apps/meteor/client/views/mediaCallHistory/CallHistoryPage.tsx — data fetching, debouncing, pagination and row transformation
    • apps/meteor/client/views/mediaCallHistory/useMediaCallInternalHistoryActions.ts — API shape change and navigation logic
    • apps/meteor/client/views/mediaCallHistory/MediaCallHistoryContextualbar.tsx — prop-driven refactor and query key handling
    • Prop threading: NavBar components (NavBarControls*) and new callHistoryItem prop usage
    • Type and export surface changes in packages/ui-voip and packages/ui-client

Possibly related PRs

Suggested reviewers

  • tassoevan
  • ricardogarim
  • gabriellsh

Poem

🐰 In burrows of code I hop and sing,
I threaded history through NavBar string.
Routes and tables, filters that play,
Click a row — details leap into day.
A carrot of features, fresh and spry — hip hop hooray! 🥕📞

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: Call History Table' is clear, specific, and directly describes the main feature being introduced. It aligns well with the comprehensive changeset that adds call history functionality including table components, filtering, pagination, and UI integration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/callHistoryTable

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.

@gabriellsh gabriellsh force-pushed the feat/callHistoryTable branch from 774be00 to 6f04491 Compare December 17, 2025 15:26
@gabriellsh gabriellsh force-pushed the feat/callHistoryTable branch from 6f04491 to f9beea8 Compare December 17, 2025 15:32
@github-actions
Copy link
Contributor

github-actions bot commented Dec 17, 2025

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.2GiB 1.2GiB +12MiB
rocketchat 358MiB 347MiB +12MiB
omnichannel-transcript-service 132MiB 132MiB -231B
queue-worker-service 132MiB 132MiB +214B
ddp-streamer-service 126MiB 126MiB -540B
account-service 113MiB 113MiB +617B
authorization-service 111MiB 111MiB -1.9KiB
stream-hub-service 111MiB 111MiB +242B
presence-service 111MiB 111MiB +203B

📊 Historical Trend

---
config:
  theme: "dark"
  xyChart:
    width: 900
    height: 400
---
xychart
  title "Image Size Evolution by Service (Last 30 Days + This PR)"
  x-axis ["11/15 22:28", "11/16 01:28", "11/17 23:50", "11/18 22:53", "11/19 23:02", "11/21 16:49", "11/24 17:34", "11/27 22:32", "11/28 19:05", "12/01 23:01", "12/02 21:57", "12/03 21:00", "12/04 18:17", "12/05 21:56", "12/08 20:15", "12/09 22:17", "12/10 23:26", "12/11 21:56", "12/12 22:45", "12/13 01:34", "12/15 22:31", "12/16 22:18", "12/17 21:04", "12/18 23:12", "12/19 23:27", "12/20 01:42", "12/20 01:52 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "queue-worker-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "rocketchat" [0.36, 0.36, 0.35, 0.35, 0.35, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.35]
  line "stream-hub-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
Loading

Statistics (last 26 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.2GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 1.2GiB
ℹ️ About this report

This report compares Docker image sizes from this build against the develop baseline.

  • Tag: pr-37839
  • Baseline: develop
  • Timestamp: 2025-12-20 01:52:07 UTC
  • Historical data points: 26

Updated: Sat, 20 Dec 2025 01:52:07 GMT

@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

❌ Patch coverage is 20.83333% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.69%. Comparing base (626f0d2) to head (50a74af).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37839      +/-   ##
===========================================
- Coverage    67.70%   67.69%   -0.01%     
===========================================
  Files         3475     3476       +1     
  Lines       113871   113895      +24     
  Branches     20947    20956       +9     
===========================================
+ Hits         77096    77104       +8     
- Misses       34587    34605      +18     
+ Partials      2188     2186       -2     
Flag Coverage Δ
e2e 57.18% <20.83%> (-0.03%) ⬇️
e2e-api 44.05% <ø> (+0.05%) ⬆️

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a comprehensive Call History Table feature that allows users to view, filter, and interact with their call history. The implementation includes a new dedicated page with filtering capabilities, table components for displaying call records, and integration points throughout the application's navigation.

Key Changes:

  • New MediaCallHistoryTable component with sortable columns for contact, type, status, and timestamp
  • Call history page with search, type filtering (inbound/outbound), and status filtering capabilities
  • Refactored call history components to be reusable across different contexts (moved to shared components)

Reviewed changes

Copilot reviewed 31 out of 32 changed files in this pull request and generated 20 comments.

Show a summary per file
File Description
packages/ui-voip/src/views/MediaCallHistoryTable/* New table components for displaying call history with rows, status indicators, and contact information
packages/ui-voip/src/components/CallHistory*.tsx Moved and enhanced internal/external user components for reusability
packages/ui-voip/src/ui-kit/getHistoryMessagePayload.ts Refactored to extract getCallDurationText for table usage
apps/meteor/client/views/mediaCallHistory/CallHistoryPage.tsx Main call history page with table, filters, and contextual sidebar
apps/meteor/client/views/mediaCallHistory/CallHistoryPageFilters.tsx Filter components for search, direction, and status
apps/meteor/client/views/mediaCallHistory/CallHistoryRow*.tsx Row components for different contact types (internal, external, unknown)
apps/meteor/client/views/mediaCallHistory/MediaCallHistoryContextualbar*.tsx Refactored contextual bar to support both room and page contexts
apps/meteor/client/views/mediaCallHistory/useMediaCallInternalHistoryActions.ts Refactored hook to support flexible navigation contexts
apps/meteor/client/startup/routes.tsx Added /call-history route with optional tab and historyId parameters
apps/meteor/client/NavBarV2/* Added call history navigation items to NavBar
packages/ui-client/src/components/MultiSelectCustom/* Enhanced to support icons in dropdown options
packages/i18n/src/locales/en.i18n.json Added translations for new call history features

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gabriellsh gabriellsh marked this pull request as ready for review December 19, 2025 22:22
@gabriellsh gabriellsh requested a review from a team as a code owner December 19, 2025 22:22
Copy link
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.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsWithCall.tsx (1)

15-48: Pass callHistoryItem to the child component.

The callHistoryItem prop is destructured from the props but not passed to NavBarControlsMenu. Since it's extracted separately from the spread operator, it won't be included in {...props}.

Proposed fix
-const NavBarControlsWithCall = ({ omnichannelItems, isPressed, ...props }: NavBarControlsMenuProps) => {
+const NavBarControlsWithCall = ({ omnichannelItems, isPressed, callHistoryItem, ...props }: NavBarControlsMenuProps) => {
 	const {
 		icon: omnichannelCallIcon,
 		title: omnichannelCallTitle,
 		handleOpenDialModal,
 		isDisabled: callDialPadDisabled,
 	} = useOmnichannelCallDialPadAction();
 
 	const {
 		title: omnichannelCallTogglerTitle,
 		icon: omnichannelCallTogglerIcon,
 		handleToggleCall,
 		isDisabled: callTogglerDisabled,
 	} = useOmnichannelCallToggleAction();
 
 	const omnichannelItemsWithCall = [
 		...omnichannelItems,
 		{
 			id: 'omnichannelCallDialPad',
 			icon: omnichannelCallIcon,
 			content: omnichannelCallTitle,
 			onClick: handleOpenDialModal,
 			disabled: callDialPadDisabled,
 		},
 		{
 			id: 'omnichannelCallToggler',
 			icon: omnichannelCallTogglerIcon,
 			content: omnichannelCallTogglerTitle,
 			onClick: handleToggleCall,
 			disabled: callTogglerDisabled,
 		},
 	] as GenericMenuItemProps[];
 
-	return <NavBarControlsMenu omnichannelItems={omnichannelItemsWithCall} isPressed={isPressed} {...props} />;
+	return <NavBarControlsMenu omnichannelItems={omnichannelItemsWithCall} isPressed={isPressed} callHistoryItem={callHistoryItem} {...props} />;
 };
♻️ Duplicate comments (5)
apps/meteor/client/views/mediaCallHistory/MediaCallHistoryContextualbar.tsx (1)

41-46: Acknowledge the TODO for type assertions.

The as any assertions are noted with TODO comments. This is a known type limitation that should be addressed by updating the endpoint type definition to support the union of { callId: string } and { historyId: string }.

The past review already flagged this. The TODO comments indicate awareness of the issue.

packages/ui-voip/src/views/MediaCallHistoryTable/index.ts (1)

2-3: Redundant export pattern for CallHistoryTableRow.

CallHistoryTableRow is exported both as a default export (line 2) and through a wildcard export (line 3), creating confusion about which export pattern to use.

packages/ui-voip/src/views/MediaCallHistoryTable/MediaCallHistoryTable.stories.tsx (2)

28-28: Default language mismatch.

The default language is set to 'pt-BR' but all translations are provided in English, which will cause translation keys to display instead of actual text.


87-89: Avoid unsafe type assertion for contact types.

The type is fixed to CallHistoryTableInternalContact, but getContact() returns a union of CallHistoryTableInternalContact | CallHistoryTableExternalContact | CallHistoryUnknownContact. This type assertion defeats TypeScript's type checking.

packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableRow.tsx (1)

51-53: Type guard doesn't match the type definition.

The type guard checks for '_id' in contact && ('username' in contact || 'name' in contact), but CallHistoryTableInternalContact only requires _id (lines 17-19 show username and name are optional). A valid internal contact like { _id: "123" } would fail this guard.

Since CallHistoryTableExternalContact has number and CallHistoryUnknownContact has unknown, checking for '_id' alone is sufficient to distinguish internal contacts.

🔎 Proposed fix to match type definition
 export const isCallHistoryTableInternalContact = (contact: CallHistoryTableRowContact): contact is CallHistoryTableInternalContact => {
-	return '_id' in contact && ('username' in contact || 'name' in contact);
+	return '_id' in contact;
 };
🧹 Nitpick comments (7)
packages/i18n/src/locales/en.i18n.json (1)

2033-2033: Status and direction strings are well-phrased; optional terminology alignment

Ended, Not_answered, Unknown, Inbound, and Outbound are concise and appropriate as call status/direction labels.
If you want absolute terminology consistency with existing keys like Incoming / Outgoing, you could consider reusing those words here, but it’s not required for clarity.

As per retrieved learnings, updating only en.i18n.json is correct; no need to touch other locales.

Also applies to: 3846-3846, 5506-5506, 6506-6506, 6757-6757

apps/meteor/client/views/mediaCallHistory/CallHistoryRowInternalUser.tsx (1)

40-48: Type assertion can be tightened.

The type assertion on line 41 assumes all entries have defined callbacks, but the filter on line 42 handles undefined values. Consider using a type guard for better type safety:

🔎 Proposed refinement
 const getItems = (actions: HistoryActionCallbacks, t: TFunction) => {
-	return (Object.entries(actions) as [HistoryActions, () => void][])
-		.filter(([_, callback]) => callback)
+	return (Object.entries(actions) as [HistoryActions, (() => void) | undefined][])
+		.filter((entry): entry is [HistoryActions, () => void] => Boolean(entry[1]))
 		.map(([action, callback]) => ({
 			id: action,
 			icon: iconDictionary[action],
 			content: t(i18nDictionary[action]),
 			onClick: callback,
 		}));
 };
apps/meteor/client/views/mediaCallHistory/useMediaCallInternalHistoryActions.ts (1)

17-23: Consider exporting the options type.

The UseMediaCallInternalHistoryActionsBaseOptions type would be useful for consumers who need to type their props before passing them to this hook.

🔎 Proposed change
-type UseMediaCallInternalHistoryActionsBaseOptions = {
+export type UseMediaCallInternalHistoryActionsBaseOptions = {
 	contact: InternalCallHistoryContact;
 	messageId?: string;
 	openRoomId?: string;
 	messageRoomId?: string;
 	openUserInfo?: (userId: string) => void;
 };
packages/ui-voip/src/index.ts (1)

11-12: Consider explicit exports instead of wildcard re-export.

Using export * can unintentionally expose internal utilities from the MediaCallHistoryTable module. For a public package API, explicit exports provide better control over the public surface.

🔎 Suggested explicit exports
-export * from './views/MediaCallHistoryTable';
+export { MediaCallHistoryTable, CallHistoryTableRow } from './views/MediaCallHistoryTable';
+export type { /* specific types if needed */ } from './views/MediaCallHistoryTable';

Alternatively, if the wildcard pattern is intentional and consistent with the project's conventions for this package, this can be kept as-is.

packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableUnknownContact.tsx (1)

2-2: Use the project's standard translation import.

The import should use @rocket.chat/ui-contexts instead of react-i18next directly to maintain consistency with the project's established pattern.

Proposed fix
-import { useTranslation } from 'react-i18next';
+import { useTranslation } from '@rocket.chat/ui-contexts';
apps/meteor/client/views/mediaCallHistory/CallHistoryPageFilters.tsx (1)

61-66: Consider renaming for clarity.

The function name handleChangeType is misleading—it actually handles status filter changes (line 63 calls onChangeStates). Consider renaming to handleChangeStates or handleStatusFilterChange to match its purpose.

🔎 Suggested rename
-	const handleChangeType = useCallback(
+	const handleChangeStates = useCallback(
 		(options: OptionProp[]) => {
 			onChangeStates(options.map((option) => option.id) as StatesFilter);
 		},
 		[onChangeStates],
 	);

And update the usage:

 				<MultiSelectCustom
 					dropdownOptions={dropdownStatesOptions}
 					defaultTitle='All_status'
 					selectedOptionsTitle='Status'
 					selectedOptions={selectedOptions}
-					setSelectedOptions={handleChangeType}
+					setSelectedOptions={handleChangeStates}
 				/>
packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableRow.tsx (1)

28-41: Simplify the conditional type for the contact property.

The conditional type for contact property (lines 30-34) is equivalent to simply contact: T. The complex conditional structure doesn't provide additional type safety since T already extends CallHistoryTableRowContact.

🔎 Proposed simplification
 export type CallHistoryTableRowProps<T extends CallHistoryTableRowContact> = {
 	_id: string;
-	contact: T extends CallHistoryTableInternalContact
-		? CallHistoryTableInternalContact
-		: T extends CallHistoryTableExternalContact
-			? CallHistoryTableExternalContact
-			: CallHistoryUnknownContact;
+	contact: T;
 	type: 'outbound' | 'inbound';
 	status: CallHistoryItemState;
 	duration: number;
 	timestamp: string;
 	onClick: () => void;
 	menu: ReactNode;
 };
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 3f2ff26 and b866a3a.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (31)
  • apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsMenu.tsx (1 hunks)
  • apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsWithCall.tsx (1 hunks)
  • apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsWithData.tsx (4 hunks)
  • apps/meteor/client/NavBarV2/NavBarVoipGroup/NavBarVoipGroup.tsx (1 hunks)
  • apps/meteor/client/startup/routes.tsx (3 hunks)
  • apps/meteor/client/views/mediaCallHistory/CallHistoryPage.tsx (1 hunks)
  • apps/meteor/client/views/mediaCallHistory/CallHistoryPageFilters.tsx (1 hunks)
  • apps/meteor/client/views/mediaCallHistory/CallHistoryRowExternalUser.tsx (1 hunks)
  • apps/meteor/client/views/mediaCallHistory/CallHistoryRowInternalUser.tsx (1 hunks)
  • apps/meteor/client/views/mediaCallHistory/CallHistoryRowUnknownUser.tsx (1 hunks)
  • apps/meteor/client/views/mediaCallHistory/MediaCallHistoryContextualbar.tsx (1 hunks)
  • apps/meteor/client/views/mediaCallHistory/MediaCallHistoryContextualbarRoom.tsx (1 hunks)
  • apps/meteor/client/views/mediaCallHistory/MediaCallHistoryInternal.tsx (3 hunks)
  • apps/meteor/client/views/mediaCallHistory/useMediaCallInternalHistoryActions.ts (3 hunks)
  • apps/meteor/client/views/room/providers/hooks/useCoreRoomRoutes.ts (1 hunks)
  • packages/i18n/src/locales/en.i18n.json (9 hunks)
  • packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustom.tsx (2 hunks)
  • packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustomList.tsx (3 hunks)
  • packages/ui-voip/src/components/CallHistoryExternalUser.tsx (1 hunks)
  • packages/ui-voip/src/components/index.ts (1 hunks)
  • packages/ui-voip/src/index.ts (1 hunks)
  • packages/ui-voip/src/ui-kit/getHistoryMessagePayload.ts (2 hunks)
  • packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryContextualbar.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableDirection.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableRow.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableStatus.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableUnknownContact.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallHistoryTable/MediaCallHistoryTable.stories.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallHistoryTable/MediaCallHistoryTable.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallHistoryTable/index.ts (1 hunks)
  • packages/ui-voip/src/views/index.ts (1 hunks)
🧰 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/ui-voip/src/index.ts
  • packages/ui-voip/src/views/MediaCallHistoryTable/index.ts
  • packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableUnknownContact.tsx
  • apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsWithCall.tsx
  • packages/ui-voip/src/views/MediaCallHistoryTable/MediaCallHistoryTable.stories.tsx
  • apps/meteor/client/views/mediaCallHistory/MediaCallHistoryContextualbarRoom.tsx
  • packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableDirection.tsx
  • apps/meteor/client/startup/routes.tsx
  • packages/ui-voip/src/views/MediaCallHistoryTable/MediaCallHistoryTable.tsx
  • apps/meteor/client/views/mediaCallHistory/CallHistoryPage.tsx
  • packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableStatus.tsx
  • apps/meteor/client/NavBarV2/NavBarVoipGroup/NavBarVoipGroup.tsx
  • apps/meteor/client/views/room/providers/hooks/useCoreRoomRoutes.ts
  • packages/ui-voip/src/components/CallHistoryExternalUser.tsx
  • apps/meteor/client/views/mediaCallHistory/CallHistoryRowExternalUser.tsx
  • apps/meteor/client/views/mediaCallHistory/CallHistoryRowInternalUser.tsx
  • apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsWithData.tsx
  • apps/meteor/client/views/mediaCallHistory/useMediaCallInternalHistoryActions.ts
  • apps/meteor/client/views/mediaCallHistory/MediaCallHistoryInternal.tsx
  • packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustom.tsx
  • apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsMenu.tsx
  • packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableRow.tsx
  • packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustomList.tsx
  • apps/meteor/client/views/mediaCallHistory/CallHistoryRowUnknownUser.tsx
  • packages/ui-voip/src/components/index.ts
  • packages/ui-voip/src/views/index.ts
  • packages/ui-voip/src/ui-kit/getHistoryMessagePayload.ts
  • apps/meteor/client/views/mediaCallHistory/MediaCallHistoryContextualbar.tsx
  • packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryContextualbar.tsx
  • apps/meteor/client/views/mediaCallHistory/CallHistoryPageFilters.tsx
🧠 Learnings (11)
📓 Common learnings
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37419
File: packages/i18n/src/locales/en.i18n.json:918-921
Timestamp: 2025-11-19T18:20:07.720Z
Learning: Repo: RocketChat/Rocket.Chat — i18n/formatting
Learning: This repository uses a custom message formatting parser in UI blocks/messages; do not assume standard Markdown rules. For keys like Call_ended_bold, Call_not_answered_bold, Call_failed_bold, and Call_transferred_bold in packages/i18n/src/locales/en.i18n.json, retain the existing single-asterisk emphasis unless maintainers request otherwise.
📚 Learning: 2025-12-18T15:18:23.819Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37773
File: apps/meteor/client/views/mediaCallHistory/MediaCallHistoryInternal.tsx:24-34
Timestamp: 2025-12-18T15:18:23.819Z
Learning: In apps/meteor/client/views/mediaCallHistory/MediaCallHistoryInternal.tsx, for internal call history items, the item.contactId is guaranteed to always match either the caller.id or callee.id in the call data, so the contact resolution in getContact will never result in undefined.

Applied to files:

  • packages/ui-voip/src/index.ts
  • packages/ui-voip/src/views/MediaCallHistoryTable/index.ts
  • packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableUnknownContact.tsx
  • apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsWithCall.tsx
  • packages/ui-voip/src/views/MediaCallHistoryTable/MediaCallHistoryTable.stories.tsx
  • apps/meteor/client/views/mediaCallHistory/MediaCallHistoryContextualbarRoom.tsx
  • packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableDirection.tsx
  • apps/meteor/client/startup/routes.tsx
  • packages/ui-voip/src/views/MediaCallHistoryTable/MediaCallHistoryTable.tsx
  • apps/meteor/client/views/mediaCallHistory/CallHistoryPage.tsx
  • packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableStatus.tsx
  • apps/meteor/client/NavBarV2/NavBarVoipGroup/NavBarVoipGroup.tsx
  • apps/meteor/client/views/room/providers/hooks/useCoreRoomRoutes.ts
  • packages/ui-voip/src/components/CallHistoryExternalUser.tsx
  • apps/meteor/client/views/mediaCallHistory/CallHistoryRowExternalUser.tsx
  • apps/meteor/client/views/mediaCallHistory/CallHistoryRowInternalUser.tsx
  • apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsWithData.tsx
  • apps/meteor/client/views/mediaCallHistory/useMediaCallInternalHistoryActions.ts
  • apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsMenu.tsx
  • packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableRow.tsx
  • apps/meteor/client/views/mediaCallHistory/CallHistoryRowUnknownUser.tsx
  • packages/ui-voip/src/components/index.ts
  • packages/ui-voip/src/ui-kit/getHistoryMessagePayload.ts
  • apps/meteor/client/views/mediaCallHistory/MediaCallHistoryContextualbar.tsx
  • packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryContextualbar.tsx
  • apps/meteor/client/views/mediaCallHistory/CallHistoryPageFilters.tsx
📚 Learning: 2025-11-19T18:20:37.116Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37419
File: apps/meteor/server/services/media-call/service.ts:141-141
Timestamp: 2025-11-19T18:20:37.116Z
Learning: In apps/meteor/server/services/media-call/service.ts, the sendHistoryMessage method should use call.caller.id or call.createdBy?.id as the message author, not call.transferredBy?.id. Even for transferred calls, the message should appear in the DM between the two users who are calling each other, not sent by the person who transferred the call.

Applied to files:

  • apps/meteor/client/startup/routes.tsx
  • apps/meteor/client/views/mediaCallHistory/CallHistoryPage.tsx
  • apps/meteor/client/views/mediaCallHistory/CallHistoryRowExternalUser.tsx
  • apps/meteor/client/views/mediaCallHistory/CallHistoryRowInternalUser.tsx
  • apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsWithData.tsx
  • apps/meteor/client/views/mediaCallHistory/useMediaCallInternalHistoryActions.ts
  • apps/meteor/client/views/mediaCallHistory/MediaCallHistoryInternal.tsx
  • apps/meteor/client/views/mediaCallHistory/CallHistoryRowUnknownUser.tsx
  • packages/ui-voip/src/ui-kit/getHistoryMessagePayload.ts
  • apps/meteor/client/views/mediaCallHistory/MediaCallHistoryContextualbar.tsx
  • packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryContextualbar.tsx
📚 Learning: 2025-11-19T18:20:07.720Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37419
File: packages/i18n/src/locales/en.i18n.json:918-921
Timestamp: 2025-11-19T18:20:07.720Z
Learning: Repo: RocketChat/Rocket.Chat — i18n/formatting
Learning: This repository uses a custom message formatting parser in UI blocks/messages; do not assume standard Markdown rules. For keys like Call_ended_bold, Call_not_answered_bold, Call_failed_bold, and Call_transferred_bold in packages/i18n/src/locales/en.i18n.json, retain the existing single-asterisk emphasis unless maintainers request otherwise.

Applied to files:

  • packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableStatus.tsx
  • packages/i18n/src/locales/en.i18n.json
  • packages/ui-voip/src/ui-kit/getHistoryMessagePayload.ts
  • apps/meteor/client/views/mediaCallHistory/CallHistoryPageFilters.tsx
📚 Learning: 2025-09-25T09:59:26.461Z
Learnt from: Dnouv
Repo: RocketChat/Rocket.Chat PR: 37057
File: packages/apps-engine/src/definition/accessors/IUserRead.ts:23-27
Timestamp: 2025-09-25T09:59:26.461Z
Learning: UserBridge.doGetUserRoomIds in packages/apps-engine/src/server/bridges/UserBridge.ts has a bug where it implicitly returns undefined when the app lacks read permission (missing return statement in the else case of the permission check).

Applied to files:

  • apps/meteor/client/views/mediaCallHistory/CallHistoryRowInternalUser.tsx
  • apps/meteor/client/views/mediaCallHistory/useMediaCallInternalHistoryActions.ts
📚 Learning: 2025-10-28T16:53:42.761Z
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 37205
File: ee/packages/federation-matrix/src/FederationMatrix.ts:296-301
Timestamp: 2025-10-28T16:53:42.761Z
Learning: In the Rocket.Chat federation-matrix integration (ee/packages/federation-matrix/), the createRoom method from rocket.chat/federation-sdk will support a 4-argument signature (userId, roomName, visibility, displayName) in newer versions. Code using this 4-argument call is forward-compatible with planned library updates and should not be flagged as an error.

Applied to files:

  • apps/meteor/client/views/mediaCallHistory/CallHistoryRowInternalUser.tsx
📚 Learning: 2025-09-25T09:59:26.461Z
Learnt from: Dnouv
Repo: RocketChat/Rocket.Chat PR: 37057
File: packages/apps-engine/src/definition/accessors/IUserRead.ts:23-27
Timestamp: 2025-09-25T09:59:26.461Z
Learning: AppUserBridge.getUserRoomIds in apps/meteor/app/apps/server/bridges/users.ts always returns an array of strings (mapping subscription documents to room IDs), never undefined, even when user has no room subscriptions.

Applied to files:

  • apps/meteor/client/views/mediaCallHistory/CallHistoryRowInternalUser.tsx
📚 Learning: 2025-09-25T09:59:26.461Z
Learnt from: Dnouv
Repo: RocketChat/Rocket.Chat PR: 37057
File: packages/apps-engine/src/definition/accessors/IUserRead.ts:23-27
Timestamp: 2025-09-25T09:59:26.461Z
Learning: AppUserBridge.getUserRoomIds in apps/meteor/app/apps/server/bridges/users.ts always returns an array of strings by mapping subscription documents to room IDs, never undefined, even when user has no room subscriptions.

Applied to files:

  • apps/meteor/client/views/mediaCallHistory/CallHistoryRowInternalUser.tsx
📚 Learning: 2025-12-18T15:18:23.819Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37773
File: apps/meteor/client/views/mediaCallHistory/MediaCallHistoryInternal.tsx:24-34
Timestamp: 2025-12-18T15:18:23.819Z
Learning: In apps/meteor/client/views/mediaCallHistory/MediaCallHistoryInternal.tsx, the claim is that internal call history items always have contactId equal to either caller.id or callee.id, so getContact will not produce undefined. Treat this as a file-specific guarantee and avoid adding guards that rely on other data sources in this path. If this invariant holds, you can rely on contact resolution not returning undefined, but consider adding a lightweight runtime assertion or a failing guard when the invariant is violated (e.g., throw or log) to surface unexpected data instead of silently handling undefined. This guideline applies only to this file path and should not be assumed project-wide without verification.

Applied to files:

  • apps/meteor/client/views/mediaCallHistory/MediaCallHistoryInternal.tsx
📚 Learning: 2025-11-17T15:07:13.273Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37398
File: packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx:357-363
Timestamp: 2025-11-17T15:07:13.273Z
Learning: In packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx, IconElement is a presentational, non-actionable element that does not require wrapping in AppIdProvider, similar to plain_text and mrkdwn renderers. Only actionable elements (those with actions, actionId, or interactive behavior) should be wrapped in AppIdProvider.

Applied to files:

  • packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustom.tsx
  • packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustomList.tsx
📚 Learning: 2025-11-19T12:32:29.696Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 37547
File: packages/i18n/src/locales/en.i18n.json:634-634
Timestamp: 2025-11-19T12:32:29.696Z
Learning: Repo: RocketChat/Rocket.Chat
Context: i18n workflow
Learning: In this repository, new translation keys should be added to packages/i18n/src/locales/en.i18n.json only; other locale files are populated via the external translation pipeline and/or fall back to English. Do not request adding the same key to all locale files in future reviews.

Applied to files:

  • packages/i18n/src/locales/en.i18n.json
  • apps/meteor/client/views/mediaCallHistory/CallHistoryPageFilters.tsx
🧬 Code graph analysis (12)
packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableUnknownContact.tsx (1)
packages/ui-contexts/src/index.ts (1)
  • useTranslation (81-81)
packages/ui-voip/src/views/MediaCallHistoryTable/MediaCallHistoryTable.stories.tsx (3)
packages/mock-providers/src/index.ts (1)
  • mockAppRoot (3-3)
packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableRow.tsx (4)
  • CallHistoryTableInternalContact (16-20)
  • CallHistoryTableExternalContact (12-14)
  • CallHistoryUnknownContact (22-24)
  • CallHistoryTableRowProps (28-41)
packages/ui-client/src/components/GenericTable/hooks/useSort.ts (1)
  • useSort (5-34)
packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableDirection.tsx (1)
packages/ui-contexts/src/index.ts (1)
  • useTranslation (81-81)
apps/meteor/client/views/mediaCallHistory/CallHistoryPage.tsx (6)
packages/ui-contexts/src/index.ts (3)
  • useTranslation (81-81)
  • useRouter (63-63)
  • useRouteParameter (65-65)
packages/ui-client/src/components/GenericTable/hooks/useSort.ts (1)
  • useSort (5-34)
packages/ui-client/src/components/GenericTable/hooks/usePagination.ts (1)
  • usePagination (11-40)
apps/meteor/client/views/mediaCallHistory/CallHistoryPageFilters.tsx (1)
  • useCallHistoryPageFilters (34-52)
packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableRow.tsx (5)
  • CallHistoryTableExternalContact (12-14)
  • CallHistoryUnknownContact (22-24)
  • CallHistoryTableInternalContact (16-20)
  • isCallHistoryUnknownContact (47-49)
  • isCallHistoryTableInternalContact (51-53)
packages/ui-client/src/components/GenericTable/GenericTableLoadingRow.tsx (1)
  • GenericTableLoadingRow (4-21)
packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableStatus.tsx (2)
packages/core-typings/src/ICallHistoryItem.ts (1)
  • CallHistoryItemState (6-16)
packages/ui-voip/src/ui-kit/getHistoryMessagePayload.ts (1)
  • getCallDurationText (39-51)
apps/meteor/client/views/mediaCallHistory/CallHistoryRowInternalUser.tsx (4)
packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryActions.tsx (1)
  • HistoryActionCallbacks (8-10)
packages/ui-contexts/src/index.ts (1)
  • useTranslation (81-81)
apps/meteor/client/views/mediaCallHistory/useMediaCallInternalHistoryActions.ts (1)
  • useMediaCallInternalHistoryActions (25-98)
packages/media-signaling/src/lib/Call.ts (1)
  • contact (81-83)
apps/meteor/client/views/mediaCallHistory/useMediaCallInternalHistoryActions.ts (2)
packages/media-signaling/src/lib/Call.ts (1)
  • contact (81-83)
apps/meteor/tests/e2e/page-objects/fragments/toolbar.ts (1)
  • openUserInfo (99-101)
apps/meteor/client/views/mediaCallHistory/MediaCallHistoryInternal.tsx (2)
apps/meteor/client/views/mediaCallHistory/useMediaCallInternalHistoryActions.ts (1)
  • useMediaCallInternalHistoryActions (25-98)
apps/meteor/tests/e2e/page-objects/fragments/toolbar.ts (1)
  • openUserInfo (99-101)
packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableRow.tsx (4)
packages/core-typings/src/ICallHistoryItem.ts (1)
  • CallHistoryItemState (6-16)
packages/ui-contexts/src/index.ts (1)
  • useLanguage (39-39)
packages/ui-client/src/components/GenericTable/GenericTableRow.tsx (1)
  • GenericTableRow (6-6)
packages/ui-client/src/components/GenericTable/GenericTableCell.tsx (1)
  • GenericTableCell (6-6)
apps/meteor/client/views/mediaCallHistory/CallHistoryRowUnknownUser.tsx (1)
packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableRow.tsx (2)
  • CallHistoryTableRowProps (28-41)
  • CallHistoryUnknownContact (22-24)
packages/ui-voip/src/ui-kit/getHistoryMessagePayload.ts (1)
packages/ui-kit/src/index.ts (1)
  • TextObject (7-7)
apps/meteor/client/views/mediaCallHistory/MediaCallHistoryContextualbar.tsx (3)
apps/meteor/client/lib/queryKeys.ts (1)
  • callHistoryQueryKeys (162-165)
apps/meteor/client/views/mediaCallHistory/MediaCallHistoryInternal.tsx (1)
  • isInternalCallHistoryItem (20-22)
apps/meteor/client/views/mediaCallHistory/MediaCallHistoryExternal.tsx (1)
  • isExternalCallHistoryItem (21-23)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (28)
packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustom.tsx (1)

4-4: LGTM! Clean type extension for icon support.

The import of IconNames and the optional icon property on OptionProp are well-typed and maintain backward compatibility. The type signature properly constrains icon names and color values.

Also applies to: 30-30

packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustomList.tsx (2)

1-1: LGTM! Well-structured color mapping helper.

The OptionIcon import and getIconColor helper function are cleanly implemented. The color token mapping follows a sensible pattern, returning undefined for default cases to let the component use its default styling.

Also applies to: 10-20


61-61: LGTM! Clean conditional icon rendering.

The icon rendering is properly guarded by the option.icon check, ensuring type safety. The spacing (mie={4}) provides appropriate visual separation from the text.

packages/i18n/src/locales/en.i18n.json (1)

494-494: Call history labels and filters look consistent and clear

All_directions, Call_history, Search_calls, and Time_slash_Date follow existing naming/capitalization patterns (e.g., “All_*”, “Search *”) and read naturally in the Call History UI. No changes needed.

Also applies to: 1000-1000, 4751-4751, 5340-5340

apps/meteor/client/views/mediaCallHistory/MediaCallHistoryContextualbarRoom.tsx (1)

7-19: LGTM!

The component properly bridges the room context to the prop-driven MediaCallHistoryContextualbar. The useCallback memoization for openUserInfo is appropriate, and the prop wiring is clean.

apps/meteor/client/views/room/providers/hooks/useCoreRoomRoutes.ts (1)

3-8: LGTM!

The import and tabComponent reference correctly point to the new MediaCallHistoryContextualbarRoom component, which properly bridges the room context to the prop-driven MediaCallHistoryContextualbar.

packages/ui-voip/src/components/CallHistoryExternalUser.tsx (1)

5-18: LGTM!

The showIcon prop is cleanly implemented with a sensible default of true for backward compatibility. The conditional rendering logic is straightforward.

apps/meteor/client/views/mediaCallHistory/CallHistoryRowInternalUser.tsx (1)

64-74: Verify the contact object construction.

The contact object construction looks correct. Note that:

  • username: contact.username ?? '' is necessary because CallHistoryTableInternalContact.username is optional but InternalCallHistoryContact.username requires a string.
  • The openUserInfo wrapper correctly captures rid from the component's scope and passes userId from the hook's invocation.
apps/meteor/client/views/mediaCallHistory/MediaCallHistoryContextualbar.tsx (1)

18-34: LGTM on the prop-driven refactor.

The new MediaCallHistoryContextualbarProps type cleanly defines the component's interface, and the destructured props provide clear control flow. This makes the component more testable and reusable compared to the previous route-parameter-based approach.

apps/meteor/client/views/mediaCallHistory/useMediaCallInternalHistoryActions.ts (2)

89-97: Verify jumpToMessage availability logic.

The jumpToMessage action is only returned when both messageId and messageRoomId are provided (line 93), but the jumpToMessage function itself can work with openRoomId as a fallback (line 68). Is this intentional restriction, or should the condition be messageId && (messageRoomId || openRoomId)?


53-65: LGTM on direct message navigation logic.

The goToDirectMessage memoization correctly prioritizes directMessage.onClick when available, and falls back to router navigation only when messageRoomId exists without openRoomId. This aligns with the author's previous clarification that when openRoomId exists, the action should come from useDirectMessageAction.

apps/meteor/client/views/mediaCallHistory/MediaCallHistoryInternal.tsx (1)

36-56: LGTM! Clean integration of new props with existing logic.

The conditional wrapping of openUserInfo on line 55 correctly adapts the two-parameter signature (userId, rid) to the single-parameter signature expected by useMediaCallInternalHistoryActions. The fallback for rid on line 48 ensures the hook receives a valid room ID.

packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryContextualbar.tsx (1)

20-20: LGTM! Clean import consolidation.

Centralizing component imports through the barrel export improves maintainability and consistency across the package.

apps/meteor/client/NavBarV2/NavBarVoipGroup/NavBarVoipGroup.tsx (1)

12-22: LGTM! Navigation implementation is clean.

The useCallback correctly memoizes the navigation handler with router as dependency.

Note: The Call History item only renders when callAction is truthy (lines 15-17). Please verify this is intentional—if call history should be accessible even when VoIP is temporarily unavailable, the guard may need adjustment.

apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsMenu.tsx (1)

13-23: LGTM! Clean extension of menu items.

The array construction with filter(Boolean) correctly handles the optional nature of both callItem and callHistoryItem, and the type assertion is appropriate given TypeScript's type narrowing limitations with filter.

packages/ui-voip/src/views/index.ts (1)

4-4: LGTM!

The export follows the established pattern and properly exposes the MediaCallHistoryTable module.

packages/ui-voip/src/components/index.ts (1)

13-14: LGTM!

The exports follow the established pattern and properly expose the call history user components.

packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableDirection.tsx (1)

1-15: LGTM!

The component correctly maps direction to icons and renders a clean, accessible layout with translated labels.

packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableStatus.tsx (1)

1-68: LGTM!

The component cleanly separates state-to-UI mapping logic into focused helper functions and correctly handles optional duration display. The implementation follows good practices.

apps/meteor/client/views/mediaCallHistory/CallHistoryRowUnknownUser.tsx (1)

1-30: LGTM!

The component appropriately handles unknown contacts by providing an empty menu (no actions available) while maintaining the same row structure. The onClick handler correctly forwards the history ID.

packages/ui-voip/src/ui-kit/getHistoryMessagePayload.ts (1)

39-63: LGTM!

Excellent refactoring that extracts the duration formatting logic into a reusable getCallDurationText helper. This enables the UI components to display plain duration text without markdown, while maintaining backward compatibility for the message payload formatting.

apps/meteor/client/views/mediaCallHistory/CallHistoryRowExternalUser.tsx (1)

1-47: LGTM!

The component correctly provides a voice call action for external contacts when the widget is available. The conditional action creation and memoization are properly implemented.

apps/meteor/client/views/mediaCallHistory/CallHistoryPage.tsx (3)

19-43: LGTM!

The helper functions correctly map UI sorting and filtering to API parameters. The getStateFilter appropriately treats 'failed' and 'error' as synonymous, and the sort logic includes sensible secondary sorting by timestamp.


103-165: LGTM!

The query integration is well-implemented with all dependencies properly tracked in the queryKey. The data transformation logic appropriately handles external, internal, and unknown contact types with defensive checks for missing data.


167-238: LGTM!

The page rendering handles loading, error, and success states appropriately. The row rendering uses type guards to select the correct component variant, and the contextual bar integration is clean.

packages/ui-voip/src/views/MediaCallHistoryTable/MediaCallHistoryTable.tsx (1)

1-50: LGTM!

The table component provides a clean, sortable interface with appropriate column headers and proper sorting state management. The implementation follows established patterns from the ui-client GenericTable components.

apps/meteor/client/views/mediaCallHistory/CallHistoryPageFilters.tsx (1)

20-32: All translation keys are defined. The keys 'Inbound', 'Outbound', 'All_directions', 'Filter_By_Status', 'Ended', 'Not_answered', 'Transferred', and 'Failed' all exist in en.i18n.json.

packages/ui-voip/src/views/MediaCallHistoryTable/CallHistoryTableRow.tsx (1)

67-67: Verify the ARIA role for the clickable table row.

The row uses role='link' with an onClick handler. According to ARIA specifications, role='link' should be used for navigation to a new page or location, while role='button' is more appropriate for interactive elements that perform actions. Confirm whether clicking this row performs navigation or an action.

Additionally, using role='link' on a table row is semantically unusual—the more common pattern is to have a link inside a cell or use role='button' for the entire row.

@gabriellsh gabriellsh added the stat: QA assured Means it has been tested and approved by a company insider label Dec 19, 2025
@gabriellsh gabriellsh added this to the 7.14.0 milestone Dec 19, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Dec 19, 2025
Copy link
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.

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/i18n/src/locales/en.i18n.json (2)

4752-4752: Search_calls label matches other “Search_*” inputs

The phrasing is consistent with nearby keys like Search_Apps, Search_Channels. Any capitalization differences are already present in adjacent keys, so this is acceptable.


5508-5508: Unknown key addition is reasonable alongside existing unknown

Having both unknown and Unknown allows case‑specific reuse in different contexts. Just ensure both are used intentionally to avoid confusion later.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b866a3a and 50a74af.

📒 Files selected for processing (1)
  • packages/i18n/src/locales/en.i18n.json (9 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37773
File: apps/meteor/client/views/mediaCallHistory/MediaCallHistoryInternal.tsx:24-34
Timestamp: 2025-12-18T15:18:31.688Z
Learning: In apps/meteor/client/views/mediaCallHistory/MediaCallHistoryInternal.tsx, for internal call history items, the item.contactId is guaranteed to always match either the caller.id or callee.id in the call data, so the contact resolution in getContact will never result in undefined.
📚 Learning: 2025-11-19T12:32:29.696Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 37547
File: packages/i18n/src/locales/en.i18n.json:634-634
Timestamp: 2025-11-19T12:32:29.696Z
Learning: Repo: RocketChat/Rocket.Chat
Context: i18n workflow
Learning: In this repository, new translation keys should be added to packages/i18n/src/locales/en.i18n.json only; other locale files are populated via the external translation pipeline and/or fall back to English. Do not request adding the same key to all locale files in future reviews.

Applied to files:

  • packages/i18n/src/locales/en.i18n.json
📚 Learning: 2025-11-19T18:20:07.720Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37419
File: packages/i18n/src/locales/en.i18n.json:918-921
Timestamp: 2025-11-19T18:20:07.720Z
Learning: Repo: RocketChat/Rocket.Chat — i18n/formatting
Learning: This repository uses a custom message formatting parser in UI blocks/messages; do not assume standard Markdown rules. For keys like Call_ended_bold, Call_not_answered_bold, Call_failed_bold, and Call_transferred_bold in packages/i18n/src/locales/en.i18n.json, retain the existing single-asterisk emphasis unless maintainers request otherwise.

Applied to files:

  • packages/i18n/src/locales/en.i18n.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (7)
packages/i18n/src/locales/en.i18n.json (7)

494-494: All_directions label aligns with existing “All_*” filters

Key name and value follow existing patterns like All_status, All_time. No issues spotted.


1000-1000: Call_history key is consistent with existing call copy

Paired nicely with Call_history_provides_a_record... and fits other navigation/section labels. Looks good.


2033-2033: Ended status string looks correct

Short, neutral past-tense status suitable for call history / filters; no conflicts found with existing keys.


3847-3847: Not_answered call status is clear and unambiguous

Text matches existing phrasing such as Call_was_not_answered; safe to use as a compact label.


5342-5342: Time_slash_Date header looks appropriate

Good concise column/label text; no formatting or spacing issues.


6508-6508: Inbound label matches telephony terminology

Inbound as a standalone direction term is consistent with existing Incoming-style wording and fits call filters.


6759-6759: Outbound label complements Inbound for direction filters

Pairs cleanly with Inbound and with existing call-related keys; no localization or naming issues noticed.

@kodiakhq kodiakhq bot merged commit 7b851e6 into develop Dec 20, 2025
87 of 89 checks passed
@kodiakhq kodiakhq bot deleted the feat/callHistoryTable branch December 20, 2025 02:40
gaolin1 pushed a commit to gaolin1/medsense.webchat that referenced this pull request Jan 6, 2026
Co-authored-by: Tasso Evangelista <2263066+tassoevan@users.noreply.github.com>
@dougfabris dougfabris modified the milestones: 7.14.0, 8.0.0 Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants