Closed Bug 1769585 Opened 9 months ago Closed 9 months ago

Require a minimum character count for adaptive history autofill


(Firefox :: Address Bar, task, P1)




102 Branch
Tracking Status
firefox102 --- verified


(Reporter: adw, Assigned: daisuke)


(Blocks 1 open bug)


(Whiteboard: [snt-traiged])


(4 files)

We should consider requiring a minimum character count in the user's search string before adaptive history autofill kicks in. That should help the problem where adaptive history autofill is breaking people's muscle memory when they want to trigger domain (origin) autofill. A few broad options:

  1. Hardcode a minimum, like 3 (it wouldn't actually be "hardcoded" but would be in a hidden pref)
  2. Require that the full search string in the adaptive history database record be typed (the moz_inputhistory.input value), instead of simply any prefix of it
  3. Combination of 1 and 2. The problem with 2 is that the search string in the record can be any length, even 1, so doing 2 alone wouldn't fix the problem for some people for some search strings.

Point 3. is a non-problem imo, because if the user types a single letter and picks a url, that's a sign they may want that.

Doing 1. it won't be possible to train the system to autofill a url just typing a single letter or couple of them.

On the other side, if we do 2. we may match less often at the beginning, because the user has to type the exact word they typed in the past before the behavior kicks in. Though, the user can then train the system by typing the same 1 or 2 letters and picking the same url. The problem could arise from signal persistence, we retain adaptive history for 90 days of use. That long time may complicate re-training the behavior. I suspect 30 days would work better for this feature: that'd mean changing the threshold from 0.1 to 0.47.

My best guess would be to go for 2 and also rise the threshold to make training easier.
We could also introduce a minChars pref that by default would be 0 (disabled) but if we rise it to a positive value the user has to type the whole word but no matching below the min chars required. This may allow for an alternate testing path.

How does this sound?

See Also: → 1769764
Assignee: nobody → daisuke
Attachment #9277031 - Attachment description: Bug 1769585: Make the input history that exactly matches the user input to be the candidate. → Bug 1769585: Make the input history that the user input starts with to be a candidate.
Pushed by
Make the input history that the user input starts with to be a candidate. r=adw
Change default useCountThreshold to not handle input history passed 30 days. r=adw
Introduce a pref that the minimum char length to enable adaptive history autofill. r=adw
Introduce Nimbus variables for autoFillAdaptiveHistoryMinCharsThreshold and autoFillAdaptiveHistoryMinCharsThreshold. r=adw
Regressions: 1770117
Regressions: 1770118

Hello Drew,

Could you please update the [QA] Adaptive history autofill document with the new changes and implementations?

Thank you in advance!

Flags: needinfo?(adw)
Regressions: 1770168
Points: 3 → 5

I've updated the doc, thanks for the reminder.

Flags: needinfo?(adw)
Regressions: 1770391

This was verified in the nightly test run for Firefox 102. This will also be covered as part of the preliminary testing run for beta Firefox 102.
Marking the issue as verified fixed.

Flags: in-qa-testsuite?(vlad.lucaci)
You need to log in before you can comment on or make changes to this bug.