Skip to content

PM-38356 PM-37177: Bug: Update premium subscription trouble-states#7073

Merged
david-livefront merged 1 commit into
mainfrom
PM-38356-PM-37177-update-trouble-state
Jun 18, 2026
Merged

PM-38356 PM-37177: Bug: Update premium subscription trouble-states#7073
david-livefront merged 1 commit into
mainfrom
PM-38356-PM-37177-update-trouble-state

Conversation

@david-livefront

@david-livefront david-livefront commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

🎟️ Tracking

PM-38356
PM-37177

📔 Objective

This PR updates the logic for determining which premium card should be displayed to the user. The two options are Upgrade to Premium card or the newly added Needs Attention card.

📸 Screenshots

@david-livefront david-livefront added the ai-review-vnext Request a Claude code review using the vNext workflow label Jun 17, 2026
@david-livefront david-livefront requested a review from a team as a code owner June 17, 2026 21:49
@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context t:bug Change Type - Bug labels Jun 17, 2026
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

This PR refactors the premium action-card logic, replacing the boolean isPremiumUpgradeBannerEligibleFlow with a PremiumCard enum (UPGRADE, NEEDS_ATTENTION, NONE) and adds a new "Your subscription needs attention" card for PAST_DUE/UPDATE_PAYMENT statuses. The rename is consistently applied across the manager, ViewModel, state, and tests with no lingering references to the old flow. Behavior changes are intentional and well-covered: EXPIRED/PAUSED map to the gated UPGRADE card, payment-trouble statuses map to an ungated NEEDS_ATTENTION card, and CANCELED now maps to NONE.

Code Review Details

No outstanding findings.

Two previously flagged 🎨 SUGGESTED findings (KDoc on premiumCardStateFlow and premiumCardState()) were already addressed and verified in their existing threads.

aj-rosado
aj-rosado previously approved these changes Jun 18, 2026

@aj-rosado aj-rosado left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

SaintPatrck
SaintPatrck previously approved these changes Jun 18, 2026
@david-livefront david-livefront dismissed stale reviews from SaintPatrck and aj-rosado via ff7f032 June 18, 2026 18:30
@david-livefront david-livefront force-pushed the PM-38356-PM-37177-update-trouble-state branch from e13afd8 to ff7f032 Compare June 18, 2026 18:30
@github-actions github-actions Bot added the app:authenticator Bitwarden Authenticator app context label Jun 18, 2026
@david-livefront david-livefront force-pushed the PM-38356-PM-37177-update-trouble-state branch from ff7f032 to 0ba58b3 Compare June 18, 2026 18:39
@david-livefront david-livefront force-pushed the PM-38356-PM-37177-update-trouble-state branch from 0ba58b3 to 6ca6d51 Compare June 18, 2026 18:55
@david-livefront david-livefront force-pushed the PM-38356-PM-37177-update-trouble-state branch from 6ca6d51 to 4e49b96 Compare June 18, 2026 19:38
* Emits a [PremiumCard] for the current user indicating what Premium card should be displayed.
*/
val isPremiumUpgradeBannerEligibleFlow: StateFlow<Boolean>
val premiumCardStateFlow: StateFlow<PremiumCard>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔥

override val premiumCardStateFlow: StateFlow<PremiumCard> =
combine(
authDiskSource.userStateFlow,
authDiskSource.userStateFlow.map { it?.activeAccount },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👏

@david-livefront

Copy link
Copy Markdown
Collaborator Author

Thanks @SaintPatrck

@david-livefront david-livefront added this pull request to the merge queue Jun 18, 2026
Merged via the queue into main with commit 59b9cbf Jun 18, 2026
39 checks passed
@david-livefront david-livefront deleted the PM-38356-PM-37177-update-trouble-state branch June 18, 2026 20:08
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.

3 participants