Skip to content

[PM-35228] Add Premium Status Changed Push Notification#20498

Open
sbrown-livefront wants to merge 9 commits intomainfrom
billing/pm-35228/add-premium-status-changed-push-notification
Open

[PM-35228] Add Premium Status Changed Push Notification#20498
sbrown-livefront wants to merge 9 commits intomainfrom
billing/pm-35228/add-premium-status-changed-push-notification

Conversation

@sbrown-livefront
Copy link
Copy Markdown
Collaborator

@sbrown-livefront sbrown-livefront commented May 4, 2026

🎟️ Tracking

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

📔 Objective

This pull request introduces support for handling premium status change notifications across the application. The main changes add a new PremiumStatusChanged notification type, update the notification processing logic to handle this new type, and ensure that the premium status is correctly updated in the user's billing profile state.

Notification Type and Model Additions:

  • Added a new NotificationType.PremiumStatusChanged enum value and corresponding PremiumStatusChangedNotification model to represent premium status change events. [1] [2]
  • Updated the NotificationResponse class to handle deserialization of the new notification payload.

Notification Handling Logic:

  • Updated DefaultServerNotificationsService to inject and use BillingAccountProfileStateService for processing PremiumStatusChanged notifications, updating the user's premium status accordingly.

📸 Screenshots

Trigger a PremiumStatusChanged in Browser Extension

Screen.Recording.2026-05-04.at.1.25.35.PM.mov

@sbrown-livefront sbrown-livefront self-assigned this May 4, 2026
@sbrown-livefront sbrown-livefront added the ai-review Request a Claude code review label May 4, 2026
@sbrown-livefront sbrown-livefront changed the title Billing/pm 35228/add premium status changed push notification [PM-35228] Add Premium Status Changed Push Notification May 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

This PR adds a new PremiumStatusChanged push notification type so client apps can react to premium status changes without waiting for a full sync. The implementation adds the new enum value, a typed payload (PremiumStatusChangedNotification), wires BillingAccountProfileStateService into DefaultServerNotificationsService, and updates DI in both the Angular module and the browser background service. Tests cover the true/false payload paths, preservation of the existing hasPremiumFromAnyOrganization value, and that no full sync is triggered.

@sbrown-livefront sbrown-livefront marked this pull request as ready for review May 4, 2026 18:18
@sbrown-livefront sbrown-livefront requested a review from a team as a code owner May 4, 2026 18:18
@sbrown-livefront sbrown-livefront requested review from a team, cyprain-okeke and djsmith85 and removed request for a team May 4, 2026 18:18
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 4, 2026

@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.11%. Comparing base (1c078bc) to head (c95c1e1).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #20498   +/-   ##
=======================================
  Coverage   47.11%   47.11%           
=======================================
  Files        3951     3951           
  Lines      119732   119744   +12     
  Branches    18349    18349           
=======================================
+ Hits        56410    56418    +8     
- Misses      59086    59090    +4     
  Partials     4236     4236           

☔ View full report in Codecov by Sentry.
📢 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.

@bw-ghapp
Copy link
Copy Markdown
Contributor

bw-ghapp Bot commented May 4, 2026

Changes in this PR impact the Autofill experience of the browser client

BIT has tested the core experience with these changes and all feature flags disabled.

✅ Fortunately, these BIT tests have passed! 🎉

@bw-ghapp
Copy link
Copy Markdown
Contributor

bw-ghapp Bot commented May 4, 2026

Changes in this PR impact the Autofill experience of the browser client

BIT has tested the core experience with these changes and the feature flag configuration used by vault.bitwarden.com.

✅ Fortunately, these BIT tests have passed! 🎉

Copy link
Copy Markdown
Contributor

@djsmith85 djsmith85 left a comment

Choose a reason for hiding this comment

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

Changes are looking good. Approving for platform

Copy link
Copy Markdown
Contributor

@cyprain-okeke cyprain-okeke left a comment

Choose a reason for hiding this comment

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

Looks good

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants