Skip to content

Conversation

@gabriellsh
Copy link
Member

@gabriellsh gabriellsh commented Jan 13, 2026

Proposed changes (including videos or screenshots)

Added a quick link to go back to the callers DM.

image

Issue(s)

VGA-85

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • New Features

    • Direct Message quick-link button added to the call widget header for one-click navigation to a participant's conversation.
  • Improvements

    • Media call tracking and context now propagate the currently open DM room to improve widget behavior across room views.
    • New navigation hook streamlines DM routing from call-related UI.
  • Tests

    • Unit tests updated to cover the new navigation hook and extended media-call context shape.

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

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Jan 13, 2026

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 Jan 13, 2026

🦋 Changeset detected

Latest commit: afcbedd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 40 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-voip Patch
@rocket.chat/gazzodown Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/livechat Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/http-router Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/abac Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 13, 2026

Walkthrough

Adds a DM quick-link from the call widget: introduces a new useGoToDirectMessage hook, extends MediaCall context with onClickDirectMessage and setOpenRoomId, tracks the open room from Room, and surfaces a Direct Message button in the OngoingCall widget.

Changes

Cohort / File(s) Summary
Changelog
.changeset/eighty-weeks-rush.md
Patch entry documenting the new call-widget quick link to participant DM.
useGoToDirectMessage Hook
packages/ui-client/src/hooks/useGoToDirectMessage.ts, packages/ui-client/src/hooks/useGoToDirectMessage.spec.ts, packages/ui-client/src/hooks/index.ts
New hook that resolves target user, checks permissions/subscriptions, returns a navigation function (or undefined); includes route typing augmentation and unit tests; re-export added.
MediaCall Context & Provider
packages/ui-voip/src/context/MediaCallContext.ts, packages/ui-voip/src/context/MediaCallProvider.tsx, packages/ui-voip/src/context/MockedMediaCallProvider.tsx
Adds onClickDirectMessage and setOpenRoomId to context shapes and provider; exposes setter and click handler; mocks updated.
Room Tracking Hook & Exports
packages/ui-voip/src/hooks/useMediaCallOpenRoomTracker.ts, packages/ui-voip/src/hooks/index.ts, packages/ui-voip/src/index.ts, apps/meteor/client/views/room/Room.tsx
New hook to sync openRoomId into MediaCallContext; Room component invokes it; exports re-exported from package index.
Widget UI & Layout
packages/ui-voip/src/views/MediaCallWidget/OngoingCall.tsx, packages/ui-voip/src/views/MediaCallWidget/WidgetHeader.tsx, packages/ui-voip/src/views/MediaCallWidget/OngoingCall.stories.tsx
OngoingCall reads onClickDirectMessage from context and conditionally renders a Direct Message ActionButton; header layout adjusted to flex; story added for DM button.
Navigation Refactor in Call History / User Actions
apps/meteor/client/views/mediaCallHistory/useMediaCallInternalHistoryActions.ts, apps/meteor/client/views/room/hooks/useUserInfoActions/actions/useDirectMessageAction.ts
Replaced previous direct-message navigation logic with useGoToDirectMessage usage; removed older permission/subscription/routing side-effect code.
Meteor Provider & Tests
apps/meteor/client/providers/MediaCallProvider.tsx, apps/meteor/client/views/room/hooks/useUserInfoActions/actions/useUserMediaCallAction.spec.tsx
Unauthorized provider context now includes setOpenRoomId: undefined; tests updated to include setOpenRoomId in mocked MediaCallContext.

Sequence Diagram

sequenceDiagram
    participant Room as Room Component
    participant Tracker as useMediaCallOpenRoomTracker
    participant Context as MediaCallContext
    participant Provider as MediaCallProvider
    participant Widget as OngoingCall Widget
    participant User as User
    participant Router as Router

    Room->>Tracker: invoke with room._id
    Tracker->>Context: read setOpenRoomId
    Tracker->>Context: setOpenRoomId(room._id)
    Tracker-->>Context: on unmount setOpenRoomId(undefined)

    Widget->>Context: useMediaCallContext()
    Context-->>Widget: { onClickDirectMessage, ... }

    User->>Widget: click Direct Message button
    Widget->>Context: call onClickDirectMessage()
    Context->>Router: navigate to direct message route (rid)
    Router-->>Room: updates current room
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • dougfabris
  • aleksandernsilva

Poem

🐰 A hop, a click, a DM appears,

From call to chat with nary a fear;
I tracked the room and opened the door,
Now messages hop across the floor. 🥕📨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main change: adding a Direct Message button to the Media Call widget.
Linked Issues check ✅ Passed The implementation fully addresses VGA-85 by adding an in-widget Direct Message button that navigates users from the active media call UI to the corresponding DM room.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing the Direct Message button feature. No unrelated modifications detected.
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.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/widgetGoToRoom

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 changed the base branch from develop to chore/refactorDirectMessageAction January 13, 2026 20:17
@gabriellsh gabriellsh added this to the 8.1.0 milestone Jan 13, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

