Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: infinite profile loading screen when user cannot be added (WPB-14842) #3187

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

sergeibakhtiarov
Copy link
Contributor

@sergeibakhtiarov sergeibakhtiarov commented Dec 17, 2024

BugWPB-14842 [Android] User profile loading indefinitely when trying to connect to a user with QR code when I am not allowed to connect

https://wearezeta.atlassian.net/browse/WPB-14842

What's new in this PR?

Issues

When trying to add user via QR code and this user cannot be added (e.g. anta user to beta app) then profile screen is showing infinite loading progress.

Causes (Optional)

The scenario when user is not found locally and network fetch returns success result with no users is not handled. The repository is storing fetched users in the database and UI will get user from the database. In this flow no users are saved in the database and UI keeps showing progress because no error was returned.

Solutions

Add a boolean flag (instead of Unit) to indicate if actual users were found. Use this flag to return error if no users were found on server.

How to Test

Try to add an anta user to beta app via QR code.

@echoes-hq echoes-hq bot added the echoes: unplanned Any work item that isn’t part of the product or technical roadmap. label Dec 17, 2024
@sergeibakhtiarov sergeibakhtiarov changed the title fix: infinite profile loading screen when user cannot be added (WPB-1… fix: infinite profile loading screen when user cannot be added (WPB-14842) Dec 17, 2024
Copy link
Contributor

github-actions bot commented Dec 17, 2024

Test Results

3 355 tests  +1   3 248 ✅ +1   5m 54s ⏱️ +13s
  574 suites ±0     107 💤 ±0 
  574 files   ±0       0 ❌ ±0 

Results for commit 48bb02d. ± Comparison against base commit 91b8319.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.10%. Comparing base (91b8319) to head (48bb02d).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3187   +/-   ##
========================================
  Coverage    54.10%   54.10%           
========================================
  Files         1256     1256           
  Lines        36661    36661           
  Branches      3726     3727    +1     
========================================
  Hits         19834    19834           
- Misses       15387    15388    +1     
+ Partials      1440     1439    -1     
Files with missing lines Coverage Δ
.../com/wire/kalium/logic/data/user/UserRepository.kt 68.04% <100.00%> (ø)
...logic/feature/message/MessageSendFailureHandler.kt 87.71% <100.00%> (ø)
...alium/logic/feature/user/ObserveUserInfoUseCase.kt 84.37% <ø> (ø)

... and 2 files 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 91b8319...48bb02d. Read the comment docs.

@datadog-wireapp
Copy link

Datadog Report

Branch report: fix/infinite-profile-loading
Commit report: 32b86ec
Test service: kalium-jvm

✅ 0 Failed, 3248 Passed, 107 Skipped, 1m 2.35s Total Time

@sergeibakhtiarov sergeibakhtiarov added this pull request to the merge queue Dec 18, 2024
@sergeibakhtiarov sergeibakhtiarov removed this pull request from the merge queue due to a manual request Dec 18, 2024
@sergeibakhtiarov sergeibakhtiarov added this pull request to the merge queue Dec 18, 2024
Merged via the queue into develop with commit bb9bd8f Dec 18, 2024
26 of 27 checks passed
@sergeibakhtiarov sergeibakhtiarov deleted the fix/infinite-profile-loading branch December 18, 2024 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: unplanned Any work item that isn’t part of the product or technical roadmap. 🚨 Potential breaking changes 👕 size: S type: bug / fix 🐞
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants