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

Closed
opened 2026-05-19 20:46:33 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6939
Author: @SaintPatrck
Created: 5/18/2026
Status: Merged
Merged: 5/20/2026
Merged by: @SaintPatrck

Base: mainHead: premium-upgrade/pm-36886-self-hosted-gating


📝 Commits (4)

  • ee5b582 [PM-36886] fix: Gate premium upgrade flow on cloud-hosted environments
  • 9f09675 [PM-36886] feat: Surface premium feature list on self-hosted Plan screen
  • 7b9969c [PM-36886] chore: Drop unreferenced strings from earlier action-card design
  • d311bc5 Rename Free and SelfHosted content composables in PlanScreen

📊 Changes

7 files changed (+344 additions, -56 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/premium/plan/PlanScreen.kt (+101 -7)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/premium/plan/PlanViewModel.kt (+52 -30)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/SettingsViewModel.kt (+37 -2)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/premium/plan/PlanScreenTest.kt (+50 -1)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/premium/plan/PlanViewModelTest.kt (+62 -16)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/SettingsViewModelTest.kt (+41 -0)
📝 ui/src/main/res/values/strings.xml (+1 -0)

📄 Description

🎟️ 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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/6939 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 5/18/2026 **Status:** ✅ Merged **Merged:** 5/20/2026 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `premium-upgrade/pm-36886-self-hosted-gating` --- ### 📝 Commits (4) - [`ee5b582`](https://github.com/bitwarden/android/commit/ee5b5824a35fc8ac28e6fbe413850b35c4f2f1d7) [PM-36886] fix: Gate premium upgrade flow on cloud-hosted environments - [`9f09675`](https://github.com/bitwarden/android/commit/9f096754a47496ca9da5b25788a3a667b198f622) [PM-36886] feat: Surface premium feature list on self-hosted Plan screen - [`7b9969c`](https://github.com/bitwarden/android/commit/7b9969c0aa557d0750a0a8abb4e5d37bfc1cbaec) [PM-36886] chore: Drop unreferenced strings from earlier action-card design - [`d311bc5`](https://github.com/bitwarden/android/commit/d311bc58beec3da6711ab64b212ccacc4bdd2d41) Rename Free and SelfHosted content composables in PlanScreen ### 📊 Changes **7 files changed** (+344 additions, -56 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/premium/plan/PlanScreen.kt` (+101 -7) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/premium/plan/PlanViewModel.kt` (+52 -30) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/SettingsViewModel.kt` (+37 -2) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/premium/plan/PlanScreenTest.kt` (+50 -1) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/premium/plan/PlanViewModelTest.kt` (+62 -16) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/SettingsViewModelTest.kt` (+41 -0) 📝 `ui/src/main/res/values/strings.xml` (+1 -0) </details> ### 📄 Description ## 🎟️ Tracking - https://bitwarden.atlassian.net/browse/PM-36886 - https://bitwarden.atlassian.net/browse/PM-36887 - https://bitwarden.atlassian.net/browse/PM-36889 - https://bitwarden.atlassian.net/browse/PM-37472 ## 📔 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 | |--------|--------| | <img width="365" src="https://github.com/user-attachments/assets/2e597466-37ed-4674-b39b-0c9e40614ab9" /> | <img width="365" src="https://github.com/user-attachments/assets/3de58907-c6e2-46fb-b883-8c80873ab114" /> | | <img width="365" src="https://github.com/user-attachments/assets/5ebd13eb-a193-42b8-a960-3d83b0fbbfdf" /> | <img width="365" src="https://github.com/user-attachments/assets/5e116bfd-ddad-4ed8-ac90-8ade98c5726b" /> | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-19 20:46:33 -05:00
GiteaMirror changed title from [PR #6939] [PM-36886] fix: Gate premium upgrade flow on self-hosted environments to [PR #6939] [MERGED] [PM-36886] fix: Gate premium upgrade flow on self-hosted environments 2026-05-23 00:59:35 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#82227