[PM-39767] fix: Hide Upgrade to Premium action card while an upgrade is pending - #2936
Draft
KatherineInCode wants to merge 1 commit into
Draft
[PM-39767] fix: Hide Upgrade to Premium action card while an upgrade is pending#2936KatherineInCode wants to merge 1 commit into
KatherineInCode wants to merge 1 commit into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎟️ 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
.appearedrefresh never re-fires on its own.VaultListProcessorfactors its action-card gating logic into a sharedupdatePremiumUpgradeActionCardVisibility(isPending:)helper, used by both the existing one-shot refresh and a new live subscription toBillingService.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.