[PM-37335] fix: Route attachments upgrade CTA through in-app plan modal#6946
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This PR routes the Attachments "Upgrade to Premium" CTA through the in-app plan modal when Code Review DetailsNo findings. The change is a focused, low-risk routing fix that follows an established pattern already used by the item-detail upgrade CTA. Test coverage exercises both the in-app and fallback paths, and the navigation wiring is consistent with the other |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6946 +/- ##
==========================================
- Coverage 86.30% 86.18% -0.13%
==========================================
Files 873 914 +41
Lines 63220 64785 +1565
Branches 9165 9209 +44
==========================================
+ Hits 54563 55835 +1272
- Misses 5508 5789 +281
- Partials 3149 3161 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| verify(exactly = 1) { | ||
| environmentRepository.environment | ||
|
|
||
| @Suppress("MaxLineLength") |
There was a problem hiding this comment.
This suppression isn't needed, is it?
| } | ||
| } | ||
|
|
||
| @Suppress("MaxLineLength") |
There was a problem hiding this comment.
This isn't needed either, right?
6b20d8d to
0e7967d
Compare
The Attachments "Upgrade to Premium" dialog was missed by the PM-33519 rewire and continued routing to the legacy web URL even when in-app upgrade is available. Branch on PremiumStateManager.isInAppUpgradeAvailable so the dialog opens the in-app plan modal in that path, falling back to the legacy URL otherwise.
0e7967d to
a06db7f
Compare
🎟️ 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.handleUpgradeToPremiumClicknow consultsPremiumStateManager.isInAppUpgradeAvailable()and emitsNavigateToPlanModalwhen in-app upgrade is supported, falling back to the existing web URL for environments where it is not. Mirrors theVaultItemViewModel.handleUpgradeToPremiumClickshape already in place for the item-detail upgrade CTA.