Skip to content

fix: Missing "Open in room" button on widget's shared screen#40331

Open
gabriellsh wants to merge 2 commits intodevelopfrom
fix/voiceOpenInRoom
Open

fix: Missing "Open in room" button on widget's shared screen#40331
gabriellsh wants to merge 2 commits intodevelopfrom
fix/voiceOpenInRoom

Conversation

@gabriellsh
Copy link
Copy Markdown
Member

@gabriellsh gabriellsh commented Apr 28, 2026

Proposed changes (including videos or screenshots)

Issue(s)

CORE-2109

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • New Features
    • Added an "Open in room" button to the shared screen card in the voice call widget. The button displays on hover, allowing users to quickly access shared content within the room context.

@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot Bot commented Apr 28, 2026

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

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

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 28, 2026

🦋 Changeset detected

Latest commit: a92d75a

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

This PR includes changesets to release 42 packages
Name Type
@rocket.chat/i18n Minor
@rocket.chat/ui-voip Major
@rocket.chat/meteor Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-contexts Major
@rocket.chat/web-ui-registration Major
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/ui-client Major
@rocket.chat/uikit-playground Patch
@rocket.chat/gazzodown Major
@rocket.chat/livechat Patch
@rocket.chat/ui-avatar Major
@rocket.chat/ui-video-conf Major
@rocket.chat/queue-worker 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/models Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/presence-service Patch
@rocket.chat/abac Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch
@rocket.chat/server-fetch 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
Copy Markdown
Contributor

coderabbitai Bot commented Apr 28, 2026

Walkthrough

Adds an "Open in room" button to the shared screen card in the voice call widget. Changes include a new i18n translation key, a new button component, integration into StreamCard via a new optional prop, and wiring the button to an existing handler.

Changes

Cohort / File(s) Summary
Release Configuration
.changeset/little-cars-love.md
Changeset declaring minor version bumps for @rocket.chat/i18n and @rocket.chat/ui-voip packages.
Internationalization
packages/i18n/src/locales/en.i18n.json
Added English translation entry for "Open_in_room" key mapping to "Open in room" text.
UI Component Implementation
packages/ui-voip/src/components/Cards/StreamCard/StreamCard.tsx, packages/ui-voip/src/components/Cards/StreamCard/StreamCardOpenInRoom.tsx
Introduced StreamCardOpenInRoomButton component with optional showOnHover behavior, and updated StreamCard to accept and conditionally render the button via new onClickOpenInRoom prop.
Widget Integration
packages/ui-voip/src/views/MediaCallWidget/OngoingCallWithScreen.tsx
Connected the new button handler to existing onClickDirectMessage action on the remote active screen StreamCard.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

type: bug

🚥 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 title accurately describes the main change: reintroducing a missing 'Open in room' button on the widget's shared screen, which aligns with all the code changes across multiple packages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • CORE-2109: Request failed with status code 401

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

❤️ Share

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

