5ba8b0ca927d

fix: autofill stays off non-credential forms — no chip in chat composers (v2.10.14)

June hit the branded autofill chip in Discord's message composer — a bare text field where credentials don't belong. - Root cause: the service gated on hasUsableField, which accepts identity-only structures, so any classifiable text field earned a response (picker row + inline chip) - New ParsedStructure.hasCredentialField (password OR otp OR digit-box group OR card) is now the only gate: login, signup, 2FA, and card forms get suggestions; chat composers, search boxes, and comment fields get nothing - Tradeoff: identity-first two-step logins lose step-1 suggestions until the password step — accepted - full suite 902, only the 5 known pre-existing failures. Needs on-device confirm in Discord.

time
2026-08-03 16:38 UTC · 2 months ago
machine
koh2
parent
62049aae849d
3 files VERSION+1 −1app/src/main/java/com/peachpasswords/autofill/AssistStructureParser.kt+7 −1app/src/main/java/com/peachpasswords/autofill/PeachAutofillService.kt+1 −1
VERSION+1 −1
@@ -1 +1 @@1-2.10.131+2.10.14

view file

app/src/main/java/com/peachpasswords/autofill/AssistStructureParser.kt+7 −1
@@ -40,7 +40,13 @@4040 ) {4141     /** The id we put the account identifier into — email preferred, else username. */4242     val identityId: AutofillId? get() = emailId ?: usernameId43-    val hasUsableField: Boolean get() = passwordId != null || identityId != null || otpId != null || otpDigitBoxIds.isNotEmpty() || hasCardField43+    /**44+     * Forms that earn an autofill response: a password field (login/signup),45+     * an OTP field (2FA entry), or card fields. Bare text/identity fields —46+     * chat composers, search boxes — never get a suggestion (the Discord47+     * message-input false positive).48+     */49+    val hasCredentialField: Boolean get() = passwordId != null || otpId != null || otpDigitBoxIds.isNotEmpty() || hasCardField4450     val hasCardField: Boolean get() = cardNumberId != null || cardExpMonthId != null ||4551         cardExpYearId != null || cardExpDateId != null || cardCvcId != null || cardNameId != null4652     /** Best label to rank entries against. */

view file

app/src/main/java/com/peachpasswords/autofill/PeachAutofillService.kt+1 −1
@@ -44,7 +44,7 @@4444         val context = applicationContext4545         val structure = latestStructure(request) ?: run { callback.onSuccess(null); return }4646         val parsed = resolveAutofillOrigin(context, AssistStructureParser.parse(structure))47-        if (!parsed.hasUsableField) { callback.onSuccess(null); return }47+        if (!parsed.hasCredentialField) { callback.onSuccess(null); return }4848 4949         val inlineSpecs = inlineSpecs(request)5050         val response = FillResponse.Builder()

view file