Skip to content

Auth/pm 5594/enabling account switching causes performance issues on safari#18339

Merged
enmande merged 4 commits intomainfrom
auth/pm-5594/enabling-account-switching-causes-performance-issues-on-safari
Jan 27, 2026
Merged

Auth/pm 5594/enabling account switching causes performance issues on safari#18339
enmande merged 4 commits intomainfrom
auth/pm-5594/enabling-account-switching-causes-performance-issues-on-safari

Conversation

@enmande
Copy link
Contributor

@enmande enmande commented Jan 13, 2026

🎟️ Tracking

PM-5594

📔 Objective

:octocat: Associated server PR 6829 introduces the feature flag behind this update.

Allows the re-enabling of account switching in the Safari browser extension.

Recent investigations have shown whatever the cause of significant performance issues in Safari browser extension when account switching was introduced have been resolved. Local attempts to observe performance slowdown have failed to reproduce anything measurable.

This update includes a modest refactor to drive the enablement of account switching toward a server-provided feature flag, away from the client-side compile-time flag which was used for what are understood to be historical reasons (not technical reasons). This will further allow for a controlled rollout, or a rollback if necessary. To tightly scope the change and to facilitate future unwinding, the enablement check has been moved to the AccountSwitcherService (domain responsibility).

📸 Screenshots

Flag Off

Feature flag off, preserving current state of "no account switching on Safari extension."

PM-5594__flag-off.mov

Flag On

The feature flag is evaluated after BrowserApi.isSafari is evaluated, allowing the controlled configuration of behavior for Safari browser.

PM-5594__flag-on.mov

⏰ 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 Jan 13, 2026

Logo
Checkmarx One – Scan Summary & Detailsa92d4c17-8064-42a4-8655-ce228a3b93ae

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

@codecov
Copy link

codecov bot commented Jan 13, 2026

Codecov Report

❌ Patch coverage is 27.77778% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.50%. Comparing base (8cda097) to head (eab09a7).
⚠️ Report is 159 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...up/account-switching/account-switcher.component.ts 0.00% 6 Missing ⚠️
...ofill/popup/settings/excluded-domains.component.ts 0.00% 4 Missing ⚠️
...unt-switching/services/account-switcher.service.ts 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18339      +/-   ##
==========================================
- Coverage   42.58%   42.50%   -0.08%     
==========================================
  Files        3627     3635       +8     
  Lines      105188   105554     +366     
  Branches    15877    15943      +66     
==========================================
+ Hits        44791    44868      +77     
- Misses      58507    58795     +288     
- Partials     1890     1891       +1     

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

bw-ghapp bot commented Jan 13, 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! 🎉

@bw-ghapp
Copy link
Contributor

bw-ghapp bot commented Jan 13, 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! 🎉

@enmande enmande added the ai-review Request a Claude code review label Jan 13, 2026
@enmande enmande marked this pull request as ready for review January 13, 2026 01:25
@enmande enmande requested review from a team as code owners January 13, 2026 01:25
@enmande enmande added ai-review Request a Claude code review and removed ai-review Request a Claude code review labels Jan 13, 2026
Copy link
Contributor

@coroiu coroiu left a comment

Choose a reason for hiding this comment

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

Platform changes are good 👍

Copy link
Contributor

@jprusik jprusik left a comment

Choose a reason for hiding this comment

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

I don't think we need to

edit: I think I approved mid-thought here 😂

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Good work Dave! Changes look good.

@enmande enmande merged commit c82ac0f into main Jan 27, 2026
158 checks passed
@enmande enmande deleted the auth/pm-5594/enabling-account-switching-causes-performance-issues-on-safari branch January 27, 2026 19:27
jaasen-livefront pushed a commit that referenced this pull request Feb 17, 2026
…performance issues on safari (#18339)

* refactor(account-switching) [PM-5594]: Move account switching enabled flag to AccountSwitcherService to accommodate server-side feature flag.

* test(account-switching) [PM-5594]: Update tests to include ConfigService dependency for feature flag.

* refactor(account-switching) [PM-5594]: Remove compile-time account switching flags from browser.

* refactor(account-switching) [PM-5594]: Move initialization to ctor for strict.
DerPlayer2001 added a commit to DerPlayer2001/vaultwarden that referenced this pull request Mar 3, 2026
DerPlayer2001 added a commit to DerPlayer2001/vaultwarden that referenced this pull request Mar 3, 2026
DerPlayer2001 added a commit to DerPlayer2001/vaultwarden that referenced this pull request Mar 3, 2026
DerPlayer2001 added a commit to DerPlayer2001/vaultwarden that referenced this pull request Mar 3, 2026
DerPlayer2001 added a commit to DerPlayer2001/vaultwarden that referenced this pull request Mar 4, 2026
DerPlayer2001 added a commit to DerPlayer2001/vaultwarden that referenced this pull request Mar 7, 2026
dani-garcia pushed a commit to dani-garcia/vaultwarden that referenced this pull request Mar 9, 2026
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.

5 participants