Repository navigation
PM-39367: bug: When the billing API 404s, the 'Plan' row should be hidden from the UI - #7546
david-livefront wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
e5ab1e1 to
1cca0c5
Compare
| } | ||
| // 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) |
There was a problem hiding this comment.
The hasPremium and isOrgOnlyPremium checks combine && and || in one condition, making the eligibility logic harder to parse.
| !((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
1cca0c5 to
4d24a15
Compare
4d24a15 to
5ae4694
Compare
🎟️ Tracking
PM-39367
📔 Objective
This PR updates the
isPlanRowEligibleFlowto emit false if no subscription is found.