chore: mutate local SDPs, adding content tag to identify streams - #41654
Conversation
|
Looks like this PR is ready to merge! 🎉 |
|
WalkthroughThe change adds SDP parsing and mutation utilities. WebRTC negotiation tags local main and screen-share streams. Remote SDP processing derives stream mappings and assigns unidentified video tracks to screen share. ChangesSDP stream signaling
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant PeerConnection
participant Negotiation
participant SDP
PeerConnection->>Negotiation: provide local description
Negotiation->>SDP: tag main and screen-share streams
SDP-->>Negotiation: return updated SDP
Negotiation-->>PeerConnection: emit updated SDP
sequenceDiagram
participant RemoteSDP
participant ClientMediaCall
participant MediaCallWebRTCProcessor
participant SDP
participant MediaStreamManager
RemoteSDP->>ClientMediaCall: provide remote SDP signal
ClientMediaCall->>MediaCallWebRTCProcessor: pass complete signal
MediaCallWebRTCProcessor->>SDP: parse stream content
SDP-->>MediaCallWebRTCProcessor: return stream mappings
MediaCallWebRTCProcessor->>MediaStreamManager: update merged remote IDs
MediaStreamManager->>MediaStreamManager: assign unidentified video to screenShareRemote
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/media-signaling/src/lib/services/webrtc/sdp.ts (1)
1-3: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRemove new implementation comments.
The coding guideline prohibits implementation comments.
packages/media-signaling/src/lib/services/webrtc/sdp.ts#L1-L3: move RFC context to external documentation or express it through types.packages/media-signaling/src/lib/services/webrtc/sdp.ts#L186-L188: remove the return-shape comment.packages/media-signaling/src/lib/media/MediaStreamManager.ts#L123-L125: express the fallback intent through the method name or external documentation.As per coding guidelines, “Avoid code comments in the implementation.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/media-signaling/src/lib/services/webrtc/sdp.ts` around lines 1 - 3, Remove the implementation comments at packages/media-signaling/src/lib/services/webrtc/sdp.ts:1-3 and :186-188, preserving the existing MediaContent, StreamContent, and return behavior; move any necessary context to external documentation. At packages/media-signaling/src/lib/media/MediaStreamManager.ts:123-125, remove the fallback-intent comment and express that intent through the relevant method name or external documentation.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/media-signaling/src/lib/services/webrtc/sdp.ts`:
- Around line 1-3: Remove the implementation comments at
packages/media-signaling/src/lib/services/webrtc/sdp.ts:1-3 and :186-188,
preserving the existing MediaContent, StreamContent, and return behavior; move
any necessary context to external documentation. At
packages/media-signaling/src/lib/media/MediaStreamManager.ts:123-125, remove the
fallback-intent comment and express that intent through the relevant method name
or external documentation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 90718616-0dfd-4023-b4de-0fd665da304b
📒 Files selected for processing (4)
packages/media-signaling/src/lib/media/MediaStreamManager.tspackages/media-signaling/src/lib/services/webrtc/Negotiation.tspackages/media-signaling/src/lib/services/webrtc/index.tspackages/media-signaling/src/lib/services/webrtc/sdp.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
- GitHub Check: cubic · AI code reviewer
- GitHub Check: Hacktron Security Check
- 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/media-signaling/src/lib/services/webrtc/index.tspackages/media-signaling/src/lib/media/MediaStreamManager.tspackages/media-signaling/src/lib/services/webrtc/Negotiation.tspackages/media-signaling/src/lib/services/webrtc/sdp.ts
🧠 Learnings (3)
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In the Rocket.Chat repository, do not reference Biome lint rules in code review feedback. Biome is not used even if biome.json exists; only reference Biome rules if there is explicit, project-wide usage documented. For TypeScript files, review lint implications without Biome guidance unless the project enables Biome rules.
Applied to files:
packages/media-signaling/src/lib/services/webrtc/index.tspackages/media-signaling/src/lib/media/MediaStreamManager.tspackages/media-signaling/src/lib/services/webrtc/Negotiation.tspackages/media-signaling/src/lib/services/webrtc/sdp.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In this repository (RocketChat/Rocket.Chat), Biome lint rules are not used even if a biome.json exists. When reviewing TypeScript files (e.g., packages/ui-voip/src/providers/useMediaSession.ts), ensure lint suggestions do not reference Biome-specific rules. Rely on general ESLint/TypeScript lint rules and project conventions instead.
Applied to files:
packages/media-signaling/src/lib/services/webrtc/index.tspackages/media-signaling/src/lib/media/MediaStreamManager.tspackages/media-signaling/src/lib/services/webrtc/Negotiation.tspackages/media-signaling/src/lib/services/webrtc/sdp.ts
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.
Applied to files:
packages/media-signaling/src/lib/services/webrtc/index.tspackages/media-signaling/src/lib/media/MediaStreamManager.tspackages/media-signaling/src/lib/services/webrtc/Negotiation.tspackages/media-signaling/src/lib/services/webrtc/sdp.ts
🔇 Additional comments (4)
packages/media-signaling/src/lib/services/webrtc/index.ts (1)
2-2: LGTM!packages/media-signaling/src/lib/services/webrtc/Negotiation.ts (1)
3-3: LGTM!Also applies to: 210-242
packages/media-signaling/src/lib/media/MediaStreamManager.ts (2)
7-7: LGTM!Also applies to: 147-156
48-64: 🗄️ Data Integrity & IntegrationCheck SIP answers against the SDP mapping concern.
setRemoteIdsBySDPis not invoked from the shown remote-SDP or remote-description paths. If SIP SDP answers reachaddRemoteTrackwithout a correspondingsetRemoteIds(signal.streams)call orsetRemoteIdsBySDP(signal.sdp.sdp), remote video tracks can fall back toscreen-sharebased on theunidentified streampath.
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #41654 +/- ##
===========================================
+ Coverage 68.73% 68.80% +0.06%
===========================================
Files 4155 4156 +1
Lines 159672 159789 +117
Branches 28028 28040 +12
===========================================
+ Hits 109757 109936 +179
+ Misses 44742 44677 -65
- Partials 5173 5176 +3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/media-signaling/src/lib/services/webrtc/Processor.ts (1)
313-359: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd unit tests for the stream-ID merge logic.
combineRemoteIdsandgetRemoteIdsFromSDPare pure functions that implement the merge precedence between explicit signal streams and SDP-derived streams. This logic is easy to regress silently, since a wrong precedence or a missednullfilter only shows up as a misassigned video track at runtime.Add unit tests covering:
- Explicit streams only, SDP streams only, and both present with an overlapping
id.- SDP content with no matching tag (
getStreamTagByMediaContentreturns falsy), to confirm those entries are filtered out.- Empty
streamsand empty SDP-derived list, to confirmthis.streams.setRemoteIdsis not called.Do you want me to draft these test cases?
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/media-signaling/src/lib/services/webrtc/Processor.ts` around lines 313 - 359, Add unit tests for setRemoteIds, combineRemoteIds, and getRemoteIdsFromSDP covering explicit-only, SDP-only, and overlapping IDs with explicit-stream precedence; verify SDP entries without a tag are filtered out, and confirm setRemoteIds is not called when both input lists are empty. Mock the SDP helpers and streams dependency as needed to isolate these behaviors.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/media-signaling/src/lib/services/webrtc/Processor.ts`:
- Around line 313-359: Add unit tests for setRemoteIds, combineRemoteIds, and
getRemoteIdsFromSDP covering explicit-only, SDP-only, and overlapping IDs with
explicit-stream precedence; verify SDP entries without a tag are filtered out,
and confirm setRemoteIds is not called when both input lists are empty. Mock the
SDP helpers and streams dependency as needed to isolate these behaviors.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 3469ae8d-45dc-4cc6-817d-3fb0b7900e20
📒 Files selected for processing (5)
packages/media-signaling/src/definition/services/webrtc/IWebRTCProcessor.tspackages/media-signaling/src/lib/Call.tspackages/media-signaling/src/lib/media/MediaStreamManager.tspackages/media-signaling/src/lib/services/webrtc/Processor.tspackages/media-signaling/src/lib/services/webrtc/sdp.ts
💤 Files with no reviewable changes (1)
- packages/media-signaling/src/lib/media/MediaStreamManager.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/media-signaling/src/lib/services/webrtc/sdp.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (5)
- GitHub Check: 📦 Build Packages
- GitHub Check: cubic · AI code reviewer
- GitHub Check: CodeQL-Build
- GitHub Check: Hacktron Security Check
- 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/media-signaling/src/definition/services/webrtc/IWebRTCProcessor.tspackages/media-signaling/src/lib/services/webrtc/Processor.tspackages/media-signaling/src/lib/Call.ts
🧠 Learnings (3)
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In the Rocket.Chat repository, do not reference Biome lint rules in code review feedback. Biome is not used even if biome.json exists; only reference Biome rules if there is explicit, project-wide usage documented. For TypeScript files, review lint implications without Biome guidance unless the project enables Biome rules.
Applied to files:
packages/media-signaling/src/definition/services/webrtc/IWebRTCProcessor.tspackages/media-signaling/src/lib/services/webrtc/Processor.tspackages/media-signaling/src/lib/Call.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In this repository (RocketChat/Rocket.Chat), Biome lint rules are not used even if a biome.json exists. When reviewing TypeScript files (e.g., packages/ui-voip/src/providers/useMediaSession.ts), ensure lint suggestions do not reference Biome-specific rules. Rely on general ESLint/TypeScript lint rules and project conventions instead.
Applied to files:
packages/media-signaling/src/definition/services/webrtc/IWebRTCProcessor.tspackages/media-signaling/src/lib/services/webrtc/Processor.tspackages/media-signaling/src/lib/Call.ts
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.
Applied to files:
packages/media-signaling/src/definition/services/webrtc/IWebRTCProcessor.tspackages/media-signaling/src/lib/services/webrtc/Processor.tspackages/media-signaling/src/lib/Call.ts
🔇 Additional comments (3)
packages/media-signaling/src/definition/services/webrtc/IWebRTCProcessor.ts (1)
7-7: LGTM!Also applies to: 52-52
packages/media-signaling/src/lib/Call.ts (1)
1064-1090: LGTM!packages/media-signaling/src/lib/services/webrtc/Processor.ts (1)
6-9: LGTM!Also applies to: 360-363
There was a problem hiding this comment.
All reported issues were addressed across 5 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/media-signaling/jest.config.ts`:
- Around line 1-6: Add the explicit client testMatch pattern to the exported
Jest configuration alongside client.preset, using the monorepo pattern
'<rootDir>/src/**/*.client.spec.[jt]s?(x)' and preserving the existing Config
typing.
🪄 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 Plus
Run ID: add3db52-cb6c-4077-bf34-bf7c0e9d73a8
📒 Files selected for processing (4)
packages/media-signaling/jest.config.tspackages/media-signaling/package.jsonpackages/media-signaling/src/lib/services/webrtc/sdp.spec.tspackages/media-signaling/src/lib/services/webrtc/sdp.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/media-signaling/src/lib/services/webrtc/sdp.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
- GitHub Check: 📦 Build Packages
- GitHub Check: CodeQL-Build
- GitHub Check: Hacktron Security Check
- GitHub Check: CodeQL-Build
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{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/media-signaling/jest.config.tspackages/media-signaling/src/lib/services/webrtc/sdp.spec.ts
**/*.spec.ts
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.spec.ts: Use descriptive test names that clearly communicate expected behavior in Playwright tests
Use.spec.tsextension for test files (e.g.,login.spec.ts)
Files:
packages/media-signaling/src/lib/services/webrtc/sdp.spec.ts
🧠 Learnings (9)
📚 Learning: 2026-06-16T14:13:34.463Z
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 40974
File: packages/web-ui-registration/package.json:31-31
Timestamp: 2026-06-16T14:13:34.463Z
Learning: In Rocket.Chat’s monorepo, when reviewing a dependency entry and flagging that a specific version “does not exist” (e.g., in package.json), first verify the exact package/version directly against the npm registry (use URLs like https://registry.npmjs.org/<package>/<version> or https://www.npmjs.com/package/<package>/v/<version>). Do not rely on web search results for this check, since they may be stale or cached and may not reflect the latest published versions.
Applied to files:
packages/media-signaling/package.json
📚 Learning: 2026-06-16T14:13:49.795Z
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 40974
File: packages/web-ui-registration/package.json:26-26
Timestamp: 2026-06-16T14:13:49.795Z
Learning: During code reviews that check whether a dependency version exists in package.json (especially for Rocket.Chat’s rocket.chat/fuselage and related rocket.chat/fuselage-* packages), don’t rely on web search results. Instead, verify the version directly against the npm registry (e.g., via the npm registry API or the canonical package URL https://www.npmjs.com/package/<package>/v/<version>) before deciding that a version bump is invalid. If the version is present in the npm registry, do not flag it as invalid.
Applied to files:
packages/media-signaling/package.json
📚 Learning: 2026-06-16T14:13:59.986Z
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 40974
File: packages/ui-video-conf/package.json:25-25
Timestamp: 2026-06-16T14:13:59.986Z
Learning: In the Rocket.Chat monorepo, when reviewing a dependency version bump for rocket.chat/fuselage in a package.json, do not flag the new version constraint as “non-existent” or invalid unless you verify the published versions directly from the npm registry (https://www.npmjs.com/package/rocket.chat/fuselage). Don’t rely on search/web results for available versions since they can be stale.
Applied to files:
packages/media-signaling/package.json
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In the Rocket.Chat repository, do not reference Biome lint rules in code review feedback. Biome is not used even if biome.json exists; only reference Biome rules if there is explicit, project-wide usage documented. For TypeScript files, review lint implications without Biome guidance unless the project enables Biome rules.
Applied to files:
packages/media-signaling/jest.config.tspackages/media-signaling/src/lib/services/webrtc/sdp.spec.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In this repository (RocketChat/Rocket.Chat), Biome lint rules are not used even if a biome.json exists. When reviewing TypeScript files (e.g., packages/ui-voip/src/providers/useMediaSession.ts), ensure lint suggestions do not reference Biome-specific rules. Rely on general ESLint/TypeScript lint rules and project conventions instead.
Applied to files:
packages/media-signaling/jest.config.tspackages/media-signaling/src/lib/services/webrtc/sdp.spec.ts
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.
Applied to files:
packages/media-signaling/jest.config.tspackages/media-signaling/src/lib/services/webrtc/sdp.spec.ts
📚 Learning: 2025-12-10T21:00:43.645Z
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37091
File: ee/packages/abac/jest.config.ts:4-7
Timestamp: 2025-12-10T21:00:43.645Z
Learning: Adopt the monorepo-wide Jest testMatch pattern: <rootDir>/src/**/*.spec.{ts,js,mjs} (represented here as '**/src/**/*.spec.{ts,js,mjs}') to ensure spec files under any package's src directory are picked up consistently across all packages in the Rocket.Chat monorepo. Apply this pattern in jest.config.ts for all relevant packages to maintain uniform test discovery.
Applied to files:
packages/media-signaling/src/lib/services/webrtc/sdp.spec.ts
📚 Learning: 2026-02-24T19:22:48.358Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 38493
File: apps/meteor/tests/e2e/omnichannel/omnichannel-send-pdf-transcript.spec.ts:66-67
Timestamp: 2026-02-24T19:22:48.358Z
Learning: In Playwright end-to-end tests (e.g., under apps/meteor/tests/e2e/...), prefer locating elements by translated text (getByText) and ARIA roles (getByRole) over data-qa attributes. If translation values change, update the corresponding test locators accordingly. Never use data-qa locators. This guideline applies to all Playwright e2e test specs in the repository and helps keep tests robust to UI text changes and accessible semantics.
Applied to files:
packages/media-signaling/src/lib/services/webrtc/sdp.spec.ts
📚 Learning: 2026-03-06T18:10:15.268Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 39397
File: packages/gazzodown/src/code/CodeBlock.spec.tsx:47-68
Timestamp: 2026-03-06T18:10:15.268Z
Learning: In tests (especially those using testing-library/dom/jsdom) for Rocket.Chat components, the HTML <code> element has an implicit ARIA role of 'code'. Therefore, screen.getByRole('code') or screen.findByRole('code') will locate <code> elements even without a role attribute. Do not flag findByRole('code') as invalid in reviews; prefer using the implicit role instead of adding role="code" unless necessary for accessibility.
Applied to files:
packages/media-signaling/src/lib/services/webrtc/sdp.spec.ts
🔇 Additional comments (3)
packages/media-signaling/src/lib/services/webrtc/sdp.spec.ts (2)
1-496: LGTM!
312-321: 🎯 Functional Correctness
'speaker'is a validMediaContentvalue.packages/media-signaling/package.json (1)
29-31: LGTM!
Proposed changes (including videos or screenshots)
Mutate local SDPs, adding
a=content:...lines to identify the media stream's purpose (main or screen-share) on the peer.This removes the need for a secondary process to identify this same information (currently we map stream ids to content tags with a custom attribute that is sent alongside the sdp, but that is not available on SIP calls where the SDP is the only thing we exchange with the peer).
Issue(s)
DMVPR-22
Steps to test or reproduce
Further comments
Summary by CodeRabbit
New Features
Bug Fixes