Skip to content

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

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

[PM-39564] Fill Assist: Support email field key for email-based login forms#7107
aj-rosado wants to merge 1 commit 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
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant