Skip to content

chore: mutate local SDPs, adding content tag to identify streams - #41654

Merged
pierre-lehnen-rc merged 6 commits into
developfrom
chore/mutate-local-sdps-add-content-tag
Aug 19, 2026
Merged

chore: mutate local SDPs, adding content tag to identify streams#41654
pierre-lehnen-rc merged 6 commits into
developfrom
chore/mutate-local-sdps-add-content-tag

Conversation

@pierre-lehnen-rc

@pierre-lehnen-rc pierre-lehnen-rc commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

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

Review in cubic

Summary by CodeRabbit

  • New Features

    • Improved WebRTC stream identification using signaling and SDP metadata.
    • Added more reliable mapping of main video and screen-sharing streams during negotiation.
    • Enhanced handling of stream information across remote connections.
  • Bug Fixes

    • Unidentified remote video tracks are now assigned to screen sharing instead of being discarded.
    • Unsupported signaling types are safely ignored during call setup.
    • Remote stream information is now consolidated more reliably from available connection data.
    • Improved preservation and processing of SDP stream content during negotiation.

@dionisio-bot

dionisio-bot Bot commented Jul 31, 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 Jul 31, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b60e6c0

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 Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The 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.

Changes

SDP stream signaling

Layer / File(s) Summary
SDP parsing and mutation utilities
packages/media-signaling/src/lib/services/webrtc/sdp.ts, packages/media-signaling/src/lib/services/webrtc/index.ts, packages/media-signaling/src/lib/services/webrtc/sdp.spec.ts, packages/media-signaling/jest.config.ts, packages/media-signaling/package.json
Adds SDP parsing, serialization, stream-content mutation, stream mapping, public exports, tests, and package test/typecheck scripts.
Local description content tagging
packages/media-signaling/src/lib/services/webrtc/Negotiation.ts
Mutates local descriptions to label main and screen-share stream IDs as main and slides.
Remote SDP stream mapping
packages/media-signaling/src/definition/services/webrtc/IWebRTCProcessor.ts, packages/media-signaling/src/lib/Call.ts, packages/media-signaling/src/lib/services/webrtc/Processor.ts, packages/media-signaling/src/lib/media/MediaStreamManager.ts
Passes complete remote SDP signals through the updated processor API, merges explicit and SDP-derived stream IDs, and assigns unidentified video tracks to screenShareRemote.

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
Loading
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
Loading

Possibly related PRs

Suggested labels: type: feature

Suggested reviewers: gabriellsh

🚥 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 clearly summarizes the main change: mutating local SDPs to add content tags that identify streams.
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.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • DMVPR-22: 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.

@pierre-lehnen-rc pierre-lehnen-rc added this to the 8.8.0 milestone Jul 31, 2026
@pierre-lehnen-rc
pierre-lehnen-rc marked this pull request as ready for review July 31, 2026 20:20
@coderabbitai coderabbitai Bot added the type: feature Pull requests that introduces new feature label Jul 31, 2026

@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.

🧹 Nitpick comments (1)
packages/media-signaling/src/lib/services/webrtc/sdp.ts (1)

1-3: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove 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

📥 Commits

Reviewing files that changed from the base of the PR and between 94478c6 and 58dd02e.

📒 Files selected for processing (4)
  • packages/media-signaling/src/lib/media/MediaStreamManager.ts
  • packages/media-signaling/src/lib/services/webrtc/Negotiation.ts
  • packages/media-signaling/src/lib/services/webrtc/index.ts
  • packages/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.ts
  • packages/media-signaling/src/lib/media/MediaStreamManager.ts
  • packages/media-signaling/src/lib/services/webrtc/Negotiation.ts
  • packages/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.ts
  • packages/media-signaling/src/lib/media/MediaStreamManager.ts
  • packages/media-signaling/src/lib/services/webrtc/Negotiation.ts
  • packages/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.ts
  • packages/media-signaling/src/lib/media/MediaStreamManager.ts
  • packages/media-signaling/src/lib/services/webrtc/Negotiation.ts
  • packages/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.ts
  • packages/media-signaling/src/lib/media/MediaStreamManager.ts
  • packages/media-signaling/src/lib/services/webrtc/Negotiation.ts
  • packages/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 & Integration

