This repository was archived by the owner on Oct 17, 2026. It is now read-only.
Repository navigation
feat(panel): add scopes and actions like Spotlight on macOS 26 - #9
Merged
Merged
Conversation
Spotlight on macOS 26 narrows search with ⌘1–⌘4 and runs actions; without them Common Command felt a generation behind. Apps, Files, and Actions scopes each list what they hold when nothing is typed, which also makes the panel a Launchpad and a recent-files list. Actions run the user's Shortcuts through the shortcuts tool and quit or hide running apps, all with public API and no permissions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Spotlight on macOS 26 narrows a search to one kind with ⌘1–⌘4, lists apps when nothing is typed (it replaced Launchpad), and runs actions. Common Command searched everything at once and could only open things.
Approach
Scope(all, apps, files, actions) filters candidates and files inResults.compose. A scoped search skips calculations, links, and the web, and shows up to 40 results. With nothing typed,Results.browselists the scope: apps and panes A–Z (topics left out), recent files (last 30 days bykMDItemLastUsedDate, newest first), shortcuts A–Z, then running apps with each app's Quit and Hide together.shortcuts list(about 50 ms, run with the app scan) gives the user's shortcuts; choosing one runsshortcuts run <name>off the main thread and reports a non-zero exit. Running regular apps get Quit and Hide throughNSRunningApplication. Actions weigh -6, and Quit/Hide match by word starts, so "quit sa" can't mean the "sa" in Quit Messages.Changed behaviour
⌘1–⌘9 used to open the nth result, and holding ⌘ showed the numbers. That conflicts with Spotlight's scope keys, so it's gone. Arrow keys, hover, and click remain.
Look at sceptically
shortcuts runruns the shortcut headless; one that asks for input shows its own prompt, and one that runs long keeps a background process until it ends.NSRunningApplication.terminate()asks politely; an app with unsaved work shows its own dialog. Force Quit is deliberately not offered.kMDItemLastUsedDate, which some apps don't update.Checklist
scripts/task checkpasses locally