Skip to content

[PM-39447] [Shared Unlock] Shared unlock stuck on lock component#21446

Merged
quexten merged 3 commits into
mainfrom
km/automation-driver-2
Jul 6, 2026
Merged

[PM-39447] [Shared Unlock] Shared unlock stuck on lock component#21446
quexten merged 3 commits into
mainfrom
km/automation-driver-2

Conversation

@quexten

@quexten quexten commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

🎟️ Tracking

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

📔 Objective

Bug: When two clients sharing unlock are on the lock screen actively, then one unlocks, while the other also unlocks, it remains on the lock component and never navigates away.

This fixes it by adding an external unlock event which the lock components use to navigate away.

📸 Screenshots

N/A

Add externalUnlock$ observable to shared unlock leader/follower services,
fired by JsSharedUnlockDriver when a user key is applied externally.
Wire it into all platform LockComponentService implementations so the
lock component navigates away automatically on external unlock.
@quexten quexten requested a review from a team as a code owner June 24, 2026 05:06
@quexten quexten requested a review from eligrubb June 24, 2026 05:06
@quexten quexten changed the title [PM-39447] Lock screen auto-dismisses on shared unlock external event [PM-39447] [Shared Unlock] Shared unlock stuck on lock component Jun 24, 2026
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed the shared-unlock lock-screen fix that introduces an externalUnlock$ event so a lock component auto-dismisses when another client unlocks the same account. Verified the new getExternalUnlock$ abstract method is implemented across all three platform services (web, browser, desktop), DI wiring is correct (safeProvider deps arrays match constructors, leader/follower services registered), and subscription teardown is handled via activeAccountChange$, take(1), and destroy$. The three earlier CRITICAL test-breakage findings are resolved — the spec files now provide the new mocks/providers and the "Fix tests" commit addresses them.

Code Review Details

No outstanding findings. Previously flagged test-compilation breakages (lock.component.spec, desktop-lock-component.service.spec, web-lock-component.service.spec) were resolved in this PR's follow-up commit.

@quexten quexten marked this pull request as draft June 24, 2026 05:09
Comment thread libs/key-management-ui/src/lock/components/lock.component.ts
@quexten quexten added the t:bugfix Change Type - Bugfix label Jun 24, 2026
@quexten quexten marked this pull request as ready for review June 24, 2026 05:33
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 36.84211% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.56%. Comparing base (81757da) to head (cf769bd).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...d-unlock/default-shared-unlock-follower.service.ts 0.00% 4 Missing ⚠️
...red-unlock/default-shared-unlock-leader.service.ts 0.00% 4 Missing ⚠️
.../lock/services/extension-lock-component.service.ts 50.00% 3 Missing ⚠️
...nt/lock/services/desktop-lock-component.service.ts 50.00% 3 Missing ⚠️
...gement/lock/services/web-lock-component.service.ts 50.00% 3 Missing ⚠️
...anagement-ui/src/lock/components/lock.component.ts 40.00% 3 Missing ⚠️
apps/browser/src/background/main.background.ts 33.33% 2 Missing ⚠️
...y-management/shared-unlock/shared-unlock-driver.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #21446      +/-   ##
==========================================
- Coverage   49.57%   49.56%   -0.01%     
==========================================
  Files        4108     4109       +1     
  Lines      129059   129094      +35     
  Branches    19721    19722       +1     
==========================================
+ Hits        63977    63989      +12     
- Misses      60353    60377      +24     
+ Partials     4729     4728       -1     

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

@sonarqubecloud

sonarqubecloud Bot commented Jul 1, 2026

Copy link
Copy Markdown

@bw-ghapp

bw-ghapp Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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

bw-ghapp Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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! 🎉

@quexten quexten merged commit 0151e15 into main Jul 6, 2026
135 of 138 checks passed
@quexten quexten deleted the km/automation-driver-2 branch July 6, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t:bugfix Change Type - Bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants