Skip to content

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

Merged
dionisio-bot[bot] merged 6 commits into
developfrom
fix/voiceOpenInRoom
May 20, 2026
Merged

fix: Missing "Open in room" button on widget's shared screen#40331
dionisio-bot[bot] merged 6 commits into
developfrom
fix/voiceOpenInRoom

Conversation

@gabriellsh

@gabriellsh gabriellsh commented Apr 28, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Issue(s)

SSGA-13

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 appears on hover and lets users open shared content directly in the room.
  • Localization

    • Added an English label for the new "Open in room" button to support translations.

@dionisio-bot

dionisio-bot Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

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

@changeset-bot

changeset-bot Bot commented Apr 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 23ddc7b

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

This PR includes changesets to release 43 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/ui-composer Major
@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

coderabbitai Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Adds an "Open in room" action to the shared screen StreamCard: new i18n key, a new StreamCardOpenInRoomButton component, StreamCard accepts an optional onClickOpenInRoom prop and renders the button when provided, and the MediaCallWidget wires that handler to the existing direct-message action.

Changes

Open-in-Room Stream Card

Layer / File(s) Summary
Copy / Data Shape
packages/i18n/src/locales/en.i18n.json
Adds "Open_in_room": "Open in room" translation key.
New UI Element
packages/ui-voip/src/components/Cards/StreamCard/StreamCardOpenInRoom.tsx
Adds StreamCardOpenInRoomButton component (props: onClick, showOnHover?: boolean) that renders a small primary icon button labeled via Open_in_room i18n key inside a CardSlotContainer.
Component Integration
packages/ui-voip/src/components/Cards/StreamCard/StreamCard.tsx
Adds optional onClickOpenInRoom?: () => void prop to StreamCardProps and conditionally renders StreamCardOpenInRoomButton when provided (uses showOnHover={true}).
Widget Wiring
packages/ui-voip/src/views/MediaCallWidget/OngoingCallWithScreen.tsx
Passes existing onClickDirectMessage handler into the remote active screen StreamCard via the new onClickOpenInRoom prop.
Release Metadata
.changeset/little-cars-love.md
Changeset declaring minor version bumps for @rocket.chat/i18n and @rocket.chat/ui-voip with message describing the "Open in room" addition.

Sequence Diagram

sequenceDiagram
    participant User as User
    participant StreamCard as StreamCard UI
    participant OpenBtn as StreamCardOpenInRoomButton
    participant Widget as MediaCallWidget (handler)

    User->>StreamCard: Hover / view shared screen
    StreamCard->>OpenBtn: Render button (showOnHover = true)
    User->>OpenBtn: Click "Open in room"
    OpenBtn->>Widget: call onClickOpenInRoom()
    Widget->>Widget: invoke onClickDirectMessage logic (open room)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a missing 'Open in room' button to the shared screen card in the voice call widget.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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.

@coderabbitai coderabbitai Bot left a comment

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.

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.

@codecov

codecov Bot commented Apr 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.66%. Comparing base (328a709) to head (23ddc7b).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #40331      +/-   ##
===========================================
- Coverage    69.68%   69.66%   -0.03%     
===========================================
  Files         3322     3323       +1     
  Lines       122827   122843      +16     
  Branches     21921    21920       -1     
===========================================
- Hits         85598    85579      -19     
- Misses       33887    33899      +12     
- Partials      3342     3365      +23     
Flag Coverage Δ
e2e 59.22% <ø> (-0.09%) ⬇️
e2e-api 46.10% <ø> (-0.04%) ⬇️
unit 70.40% <73.33%> (-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.

@gabriellsh gabriellsh added the stat: QA assured Means it has been tested and approved by a company insider label May 12, 2026
@gabriellsh gabriellsh added this to the 8.5.0 milestone May 15, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label May 15, 2026
@dionisio-bot dionisio-bot Bot added this pull request to the merge queue May 15, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 15, 2026
@gabriellsh gabriellsh removed the stat: QA assured Means it has been tested and approved by a company insider label May 15, 2026
@dionisio-bot dionisio-bot Bot removed the stat: ready to merge PR tested and approved waiting for merge label May 15, 2026
@gabriellsh gabriellsh added the stat: QA assured Means it has been tested and approved by a company insider label May 15, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label May 15, 2026
@dionisio-bot dionisio-bot Bot added this pull request to the merge queue May 15, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 15, 2026
@gabriellsh gabriellsh removed the stat: QA assured Means it has been tested and approved by a company insider label May 18, 2026
@dionisio-bot dionisio-bot Bot removed the stat: ready to merge PR tested and approved waiting for merge label May 18, 2026
@gabriellsh gabriellsh added the stat: QA assured Means it has been tested and approved by a company insider label May 18, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label May 18, 2026
@gabriellsh gabriellsh removed the stat: QA assured Means it has been tested and approved by a company insider label May 19, 2026
@dionisio-bot dionisio-bot Bot removed the stat: ready to merge PR tested and approved waiting for merge label May 19, 2026
@gabriellsh gabriellsh added the stat: QA assured Means it has been tested and approved by a company insider label May 19, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label May 19, 2026
@gabriellsh gabriellsh removed the stat: QA assured Means it has been tested and approved by a company insider label May 20, 2026
@dionisio-bot dionisio-bot Bot removed the stat: ready to merge PR tested and approved waiting for merge label May 20, 2026
@gabriellsh gabriellsh added stat: ready to merge PR tested and approved waiting for merge stat: QA assured Means it has been tested and approved by a company insider labels May 20, 2026
@dionisio-bot dionisio-bot Bot added this pull request to the merge queue May 20, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 20, 2026
@scuciatto scuciatto removed the stat: QA assured Means it has been tested and approved by a company insider label May 20, 2026
@dionisio-bot dionisio-bot Bot removed the stat: ready to merge PR tested and approved waiting for merge label May 20, 2026
@scuciatto scuciatto added stat: ready to merge PR tested and approved waiting for merge stat: QA assured Means it has been tested and approved by a company insider labels May 20, 2026
@dionisio-bot dionisio-bot Bot added this pull request to the merge queue May 20, 2026
Merged via the queue into develop with commit ad7d424 May 20, 2026
82 of 84 checks passed
@dionisio-bot dionisio-bot Bot deleted the fix/voiceOpenInRoom branch May 20, 2026 10:48
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 type: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants