Skip to content

chore: improve voip lib configs for better mobile compatibility#37265

Merged
kodiakhq[bot] merged 9 commits intodevelopfrom
chore/voip-mobile-improvements
Dec 17, 2025
Merged

chore: improve voip lib configs for better mobile compatibility#37265
kodiakhq[bot] merged 9 commits intodevelopfrom
chore/voip-mobile-improvements

Conversation

@pierre-lehnen-rc
Copy link
Contributor

@pierre-lehnen-rc pierre-lehnen-rc commented Oct 20, 2025

Proposed changes (including videos or screenshots)

  • Adds config to set the ice servers and ice timeout on session initialization
  • Adds new event to notify client when a call is confirmed by the server
  • Adds new param to ignore unconfirmed calls when checking if any calls exist
  • Adds new property to read a call's temporary id even after it was confirmed

Issue(s)

VGA-113

Steps to test or reproduce

Further comments

The only change that may impact the webclient is that the media signaling session will now only trigger the newCall event after the call is confirmed by the server (without this change, if the client requested a call, this event was triggered immediately, before the server even processed the request [and possibly rejected it])

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Oct 20, 2025

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

@changeset-bot
Copy link

changeset-bot bot commented Oct 20, 2025

⚠️ No Changeset found

Latest commit: 39ce322

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
Copy link
Contributor

coderabbitai bot commented Oct 20, 2025

Walkthrough

The changes add call confirmation tracking and ICE server configuration support to the media-signaling package. A new confirmed event and corresponding properties expose the call confirmation state, while optional ICE server configuration can now be passed through the call creation path.

Changes

Cohort / File(s) Summary
Event Definition
packages/media-signaling/src/definition/call/CallEvents.ts
Added new confirmed: void event to track when the server confirms the call's existence.
Interface Extension
packages/media-signaling/src/definition/call/IClientMediaCall.ts
Added two new readonly properties: tempCallId: string (ID used to request the call) and confirmed: boolean (call existence on server).
Implementation
packages/media-signaling/src/lib/Call.ts
Added iceServers: RTCIceServer[] to IClientMediaCallConfig; introduced public getters confirmed (returns hasRemoteData) and tempCallId (returns localCallId); added logic to emit confirmed event and conditionally pass ICE servers to WebRTC processor.
Session Configuration & Event Wiring
packages/media-signaling/src/lib/Session.ts
Added optional iceServers?: RTCIceServer[] to session config; modified getMainCall(skipLocal = false) signature to skip unconfirmed local calls; added public setIceServers() method; introduced onConfirmedCall event handlers; updated session state logic to handle call confirmation transitions; added guard in startCall() to throw error if already on a call.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Areas requiring extra attention:

  • Session.ts: The skipLocal parameter logic in getMainCall() and its cascading effects on isBusy, mainCall, hasCall, hasVisibleCall, and hasBusyCall state computations require careful validation
  • Session.ts: New startCall() error guard when getMainCall(false) returns a non-null call—verify the condition is correct and appropriately scoped
  • Call.ts and Session.ts: Confirm proper event emission timing for confirmed event in relation to remote data availability

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • tassoevan
  • gabriellsh

Poem

🐰 A call rings out across the wires,
With ICE servers climbing higher,
Confirmed at last, the state's more true,
Temp IDs guide the journey through,
Media signals dance and play,
Brighter than before today! 🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main objective: improving VOIP library configurations for mobile compatibility. Changes include ICE server support, call confirmation tracking, and timeout adjustments—all aligned with mobile optimization.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/voip-mobile-improvements

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
Copy link

codecov bot commented Oct 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.61%. Comparing base (6573e3b) to head (39ce322).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37265      +/-   ##
===========================================
+ Coverage    67.60%   67.61%   +0.01%     
===========================================
  Files         3463     3463              
  Lines       113694   113694              
  Branches     20902    20902              
===========================================
+ Hits         76864    76877      +13     
+ Misses       34697    34684      -13     
  Partials      2133     2133              
Flag Coverage Δ
e2e 57.18% <ø> (+0.02%) ⬆️
e2e-api 42.67% <ø> (+0.06%) ⬆️

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.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 15, 2025

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.2GiB 1.2GiB +12MiB
rocketchat 358MiB 347MiB +12MiB
omnichannel-transcript-service 132MiB 132MiB +897B
queue-worker-service 132MiB 132MiB +761B
ddp-streamer-service 126MiB 126MiB +811B
account-service 113MiB 113MiB +2.1KiB
stream-hub-service 110MiB 110MiB +1.1KiB
presence-service 110MiB 110MiB +1.8KiB
authorization-service 110MiB 110MiB +277B

📊 Historical Trend

---
config:
  theme: "dark"
  xyChart:
    width: 900
    height: 400
---
xychart
  title "Image Size Evolution by Service (Last 30 Days + This PR)"
  x-axis ["11/15 22:28", "11/16 01:28", "11/17 23:50", "11/18 22:53", "11/19 23:02", "11/21 16:49", "11/24 17:34", "11/27 22:32", "11/28 19:05", "12/01 23:01", "12/02 21:57", "12/03 21:00", "12/04 18:17", "12/05 21:56", "12/08 20:15", "12/09 22:17", "12/10 23:26", "12/11 21:56", "12/12 22:45", "12/13 01:34", "12/15 22:31", "12/16 22:18", "12/17 15:01", "12/17 15:21 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "queue-worker-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "rocketchat" [0.36, 0.36, 0.35, 0.35, 0.35, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.35]
  line "stream-hub-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
Loading

Statistics (last 23 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.2GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 1.2GiB
ℹ️ About this report

This report compares Docker image sizes from this build against the develop baseline.

  • Tag: pr-37265
  • Baseline: develop
  • Timestamp: 2025-12-17 15:21:09 UTC
  • Historical data points: 23

Updated: Wed, 17 Dec 2025 15:21:09 GMT

@pierre-lehnen-rc pierre-lehnen-rc marked this pull request as ready for review December 16, 2025 17:32
@pierre-lehnen-rc pierre-lehnen-rc added the stat: QA assured Means it has been tested and approved by a company insider label Dec 16, 2025
@pierre-lehnen-rc pierre-lehnen-rc added this to the 7.14.0 milestone Dec 17, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Dec 17, 2025
@kodiakhq kodiakhq bot merged commit a354057 into develop Dec 17, 2025
48 checks passed
@kodiakhq kodiakhq bot deleted the chore/voip-mobile-improvements branch December 17, 2025 15:46
gaolin1 pushed a commit to gaolin1/medsense.webchat that referenced this pull request Jan 6, 2026
@dougfabris dougfabris modified the milestones: 7.14.0, 8.0.0 Jan 19, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants