Skip to content

[PM-37287] feat: Make Premium subscription required text tappable under authenticator key#6981

Draft
SaintPatrck wants to merge 1 commit into
mainfrom
premium-upgrade/pm-37287-totp-premium-cta
Draft

[PM-37287] feat: Make Premium subscription required text tappable under authenticator key#6981
SaintPatrck wants to merge 1 commit into
mainfrom
premium-upgrade/pm-37287-totp-premium-cta

Conversation

@SaintPatrck
Copy link
Copy Markdown
Contributor

@SaintPatrck SaintPatrck commented May 26, 2026

🎟️ Tracking

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

📔 Objective

Non-Premium users see "Premium subscription required" under the Authenticator key on the View and Edit login screens, but the text is inert — there is no path from the gated state to the upgrade flow on either screen. This makes the placeholder tappable. Tapping opens an upsell dialog explaining that TOTP is a Premium feature, with Cancel and Upgrade to Premium buttons.

The Upgrade button routes through the existing handleUpgradeToPremiumClick logic: when in-app upgrade is available (MobilePremiumUpgrade flag + in-app billing supported) it opens the in-app Plan modal; otherwise it falls back to the web vault premium URI used by other upgrade CTAs.

Incidental behavior change: VaultAddEditViewModel.handleUpgradeToPremiumClick now also dismisses the active dialog before emitting the navigation event. This aligns Edit with the View screen's existing behavior and incidentally affects the existing ArchiveRequiresPremium upsell on Edit.

📸 Screenshots

View Login

In-app Upgrade DISABLED

Figma Actual
Screen_recording_20260528_095748.mp4

Edit Login

@SaintPatrck SaintPatrck added the ai-review-vnext Request a Claude code review using the vNext workflow label May 26, 2026
@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context app:authenticator Bitwarden Authenticator app context t:feature Change Type - Feature Development labels May 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 26, 2026

Bitwarden Claude Code Review

Overall Assessment: APPROVE

This PR makes the "Premium subscription required" placeholder under the authenticator key tappable on both the Vault Item view and Add/Edit Login screens, surfacing a new TotpRequiresPremium upsell dialog. The "Upgrade to Premium" confirm button is routed through a new Common.NavigateToPlanClick action that unconditionally emits NavigateToPlanModal; PlanScreen continues to own onward routing for Cloud, Self-Hosted, and Premium variants. The existing ArchiveRequiresPremium dialog on both screens is repointed to the same new action, which the PR description explicitly calls out as an intentional consolidation.

The Add-mode gate (!isPremium) is applied via a new withAuthenticatorKeyPremiumGate extension at construction; Edit/Clone modes set the gate inside CipherView.toViewState where organizationUseTotp is additionally honored. Both ViewModels clear the active dialog before emitting NavigateToPlanModal, mirroring VaultItemViewModel's existing behavior.

Code Review Details

No findings. The implementation mirrors the existing ArchiveRequiresPremium upsell pattern. The disabled branch of TotpField in VaultItemLoginContent only renders when canViewTotpCode = isPremium || organizationUseTotp is false, so the new "Premium subscription required" CTA there is correctly scoped to non-Premium, non-organizationUseTotp users. The Add-vs-Edit gate difference is documented on withAuthenticatorKeyPremiumGate, and test coverage spans dialog rendering, action dispatch, screen wiring, CipherView mapping, and the new extension (Login gate on/off, non-Login content, non-Content view state). The new authenticator_key_is_a_premium_feature string follows the codebase's content-based snake_case naming convention.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 26, 2026

Codecov Report

❌ Patch coverage is 97.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.49%. Comparing base (3732672) to head (337f170).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
.../ui/vault/feature/addedit/VaultAddEditViewModel.kt 87.50% 0 Missing and 2 partials ⚠️
...warden/ui/vault/feature/item/VaultItemViewModel.kt 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6981      +/-   ##
==========================================
+ Coverage   85.83%   86.49%   +0.66%     
==========================================
  Files         970      872      -98     
  Lines       65738    63738    -2000     
  Branches     9253     9235      -18     
==========================================
- Hits        56424    55132    -1292     
+ Misses       6139     5438     -701     
+ Partials     3175     3168       -7     
Flag Coverage Δ
app-data 17.20% <0.00%> (+0.30%) ⬆️
app-ui-auth-tools 19.00% <0.00%> (-0.37%) ⬇️
app-ui-platform 16.47% <0.00%> (-0.01%) ⬇️
app-ui-vault 27.90% <97.00%> (-0.55%) ⬇️
authenticator 6.21% <0.00%> (-0.04%) ⬇️
lib-core-network-bridge 4.08% <0.00%> (-0.02%) ⬇️
lib-data-ui 1.14% <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 Sentry.
📢 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.

@SaintPatrck SaintPatrck force-pushed the premium-upgrade/pm-37287-totp-premium-cta branch 4 times, most recently from 7da7213 to d7e67b3 Compare May 28, 2026 14:26
…er authenticator key

The "Premium subscription required" placeholder under the Authenticator key
on the View and Edit login screens was inert text, leaving non-Premium users
with no path to learn why TOTP is gated or how to upgrade. Tapping it now
opens an upsell dialog that routes through the existing in-app upgrade flow,
making the gated state actionable from where the user encounters it.

The new behavior is gated on the in-app Premium upgrade flow being available
(MobilePremiumUpgrade feature flag + in-app billing support). When the flow
is unavailable, both screens fall back to their original presentation. The
gate is observed reactively so the screens respond to flag changes while
visible.
@SaintPatrck SaintPatrck force-pushed the premium-upgrade/pm-37287-totp-premium-cta branch from d7e67b3 to 337f170 Compare May 28, 2026 15:50
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:feature Change Type - Feature Development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant