Skip to content

[PM-33518] feat: Add isInAppUpgradeAvailableFlow to PremiumStateManager#6795

Merged
SaintPatrck merged 2 commits intomainfrom
premium-upgrade/PM-33518-upgrade-available-flow
Apr 23, 2026
Merged

[PM-33518] feat: Add isInAppUpgradeAvailableFlow to PremiumStateManager#6795
SaintPatrck merged 2 commits intomainfrom
premium-upgrade/PM-33518-upgrade-available-flow

Conversation

@SaintPatrck
Copy link
Copy Markdown
Contributor

🎟️ Tracking

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

📔 Objective

Add a consolidated isInAppUpgradeAvailableFlow to PremiumStateManager that combines isInAppBillingSupportedFlow and the MobilePremiumUpgrade feature flag into a single observable signal.

Stacked on PM-33517 PR (settings/premium management)

Changes

  • Add isInAppUpgradeAvailableFlow: StateFlow<Boolean> to PremiumStateManager interface
  • Implement in PremiumStateManagerImpl by combining billing support and feature flag flows
  • Add unit tests for the new flow covering all flag/billing combinations

@SaintPatrck SaintPatrck added the ai-review-vnext Request a Claude code review using the vNext workflow label Apr 14, 2026
@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context t:feature Change Type - Feature Development labels Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 14, 2026

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

This PR adds isInAppUpgradeAvailable(): Boolean to PremiumStateManager, a synchronous getter that returns true when both BillingRepository.isInAppBillingSupportedFlow.value and the MobilePremiumUpgrade feature flag are enabled. The most recent commit intentionally converted the API from a StateFlow<Boolean> to a simple getter. Unit tests cover all four boolean combinations of the two inputs, and the test fixture adds a getFeatureFlag mock that mirrors the existing flow-based mock. KDoc is present on the new interface member.

Code Review Details

No findings.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 14, 2026

Logo
Checkmarx One – Scan Summary & Details06af60e4-33f6-4a2b-b424-0f8823a034fd

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

@SaintPatrck SaintPatrck force-pushed the premium-upgrade/PM-33517-settings-premium_bak branch from eda128d to 581f032 Compare April 14, 2026 03:30
@SaintPatrck SaintPatrck force-pushed the premium-upgrade/PM-33518-upgrade-available-flow branch from 5d1322c to 65f09c8 Compare April 14, 2026 03:30
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.81%. Comparing base (985562e) to head (b4dd755).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6795      +/-   ##
==========================================
+ Coverage   85.58%   85.81%   +0.23%     
==========================================
  Files         830      859      +29     
  Lines       61506    62519    +1013     
  Branches     8590     8602      +12     
==========================================
+ Hits        52641    53652    +1011     
+ Misses       5900     5898       -2     
- Partials     2965     2969       +4     
Flag Coverage Δ
app-data 17.01% <100.00%> (-0.34%) ⬇️
app-ui-auth-tools 20.32% <0.00%> (-0.01%) ⬇️
app-ui-platform 15.91% <0.00%> (+0.39%) ⬆️
app-ui-vault 26.37% <0.00%> (+0.48%) ⬆️
authenticator 6.66% <0.00%> (-0.01%) ⬇️
lib-core-network-bridge 4.20% <0.00%> (-0.01%) ⬇️
lib-data-ui 1.00% <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-33517-settings-premium_bak branch 4 times, most recently from 1ec1096 to a6452ec Compare April 22, 2026 12:37
Base automatically changed from premium-upgrade/PM-33517-settings-premium_bak to main April 22, 2026 14:57
Combine isInAppBillingSupportedFlow and MobilePremiumUpgrade feature
flag into a single StateFlow for determining whether to route premium
upgrade CTAs to the in-app PlanScreen or the web vault URL.
@SaintPatrck SaintPatrck force-pushed the premium-upgrade/PM-33518-upgrade-available-flow branch from 65f09c8 to 698c16d Compare April 22, 2026 20:55
@SaintPatrck SaintPatrck marked this pull request as ready for review April 22, 2026 20:56
@SaintPatrck SaintPatrck requested review from a team and david-livefront as code owners April 22, 2026 20:56
@SaintPatrck SaintPatrck added this pull request to the merge queue Apr 22, 2026
@SaintPatrck SaintPatrck removed this pull request from the merge queue due to a manual request Apr 22, 2026
@SaintPatrck SaintPatrck added this pull request to the merge queue Apr 23, 2026
Merged via the queue into main with commit 325c983 Apr 23, 2026
26 checks passed
@SaintPatrck SaintPatrck deleted the premium-upgrade/PM-33518-upgrade-available-flow branch April 23, 2026 15:52
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: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