Bug 1570266 Comment 4 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

The first problem is how we match, we pass the original search string "%" to getMatches, and then match on it, rather than just returning all the entries:
https://searchfox.org/mozilla-central/rev/b38e3beb658b80e1ed03e0fdf64d225bd4a40327/toolkit/components/places/PlacesRemoteTabsAutocompleteProvider.jsm#144

There is also the question of how to handle clash with local tabs, maybe only return a max of maxRichResults remote tabs? Because they will push away local tabs completely (if you have 10 remote tabs). Like in other cases we should add a few results, put the others aside, and if we don't find local tabs, add back the reserved ones.

Finally, Remote tabs are returned only if they were visited on mobile in the last 72 hours, for example in my case PlacesRemoteTabsAutocompleteProvider.getMatches("%") returns one entry, but it's older than 72 hours, thus I don't see it.

So, I think the only problem is handling the special restriction char in getMatches, and putting a limit.
The first problem is how we match, we pass the original search string "%" to getMatches, and then match on it, rather than just returning all the entries:
https://searchfox.org/mozilla-central/rev/b38e3beb658b80e1ed03e0fdf64d225bd4a40327/toolkit/components/places/PlacesRemoteTabsAutocompleteProvider.jsm#144

There is also the question of how to handle clash with local tabs, maybe only return a max of (maxRichResults/2) remote tabs? Because they will push away local tabs completely (if you have 10 remote tabs). Like in other cases we should add a few results, put the others aside, and if we don't find local tabs, add back the reserved ones.

Finally, Remote tabs are returned only if they were visited on mobile in the last 72 hours, for example in my case PlacesRemoteTabsAutocompleteProvider.getMatches("%") returns one entry, but it's older than 72 hours, thus I don't see it.

So, I think the only problem is handling the special restriction char in getMatches, and putting a limit.

Back to Bug 1570266 Comment 4