[PM-41319] fix: Autofill phone-number login credentials via fill-assist - #7250
[PM-41319] fix: Autofill phone-number login credentials via fill-assist#7250aj-rosado wants to merge 1 commit into
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the fill-assist changes in Code Review DetailsNo findings met the confidence threshold for posting. Notes considered and dropped during validation:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7250 +/- ##
==========================================
- Coverage 86.11% 85.83% -0.29%
==========================================
Files 894 937 +43
Lines 65210 66992 +1782
Branches 9756 9798 +42
==========================================
+ Hits 56155 57500 +1345
- Misses 5560 5985 +425
- Partials 3495 3507 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-41319
📔 Objective
Fill-assist wasn't autofilling phone-number login credentials on sites where a single field accepts either a phone number or an email address (declared under both
"email"and"phone"keys in the same host rule).Two separate bugs combined to cause this:
toAutofillViewForFieldKeyhad no case for the"phone"field key, so a matching selector silently produced no view at all."email"and"phone", the resolution picked whichever key happened to be listed first in the rules JSON. Since"email"was typically listed first, dual-purpose fields resolved toLogin.Email, whose fill logic gates onisValidEmail()— silently rejecting phone-number credentials on a field that would have accepted them.Fix:
"phone"toLogin.Username, which has no format gate (matches existing heuristic-mode behavior for phone-hinted fields).Login.Usernameover other candidate types rather than relying on map ordering.isValidEmail()check itself (not the filled value) so incidental leading/trailing whitespace on an otherwise-valid email doesn't silently block the fill.No UI changes.