Skip to content

[PM-36886] fix: Gate premium upgrade flow on self-hosted environments#6939

Merged
SaintPatrck merged 4 commits into
mainfrom
premium-upgrade/pm-36886-self-hosted-gating
May 20, 2026
Merged

[PM-36886] fix: Gate premium upgrade flow on self-hosted environments#6939
SaintPatrck merged 4 commits into
mainfrom
premium-upgrade/pm-36886-self-hosted-gating

Conversation

@SaintPatrck
Copy link
Copy Markdown
Contributor

@SaintPatrck SaintPatrck commented May 18, 2026

🎟️ Tracking

📔 Objective

Free self-hosted users have no Stripe pricing endpoint or checkout session available to them, so the existing premium upgrade surfaces either showed broken pricing, errored on the pricing fetch, or routed users into a checkout that cannot complete. Subscription management for self-hosted accounts lives exclusively on the web vault.

Gate the in-app upgrade affordance on cloud environments and surface a non-actionable info callout in its place:

  • SettingsViewModel hides the Plan row entirely when the active environment is self-hosted.
  • PlanViewModel skips the Stripe pricing fetch on self-hosted and emits a dedicated Free.SelfHosted view state.
  • PlanScreen renders a BitwardenInfoCalloutCard directing the user to log in to the web vault on a computer to manage their subscription, alongside the static premium feature list so self-hosted users can still see what Premium unlocks.

📸 Screenshots

Figma Actual

@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context app:authenticator Bitwarden Authenticator app context t:bug Change Type - Bug labels May 18, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

❌ Patch coverage is 90.19608% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.33%. Comparing base (5f3f9d1) to head (d311bc5).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../ui/platform/feature/premium/plan/PlanViewModel.kt 75.00% 5 Missing and 3 partials ⚠️
...den/ui/platform/feature/premium/plan/PlanScreen.kt 96.29% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6939      +/-   ##
==========================================
- Coverage   86.43%   86.33%   -0.11%     
==========================================
  Files         870      873       +3     
  Lines       63301    63477     +176     
  Branches     9189     9200      +11     
==========================================
+ Hits        54714    54802      +88     
- Misses       5428     5514      +86     
- Partials     3159     3161       +2     
Flag Coverage Δ
app-data 17.06% <0.00%> (-0.03%) ⬇️
app-ui-auth-tools 19.13% <0.00%> (-0.03%) ⬇️
app-ui-platform 16.37% <90.19%> (+0.11%) ⬆️
app-ui-vault 27.91% <0.00%> (-0.04%) ⬇️
authenticator 6.23% <0.00%> (-0.02%) ⬇️
lib-core-network-bridge 4.07% <0.00%> (-0.01%) ⬇️
lib-data-ui 1.15% <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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SaintPatrck SaintPatrck added the ai-review-vnext Request a Claude code review using the vNext workflow label May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

Claude Code is reviewing this pull request...

If this comment does not update with results, check the Actions log.

@SaintPatrck SaintPatrck changed the title [PM-36886] fix: Gate premium upgrade flow on cloud-hosted environments [PM-36886] fix: Gate premium upgrade flow on self-hosted environments May 19, 2026
@SaintPatrck SaintPatrck force-pushed the premium-upgrade/pm-36886-self-hosted-gating branch from 0e0e134 to d3f2605 Compare May 19, 2026 19:39
Comment thread ui/src/main/res/values/strings.xml Outdated
@SaintPatrck SaintPatrck marked this pull request as ready for review May 19, 2026 20:17
@SaintPatrck SaintPatrck requested review from a team and david-livefront as code owners May 19, 2026 20:17
Free self-hosted users have no Stripe pricing endpoint or checkout
session available to them, so the existing upgrade UI either showed
broken pricing, errored on the pricing fetch, or routed users into a
checkout that cannot complete. Subscription management for self-hosted
accounts lives on the web vault, not in-app.

Surface that affordance directly: Settings hides the Plan row, and
the Plan screen swaps the upgrade card for an info card that deep-
links to the web vault subscription page.

Resolves: PM-36886, PM-36887, PM-36889, PM-37472.
@SaintPatrck SaintPatrck force-pushed the premium-upgrade/pm-36886-self-hosted-gating branch from 8e36a6d to 7b9969c Compare May 20, 2026 00:25
@SaintPatrck SaintPatrck enabled auto-merge May 20, 2026 01:13
@SaintPatrck SaintPatrck added this pull request to the merge queue May 20, 2026
Merged via the queue into main with commit fce814d May 20, 2026
24 of 25 checks passed
@SaintPatrck SaintPatrck deleted the premium-upgrade/pm-36886-self-hosted-gating branch May 20, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review-vnext Request a Claude code review using the vNext workflow app:authenticator Bitwarden Authenticator app context 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.

2 participants