Copy link
Copy Markdown
Contributor

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/ui-voip/src/views/MediaCallWidget/OngoingCallWithScreen.tsx`:
- Line 69: The StreamCard's onClickOpenInRoom prop is wired to
onClickDirectMessage (opening a DM) instead of the room navigation handler;
update the prop passed to StreamCard so onClickOpenInRoom uses the room-opening
function (e.g., onClickOpenInRoom or a new handler that navigates to the
room/channel context) rather than onClickDirectMessage, ensuring the
StreamCardOpenInRoom button triggers room navigation; locate the StreamCard
instantiation in OngoingCallWithScreen.tsx and replace the
onClickOpenInRoom={onClickDirectMessage} binding with the correct room
navigation handler.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: af1b04d0-d07c-4f0e-bf47-2d631e975ba8

📥 Commits

Reviewing files that changed from the base of the PR and between b59da7e and a92d75a.

📒 Files selected for processing (5)
  • .changeset/little-cars-love.md
  • packages/i18n/src/locales/en.i18n.json
  • packages/ui-voip/src/components/Cards/StreamCard/StreamCard.tsx
  • packages/ui-voip/src/components/Cards/StreamCard/StreamCardOpenInRoom.tsx
  • packages/ui-voip/src/views/MediaCallWidget/OngoingCallWithScreen.tsx
📜 Review details
⏰ 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: 📦 Build Packages
  • GitHub Check: CodeQL-Build
🧰 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/MediaCallWidget/OngoingCallWithScreen.tsx
  • packages/ui-voip/src/components/Cards/StreamCard/StreamCardOpenInRoom.tsx
  • packages/ui-voip/src/components/Cards/StreamCard/StreamCard.tsx
🧠 Learnings (10)
📓 Common learnings
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 39858
File: apps/meteor/tests/e2e/apps/uikit-interactions.spec.ts:123-151
Timestamp: 2026-04-17T18:33:27.211Z
Learning: In RocketChat/Rocket.Chat (`apps/meteor/tests/e2e/apps/uikit-interactions.spec.ts`), `executeBlockActionHandler` invocations originating from a **modal** surface intentionally do NOT include a `block_action_room` (room property) in the interaction payload. Modals are not scoped to a room, so no room id is available in that context. Do not flag the absence of a room assertion in the modal block-action test as a missing coverage bug; instead, document it explicitly with a `test.step` asserting the room entry is `undefined`.
📚 Learning: 2026-02-26T19:22:29.385Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/views/CallHistoryContextualbar/CallHistoryActions.tsx:40-40
Timestamp: 2026-02-26T19:22:29.385Z
Learning: For TSX files in the UI VOIP package, ensure that when a media session state is 'unavailable', the voiceCall action is excluded from the actions object passed to CallHistoryActions so it does not render in the menu. This filtering should occur upstream (before getItems is called) to avoid tooltips or UI hints for unavailable actions. If there are multiple actions with availability states, implement a centralized helper to filter actions based on session state.

Applied to files:

  • packages/ui-voip/src/views/MediaCallWidget/OngoingCallWithScreen.tsx
  • packages/ui-voip/src/components/Cards/StreamCard/StreamCardOpenInRoom.tsx
  • packages/ui-voip/src/components/Cards/StreamCard/StreamCard.tsx
📚 Learning: 2026-03-26T16:42:35.978Z
Learnt from: pierre-lehnen-rc
Repo: RocketChat/Rocket.Chat PR: 39870
File: packages/ui-voip/src/providers/useScreenShareStreams.ts:13-21
Timestamp: 2026-03-26T16:42:35.978Z
Learning: In `packages/ui-voip/src/providers/useScreenShareStreams.ts` (RocketChat/Rocket.Chat), the early return on `!instanceState.confirmed` in `getStreamWrappers` is intentional design: screen-share streams (both local and remote) are not used during unconfirmed/pending calls, so returning `null` for the whole unconfirmed state is correct. Do not suggest splitting the guard to expose the local participant stream before call confirmation.

Applied to files:

  • packages/ui-voip/src/views/MediaCallWidget/OngoingCallWithScreen.tsx
📚 Learning: 2025-12-18T15:18:31.688Z
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.

Applied to files:

  • packages/ui-voip/src/views/MediaCallWidget/OngoingCallWithScreen.tsx
📚 Learning: 2026-04-17T17:38:15.994Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 39858
File: packages/ui-kit/src/interactions/UserInteraction.ts:33-33
Timestamp: 2026-04-17T17:38:15.994Z
Learning: In RocketChat/Rocket.Chat (`packages/ui-kit/src/interactions/UserInteraction.ts`), `ViewSubmitUserInteraction` and `ViewClosedUserInteraction` intentionally do NOT include `rid` when the interaction originates from a **modal** surface. Modals are not scoped to a room, so no room id is available in that context. The `rid?: string` field is optional to support the contextual bar surface (where room context exists) while remaining absent for modals. Do not flag the absence of `rid` in modal viewSubmit/viewClosed interactions as a missing-context bug.

Applied to files:

  • packages/ui-voip/src/views/MediaCallWidget/OngoingCallWithScreen.tsx
📚 Learning: 2026-03-27T14:52:56.865Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 39892
File: apps/meteor/client/views/room/contextualBar/Threads/Thread.tsx:150-155
Timestamp: 2026-03-27T14:52:56.865Z
Learning: In Rocket.Chat, there are two different `ModalBackdrop` components with different prop APIs. During review, confirm the import source: (1) `rocket.chat/fuselage` `ModalBackdrop` uses `ModalBackdropProps` based on `BoxProps` (so it supports `onClick` and other Box/DOM props) and does not have an `onDismiss` prop; (2) `rocket.chat/ui-client` `ModalBackdrop` uses a narrower props interface like `{ children?: ReactNode; onDismiss?: () => void }` and handles Escape keypress and outside mouse-up, and it does not forward arbitrary DOM props such as `onClick`. Flag mismatched props (e.g., `onDismiss` passed to the fuselage component or `onClick` passed to the ui-client component) and ensure the usage matches the correct component being imported.

Applied to files:

  • packages/ui-voip/src/views/MediaCallWidget/OngoingCallWithScreen.tsx
  • packages/ui-voip/src/components/Cards/StreamCard/StreamCardOpenInRoom.tsx
  • packages/ui-voip/src/components/Cards/StreamCard/StreamCard.tsx
📚 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:

  • .changeset/little-cars-love.md
📚 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:

  • .changeset/little-cars-love.md
📚 Learning: 2026-03-16T21:50:37.589Z
Learnt from: amitb0ra
Repo: RocketChat/Rocket.Chat PR: 39676
File: .changeset/migrate-users-register-openapi.md:3-3
Timestamp: 2026-03-16T21:50:37.589Z
Learning: For changes related to OpenAPI migrations in Rocket.Chat/OpenAPI, when removing endpoint types and validators from rocket.chat/rest-typings (e.g., UserRegisterParamsPOST, /v1/users.register) document this as a minor changeset (not breaking) per RocketChat/Rocket.Chat-Open-API#150 Rule 7. Note that the endpoint type is re-exposed via a module augmentation .d.ts in the consuming package (e.g., packages/web-ui-registration/src/users-register.d.ts). In reviews, ensure the changeset clearly states: this is a non-breaking change, the major version should not be bumped, and the changeset reflects a minor version bump. Do not treat this as a breaking change during OpenAPI migrations.

Applied to files:

  • .changeset/little-cars-love.md
📚 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
🔇 Additional comments (4)
.changeset/little-cars-love.md (1)

1-6: Looks consistent.

The changeset metadata matches the PR scope and the minor bumps look appropriate for this UI addition.

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

4043-4043: Looks good — translation key is added correctly.

Open_in_room is well-formed and appropriately placed in en.i18n.json for this change.

Based on learnings: In this repository, new translation keys should be added to packages/i18n/src/locales/en.i18n.json only; other locale files are handled by the translation pipeline/fallback.

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

4-48: Looks good.

The new onClickOpenInRoom prop is threaded through cleanly and the button is conditionally rendered in the right place. No concerns here.

packages/ui-voip/src/components/Cards/StreamCard/StreamCardOpenInRoom.tsx (1)

1-22: Looks good.

The component is minimal, typed cleanly, and follows the existing card-slot hover pattern. No concerns here.


{remoteScreen?.active && (
<StreamCard autoHeight maxHeight={120}>
<StreamCard autoHeight maxHeight={120} onClickOpenInRoom={onClickDirectMessage}>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -nC4 '\bonClickDirectMessage\b' packages/ui-voip
rg -nC4 '\bonClickOpenInRoom\b' packages/ui-voip
rg -nC4 '\bOpen_in_room\b|\bDirect_Message\b' packages/i18n/src/locales/en.i18n.json packages/ui-voip/src

Repository: RocketChat/Rocket.Chat

Length of output: 21534


The "Open in room" button on the shared screen card navigates to a direct message instead of the room context.

Line 69 wires the onClickOpenInRoom prop to onClickDirectMessage, which opens a DM conversation. The button label "Open in room" and prop name both suggest opening a room/channel view, not a direct message. The shared-screen card will navigate users to the wrong surface.

Code reference
<StreamCard autoHeight maxHeight={120} onClickOpenInRoom={onClickDirectMessage}>

The button renders with label "Open in room" (from StreamCardOpenInRoom.tsx) but invokes DM navigation.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/ui-voip/src/views/MediaCallWidget/OngoingCallWithScreen.tsx` at line
69, The StreamCard's onClickOpenInRoom prop is wired to onClickDirectMessage
(opening a DM) instead of the room navigation handler; update the prop passed to
StreamCard so onClickOpenInRoom uses the room-opening function (e.g.,
onClickOpenInRoom or a new handler that navigates to the room/channel context)
rather than onClickDirectMessage, ensuring the StreamCardOpenInRoom button
triggers room navigation; locate the StreamCard instantiation in
OngoingCallWithScreen.tsx and replace the
onClickOpenInRoom={onClickDirectMessage} binding with the correct room
navigation handler.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 73.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.85%. Comparing base (ceefff9) to head (a92d75a).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #40331      +/-   ##
===========================================
+ Coverage    69.81%   69.85%   +0.04%     
===========================================
  Files         3296     3298       +2     
  Lines       119173   119259      +86     
  Branches     21479    21527      +48     
===========================================
+ Hits         83197    83313     +116     
+ Misses       32668    32656      -12     
+ Partials      3308     3290      -18     
Flag Coverage Δ
e2e 59.74% <ø> (+0.02%) ⬆️
e2e-api 46.33% <ø> (+0.09%) ⬆️
unit 70.61% <73.33%> (+0.03%) ⬆️

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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant