Skip to content

[PM-35455] feat: Wire premium subscription data into Plan screen#6819

Draft
SaintPatrck wants to merge 4 commits intopremium-upgrade/PM-35454-subscription-backendfrom
premium-upgrade/PM-35455-plan-premium-wiring
Draft

[PM-35455] feat: Wire premium subscription data into Plan screen#6819
SaintPatrck wants to merge 4 commits intopremium-upgrade/PM-35454-subscription-backendfrom
premium-upgrade/PM-35455-plan-premium-wiring

Conversation

@SaintPatrck
Copy link
Copy Markdown
Contributor

@SaintPatrck SaintPatrck commented Apr 21, 2026

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-35455

📔 Objective

Wires premium subscription data into the Plan screen so premium users see their actual billed rate, storage cost, discount, estimated tax, and next-charge summary — plus a status badge reflecting their current subscription state.

Stacks on PM-35454. Line items default to a "--" placeholder while the subscription fetch is loading and for any field that resolves to null or 0.00 (e.g. no additional storage, no discount, no tax). Currency is hardcoded to USD for now.

The existing Manage plan / Cancel Premium flows (via the Stripe customer portal) are surfaced here; the cancel button is hidden when status is already CANCELED.

📸 Screenshots

@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context app:authenticator Bitwarden Authenticator app context t:feature Change Type - Feature Development labels Apr 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Logo
Checkmarx One – Scan Summary & Detailsa258bf78-f12f-4de5-bb5c-8de584706362

Great job! No new security vulnerabilities introduced in this pull request

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

❌ Patch coverage is 41.42857% with 205 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.04%. Comparing base (cbf4111) to head (915e983).

Files with missing lines Patch % Lines
...den/ui/platform/feature/premium/plan/PlanScreen.kt 0.57% 167 Missing and 5 partials ⚠️
.../ui/platform/feature/premium/plan/PlanViewModel.kt 82.38% 18 Missing and 10 partials ⚠️
...form/feature/premium/plan/handlers/PlanHandlers.kt 72.22% 5 Missing ⚠️
Additional details and impacted files
@@                                Coverage Diff                                @@
##           premium-upgrade/PM-35454-subscription-backend    #6819      +/-   ##
=================================================================================
- Coverage                                          85.46%   85.04%   -0.43%     
=================================================================================
  Files                                                834      834              
  Lines                                              61582    62036     +454     
  Branches                                            8597     8636      +39     
=================================================================================
+ Hits                                               52632    52757     +125     
- Misses                                              5985     6300     +315     
- Partials                                            2965     2979      +14     
Flag Coverage Δ
app-data 17.25% <0.00%> (-0.10%) ⬇️
app-ui-auth-tools 20.21% <0.00%> (-0.11%) ⬇️
app-ui-platform 15.64% <41.42%> (+0.12%) ⬆️
app-ui-vault 25.76% <0.00%> (-0.14%) ⬇️
authenticator 6.65% <0.00%> (-0.04%) ⬇️
lib-core-network-bridge 4.17% <0.00%> (-0.04%) ⬇️
lib-data-ui 0.99% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

@SaintPatrck SaintPatrck force-pushed the premium-upgrade/PM-35455-plan-premium-wiring branch from c3887d5 to 915e983 Compare April 21, 2026 21:48
@SaintPatrck SaintPatrck added ai-review-vnext Request a Claude code review using the vNext workflow labels Apr 21, 2026
@github-actions github-actions Bot removed the ai-review-vnext Request a Claude code review using the vNext workflow label Apr 21, 2026
@SaintPatrck SaintPatrck force-pushed the premium-upgrade/PM-35454-subscription-backend branch from cbf4111 to 0cb83ba Compare April 23, 2026 20:44
@SaintPatrck SaintPatrck force-pushed the premium-upgrade/PM-35455-plan-premium-wiring branch from 915e983 to 5230d82 Compare April 23, 2026 21:10
Fixed height 24dp, 12dp corner radius, and 4dp vertical inner padding match
the Status Badges component's published dimensions.
Renders a premium user's actual billed rate, storage cost, discount, estimated tax, and next-charge summary in the Plan screen, along with the subscription status badge and the existing Manage plan / Cancel Premium actions. Line items default to a "--" placeholder while the subscription fetch is loading and for any field that resolves to null or 0.00.
Renders the paused status as a warning badge with a generic resume message
and swaps the Plan screen's currency formatting helpers off Double now that
SubscriptionInfo is BigDecimal-backed.
@SaintPatrck SaintPatrck force-pushed the premium-upgrade/PM-35455-plan-premium-wiring branch from 5230d82 to 06622de Compare April 23, 2026 21:20
<string name="subscription_canceled_description">Your subscription was canceled on %1$s. Resubscribe to continue using premium features.</string>
<string name="subscription_overdue_description">We couldn’t process your payment. Update your payment before your subscription ends on %1$s.</string>
<string name="subscription_past_due_description">You have a grace period of %1$d days from your subscription expiration date. Please resolve the past due amount by %2$s.</string>
<string name="subscription_paused_description">Your subscription is paused. Resume it to continue using premium features.</string>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RishikaSG-28 is this ok for the "Paused" status message?

Copy link
Copy Markdown

@RishikaSG-28 RishikaSG-28 Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SaintPatrck For the paused state, here's the copy:
Badge: "Paused" (orange/warning)
Message: "Your subscription is paused. Resume to continue using premium features."

Backfill the Compose UI tests for the premium subscription card, status
badge variants, line items, action buttons, and portal/subscription dialog
states that Codecov flagged as uncovered.
@SaintPatrck SaintPatrck force-pushed the premium-upgrade/PM-35454-subscription-backend branch from 0a18f8a to 049e150 Compare April 24, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app:authenticator Bitwarden Authenticator app context app:password-manager Bitwarden Password Manager app context t:feature Change Type - Feature Development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants