Skip to content

feat(drive): In-app pdf viewer (WPB-28358) - #5235

Open
ohassine wants to merge 13 commits into
developfrom
in-app-pdf-viewer
Open

feat(drive): In-app pdf viewer (WPB-28358)#5235
ohassine wants to merge 13 commits into
developfrom
in-app-pdf-viewer

Conversation

@ohassine

@ohassine ohassine commented Aug 31, 2026

Copy link
Copy Markdown
Member

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


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

Implement an in-app PDF viewer on Android so users can open and view PDF files directly within the app without relying on an external PDF reader

Screen_recording_20260831_111258.mp4

Dependencies (Optional)

If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.

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.

@pull-request-size

Copy link
Copy Markdown

Ups 🫰🟨

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


val partial = File(target.parentFile, "${target.name}$PARTIAL_SUFFIX")
return runCatching {
val connection = (URL(contentUrl).openConnection() as HttpURLConnection).apply {

@semgrep-code-wireapp semgrep-code-wireapp Bot Aug 31, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Server-Side Request Forgery occur when a web server executes a request to a user supplied
destination parameter that is not validated. Such vulnerabilities could allow an attacker to
access internal services or to launch attacks from your web server.

🎉 Fixed in commit 88cdf32 🎉

@ohassine
ohassine marked this pull request as draft August 31, 2026 15:19
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Test Results

2 702 tests   2 702 ✅  1m 50s ⏱️
  341 suites      0 💤
  341 files        0 ❌

Results for commit 8023033.

♻️ This comment has been updated with latest results.

ohassine and others added 8 commits September 1, 2026 11:01
# Conflicts:
#	app/build.gradle.kts
#	app/src/main/kotlin/com/wire/android/di/metro/AppSessionViewModelGraph.kt
#	app/src/main/kotlin/com/wire/android/navigation/routes/media/MediaNavigation3Entries.kt
#	app/src/main/kotlin/com/wire/android/ui/home/conversations/ConversationMessageComposer.kt
#	app/src/main/kotlin/com/wire/android/ui/home/conversations/ConversationNavigation3Entries.kt
#	app/src/main/kotlin/com/wire/android/ui/home/conversations/ConversationScreen.kt
#	app/src/main/kotlin/com/wire/android/ui/home/conversations/messages/item/MessageClickActions.kt
#	app/src/main/kotlin/com/wire/android/ui/home/conversations/messages/item/MessageContentAndStatus.kt
#	app/src/main/kotlin/com/wire/android/ui/home/conversations/messages/item/MessageContentItem.kt
#	app/src/main/kotlin/com/wire/android/ui/home/conversations/model/messagetypes/multipart/MultipartAttachmentsView.kt
#	app/src/main/kotlin/com/wire/android/ui/home/conversations/model/messagetypes/multipart/MultipartAttachmentsViewModel.kt
#	app/src/test/kotlin/com/wire/android/ui/home/conversations/model/messagetypes/multipart/MultipartAttachmentsViewModelTest.kt
#	features/cells/build.gradle.kts
#	features/cells/src/main/java/com/wire/android/feature/cells/navigation/CellsNavigation3Renderer.kt
#	features/cells/src/main/java/com/wire/android/feature/cells/ui/CellViewModel.kt
@ohassine ohassine changed the title feat: In app pdf viewer (WPB-28358) feat(drive): In app pdf viewer (WPB-28358) Sep 4, 2026
@ohassine ohassine changed the title feat(drive): In app pdf viewer (WPB-28358) feat(drive): In-app pdf viewer (WPB-28358) Sep 4, 2026
@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 59.44444% with 73 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.23%. Comparing base (fe0c81f) to head (8023033).

Files with missing lines Patch % Lines
...n/kotlin/com/wire/android/pdfviewer/PdfDocument.kt 0.00% 30 Missing ⚠️
...ain/kotlin/com/wire/android/pdfviewer/PdfViewer.kt 0.00% 23 Missing ⚠️
...n/com/wire/android/pdfviewer/PdfViewerViewModel.kt 90.74% 4 Missing and 1 partial ⚠️
...conversations/messages/item/MessageClickActions.kt 0.00% 4 Missing ⚠️
...in/com/wire/android/pdfviewer/PdfSourceResolver.kt 85.18% 1 Missing and 3 partials ⚠️
...com/wire/android/feature/cells/ui/CellViewModel.kt 72.72% 2 Missing and 1 partial ⚠️
...getypes/multipart/MultipartAttachmentsViewModel.kt 80.00% 0 Missing and 1 partial ⚠️
...tlin/com/wire/android/pdfviewer/PageBitmapCache.kt 92.85% 0 Missing and 1 partial ⚠️
.../wire/android/pdfviewer/PdfViewerViewModelGraph.kt 0.00% 1 Missing ⚠️
...e/android/feature/cells/ui/CellsFilesNavigation.kt 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (59.44%) 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    #5235      +/-   ##
===========================================
+ Coverage    53.03%   53.23%   +0.19%     
===========================================
  Files          745      752       +7     
  Lines        25824    25990     +166     
  Branches      4236     4274      +38     
===========================================
+ Hits         13697    13835     +138     
- Misses       10792    10810      +18     
- Partials      1335     1345      +10     
Files with missing lines Coverage Δ
...me/conversations/ConversationNavigation3Entries.kt 14.70% <ø> (ø)
...messagetypes/multipart/MultipartAttachmentsView.kt 0.00% <ø> (ø)
...otlin/com/wire/android/pdfviewer/PdfViewerState.kt 100.00% <100.00%> (ø)
...roid/feature/cells/ui/AllFilesNavigationActions.kt 100.00% <100.00%> (ø)
...wire/android/feature/cells/ui/CellScreenContent.kt 0.00% <ø> (ø)
...getypes/multipart/MultipartAttachmentsViewModel.kt 59.64% <80.00%> (+5.59%) ⬆️
...tlin/com/wire/android/pdfviewer/PageBitmapCache.kt 92.85% <92.85%> (ø)
.../wire/android/pdfviewer/PdfViewerViewModelGraph.kt 0.00% <0.00%> (ø)
...e/android/feature/cells/ui/CellsFilesNavigation.kt 0.00% <0.00%> (ø)
...com/wire/android/feature/cells/ui/CellViewModel.kt 48.71% <72.72%> (+0.63%) ⬆️
... and 5 more

... and 1 file with indirect coverage changes


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 fe0c81f...8023033. Read the comment docs.

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

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@ohassine
ohassine marked this pull request as ready for review September 4, 2026 14:22
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

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