Skip to content

[PM-38575] feat: hide payment modal for sales-assisted trials - #22805

Open
cyprain-okeke wants to merge 2 commits into
billing/pm-38574/set-trial-initiation-path-for-sales-assisted-trialsfrom
billing/pm-38575/hide-payment-modal-for-sales-assisted-trials
Open

[PM-38575] feat: hide payment modal for sales-assisted trials#22805
cyprain-okeke wants to merge 2 commits into
billing/pm-38574/set-trial-initiation-path-for-sales-assisted-trialsfrom
billing/pm-38575/hide-payment-modal-for-sales-assisted-trials

Conversation

@cyprain-okeke

@cyprain-okeke cyprain-okeke commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🎟️ Tracking

PM-38575

📔 Objective

Suppress TrialPaymentDialogComponent for sales-assisted trial organizations — they're invoiced through their Bitwarden sales representative, so the self-serve card-entry modal doesn't apply. The trial countdown banner is intentionally unchanged (getFreeTrialWarning$ untouched); banner copy is handled separately in PM-38885.

A few notes for review:

Sales-assisted trial organizations are invoiced through the customer's
sales representative, so the self-serve TrialPaymentDialogComponent does
not apply to them. Suppress it by filtering on the isSalesAssisted flag
from PM-38574.

- Guard is placed in OrganizationWarningsService rather than at the call
  sites, so both admin-console callers (members.component and
  collections/vault.component) are covered by the single change.
- The trial countdown banner is intentionally untouched: getFreeTrialWarning$
  still returns the warning for sales-assisted trials, so the banner keeps
  showing. Banner copy is handled separately in PM-38885.
- Behavior is a no-op until server#8272 ships, since isSalesAssisted
  defaults to false when the server omits it.
@cyprain-okeke cyprain-okeke added the ai-review Request a Claude code review label Aug 31, 2026
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed the isSalesAssisted guard added to showSubscribeBeforeFreeTrialEndsDialog$ in apps/web/src/app/billing/organizations/warnings/services/organization-warnings.service.ts:266 plus the four accompanying spec changes. The guard is scoped to the modal path only, so getFreeTrialWarning$ and the trial banner keep emitting as the description states, and the new spec at line 211 pins that behavior. Both production consumers (vault.component.ts:360, members.component.ts:252) subscribe through merge(...), so a stream that completes without emitting is safe — this matches the shape the pre-existing warning !== null filter already had, and no firstValueFrom consumer exists that would throw EmptyError. TrialPaymentDialogComponent.open has exactly one production call site inside the guarded switchMap, and isSalesAssisted is a non-optional boolean defaulting to false when the server omits IsSalesAssisted, making this a safe no-op until bitwarden/server#8272 ships.

No findings met the confidence threshold for posting.

@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.05%. Comparing base (374ff28) to head (b2b22c6).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@                                           Coverage Diff                                            @@
##           billing/pm-38574/set-trial-initiation-path-for-sales-assisted-trials   #22805      +/-   ##
========================================================================================================
- Coverage                                                                 55.05%   55.05%   -0.01%     
========================================================================================================
  Files                                                                      4346     4346              
  Lines                                                                    138567   138567              
  Branches                                                                  21970    21970              
========================================================================================================
- Hits                                                                      76292    76288       -4     
- Misses                                                                    56723    56727       +4     
  Partials                                                                   5552     5552              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cyprain-okeke cyprain-okeke added the t:feature Change Type - Feature Development label Aug 31, 2026
@cyprain-okeke
cyprain-okeke marked this pull request as ready for review August 31, 2026 16:50
@cyprain-okeke
cyprain-okeke requested a review from a team as a code owner August 31, 2026 16:50
@cyprain-okeke
cyprain-okeke requested review from kdenney and removed request for a team August 31, 2026 16:50
…sisted-trials' into billing/pm-38575/hide-payment-modal-for-sales-assisted-trials
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review t:feature Change Type - Feature Development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants