Items from browsing history fail to show up in address bar autocomplete

Description of the issue: Many items from the browsing history do now show up at all in the address bar autocomplete.

How can this issue be reproduced?

  1. Visit brave://history/ and pick one of the entries that have not been visited for a while, say, over a week

  2. Open a new tab, start typing parts of the page title or URL, and observe that the page does not show up in the autocomplete list

  3. Try also using the @history search keyword, to confirm that the result indeed does not show up

Expected result: The pages from my browsing history should appear in the autocomplete list of the address bar.

Brave Version (check About Brave): Brave 1.81.137 (Official Build) (64-bit)
Chromium: 139.0.7258.158

Screenshots demonstrating this issue:

  1. My address bar config, showing I have autocomplete enabled and the “browsing history” checkbox activated:

  2. My browsing history listing, showing an entry (YouTube video “The Expert”) currently in the stored browsing history:

(Click to expand)

  1. Address bar search for a term in the title of the aforementioned page — no results:

  2. Address bar search for the URL, and using the @history keyword — only an unrelated result shown:

Note: I’ve been having this issue for as long as I remember using Brave. And indeed, there have been reports about this bug in the past, e.g. this thread from 2023 by @msmafra, also confirmed by @Hotdogs555.

I wonder if it may be related to issue #44428 — URL history Autocomplete shows entries outside of history. Could it be that the autocomplete function uses a separate index than the actual browsing history logs, and these two lists are getting out of sync?