📦 Docker Image Size Report

➡️ Changes

Service Current Baseline Change Percent
sum of all images 0B 0B 0B
account-service 0B 0B 0B
authorization-service 0B 0B 0B
ddp-streamer-service 0B 0B 0B
omnichannel-transcript-service 0B 0B 0B
presence-service 0B 0B 0B
queue-worker-service 0B 0B 0B
rocketchat 0B 0B 0B

📊 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/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 21:03", "12/22 18:54", "12/23 16:16", "12/24 19:38", "12/25 17:51", "12/26 13:18", "12/29 19:01", "12/30 20:52", "01/19 22:07 (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, 0.11, 0.11, 0.11, 0.00]
  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, 0.11, 0.11, 0.11, 0.00]
  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, 0.12, 0.12, 0.12, 0.00]
  line "omnichannel-transcript-service" [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, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.00]
  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, 0.11, 0.11, 0.11, 0.00]
  line "queue-worker-service" [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, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.00]
  line "rocketchat" [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.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.00]
Loading

Statistics (last 30 days):

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

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

  • Tag: pr-38169
  • Baseline: develop
  • Timestamp: 2026-01-19 22:07:09 UTC
  • Historical data points: 30

Updated: Mon, 19 Jan 2026 22:07:10 GMT

Base automatically changed from chore/refactorDirectMessageAction to develop January 17, 2026 20:22
@codecov
Copy link

codecov bot commented Jan 19, 2026

Codecov Report

❌ Patch coverage is 63.33333% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.67%. Comparing base (1e0b37f) to head (afcbedd).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #38169      +/-   ##
===========================================
- Coverage    70.71%   70.67%   -0.05%     
===========================================
  Files         3141     3142       +1     
  Lines       108799   108820      +21     
  Branches     19587    19644      +57     
===========================================
- Hits         76942    76912      -30     
- Misses       29857    29911      +54     
+ Partials      2000     1997       -3     
Flag Coverage Δ
e2e 60.30% <100.00%> (-0.05%) ⬇️
e2e-api 47.99% <ø> (-1.10%) ⬇️
unit 71.77% <62.06%> (-0.01%) ⬇️

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.

@dougfabris dougfabris marked this pull request as ready for review January 19, 2026 17:18
@dougfabris dougfabris requested a review from a team as a code owner January 19, 2026 17:18
Copy link
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 19 files

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

🤖 Fix all issues with AI agents
In @.changeset/eighty-weeks-rush.md:
- Line 7: Update the changelog sentence that currently reads "Introduces in the
call widget a quick link that redirects to the participants direct message" to
use the correct possessive form by changing "participants direct message" to
"participant's direct message", ensuring the message now reads "Introduces in
the call widget a quick link that redirects to the participant's direct
message".

In `@packages/ui-client/src/hooks/useGoToDirectMessage.ts`:
- Around line 20-27: The hook creates an unnecessary in-memory subscription by
passing an empty string; instead pass the actual username (possibly undefined)
and make useUserSubscriptionByName guard against falsy input so it returns
undefined early without creating watchers. Update useGoToDirectMessage to call
useUserSubscriptionByName(targetUser.username) (not ''), and change the
useUserSubscriptionByName implementation/signature to accept string | undefined
and immediately return undefined when username is falsy, ensuring no
subscription/predicate is created and types are updated accordingly.
🧹 Nitpick comments (3)
packages/ui-voip/src/views/MediaCallWidget/OngoingCall.stories.tsx (1)

66-72: LGTM! Story demonstrates the DM button feature.

The story correctly wraps OngoingCall with MockedMediaCallProvider passing onClickDirectMessage to enable the DM button rendering.

Consider using action('onClickDirectMessage') from @storybook/addon-actions instead of () => undefined to log interactions in the Storybook Actions panel, which aids visual testing.

packages/ui-voip/src/context/MediaCallProvider.tsx (1)

13-13: Remove commented-out import.

Per coding guidelines, avoid code comments in implementation files. This commented import should be removed.

Suggested fix
-	// useRouteParameter,
apps/meteor/client/views/mediaCallHistory/useMediaCallInternalHistoryActions.ts (1)

50-50: Consider passing undefined instead of empty string.

While this works correctly (empty string is falsy, so the alreadyOpen check behaves as expected), passing undefined is semantically clearer when no room is open.

Suggested fix
-	const goToDirectMessage = useGoToDirectMessage({ username: contact.username }, openRoomId ?? '');
+	const goToDirectMessage = useGoToDirectMessage({ username: contact.username }, openRoomId);

tassoevan and others added 2 commits January 19, 2026 15:01
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Douglas Fabris <devfabris@gmail.com>
@gabriellsh gabriellsh added the stat: QA assured Means it has been tested and approved by a company insider label Jan 19, 2026
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jan 19, 2026
@kodiakhq kodiakhq bot merged commit 00b36c5 into develop Jan 19, 2026
44 checks passed
@kodiakhq kodiakhq bot deleted the feat/widgetGoToRoom branch January 19, 2026 22:28
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