Skip to content

Conversation

@gabriellsh
Copy link
Member

@gabriellsh gabriellsh commented Dec 8, 2025

Proposed changes (including videos or screenshots)

Issue(s)

VGA-105

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • New Features

    • Added detailed call history panel displaying contact information, call direction, date, duration, and call ID
    • Support for both internal and external contacts in call history view
  • Localization

    • Added translation strings for call-related information (Call ID, Duration, Incoming/Outgoing voice calls)
  • Tests

    • Added Storybook stories for call history component testing

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

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 8, 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 8, 2025

⚠️ No Changeset found

Latest commit: 86981c9

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

@gabriellsh gabriellsh marked this pull request as draft December 8, 2025 22:07
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This PR introduces UI components and translations for a call history contextual bar feature, including display components for internal and external contacts, a new Storybook story file, date formatting utilities, and translation keys for call-related labels.

Changes

Cohort / File(s) Summary
Translation Keys
packages/i18n/src/locales/en.i18n.json
Added four new i18n keys: Call_ID, Duration, Incoming_voice_call, and Outgoing_voice_call for call history display labels
Package Dependencies
packages/ui-voip/package.json
Added @rocket.chat/fuselage-ui-kit as a workspace dependency across dependencies, devDependencies, and peerDependencies sections
Call History Components
packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryContextualbar.tsx, CallHistoryInternalUser.tsx, CallHistoryExternalUser.tsx
Introduced three new React components: main contextual bar rendering call history with contact details, call metadata, and action buttons; internal user display with avatar and presence status; external user display with formatted phone number
Storybook Stories
packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryContextualbar.stories.tsx
Added Storybook story file with two story variants (Default and ExternalContact) for the CallHistoryContextualbar component with mock data and translation decorators
Date Formatting Utility
packages/ui-voip/src/views/CallHistoryContextualbar/useFullStartDate.ts
Introduced useFullStartDate React hook that formats a Date object to locale-aware string using the current UI language

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • CallHistoryContextualbar.tsx: Type guard logic for distinguishing internal/external contacts, UiKit block construction (getBlocks), and context provider setup require careful review
  • CallHistoryInternalUser.tsx: Multiple hook dependencies (useUserPresence, useUserDisplayName, useUserAvatarPath) and memoization patterns should be validated
  • Package.json: Verify @rocket.chat/fuselage-ui-kit workspace dependency is consistently applied across all three sections (dependencies, devDependencies, peerDependencies)

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • tassoevan
  • KevLehman

Poem

A rabbit hops through call logs bright, 🐰
With internal users, external might,
Avatars glow and durations flow,
Status bullets steal the show—
Call history shines, a feature so fine! 📞✨

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: Media Call history contextual bar' clearly summarizes the main change - adding a contextual bar component for call history display.
Linked Issues check ✅ Passed The PR implements the call history contextual bar component as specified in VGA-75, with all supporting features including translations, UI components, and helper hooks.
Out of Scope Changes check ✅ Passed All changes are within scope: translation keys for voice calls, UI components for call history display, stories for testing, and supporting hooks - all directly related to the contextual bar feature.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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
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: 3

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

914-914: Optional: unify “ID” acronym casing across call keys

This adds Call_ID while nearby we have Caller_Id and Client_ID. Consider standardizing on one style in a follow‑up (ID vs Id) to reduce drift. No change required for this PR.

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

7-19: LGTM! Component implementation is clean and straightforward.

The phone number formatting logic (line 16) is simple and correct. If this pattern is reused elsewhere, consider extracting it to a utility function.

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

66-66: Clarify or remove the TODO comment.

The comment mentions "Duration will also be displayed here," but duration is already shown at lines 123-125. If this TODO refers to integrating server-side block generation, consider updating the comment for clarity.

Do you want me to help generate a shared function for UiKit block generation that could be used on both client and server?


87-87: Remove commented-out code.

The commented-out destructured variables should be removed. If these actions will be used in the future, they can be added back when needed.

Apply this diff:

-	const { voiceCall, /* videoCall, jumpToMessage, */ directMessage, userInfo /* voiceCallExtension, direction */ } = actions;
+	const { voiceCall, directMessage, userInfo } = actions;

120-120: Consider alternative to negative margin.

The negative margin mbs={-8} might indicate a layout issue. Consider adjusting the MessageBlock or InfoPanelSection spacing instead of using negative margins.

📜 Review details

Configuration used: CodeRabbit 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 dc8ecd3 and b20679b.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (7)
  • packages/i18n/src/locales/en.i18n.json (4 hunks)
  • packages/ui-voip/package.json (2 hunks)
  • packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryContextualbar.stories.tsx (1 hunks)
  • packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryContextualbar.tsx (1 hunks)
  • packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryExternalUser.tsx (1 hunks)
  • packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryInternalUser.tsx (1 hunks)
  • packages/ui-voip/src/views/CallHistoryContextualbar/useFullStartDate.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/views/CallHistoryContextualbar/CallHistoryContextualbar.tsx
  • packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryInternalUser.tsx
  • packages/ui-voip/src/views/CallHistoryContextualbar/useFullStartDate.ts
  • packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryContextualbar.stories.tsx
  • packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryExternalUser.tsx
🧠 Learnings (6)
📓 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-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/CallHistoryContextualbar/CallHistoryContextualbar.tsx
  • packages/i18n/src/locales/en.i18n.json
📚 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:

  • packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryInternalUser.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/ui-voip/package.json
  • packages/i18n/src/locales/en.i18n.json
📚 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:

  • packages/ui-voip/package.json
