Skip to content

[PM-39767] fix: Show upgrade pending alert when upgrading via Settings > Plan#2873

Draft
KatherineInCode wants to merge 1 commit into
mainfrom
pm-39767/upgrade-pending
Draft

[PM-39767] fix: Show upgrade pending alert when upgrading via Settings > Plan#2873
KatherineInCode wants to merge 1 commit into
mainfrom
pm-39767/upgrade-pending

Conversation

@KatherineInCode

Copy link
Copy Markdown
Contributor

🎟️ 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 .premiumUpgrade without ever creating it, so nothing was ever subscribed to catch the .pending status on that path.

Fix: wire SettingsProcessor into the same helper the other 8 entry points already use — SettingsRoute now conforms to PremiumUpgradeRoute, gaining an associated DismissAction on its .dismiss case (mirroring VaultRoute), and navigateToPlan() routes through premiumUpgradeHelper.startInAppPremiumUpgrade() instead of navigating directly.

Giving .dismiss an associated value surfaced a few unrelated pre-existing call sites that referenced it bare (no parens) in ExportVaultProcessor, PendingRequestsProcessor, and DeleteAccountProcessor — 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.

…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.
@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context t:bug Change Type - Bug labels Jul 9, 2026
@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.72727% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.27%. Comparing base (438d632) to head (4ed1444).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...Platform/Settings/Settings/SettingsProcessor.swift 37.50% 5 Missing ⚠️
...red/UI/Platform/Settings/SettingsCoordinator.swift 90.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app:password-manager Bitwarden Password Manager app context t:bug Change Type - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant