Skip to content

PM-39367: bug: When the billing API 404s, the 'Plan' row should be hidden from the UI - #7546

Draft
david-livefront wants to merge 1 commit into
mainfrom
PM-39367-no-subscription
Draft

david-livefront wants to merge 1 commit into
mainfrom
PM-39367-no-subscription

Conversation

@david-livefront

@david-livefront david-livefront commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

🎟️ Tracking

PM-39367

📔 Objective

This PR updates the isPlanRowEligibleFlow to emit false if no subscription is found.

@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context t:bug Change Type - Bug labels Oct 29, 2026
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.82%. Comparing base (262dba3) to head (5ae4694).

Files with missing lines Patch % Lines
...en/data/billing/manager/PremiumStateManagerImpl.kt 93.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7546   +/-   ##
=======================================
  Coverage   86.82%   86.82%           
=======================================
  Files         896      896           
  Lines       65792    65798    +6     
  Branches     9407     9411    +4     
=======================================
+ Hits        57121    57127    +6     
  Misses       5187     5187           
  Partials     3484     3484           
Flag Coverage Δ
app-data 18.70% <93.33%> (+<0.01%) ⬆️
app-ui-auth-tools 18.62% <0.00%> (-0.01%) ⬇️
app-ui-platform 16.47% <0.00%> (-0.01%) ⬇️
app-ui-vault 26.97% <0.00%> (-0.01%) ⬇️
authenticator 6.01% <0.00%> (-0.01%) ⬇️
lib-core-network-bridge 4.12% <0.00%> (-0.01%) ⬇️
lib-data-ui 1.25% <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 Harness.
📢 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.

@david-livefront
david-livefront force-pushed the PM-39367-no-subscription branch 2 times, most recently from e5ab1e1 to 1cca0c5 Compare October 30, 2026 20:45
}
// The Plan Row is hidden if the user has premium but does not have
// a subscription or the premium status was granted by an organization.
!((hasPremium && !hasSubscription) || isOrgOnlyPremium)

@aikido-pr-checks aikido-pr-checks Bot Oct 30, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The hasPremium and isOrgOnlyPremium checks combine && and || in one condition, making the eligibility logic harder to parse.

Suggested change
!((hasPremium && !hasSubscription) || isOrgOnlyPremium)
val hasIneligiblePremium = hasPremium && !hasSubscription
!(hasIneligiblePremium || isOrgOnlyPremium)
Details

✨ AI Reasoning
​The condition combines a conjunction and a disjunction, requiring the reader to track how hasPremium, hasSubscription, and isOrgOnlyPremium relate. This creates avoidable precedence and grouping complexity in the eligibility expression.

Reply on this comment to give feedback or ignore the issue.
More info

@david-livefront
david-livefront force-pushed the PM-39367-no-subscription branch from 1cca0c5 to 4d24a15 Compare October 30, 2026 20:49
@david-livefront
david-livefront force-pushed the PM-39367-no-subscription branch from 4d24a15 to 5ae4694 Compare October 30, 2026 20:56

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

1 participant