Skip to content

Conversation

@andrebispo5
Copy link
Contributor

@andrebispo5 andrebispo5 commented Oct 16, 2025

🎟️ Tracking

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

📔 Objective

This pull request introduces a feature flag to control logout behavior when a push notification is received for a KDF (Key Derivation Function) change. If the new NoLogoutOnKdfChange flag is enabled, the app will avoid logging out the user when the logout reason is a KDF change.

Feature: Avoid logout on KDF change

  • Added a new feature flag NoLogoutOnKdfChange to FlagKey, including its display label and debug menu integration, allowing toggling the behavior from the UI.
  • Updated PushManagerImpl to check the new flag and skip emitting logout events if the logout reason is KDF_CHANGE in push notifications.
  • Modified dependency injection to provide FeatureFlagManager to PushManagerImpl.

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@github-actions
Copy link
Contributor

github-actions bot commented Oct 16, 2025

Logo
Checkmarx One – Scan Summary & Detailsc62a4c34-25f9-4b91-bc1c-12b9a5137a20

Great job! No new security vulnerabilities introduced in this pull request

@andrebispo5 andrebispo5 changed the title Pm 26736/prevent logout notification [PM-26736] Prevent logout notification on KDF change Oct 16, 2025
@codecov
Copy link

codecov bot commented Oct 16, 2025

Codecov Report

❌ Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.81%. Comparing base (03df341) to head (4b08383).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
...bitwarden/data/platform/manager/PushManagerImpl.kt 77.77% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6038      +/-   ##
==========================================
+ Coverage   84.24%   84.81%   +0.57%     
==========================================
  Files         836      720     -116     
  Lines       56967    54632    -2335     
  Branches     7623     7588      -35     
==========================================
- Hits        47991    46337    -1654     
+ Misses       6308     5637     -671     
+ Partials     2668     2658      -10     

☔ 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.

/**
* Data object holding the feature flag key for the No Logout On KDF Change feature.
*/
data object NoLogoutOnKdfChange : FlagKey<Boolean>() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we add this to the activePasswordManagerFlags above

@andrebispo5 andrebispo5 added this pull request to the merge queue Oct 16, 2025
Merged via the queue into main with commit a70b217 Oct 16, 2025
9 checks passed
@andrebispo5 andrebispo5 deleted the pm-26736/prevent-logout-notification branch October 16, 2025 19:29
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.

4 participants