Skip to content

fix: do not close SFT 1on1 call when other user audio is not established [WPB-19591]#3838

Open
saleniuk wants to merge 1 commit intodevelopfrom
fix/closing-sft-1on1-call-when-audio-not-established
Open

fix: do not close SFT 1on1 call when other user audio is not established [WPB-19591]#3838
saleniuk wants to merge 1 commit intodevelopfrom
fix/closing-sft-1on1-call-when-audio-not-established

Conversation

@saleniuk
Copy link
Contributor

@saleniuk saleniuk commented Feb 4, 2026

BugWPB-19591 [Android] Crash in 1:1 call when both users enable video at the same time


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

During SFT 1:1 call, when one of participants loses connection and their audio stops being established, the call is dropped.

Causes (Optional)

Some time ago, when having problems with leaving subconversations, we implemented some short-term solution by deleting subconversation instead of leaving it and also checking for the audio established value of another participant to determine whether it's still in the call and close the call otherwise. The original problem was already solved by implementing long-term solution to leaving the subconversation (solved removal key problem) and we applied that changes but only removed first part of the temporary fix from code in kalium, but the other (logic using audio established parameter) remained and it conflicts with recent changes that allow reconnection in the event of a short internet outage - because of that logic, when other person loses connection in SFT 1:1 call then the call is instantly closed. This happens as well when both users enable video at the same time - both then initiate changing the call to a video call and update MLS and there’s a moment for both when the other person doesn’t have audio established and because of this logic the call is closed in that moment.

Solutions

Removed that logic of checking for the other participant's audio established value, we already have the long-term solution implemented and when other participants leave a call then they just leave a subconversation safely so the same logic can be applied to Proteus and MLS regular and SFT 1:1 calls - close the call when participants list changes from 2 to 1. Thanks to that we can have "connecting" state on 1:1 calls as well and be able to reconnect in case of short internet outage and enable videos at the same time.
The whole logic of checking whether the app can use SFT in 1:1 calls and whether the given call is established 1:1 moved inside the CallHelper.shouldEndSFTOneOnOneCall method so that the whole logic is in one place and it's a standalone ready-to-use method that doesn't require any other checks outside of it.

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

User 1 starts 1:1 SFT call, user 2 answers, user 2 loses internet connection for a couple of seconds and connects back.
User 1 starts 1:1 SFT call, user 2 answers, both enable video at the same time.


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 4, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Test Results

0 tests   - 4 300   0 ✅  - 4 185   0s ⏱️ - 5m 9s
0 suites  -   723   0 💤  -   115 
0 files    -   723   0 ❌ ±    0 

Results for commit 9d7fc76. ± Comparison against base commit df99ed0.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 59.59%. Comparing base (df99ed0) to head (9d7fc76).

Files with missing lines Patch % Lines
...tlin/com/wire/kalium/logic/data/call/CallHelper.kt 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3838   +/-   ##
========================================
  Coverage    59.59%   59.59%           
========================================
  Files         1898     1898           
  Lines        59267    59260    -7     
  Branches      6418     6413    -5     
========================================
- Hits         35318    35314    -4     
  Misses       21035    21035           
+ Partials      2914     2911    -3     
Files with missing lines Coverage Δ
.../feature/call/scenario/OnParticipantListChanged.kt 100.00% <100.00%> (+2.50%) ⬆️
...tlin/com/wire/kalium/logic/data/call/CallHelper.kt 90.00% <90.00%> (+34.44%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update df99ed0...9d7fc76. Read the comment docs.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants