Skip to content

refactor(ui-voip): extract PeerCardsView from MediaCallRoomSection - #41041

Merged
ggazzo merged 2 commits into
developfrom
refactor/extract-peer-cards-view
Jun 22, 2026
Merged

refactor(ui-voip): extract PeerCardsView from MediaCallRoomSection#41041
ggazzo merged 2 commits into
developfrom
refactor/extract-peer-cards-view

Conversation

@ggazzo

@ggazzo ggazzo commented Jun 22, 2026

Copy link
Copy Markdown
Member

Pure refactor — extracts the peer cards rendering (cards, screen-share stream cards, focus handling, and the popout "show call here" state) out of MediaCallRoomSection into a dedicated PeerCardsView component. No behavior change.

This extraction was originally bundled inside the voice-to-video escalation work (#40983, via #40869). Splitting it out as a standalone refactor keeps #40983's diff focused on the new escalation behavior — there MediaCallRoomSection now only adds the escalation button/state and the VideoEscalatedView swap on top of this component.

Summary by CodeRabbit

  • Refactor
    • Improved code organization of the media call interface for enhanced maintainability.

related to DMV-17 I

@dionisio-bot

dionisio-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

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

  • This PR is targeting the wrong base branch. It should target 8.7.0, but it targets 8.6.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d3a4792

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

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Peer card rendering is extracted from MediaCallRoomSection into a new PeerCardsView component. PeerCardsView owns focused-card state, usePlayMediaStream wiring, stream card construction, and popout/standard layout logic. MediaCallRoomSection is simplified to delegate its card list area to a single <PeerCardsView /> render.

Changes

PeerCardsView extraction

Layer / File(s) Summary
New PeerCardsView component
packages/ui-voip/src/views/MediaCallRoomSection/PeerCardsView.tsx
Introduces PeerCardsView with PeerCardsViewProps, internal focusedCard state ('remote' | 'local' | null), data wiring from useMediaCallView and useMediaCallInstance, usePlayMediaStream ref callbacks for remote and local video elements, conditional remoteStreamCard/localStreamCard construction, and a render path that handles both popout and standard CardListContainer layouts. Returns null when peerInfo is missing or has an unexpected shape.
MediaCallRoomSection refactor and changeset
packages/ui-voip/src/views/MediaCallRoomSection/MediaCallRoomSection.tsx, .changeset/extract-peer-cards-view.md
Removes useState, usePlayMediaStream, local focusedCard state, and all inline card list rendering. useMediaCallView now provides only localScreen; sessionState destructuring is narrowed to muted, held, peerInfo, connectionState, startedAt. The card list area is replaced with <PeerCardsView user={user} shouldWrapCards={shouldWrapCards} />. Changeset documents the patch.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title accurately describes the main change: extracting peer card rendering into a dedicated PeerCardsView component from MediaCallRoomSection. It is concise, clear, and directly reflects the primary refactoring objective.
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.


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.

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 32.50000% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.16%. Comparing base (7b54fb7) to head (d3a4792).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #41041      +/-   ##
===========================================
- Coverage    70.19%   70.16%   -0.03%     
===========================================
  Files         3360     3361       +1     
  Lines       129668   129690      +22     
  Branches     22485    22506      +21     
===========================================
- Hits         91017    91000      -17     
- Misses       35339    35375      +36     
- Partials      3312     3315       +3     
Flag Coverage Δ
unit 70.07% <32.50%> (-0.04%) ⬇️

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.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 3 files

Re-trigger cubic

@ggazzo
ggazzo force-pushed the refactor/extract-peer-cards-view branch from 86d73f0 to c89688e Compare June 22, 2026 15:49
@ggazzo ggazzo modified the milestones: 8.6.0, 8.7.0 Jun 22, 2026
@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Jun 22, 2026
@ggazzo
ggazzo merged commit ffaa115 into develop Jun 22, 2026
10 of 12 checks passed
@ggazzo
ggazzo deleted the refactor/extract-peer-cards-view branch June 22, 2026 17:17
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 type: chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants