src/switcher/state/ExceptionMatcherSpecs.md
Line coverage:
ExceptionMatcher.swift100% · refreshed 2026-05-27 by/coverage-explore
The Exceptions tab lets the user add per-app rules. ExceptionMatcher answers the two questions those
rules drive, both pure:
hidesWindow — should this window be hidden from the switcher? (the exception's hide rule)disablesShortcuts — should AltTab's global shortcuts be turned off while this app is frontmost?
(the exception's ignore rule)Both share a bundle-id prefix gate: an exception applies to an app iff the exception's
bundleIdentifier is non-empty and the app's bundle id has it as a prefix (so com.foo covers
com.foo.bar). It was extracted from Windows.refreshIfWindowShouldBeShownToTheUser (hide) and
App.checkIfShortcutsShouldBeDisabled (ignore).
.none never hides; .always always hides; .whenNoOpenWindow hides only the
windowless placeholder row; .windowTitleContains hides when any non-empty pattern is a substring of
the window title (nil / empty / empty-string patterns never match)..always disables shortcuts whenever the app is frontmost; .whenFullscreen only
while the active window is fullscreen; .none never.bundleIdentifier must not match every app; a nil app bundle-id
never matches; any matching exception in the list is enough.Mirrors ExceptionMatcherTests.swift 1:1.
hideMatches).none → never..always → always..whenNoOpenWindow matches only the windowless row.hidesWindow (bundle-id prefix gate + hide rule)com.foo exception hides com.foo.bar (prefix).hide == .none → no hide.disablesShortcuts (bundle-id prefix gate + ignore rule).always → disabled..whenFullscreen + fullscreen → disabled..whenFullscreen + not fullscreen → enabled..none → enabled.