Skip to content

feat: add forward option when sharing assets [WPB-26687]#4869

Open
MohamadJaara wants to merge 9 commits into
developfrom
mo/feat/share-logs-as-one-file
Open

feat: add forward option when sharing assets [WPB-26687]#4869
MohamadJaara wants to merge 9 commits into
developfrom
mo/feat/share-logs-as-one-file

Conversation

@MohamadJaara

@MohamadJaara MohamadJaara commented May 26, 2026

Copy link
Copy Markdown
Member

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

Adds separate “Forward in Wire” and external-share flows for logs and shared assets.

This PR builds on zipped-log sharing and extends sharing UX so users can choose whether to send content inside Wire or share it through external apps. It also hardens handling of Wire-owned FileProvider URIs, with separate behavior for Android 15/API 35+ and older Android versions.

Changes

  • Add separate sharing actions for:
    • forwarding logs/files in Wire
    • sharing logs/files externally
  • Add share-options bottom sheets/menu entries for log and asset sharing.
  • Route Wire log sharing through ImportMediaScreen using shared file URIs.
  • Introduce ImportMediaNavArgs for passing internal shared media URIs through navigation.
  • Update message, conversation media, and media gallery asset sharing flows to support both Wire and external destinations.
  • Keep external sharing behind the Android chooser and exclude Wire’s own share targets.
  • Add Android 15/API 35+ trusted-caller handling for Wire FileProvider share intents.
  • Reject public share intents containing Wire FileProvider URIs on older Android versions where trusted caller identity is unavailable.
  • Restrict accepted internal Wire share URIs to the shared FileProvider root.
  • Rework log archive sharing helpers so zipped logs can be shared either externally or imported back into Wire.
  • Add/update tests for internal/public share URI validation, trusted vs untrusted Wire provider shares, and media sharing menu behavior.

@MohamadJaara MohamadJaara force-pushed the mo/feat/share-logs-as-one-zip-file branch from 9846e21 to f051666 Compare June 24, 2026 11:42
Base automatically changed from mo/feat/share-logs-as-one-zip-file to develop June 24, 2026 12:42
@pull-request-size

Copy link
Copy Markdown

Ups 🫰🟨

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

@MohamadJaara MohamadJaara force-pushed the mo/feat/share-logs-as-one-file branch from ad612e0 to a60da89 Compare June 24, 2026 19:25
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 27.63819% with 144 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.18%. Comparing base (5487909) to head (e88c975).

Files with missing lines Patch % Lines
.../src/main/kotlin/com/wire/android/util/FileUtil.kt 0.00% 59 Missing ⚠️
...id/ui/sharing/ImportMediaAuthenticatedViewModel.kt 51.85% 20 Missing and 6 partials ⚠️
.../com/wire/android/feature/cells/util/FileHelper.kt 0.00% 12 Missing ⚠️
...e/android/ui/home/gallery/MediaGalleryViewModel.kt 38.88% 11 Missing ⚠️
...kotlin/com/wire/android/util/logging/LogSharing.kt 0.00% 11 Missing ⚠️
...otlin/com/wire/android/ui/WireActivityViewModel.kt 76.47% 0 Missing and 4 partials ⚠️
.../com/wire/android/ui/WireActivityActionsHandler.kt 0.00% 3 Missing ⚠️
...nversations/edit/MessageOptionsModalSheetLayout.kt 0.00% 3 Missing ⚠️
...rsations/messages/ConversationMessagesViewModel.kt 0.00% 3 Missing ⚠️
...om/wire/android/ui/userprofile/qr/QRCodeIntents.kt 0.00% 3 Missing ⚠️
... and 6 more

❌ Your patch check has failed because the patch coverage (27.63%) 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    #4869      +/-   ##
===========================================
- Coverage    49.27%   49.18%   -0.09%     
===========================================
  Files          653      655       +2     
  Lines        23553    23687     +134     
  Branches      3615     3650      +35     
===========================================
+ Hits         11606    11651      +45     
- Misses       10873    10951      +78     
- Partials      1074     1085      +11     
Files with missing lines Coverage Δ
...rc/main/kotlin/com/wire/android/ui/WireActivity.kt 56.48% <ø> (ø)
.../wire/android/mapper/SystemMessageContentMapper.kt 47.30% <87.50%> (ø)
...ndroid/ui/sharing/ImportMediaAuthenticatedState.kt 87.50% <0.00%> (ø)
...kotlin/com/wire/android/util/AvatarImageManager.kt 0.00% <0.00%> (ø)
...kotlin/com/wire/android/ui/MiscViewModelFactory.kt 0.00% <0.00%> (ø)
...ain/kotlin/com/wire/android/ui/debug/LogOptions.kt 0.00% <0.00%> (ø)
...n/com/wire/android/ui/edit/ShareAssetMenuOption.kt 0.00% <0.00%> (ø)
.../com/wire/android/ui/WireActivityActionsHandler.kt 0.00% <0.00%> (ø)
...nversations/edit/MessageOptionsModalSheetLayout.kt 1.92% <0.00%> (-0.08%) ⬇️
...rsations/messages/ConversationMessagesViewModel.kt 68.42% <0.00%> (-1.00%) ⬇️
... and 7 more

Continue to review full report in Codecov by Harness.

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

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

@MohamadJaara MohamadJaara force-pushed the mo/feat/share-logs-as-one-file branch from 763179b to 9669177 Compare June 30, 2026 10:50
@MohamadJaara MohamadJaara changed the title feat: add forward option when sharing assets feat: add forward option when sharing assets [WPB-26687] Jun 30, 2026
@MohamadJaara MohamadJaara force-pushed the mo/feat/share-logs-as-one-file branch from d4ad5d2 to 3b4136b Compare July 3, 2026 09:09
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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