Blog · Search
Three letters, one tab.
Open the spiral, type saf, press Return. You are in Safari. The rule that got you there is small enough to describe in one post, and small enough that you can predict it, which is the point.
Substring, not fuzzy
Fuzzy matching is a good tool for a large corpus and a half-remembered target. A desk is neither. There are a couple of dozen windows, and you are typing to narrow something you can mostly see already. Fuzzy matching in that setting produces surprises: gh lighting up "Nightly build" because the letters happen to appear in order. So VortexFlow matches plain substrings, case-insensitive and accent-insensitive. resume finds "Résumé." Nothing matches that does not visibly contain what you typed.
Predictability is what lets someone type two letters and commit without looking.
The ranking, in full
Every window, tab, and installed app gets a score for your query, or no score at all. Higher wins. This is the whole list:
- The site's host, or the app's name, begins with what you typed.
grokis the tab on grok.com even when the page title is a question you asked it. - The window title begins with it.
- The host or app name contains it somewhere.
- The title contains it; or a word in the title starts with it, so
envfinds.env.localandboardfinds "Scrum Board"; or the URL path contains it, soworkdayfinds/workday-task-board/on a desktop you are not looking at.
The path, not the whole address. Query strings and https would match every tab. And ties keep their incoming order, which is most-recently-used, so the ranking never reorders what you would have expected to see anyway. Two Chromes both matching doc stay in the order you last touched them.
An installed app that is not running matches only on its real name. Otherwise typing open would offer everything on the machine.
Where the tabs come from
Chrome, Safari, Edge, Brave, Arc, Comet, Chromium, and Apple Terminal, whose tabs carry the name of the host you are shelled into, which is why prod-db is a thing you can type. Firefox, Vivaldi, Opera and Zen are on the help-wanted list.
When nothing matches
A miss is not a dead end. If no window or tab matches, installed applications appear by name: type figma when Figma is closed and Return opens it. If nothing on the Mac matches at all, the same spiral offers to search the web, open the first result, or hand the words to ChatGPT, Claude or Grok as a prompt. Something that looks like an address, grok.com, is treated as a place to go; something that looks like a phrase is treated as a query. Guessing wrong in that direction costs you a click; guessing wrong the other way would load a page you never asked for, so the test is conservative.
You never put the overlay down. That is the design goal, and the ranking exists to serve it. The file is WindowSearch.swift. It is shorter than this post.