[PM-39767] fix: Show upgrade pending alert when upgrading via Settings > Plan - #2873
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.25% 81.26% +0.01%
==========================================
Files 1028 1028
Lines 66164 66177 +13
==========================================
+ Hits 53760 53782 +22
+ Misses 12404 12395 -9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the fix wiring Code Review DetailsNo findings. Verified:
|
🎟️ 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.