-
Notifications
You must be signed in to change notification settings - Fork 1.5k
PM-28324: Add a guard that conditionally forces a popout depending on platform #17444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Claude finished @abergs's task —— View job Code Review SummaryThis PR adds a route guard to force browser extension popouts on specific platforms, solving a window focus issue with passkey login on Linux. The implementation is clean and well-tested. FindingsFinding 1: PR title and description need improvement The PR title lacks specificity about the problem being solved. Consider:
Objective section improvementsThe objective should better explain the root problem: ## 📔 Objective
Fixes a window focus issue on Linux where the browser extension popup closes during WebAuthn/passkey authentication, interrupting the login flow.
This PR introduces a new `platformPopoutGuard` that forces the extension to open in a popout window (instead of the regular popup) on affected platforms before navigating to the passkey login route. After successful authentication, the popout automatically closes and reopens the regular popup.
The guard is platform-configurable and includes a `forcePopout` parameter for cross-platform testing.Finding 2: Test suite is comprehensive and well-structured The test suite (
Finding 3: Integration with The auto-close behavior (lines 136-143 in
Finding 4: Comparison with The comment from @djsmith85 mentions
For passkey authentication, the automatic guard approach is more appropriate because:
Finding 5: Missing test coverage is in routing configuration Codecov reports 1 line missing coverage at
Recommendations
Positive Observations
Overall Assessment: Solid implementation that solves a real UX problem on Linux. Tests were added as requested by @rr-bw. The automatic guard approach is more appropriate than a manual callout for time-sensitive auth operations. |
|
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17444 +/- ##
==========================================
+ Coverage 41.23% 41.26% +0.02%
==========================================
Files 3543 3547 +4
Lines 101963 102069 +106
Branches 15295 15313 +18
==========================================
+ Hits 42048 42117 +69
- Misses 58152 58187 +35
- Partials 1763 1765 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rr-bw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, would you mind adding a small test suite?
|
@abergs / @bitwarden/team-tools-dev An alternative approach to the |
|
It seems the main difference is that in tool related code we show a prompt to the user rather than automatically opening the popout. |
203173d to
d7df312
Compare

🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-28324
📔 Objective
This PR adds a new route guard that can force a browser extension popout for certain platforms. We then use that guard to solve a window focus problem for login with passkeys on linux.
To test on another platform than linux, please add
, trueto the route arguments for force a popout📸 Screenshots
https://share.cleanshot.com/86L4zpHd
⏰ Reminders before review
🦮 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