But the extension should probably use history.getVisits()
for the actual complete history of visits.
Thanks to Paul (rovyko) again here, here's what he shared me:
I actually started working on my own extension to show a compact, but chronologically correct history in the sidebar. I managed to get a working extension, but didn't finish it, mostly because the Firefox API doesn't support a key feature and I'm not interested in Chrome.
You're right about the chronological items. You can get a full list using the HistoryVisit API, but this will return visits across the entire timeline. I found that if you want to get the next (earlier) n HistoryVisits after a certain datetime, you'll need to get the next n HistoryItems first, then combine their visits, and then get only the top n HistoryVisits. If you try to get more than n visits from n items, you may end up with gaps if the n+1th visit belongs a HistoryItem that wasn't one of the original n.
Right now, the extension uses webextensions search history as shown here:
https://github.com/GabLeRoux/webextensions-history-browser/blob/db85c3e4a1779a625feb4a6806f8a86d9926edae/src/js/history.js#L26-L38
But the extension should probably use history.getVisits() for the actual complete history of visits.
Thanks to Paul (rovyko) again here, here's what he shared me: