5ba8b0ca927d
fix: autofill stays off non-credential forms — no chip in chat composers (v2.10.14)
- time
- 2026-08-03 16:38 UTC · 2 months ago
- machine
- koh2
- parent
- 62049aae849d
↓ peach-android-5ba8b0ca.tar.gzatlas at this save
files changed3 files
VERSION+1 −1app/src/main/java/com/peachpasswords/autofill/AssistStructureParser.kt+7 −1app/src/main/java/com/peachpasswords/autofill/PeachAutofillService.kt+1 −1app/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. */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()