fix: issue where when the status is set to away, the app does not ring and no join btn is visible [WPB-22834]#5018
Conversation
Codecov Report❌ Patch coverage is Please upload reports for the commit 1e6574c to get more accurate results. ❌ Your patch check has failed because the patch coverage (60.71%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #5018 +/- ##
===========================================
- Coverage 49.43% 49.33% -0.11%
===========================================
Files 652 653 +1
Lines 23476 23531 +55
Branches 3600 3608 +8
===========================================
+ Hits 11606 11608 +2
- Misses 10796 10850 +54
+ Partials 1074 1073 -1
... and 13 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the Android app’s conversation list/search and call UI to derive “ongoing/joinable call” indicators from Kalium’s in-memory joinable-calls observation, rather than relying on persisted conversation call-state fields. This aligns with the breaking Kalium model change and targets the reported issue where calls aren’t surfaced correctly (e.g., missing join UI) when the user status is set to Away.
Changes:
- Inject and consume
ObserveJoinableCallsUseCasein conversation list/search flows to drive join-call markers and related ordering signals. - Update
ConversationDetailsWithEvents.toConversationItem()mapping to computehasOnGoingCall/“new activities” from the joinable-calls map. - Adjust DI wiring and unit tests to accommodate removal of model call-state fields and the new joinable-calls source.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/test/kotlin/com/wire/android/ui/home/conversationslist/ConversationListViewModelTest.kt | Mocks ObserveJoinableCallsUseCase to support updated conversation list ViewModel dependencies. |
| app/src/test/kotlin/com/wire/android/ui/home/conversations/usecase/GetConversationsFromSearchUseCaseTest.kt | Adds coverage ensuring joinable calls produce an ongoing-call marker in search results. |
| app/src/test/kotlin/com/wire/android/ui/home/conversations/details/updateappsaccess/UpdateAppsAccessViewModelTest.kt | Removes usage of the deleted hasOngoingCall model field in test fixtures. |
| app/src/test/kotlin/com/wire/android/ui/home/conversations/details/GroupDetailsViewModelTest.kt | Removes usage of the deleted hasOngoingCall model field in test fixtures. |
| app/src/test/kotlin/com/wire/android/ui/home/conversations/composer/MessageComposerViewModelArrangement.kt | Updates mocked conversation details to no longer require hasOngoingCall. |
| app/src/test/kotlin/com/wire/android/ui/home/conversations/call/ConversationCallViewModelTest.kt | Switches call-state observation in tests from ongoing calls list to joinable calls map. |
| app/src/main/kotlin/com/wire/android/ui/home/HomeViewModelFactory.kt | Wires ObserveJoinableCallsUseCase into conversation list/search-related construction. |
| app/src/main/kotlin/com/wire/android/ui/home/conversationslist/ConversationListViewModel.kt | Combines conversation list details with joinable calls to build UI items with join-call markers. |
| app/src/main/kotlin/com/wire/android/ui/home/conversations/usecase/GetConversationsFromSearchUseCase.kt | Combines paginated search results with joinable calls to map items with call markers. |
| app/src/main/kotlin/com/wire/android/ui/home/conversations/call/ConversationCallViewModel.kt | Uses joinable calls map to derive hasOngoingCall state for the conversation call screen. |
| app/src/main/kotlin/com/wire/android/ui/calling/CallingViewModelFactory.kt | Updates factory wiring to provide ObserveJoinableCallsUseCase to ConversationCallViewModel. |
| app/src/main/kotlin/com/wire/android/mapper/ConversationMapper.kt | Adds joinable-calls map input and derives call marker/new-activity signals from it. |
| app/src/main/kotlin/com/wire/android/di/accountScoped/CallsModule.kt | Exposes ObserveJoinableCallsUseCase from CallsScope for injection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…mprove query logic
3e87592 to
1e6574c
Compare
|



https://wearezeta.atlassian.net/browse/WPB-22834
Data Flow
flowchart LR AVS["AVS call events"] CallRepo["CallRepository"] Memory["In-memory calls map<br/>ConversationId -> Call"] DB["Call DB writes<br/>(kept for existing consumers)"] Ordering["Conversation list/search ordering"] AppUI["Android conversation UI<br/>join button / row marker"] AVS --> CallRepo CallRepo --> Memory CallRepo --> DB Memory --> Ordering Memory --> AppUIWhy
Conversation list state should not depend on persisted calling rows or session-init reset work. Keeping active AVS call state in memory avoids DB pressure during Kalium init and gives consumers faster
ConversationId -> Calllookup.Breaking Change
Removed call-state fields from public Kalium conversation models:
ConversationDetails.Group.hasOngoingCallConversationDetailsWithEvents.hasOngoingCallConsumers should derive join-call UI from call APIs / the in-memory joinable-call map instead.