📚 Learning: 2025-11-17T22:38:48.631Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37505
File: packages/i18n/src/locales/en.i18n.json:3765-3765
Timestamp: 2025-11-17T22:38:48.631Z
Learning: Rocket.Chat i18n copy: Keep sentence case for the value of "Notification_Desktop_show_voice_calls" in packages/i18n/src/locales/en.i18n.json (“Show desktop notifications for voice calls”) per design directive; do not change to Title Case even if nearby labels differ.

Applied to files:

  • packages/i18n/src/locales/en.i18n.json
🧬 Code graph analysis (3)
packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryInternalUser.tsx (2)
packages/ui-contexts/src/index.ts (2)
  • useUserAvatarPath (83-83)
  • useUserPresence (99-99)
packages/livechat/src/components/Avatar/index.tsx (1)
  • Avatar (21-51)
packages/ui-voip/src/views/CallHistoryContextualbar/useFullStartDate.ts (1)
packages/ui-contexts/src/index.ts (1)
  • useLanguage (38-38)
packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryContextualbar.stories.tsx (1)
packages/mock-providers/src/index.ts (1)
  • mockAppRoot (3-3)
⏰ 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 (10)
packages/ui-voip/package.json (1)

37-37: LGTM! Dependency additions follow the established pattern.

The addition of @rocket.chat/fuselage-ui-kit to both devDependencies and peerDependencies is consistent with how other workspace UI packages are declared in this package (e.g., @rocket.chat/ui-avatar, @rocket.chat/ui-client). This pattern correctly ensures the dependency is available for development/testing while requiring consuming applications to provide it at runtime.

Also applies to: 80-80

packages/ui-voip/src/views/CallHistoryContextualbar/useFullStartDate.ts (2)

1-2: LGTM! Imports are correct.

The imports are appropriate for this hook's functionality.


4-13: Implementation looks solid.

The hook correctly memoizes the formatted date with appropriate dependencies, and the use of Intl.DateTimeFormat with dateStyle: 'full' and timeStyle: 'medium' provides good internationalization support.

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

1807-1807: LGTM: generic label

“Duration” fits existing patterns (e.g., Chat_Duration). No issues.


3970-3970: Key is properly wired in UI and Storybook

The new Outgoing_voice_call key is correctly referenced in the CallHistoryContextualbar component (packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryContextualbar.tsx:111) using the translation function, and the Storybook stories include it in mock translations. Implementation is complete.


2574-2574: Label is clear and actively used in call history UI; no duplication found.

The new Incoming_voice_call key is already integrated in CallHistoryContextualbar.tsx (line 111) where it correctly displays inbound voice calls in the call history. It serves a distinct purpose from existing keys like Incoming_call (generic widget headers) and Incoming_call_ellipsis (notifications), with no conflicts or unnecessary duplication.

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

1-65: LGTM! Type definitions and setup are well-structured.

The type guard isInternalCallHistoryContact correctly uses the in operator to distinguish contact types, and all type definitions are clear and complete.


84-154: Component logic is correct and handles both contact types properly.

The conditional rendering for internal vs external contacts works well, and the UI structure is clear.

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

13-23: LGTM! Hook usage and memoization are correct.

The avatar URL is properly memoized with correct dependencies, and all hooks are used appropriately.

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

1-86: LGTM! Storybook stories are well-structured and comprehensive.

The stories provide good coverage of both internal and external contact scenarios, and the translation mocks include all necessary keys referenced by the component.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 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 -545B
queue-worker-service 132MiB 132MiB +247B
ddp-streamer-service 126MiB 126MiB -3.2KiB
account-service 113MiB 113MiB +1.4KiB
stream-hub-service 110MiB 110MiB -153B
presence-service 110MiB 110MiB +240B
authorization-service 110MiB 110MiB -631B

📊 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 17:50", "12/17 19:37 (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]
  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]
  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]
  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]
  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]
  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]
  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.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]
Loading

Statistics (last 23 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-37739
  • Baseline: develop
  • Timestamp: 2025-12-17 19:37:52 UTC
  • Historical data points: 23

Updated: Wed, 17 Dec 2025 19:37:53 GMT

@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.69%. Comparing base (a354057) to head (86981c9).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37739      +/-   ##
===========================================
+ Coverage    67.61%   67.69%   +0.08%     
===========================================
  Files         3463     3463              
  Lines       113694   113694              
  Branches     20902    20902              
===========================================
+ Hits         76875    76968      +93     
+ Misses       34687    34589      -98     
- Partials      2132     2137       +5     
Flag Coverage Δ
e2e 57.19% <ø> (-0.02%) ⬇️
e2e-api 43.57% <ø> (+1.00%) ⬆️

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.

@gabriellsh gabriellsh marked this pull request as ready for review December 16, 2025 22:49
@tassoevan tassoevan added this to the 7.14.0 milestone Dec 17, 2025
tassoevan
tassoevan previously approved these changes Dec 17, 2025
@gabriellsh gabriellsh added the stat: QA assured Means it has been tested and approved by a company insider label Dec 17, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Dec 17, 2025
@gabriellsh gabriellsh changed the title feat: Media Call history contextual bar feat: Media Call History contextual bar Dec 17, 2025
@kodiakhq kodiakhq bot merged commit fceee73 into develop Dec 17, 2025
51 checks passed
@kodiakhq kodiakhq bot deleted the feat/callHistoryContextual branch December 17, 2025 20:26
@gabriellsh gabriellsh restored the feat/callHistoryContextual branch December 17, 2025 20:32
gaolin1 pushed a commit to gaolin1/medsense.webchat that referenced this pull request Jan 6, 2026
@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.

4 participants