Check SIP answers against the SDP mapping concern.

setRemoteIdsBySDP is not invoked from the shown remote-SDP or remote-description paths. If SIP SDP answers reach addRemoteTrack without a corresponding setRemoteIds(signal.streams) call or setRemoteIdsBySDP(signal.sdp.sdp), remote video tracks can fall back to screen-share based on the unidentified stream path.

@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.

All reported issues were addressed across 4 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/media-signaling/src/lib/services/webrtc/Negotiation.ts
Comment thread packages/media-signaling/src/lib/services/webrtc/sdp.ts
Comment thread packages/media-signaling/src/lib/services/webrtc/sdp.ts Outdated
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.14530% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 68.80%. Comparing base (0c5bcc9) to head (b60e6c0).
⚠️ Report is 101 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             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     
Flag Coverage Δ
e2e 58.85% <ø> (-0.02%) ⬇️
e2e-api 45.99% <ø> (+0.27%) ⬆️
unit 70.77% <99.14%> (+0.07%) ⬆️

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.

@coderabbitai coderabbitai Bot added type: chore and removed type: feature Pull requests that introduces new feature labels Aug 3, 2026

@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.

🧹 Nitpick comments (1)
packages/media-signaling/src/lib/services/webrtc/Processor.ts (1)

313-359: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add unit tests for the stream-ID merge logic.

combineRemoteIds and getRemoteIdsFromSDP are 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 missed null filter 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 (getStreamTagByMediaContent returns falsy), to confirm those entries are filtered out.
  • Empty streams and empty SDP-derived list, to confirm this.streams.setRemoteIds is 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

📥 Commits

Reviewing files that changed from the base of the PR and between 58dd02e and c64a5c0.

📒 Files selected for processing (5)
  • packages/media-signaling/src/definition/services/webrtc/IWebRTCProcessor.ts
  • packages/media-signaling/src/lib/Call.ts
  • packages/media-signaling/src/lib/media/MediaStreamManager.ts
  • packages/media-signaling/src/lib/services/webrtc/Processor.ts
  • packages/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.ts
  • packages/media-signaling/src/lib/services/webrtc/Processor.ts
  • packages/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.ts
  • packages/media-signaling/src/lib/services/webrtc/Processor.ts
  • packages/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.ts
  • packages/media-signaling/src/lib/services/webrtc/Processor.ts
  • packages/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.ts
  • packages/media-signaling/src/lib/services/webrtc/Processor.ts
  • packages/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

@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.

All reported issues were addressed across 5 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/media-signaling/src/lib/services/webrtc/Processor.ts
@coderabbitai coderabbitai Bot added type: feature Pull requests that introduces new feature and removed type: chore labels Aug 3, 2026

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

📥 Commits

Reviewing files that changed from the base of the PR and between 302266b and b60e6c0.

📒 Files selected for processing (4)
  • packages/media-signaling/jest.config.ts
  • packages/media-signaling/package.json
  • packages/media-signaling/src/lib/services/webrtc/sdp.spec.ts
  • packages/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.ts
  • packages/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.ts extension 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.ts
  • packages/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.ts
  • packages/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.ts
  • packages/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 valid MediaContent value.

packages/media-signaling/package.json (1)

29-31: LGTM!

Comment thread packages/media-signaling/jest.config.ts
@pierre-lehnen-rc pierre-lehnen-rc added add-to-poc stat: QA assured Means it has been tested and approved by a company insider labels Aug 17, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Aug 18, 2026
@pierre-lehnen-rc
pierre-lehnen-rc added this pull request to the merge queue Aug 18, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 18, 2026
@pierre-lehnen-rc
pierre-lehnen-rc added this pull request to the merge queue Aug 18, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 18, 2026
@pierre-lehnen-rc
pierre-lehnen-rc added this pull request to the merge queue Aug 18, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Aug 18, 2026
@pierre-lehnen-rc
pierre-lehnen-rc added this pull request to the merge queue Aug 18, 2026
Merged via the queue into develop with commit c0a0550 Aug 19, 2026
56 checks passed
@pierre-lehnen-rc
pierre-lehnen-rc deleted the chore/mutate-local-sdps-add-content-tag branch August 19, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add-to-poc 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: feature Pull requests that introduces new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants