fix(autofill): defer the direct-hotkey success toast too

autofillFillEntry (Ctrl+Shift+L/P path) still toasted "Password filled:"
optimistically alongside the honest UIPI failure toast. Route it through
autofillPendingToast / Bridge.onAutofillResult like the quick-search path,
and label with entryDisplayName (site is often empty -> "filled:" + nothing).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-07-12 04:41:24 +01:00
parent 4a47caad55
commit a602d05b84
+4 -1
View File
@@ -239,8 +239,11 @@ async function autofillFillEntry(entry, kind) {
// password-only kind → empty username → Delphi skips Tab. // password-only kind → empty username → Delphi skips Tab.
// full kind with empty entry.username → also no Tab (Delphi handles it). // full kind with empty entry.username → also no Tab (Delphi handles it).
const user = (kind === 'password') ? '' : (entry.username || ''); const user = (kind === 'password') ? '' : (entry.username || '');
// Toast deferred to Bridge.onAutofillResult — no success lie when the
// target runs elevated (UIPI drops the keystrokes).
autofillPendingToast = (kind === 'password' ? 'Password filled: ' : 'Autofilled: ')
+ entryDisplayName(entry);
Bridge.executeAutofill(user, password); Bridge.executeAutofill(user, password);
toast((kind === 'password' ? 'Password filled: ' : 'Autofilled: ') + entry.site);
// Audit (best-effort, ignore failures) // Audit (best-effort, ignore failures)
fetch('' + '/audit', { fetch('' + '/audit', {
method: 'POST', method: 'POST',