[PM-37086] feat: show settings plan row for free users#2631
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This PR enables the Settings Plan row for free users behind the existing The handoff from The naming concern raised earlier by Copilot ( Code Review DetailsNo new findings. |
There was a problem hiding this comment.
Pull request overview
Enables the Settings “Plan” row for free users behind the premiumUpgradePath feature flag, routing free users to the Premium Upgrade flow while keeping premium users routed to the Premium Plan screen. This extends existing billing navigation behavior to support both push-navigation (Settings) and root-replace (modal vault upsell) flows.
Changes:
- Added a new
SettingsRoute.premiumUpgraderoute and wired Settings navigation to open the Premium Upgrade screen when appropriate. - Updated Settings state/processor logic so the plan row can display for free users and “Plan” taps route to upgrade vs plan based on premium status.
- Adjusted BillingCoordinator Premium Upgrade presentation (push vs replace) and added
showCancelButtonstate to control the cancel (X) affordance; updated/added tests accordingly.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| BitwardenShared/UI/Platform/Settings/SettingsRoute.swift | Adds premiumUpgrade route for Settings navigation. |
| BitwardenShared/UI/Platform/Settings/SettingsCoordinator.swift | Handles new route and forwards to BillingCoordinator. |
| BitwardenShared/UI/Platform/Settings/SettingsCoordinatorTests.swift | Tests new SettingsRoute.premiumUpgrade navigation. |
| BitwardenShared/UI/Platform/Settings/Settings/SettingsState.swift | Adds hasPremium to support conditional plan vs upgrade navigation. |
| BitwardenShared/UI/Platform/Settings/Settings/SettingsProcessor.swift | Shows plan row for free users (when flagged) and routes plan presses based on hasPremium. |
| BitwardenShared/UI/Platform/Settings/Settings/SettingsProcessorTests.swift | Updates tests for free vs premium plan-press behavior and plan-row visibility. |
| BitwardenShared/UI/Billing/PremiumUpgrade/PremiumUpgradeState.swift | Adds showCancelButton to control cancel button visibility. |
| BitwardenShared/UI/Billing/PremiumUpgrade/PremiumUpgradeView.swift | Hides/shows cancel toolbar item based on state. |
| BitwardenShared/UI/Billing/PremiumUpgrade/PremiumUpgradeView+ViewInspectorTests.swift | Adds test asserting cancel button is hidden when configured. |
| BitwardenShared/UI/Billing/BillingCoordinator.swift | Pushes vs replaces Premium Upgrade depending on navigator emptiness; sets showCancelButton. |
| BitwardenShared/UI/Billing/BillingCoordinatorTests.swift | Adds coverage for push vs replace behavior and cancel button visibility. |
| BitwardenShared/Core/Platform/Services/API/ConfigAPIService.swift | Minor formatting adjustment in keychain-related catch clause. |
| BitwardenShared/Core/Platform/Services/API/ConfigAPIServiceTests.swift | Import ordering tweak. |
| BitwardenShared/Core/Auth/Services/KeychainRepository+UserSessionTests.swift | Trailing-comma formatting adjustments in test setup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2631 +/- ##
=======================================
Coverage 87.31% 87.31%
=======================================
Files 1912 1912
Lines 170379 170434 +55
=======================================
+ Hits 148759 148818 +59
+ Misses 21620 21616 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-37086
📔 Objective
Shows the Settings Plan row for free users (not just premium users). Tapping the row routes free users to the Premium Upgrade screen via push navigation, while premium users continue to the Premium Plan screen unchanged.
BillingCoordinator.showPremiumUpgrade()branches onstackNavigator?.isEmptyto decide betweenreplace(vault upsell modal flow, where a new empty nav controller is created before the coordinator navigates) andpush(settings flow, where the existing non-empty stack is reused).PremiumUpgradeState.showCancelButtonis set accordingly so the cancel (X) button only appears in the modal flow.📸 Screenshots
Screen.Recording.2026-05-12.at.09.00.35.mov