Skip to content

feat(drive): New loading behavior (WPB-23689)#4765

Open
ohassine wants to merge 20 commits intodevelopfrom
new-loading-behavior
Open

feat(drive): New loading behavior (WPB-23689)#4765
ohassine wants to merge 20 commits intodevelopfrom
new-loading-behavior

Conversation

@ohassine
Copy link
Copy Markdown
Member

@ohassine ohassine commented Apr 28, 2026

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


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

This PR replaces the old “download bottom sheet + download progress model” with a new loading behavior

File opening behavior is now streamlined:

  • If a file is already cached locally, it is opened immediately without triggering a download.
  • If a file is not available locally, it is downloaded automatically when the user taps it.
  • For small files where the download completes quickly (under ~300ms), the file is opened immediately with no loading UI.
  • For longer downloads, a loading state is shown while the file is being fetched.
  • Once the download completes, a snackbar is displayed indicating the file is ready to open.
Untitled.mp4

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 70.94595% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.90%. Comparing base (38fa9ce) to head (24a0eea).

Files with missing lines Patch % Lines
...com/wire/android/feature/cells/ui/CellViewModel.kt 58.33% 9 Missing and 6 partials ⚠️
...re/android/feature/cells/ui/CellFileActionsMenu.kt 55.00% 4 Missing and 5 partials ⚠️
.../wire/android/feature/cells/ui/model/CellNodeUi.kt 47.05% 9 Missing ⚠️
.../com/wire/android/feature/cells/ui/CellListItem.kt 0.00% 5 Missing ⚠️
...oid/feature/cells/ui/OpenFileDownloadController.kt 92.98% 0 Missing and 4 partials ⚠️
.../com/wire/android/feature/cells/util/FileHelper.kt 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (70.94%) 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    #4765      +/-   ##
===========================================
+ Coverage    50.80%   50.90%   +0.09%     
===========================================
  Files          605      609       +4     
  Lines        20887    20954      +67     
  Branches      3370     3378       +8     
===========================================
+ Hits         10612    10666      +54     
- Misses        9276     9283       +7     
- Partials       999     1005       +6     
Files with missing lines Coverage Δ
...android/feature/cells/ui/CellFileLocalPathCache.kt 100.00% <100.00%> (ø)
...wire/android/feature/cells/ui/CellScreenContent.kt 0.00% <ø> (ø)
...id/feature/cells/ui/model/NodeBottomSheetAction.kt 100.00% <100.00%> (ø)
...re/android/feature/cells/ui/model/OpenLoadState.kt 100.00% <100.00%> (ø)
.../com/wire/android/feature/cells/util/FileHelper.kt 0.00% <0.00%> (ø)
...oid/feature/cells/ui/OpenFileDownloadController.kt 92.98% <92.98%> (ø)
.../com/wire/android/feature/cells/ui/CellListItem.kt 0.00% <0.00%> (ø)
...re/android/feature/cells/ui/CellFileActionsMenu.kt 73.68% <55.00%> (-9.96%) ⬇️
.../wire/android/feature/cells/ui/model/CellNodeUi.kt 85.88% <47.05%> (-9.84%) ⬇️
...com/wire/android/feature/cells/ui/CellViewModel.kt 51.09% <58.33%> (+0.25%) ⬆️

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 38fa9ce...24a0eea. Read the comment docs.

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

@pull-request-size
Copy link
Copy Markdown

Ups 🫰🟨

This PR is too big. Please try to break it up into smaller PRs.

@ohassine ohassine changed the title feat(drive): New loading behavior (WPB-23683) feat(drive): New loading behavior (WPB-23689) Apr 28, 2026
@ohassine ohassine marked this pull request as ready for review April 29, 2026 21:03
@ohassine ohassine requested review from Garzas and sbakhtiarov April 30, 2026 06:31
@sonarqubecloud
Copy link
Copy Markdown

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.

1 participant