Skip to content

[PM-39767] fix: Hide Upgrade to Premium action card while an upgrade is pending - #2936

Draft
KatherineInCode wants to merge 1 commit into
pm-39767/upgrade-statefrom
pm-39767/cta-fixes
Draft

[PM-39767] fix: Hide Upgrade to Premium action card while an upgrade is pending#2936
KatherineInCode wants to merge 1 commit into
pm-39767/upgrade-statefrom
pm-39767/cta-fixes

Conversation

@KatherineInCode

Copy link
Copy Markdown
Contributor

🎟️ Tracking

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

📔 Objective

Second of four stacked PRs addressing QA follow-up findings on PM-39767 (base: pm-39767/upgrade-state, PR #2916).

The "Upgrade to Premium" upsell action card on the Vault tab had no concept of a pending Premium upgrade. A user who tapped "Continue" on the "Upgrade Pending" dialog would still see the CTA even though an upgrade was already in flight — most visibly for the Vault tab's own upgrade CTA, since dismissing that dialog never navigates away from this screen, so the existing one-shot .appeared refresh never re-fires on its own.

VaultListProcessor factors its action-card gating logic into a shared updatePremiumUpgradeActionCardVisibility(isPending:) helper, used by both the existing one-shot refresh and a new live subscription to BillingService.premiumUpgradePendingStatePublisher() (added in PR #2916), so the CTA hides immediately regardless of whether the screen re-appears.

A local code review flagged one test-only issue — a stream test's assertion was satisfied by the initial replayed publisher value rather than the transition it was meant to prove — fixed and verified by confirming the test fails when the guard it protects is removed.

📸 Screenshots

Not applicable — this hides an existing CTA under a specific state; no new UI.

…is pending

The upsell action card on the Vault tab had no concept of a pending Premium
upgrade, so a user who tapped "Continue" on the Upgrade Pending dialog would
still see the "Upgrade to Premium" CTA even though an upgrade was already in
flight for them.

VaultListProcessor now factors its action-card gating logic into a shared
helper and subscribes to the pending state added in the prior PR, so the CTA
hides immediately when a sync attempt started on this exact screen (where the
dialog is dismissed without leaving the view, so the existing one-shot
`.appeared` refresh alone would never re-fire), not just on next appearance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant