Skip to content

[PM-39564] feat: Fill Assist support email field key for email-based login forms#7107

Draft
aj-rosado wants to merge 4 commits into
PM-38966/add-fill-assist-option-settingsfrom
PM-39564/fill-assist-username-support-emaill
Draft

[PM-39564] feat: Fill Assist support email field key for email-based login forms#7107
aj-rosado wants to merge 4 commits into
PM-38966/add-fill-assist-option-settingsfrom
PM-39564/fill-assist-username-support-emaill

Conversation

@aj-rosado

Copy link
Copy Markdown
Contributor

🎟️ Tracking

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

📔 Objective

Fill-assist rules in the forms JSON use "email" as the field key for sites where users log in with their email address (e.g. { "email": ["input[type='email']"] }). Previously this key was unrecognised — it fell through to else -> null in toAutofillViewForFieldKey, so autofill never triggered for those fields.

This PR adds a dedicated AutofillView.Login.Email sealed subtype and wires it through the fill pipeline with a validation guard: the email field is only filled when the cipher's stored username contains @. If the username is not an email address the field is skipped, avoiding placing a non-email value into an type="email" input.

  • AutofillView.Login.Email added alongside Username and Password
  • Fill-assist "email" key maps to Login.Email in toAutofillViewForFieldKey
  • FilledDataBuilderImpl guards Login.Email: skips fill when username does not pass isValidEmail(useStrictValidation = false)
  • AutofillPartitionExtensions.usernameSaveValue updated to capture Login.Email text values so saving credentials from email-only forms preserves the typed value
  • All exhaustive when expressions on AutofillView updated (AutofillViewExtensions, AutofillParserImpl.updateWebsiteIfNecessary)

@github-actions github-actions Bot added the app:password-manager Bitwarden Password Manager app context label Jun 26, 2026
@aj-rosado aj-rosado changed the title [PM-39564] Fill Assist: Support email field key for email-based login forms [PM-39564] feat: Fill Assist support email field key for email-based login forms Jun 29, 2026
@github-actions github-actions Bot added the t:feature Change Type - Feature Development label Jun 30, 2026
…/fill-assist-username-support-emaill

# Conflicts:
#	app/src/main/kotlin/com/x8bit/bitwarden/data/autofill/util/FillAssistViewNodeExtensions.kt
@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.05%. Comparing base (ec4ec39) to head (f90e3a0).

Files with missing lines Patch % Lines
...twarden/data/autofill/parser/AutofillParserImpl.kt 0.00% 0 Missing and 1 partial ⚠️
...arden/data/autofill/util/AutofillViewExtensions.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                             Coverage Diff                              @@
##           PM-38966/add-fill-assist-option-settings    #7107      +/-   ##
============================================================================
- Coverage                                     86.06%   86.05%   -0.01%     
============================================================================
  Files                                           886      886              
  Lines                                         64627    64635       +8     
  Branches                                       9624     9629       +5     
============================================================================
+ Hits                                          55618    55624       +6     
- Misses                                         5560     5561       +1     
- Partials                                       3449     3450       +1     
Flag Coverage Δ
app-data 17.67% <77.77%> (+0.01%) ⬆️
app-ui-auth-tools 18.76% <0.00%> (-0.01%) ⬇️
app-ui-platform 16.51% <0.00%> (-0.01%) ⬇️
app-ui-vault 27.43% <0.00%> (-0.01%) ⬇️
authenticator 6.12% <0.00%> (+<0.01%) ⬆️
lib-core-network-bridge 4.04% <0.00%> (-0.01%) ⬇️
lib-data-ui 1.13% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app:password-manager Bitwarden Password Manager app context t:feature Change Type - Feature Development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant