[PM-39767] fix: Show upgrade pending alert when upgrading via Settings > Plan#2873
Draft
KatherineInCode wants to merge 1 commit into
Draft
[PM-39767] fix: Show upgrade pending alert when upgrading via Settings > Plan#2873KatherineInCode wants to merge 1 commit into
KatherineInCode wants to merge 1 commit into
Conversation
…s > Plan Settings > Plan navigated straight to the Premium upgrade screen without going through PremiumUpgradeHelper, so it never subscribed to the checkout status publisher and silently missed the "Upgrade Pending" alert when sync was interrupted after payment. Vault and Send screens already used the helper; Settings now does too. Giving SettingsRoute.dismiss an associated DismissAction (mirroring VaultRoute) also required fixing several unrelated pre-existing call sites that referenced the bare case, since a defaulted associated value isn't auto-applied outside of a direct call expression.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2873 +/- ##
==========================================
- Coverage 81.27% 81.27% -0.01%
==========================================
Files 1028 1028
Lines 66164 66177 +13
==========================================
+ Hits 53773 53783 +10
- Misses 12391 12394 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-39767
📔 Objective
Fixes a bug where initiating the Premium upgrade flow via Settings > Plan never showed the "Upgrade Pending" dialog when the post-payment sync call was interrupted — even though the identical scenario worked correctly from the Vault tab's upgrade CTA.
Root cause: the "Upgrade Pending" alert is driven by
DefaultPremiumUpgradeHelper, which subscribes to the checkout-status publisher before navigating to the Premium upgrade screen. Vault and Send screens already construct this helper;SettingsProcessor.navigateToPlan()navigated straight to.premiumUpgradewithout ever creating it, so nothing was ever subscribed to catch the.pendingstatus on that path.Fix: wire
SettingsProcessorinto the same helper the other 8 entry points already use —SettingsRoutenow conforms toPremiumUpgradeRoute, gaining an associatedDismissActionon its.dismisscase (mirroringVaultRoute), andnavigateToPlan()routes throughpremiumUpgradeHelper.startInAppPremiumUpgrade()instead of navigating directly.Giving
.dismissan associated value surfaced a few unrelated pre-existing call sites that referenced it bare (no parens) inExportVaultProcessor,PendingRequestsProcessor, andDeleteAccountProcessor— fixed those to the explicit.dismiss()call form, since a defaulted associated value isn't auto-applied outside of a direct call expression.This is a narrower fix than a fuller centralization (moving pending-checkout detection into a shared app-lifetime service) that was evaluated and intentionally shelved as out of scope for this ticket — worth a follow-up ticket if we want to prevent a future entry point from repeating this same gap.
📸 Screenshots
Not applicable — no UI changes.