Skip to content

Conversation

@sbakhtiarov
Copy link
Contributor

@sbakhtiarov sbakhtiarov commented Nov 14, 2025

TaskWPB-21328 [Android]Photo fails to load after screen is idle for ~30 minutes

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

What's new in this PR?

Issues

URLs for cell files content have expiration time. The cell file availablity and content/preview URLs are updated when the file is displayed for the first time in the conversation (and only one time until user re-opens the conversation). If URLs expire before user closes and re-open the conversation the content will no longer be available. User will see errors \ empty screens when trying to open files.

Solutions

  1. Read URL expiration time from server response and store it in the database (see kalium PR: feat: handle cell urls expiration (WPB-21328) kalium#3707)
  2. Adjust ExpiringMap to allow supplying custom expiration and expiration callback.
  3. Place file uuid with expiration time into the ExpiringMap
  4. Refresh the file availability \ URLs once expired

@sbakhtiarov sbakhtiarov force-pushed the feat/cell-urls-expiration branch from 363b8db to 1629289 Compare November 18, 2025 16:20
@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.41%. Comparing base (2aebcbe) to head (3d67d4c).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...getypes/multipart/MultipartAttachmentsViewModel.kt 0.00% 13 Missing ⚠️
...c/main/kotlin/com/wire/android/util/ExpiringMap.kt 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4417      +/-   ##
===========================================
- Coverage    47.42%   47.41%   -0.02%     
===========================================
  Files          537      537              
  Lines        18000    18013      +13     
  Branches      3048     3050       +2     
===========================================
+ Hits          8536     8540       +4     
- Misses        8549     8557       +8     
- Partials       915      916       +1     
Files with missing lines Coverage Δ
...c/main/kotlin/com/wire/android/util/ExpiringMap.kt 96.42% <87.50%> (-3.58%) ⬇️
...getypes/multipart/MultipartAttachmentsViewModel.kt 0.00% <0.00%> (ø)

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 2aebcbe...3d67d4c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sbakhtiarov sbakhtiarov added this pull request to the merge queue Nov 19, 2025
Merged via the queue into develop with commit 615a400 Nov 19, 2025
16 of 17 checks passed
@sbakhtiarov sbakhtiarov deleted the feat/cell-urls-expiration branch November 19, 2025 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants