[Google Chrome] Sort Search Tabs results by frecency
Extension
https://www.raycast.com/Codely/google-chrome
OS Version
macOS 26.6.2
Description
Search Tabs never reorders its results. useTabSearch only filters the tab list, so the order is whatever getOpenTabs returns from AppleScript: window order, then tab position within each window. A tab I open through Raycast ten times a day ranks the same as one I opened once, and when several tabs match a query the order looks arbitrary to the user.
Proposal: sort the matches with useFrecencySorting from @raycast/utils and call visitItem in the open action.
Two details that keep this safe:
- The frecency key has to be
tab.url.Tab.key()iswindowId + tabIndex, which changes as soon as a tab is moved or a window is closed (#29853 changes it towindowId + tabId, still not stable across Chrome restarts). - The hook preserves the input order for items that were never visited, so the list looks exactly as it does today until you actually open something. A preference can make it opt-in if keeping the current order matters.
Who will benefit from this feature?
Anyone who returns to the same handful of tabs through Raycast. The more tabs are open, the more the current order costs — matches for a short query are effectively unranked, so you type more characters than the tab needs.
Anything else?
- No tab-search extension in this repo sorts by usage today: Google Chrome, Arc and Browser Tabs all return unranked matches, while
useFrecencySortingis already used widely elsewhere in the monorepo. - Related requests: #8665 (Arc, closed as stale rather than declined), #18214 (Safari), #26013 (Google Chrome, ordering inside
Search All). - This overlaps with the open #29853, which rewrites
useTabSearchand changesTab.key(). Happy to implement this on top of it once it lands.
Note on labels: I filed this through the GitHub API, so the issue form's default labels were not applied and raycastbot did not pick it up. I tried adding them myself and don't have the permission.
@pernielsentikaer @0xdhrv could one of you add extension, feature request and extension: google-chrome? That is the set other issues for this extension carry (#26013, #28462, #23465).
Happy to close this and refile it through the issue form instead if that is easier on your side.
Closing this myself: I filed it against the wrong command. The one I actually use every day is Search Bookmarks, which has the same gap — bookmarks are filtered but never ranked — so I've opened #31074 for that and will put the work there.
Tab ranking still looks like a real gap to me and everything described above still applies, so I'm happy to see someone pick it up.