[PR #6946] [MERGED] [PM-37335] fix: Route attachments upgrade CTA through in-app plan modal #100377

Closed
opened 2026-05-31 05:11:52 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6946
Author: @SaintPatrck
Created: 5/19/2026
Status: Merged
Merged: 5/20/2026
Merged by: @SaintPatrck

Base: mainHead: premium-upgrade/pm-37335-attachments-modal-route


📝 Commits (1)

  • a06db7f PM-37335 fix: Route attachments upgrade CTA through in-app plan modal

📊 Changes

6 files changed (+64 additions, -23 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/vaultunlocked/VaultUnlockedNavigation.kt (+1 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsNavigation.kt (+2 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsScreen.kt (+2 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsViewModel.kt (+20 -9)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsScreenTest.kt (+8 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsViewModelTest.kt (+31 -14)

📄 Description

🎟️ Tracking

PM-37335

📔 Objective

The Attachments "Upgrade to Premium" dialog was missed by the PM-33519 rewire and continued sending users to the legacy web URL even when the in-app upgrade path was available. Users on cloud accounts with in-app upgrade enabled would leave the app to complete what should be an in-app flow — inconsistent with every other upgrade entry point already routed through the plan modal.

AttachmentsViewModel.handleUpgradeToPremiumClick now consults PremiumStateManager.isInAppUpgradeAvailable() and emits NavigateToPlanModal when in-app upgrade is supported, falling back to the existing web URL for environments where it is not. Mirrors the VaultItemViewModel.handleUpgradeToPremiumClick shape already in place for the item-detail upgrade CTA.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/6946 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 5/19/2026 **Status:** ✅ Merged **Merged:** 5/20/2026 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `premium-upgrade/pm-37335-attachments-modal-route` --- ### 📝 Commits (1) - [`a06db7f`](https://github.com/bitwarden/android/commit/a06db7f3485b5ec3291ac98f344aecef3e10bafd) [PM-37335] fix: Route attachments upgrade CTA through in-app plan modal ### 📊 Changes **6 files changed** (+64 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/vaultunlocked/VaultUnlockedNavigation.kt` (+1 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsNavigation.kt` (+2 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsScreen.kt` (+2 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsViewModel.kt` (+20 -9) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsScreenTest.kt` (+8 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsViewModelTest.kt` (+31 -14) </details> ### 📄 Description ## 🎟️ Tracking [PM-37335](https://bitwarden.atlassian.net/browse/PM-37335) ## 📔 Objective The Attachments "Upgrade to Premium" dialog was missed by the PM-33519 rewire and continued sending users to the legacy web URL even when the in-app upgrade path was available. Users on cloud accounts with in-app upgrade enabled would leave the app to complete what should be an in-app flow — inconsistent with every other upgrade entry point already routed through the plan modal. `AttachmentsViewModel.handleUpgradeToPremiumClick` now consults `PremiumStateManager.isInAppUpgradeAvailable()` and emits `NavigateToPlanModal` when in-app upgrade is supported, falling back to the existing web URL for environments where it is not. Mirrors the `VaultItemViewModel.handleUpgradeToPremiumClick` shape already in place for the item-detail upgrade CTA. [PM-37335]: https://bitwarden.atlassian.net/browse/PM-37335?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-31 05:11:52 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#100377