Closed Bug 2040819 Opened 4 months ago Closed 4 months ago

Adaptive autofill soft-block should count dismissal events per target not consecutive backspaces in one search session

Categories

(Firefox :: Address Bar, task, P1)

task

Tracking

()

VERIFIED FIXED
153 Branch
Tracking Status
firefox152 --- verified
firefox153 --- verified

People

(Reporter: jteow, Assigned: jteow)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sng])

Attachments

(2 files)

The backspace dismissal signal for adaptive autofill currently counts consecutive backspaces within a single autofill session. To trigger the soft block, a user has to backspace through an autofill suggestion the threshold number of characters in one go (e.g. gma[il.com] -> gm).

This was a misinterpretation of the intended design. Instead, the count should be stored per target (scoped by origin vs. page) and accumulate across separate autofill sessions. Each time the user clears an autofill suggestion for the same target, its count ticks up, and the soft block fires once the accumulated count crosses the threshold (e.g. gma[il.com] -> gma three separate times).

Picking the autofill or hard-dismissing via the result menu will clear the count for that target. The former because it's a positive signal, the latter because dismissing already blocks the suggestion.

Previously the backspace soft-block fired only when the user backspaced
through an autofill suggestion the threshold number of characters in a
single session (e.g. gma[il.com] -> gm). That was a misinterpretation
of the intended design.

This patch moves the count off of UrlbarInput's _autofillBackspaceState
and onto UrlbarUtils._backspaceBlocks, keyed by <scope>:<host>
where scope is "origin" or "page". Each backspace on an autofill result
ticks the count up. Once it reaches autoFill.backspaceThreshold,
blockAutofill fires and the entry's blockedAt timestamp is recorded for
re-integration telemetry.

Picking the autofill result or removing it via the result menu clears
the entry's count (the pick is a positive signal, the removal already
blocks the suggestion).

Renames trackBackspaceBlock to recordAutofillBackspace to reflect that
the helper now does the threshold check and the blockAutofill call, and
adds clearAutofillBackspaceEntryForUrl for the pick/remove paths.

Also adds test_UrlbarUtils_autofillBackspaceCount.js to cover the new
per-target accumulation and updates browser_backspace_dismissal.js
for the cross-session counting.

Pushed by jteow@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/389468393216 https://hg.mozilla.org/integration/autoland/rev/72bc229b9d15 Count adaptive autofill backspace dismissals per target across sessions r=mak,urlbar-reviewers
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch

Hi Cristian,

For adaptive autofill we changed the soft blocking trigger from three consecutive backspaces while autofill is showing (e.g. gma[il.com] → gm) to three separate dismissals of autofill (e.g. type gma, autofill completes to gma[il.com], backspace it away, repeated three times across separate search sessions).

Could you update the QA tests to reflect this? I'm also going requesting an uplift to beta so it's ready for the June experiment.

Flags: needinfo?(cbaica)
Summary: Adaptive autofill soft-block should count dismissal events per target not consecutive backspaces in one session → Adaptive autofill soft-block should count dismissal events per target not consecutive backspaces in one search session

Previously the backspace soft-block fired only when the user backspaced
through an autofill suggestion the threshold number of characters in a
single session (e.g. gma[il.com] -> gm). That was a misinterpretation
of the intended design.

This patch moves the count off of UrlbarInput's _autofillBackspaceState
and onto UrlbarUtils._backspaceBlocks, keyed by <scope>:<host>
where scope is "origin" or "page". Each backspace on an autofill result
ticks the count up. Once it reaches autoFill.backspaceThreshold,
blockAutofill fires and the entry's blockedAt timestamp is recorded for
re-integration telemetry.

Picking the autofill result or removing it via the result menu clears
the entry's count (the pick is a positive signal, the removal already
blocks the suggestion).

Renames trackBackspaceBlock to recordAutofillBackspace to reflect that
the helper now does the threshold check and the blockAutofill call, and
adds clearAutofillBackspaceEntryForUrl for the pick/remove paths.

Also adds test_UrlbarUtils_autofillBackspaceCount.js to cover the new
per-target accumulation and updates browser_backspace_dismissal.js
for the cross-session counting.

Original Revision: https://phabricator.services.mozilla.com/D301692

Attachment #9590386 - Flags: approval-mozilla-beta?
Flags: in-testsuite+
Attachment #9590386 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Hello James,

QA tests have been modified with the new backspace blocking behavior.
The issue is verified fixed using the latest Fx153.0a1 and Fx152.0b5(treeherder build) on Windows, macOS and Ubuntu. Adaptive autofill URL is now blocked if backspace is pressed on the autofill in 3 different search sessions.

Status: RESOLVED → VERIFIED
QA Whiteboard: [QA-4997][search][qa-ver-done-c153/b152]
Flags: needinfo?(cbaica)
See Also: → 2044403
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: