feat(desktop): command palette rework: ⌘. workspace switcher, one search box, ⌘P files frame, theme preview
Summary
This PR reworks the desktop command palette. It ships to everyone, in the default shell and in the paradev-shell shell. No flag.
- ⌘. workspace switcher. A palette root that lists your workspaces by what needs you: Needs input, Completed, Running, Recent. Hold ⌘ and press . again to step down the list; release to switch.
- One search box. The palette root (⌘⇧K) searches workspaces and commands together.
>narrows to commands only. - ⌘P files frame. Search files opens inside the palette instead of a second modal (v2 workspaces; v1 keeps its modal).
- Theme preview. Hovering or arrowing through the theme list shows each theme across the app. Esc, back or close puts the saved theme back.
- Settings list = settings sidebar. The palette's Settings list now reads the sidebar's own list of pages.
Also includes:
- The sidebar's hold-to-cycle strip (⌘;) is removed. ⌘; now opens the same switcher.
- The "Workspaces" command opens the switcher.
- The input takes focus on open, and long file paths truncate before file names.
Part 1: ⌘. workspace switcher
What / How
OPEN_WORKSPACE_LISThotkey: ⌘. on macOS, Ctrl+. on Windows and Linux. You can rebind it in Settings → Keyboard.- The switcher is a second palette root (
frames.tsroot: "switcher"), not a pushed frame. - Rows carry the sidebar's signals: status glyph, PR chip with checks, cloud or remote-device glyph, project and branch, and age.
- Scope: by default the list holds the workspaces on your sidebar, plus the one you are in.
#widens it to every workspace you can reach.#namekeeps one person's workspaces (matched by creator name), and the rest of the query becomes search text. - Ordering: with a query, rows rank on the palette's own scorer (title prefix > word prefix > substring) over name, branch, project, host and PR. Ties keep the bucket order.
- Hold-to-switch: it arms only from the second ⌘. press. A single tap opens the list, and releasing ⌘ does not switch.
- Analytics:
workspace_switcher_opened(via,holdsModifier) andworkspace_switched(via,bucket,index,searched,hold).
Part 2: One search box
- Without a query, the root shows the three workspaces that most need you plus "All workspaces ⌘.", then commands, with a footer of key hints.
- With a query, workspace matches and command sections rank against each other on the same score.
>shows commands only.#shows workspaces only. Chat search results (behind the workspace-moves flag) are hidden for>and#.- The
nav.workspacescommand stays and opens the switcher. It hides while the root's Workspaces section is on screen, since its "All workspaces" row does the same. Without it, a search for "workspaces" or "switch" found nothing when no workspace matched, and v1 users had no way to the list from the palette.
Part 3: ⌘P files frame
- The v2 workspace page lends the frame what it needs through
useQuickOpenStore.register: workspace id, recent files, open file paths, a search bound to the page's workspace client, and the open-file handler. - The palette mounts above the workspace client provider, so it cannot query the host itself.
- Recent files use the shared
matchRecentFiles, the same ordering chat @ mentions use. - The v1 modal stays, now v1-only.
Part 4: Theme preview
- The theme store gains
previewTheme/endThemePreview. A preview changes the shown theme only.activeThemeId, the persisted setting and thetheme-idboot cache in localStorage keep the saved theme. - A preview starts only after the pointer moves, a navigation key is pressed, or a query is typed, because cmdk highlights the first row on open.
- Enter or click keeps the theme.
useCommandStateis re-exported from@superset/ui/command.
Part 5: Settings list
The palette kept its own list of settings pages, and it had drifted from the sidebar:
- "Agents" opened Agent commands, not the agent accounts page.
- Connections, Browser, Environments, Agents, Plugins and Mobile were missing.
- Five pages had old names.
The sections now live in settings/utils/settingsSections, and useSettingsSectionVisibility applies the sidebar's hiding rules: Mac-only, admin-only, the mobile and plugins flags, and v1/v2 plus cloud. Both the sidebar and the palette read them. Old names stay as search words ("ringtones" still finds Notifications). Command ids are still derived from the route.
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
| ⌘. / Ctrl+. | Open the workspace switcher; again (⌘ held) steps down; release switches from the second press on |
| ⌘; | Same as ⌘. (the hold-to-cycle strip is gone) |
| ⌘⌫ (in switcher) | Archive or delete the selected workspace (existing confirm dialog) |
| ⌘N (in switcher) | New workspace in the viewed project |
| ← on an empty query | Leave the switcher or a frame |
| Backspace on an empty query | Leave a frame (not the switcher) |
| ⌘P | Files frame in the palette (v2) |
Manual QA Checklist
Checked live over CDP in this worktree's own dev stack (bun run dev). I ran everything in the paradev-shell shell, then again in the default shell with the flag overridden off in the renderer. The Settings list fix was checked in the paradev-shell shell only.
Root search
- ⌘⇧K: the Workspaces section (3 + "All workspaces ⌘."), commands and footer; focus in the input
- "re" ranks workspaces whose titles start with "Re" above commands
-
>reshows commands only;>workspaces+ Enter opens the switcher and the palette stays open -
#shows workspaces only - The sidebar Search button opens the same root (default shell)
Switcher
- Tap ⌘.: opens, and releasing ⌘ does not switch
- Hold ⌘ and press . twice more: steps to row 3; release switches there; events fire with
index: 2, hold: true - ⌘; opens the switcher
- In a workspace, the current one leads Recent and shows "Current"
-
#: 200 rows in the order Needs input, Completed, Running, Recent;#avi,#harshand#harsh prfilter by creator and then by text - ⌘⌫ opens "Delete workspace …?" for the selected row (cancelled every time)
- ⌘N opens a new workspace with the viewed project preselected, the same as the global ⌘N
- ← on an empty query and the back arrow go to the commands root; ← with text moves the caret; Backspace on empty stays
⌘P files frame
- Opens with focus in the input; a search returns host results; Enter opens the file
- The opened file shows up under Recently Viewed and is dropped from the search results
- Backspace and ← on an empty query leave the frame
Theme preview
- Opening the list previews nothing
- ArrowDown, hover and a typed query each preview, while
activeThemeIdand thetheme-idcache stay the same - Esc and the back arrow restore the saved theme
- Click keeps the theme
Settings
- The palette's Settings list shows the same 25 pages, in the same order, as the sidebar
- Agents, Connections, Browser, Environments and Plugins each open the right page; "ringtones" finds Notifications
- The sidebar still renders every page, with icons and the Hosts update badge
- Not opened individually: the other 19 Settings entries (same route list and code path)
- Not tested after the refactor: the settings search box, which filters the sidebar
Not verified live
- v1 (non-v2-cloud): the v1 list inside the switcher and the v1 file-search modal. Typecheck only.
Testing
bun run lint: passesbun run typecheckinapps/desktopandpackages/ui: exit 0bun run check:i18n: passes. All new strings are translated in all 17 locales.bun testinpackages/i18n: 169 passbun testinapps/desktop: 9466 pass, 49 fail. The failures are all in git-helper, worktree-import, shell-env and extension-host native-messaging tests (workspaces/utils/git.test.ts,changes/workers/git-task-handlers.test.ts, and others). These test the main process, and this branch changes none of those files or their directories. Git-helper tests in this family fail when the suite runs from a worktree path. I did not re-run them from a clean checkout.- New tests:
bucketWorkspaces,parseRootQuery,parseSwitcherQuery,scopeWorkspaces,settingsSections
Design Decisions
- The switcher is a second root, not a pushed frame, so ⌘. while it is open can step the selection, and the back arrow and ← lead to the commands root.
- One list of settings pages. Two lists are what drifted, so the sidebar and the palette now read the same one.
Known Limitations
- Highlight while typing: if the highlighted row survives a new keystroke, the highlight stays on it. Example: after typing
#harsh, "Marten" stayed highlighted, not the top row, so Enter can open a row below the top. - After leaving the switcher for the commands root, no row is highlighted until an arrow key is pressed.
- Embedded pages: ⌘. and ⌘; are not in
FORWARDED_HOTKEYS, so they don't fire while focus is in a browser pane or embedded page. The old ⌘; strip behaved the same. - Settings pages: the palette does not mount on Settings routes (unchanged), so ⌘⇧K and ⌘. do nothing there.
Rollout / Rollback
- Rollout: no flag. The behaviour changes for everyone are ⌘; (the strip is gone, it opens the switcher) and ⌘P in v2 workspaces (palette frame instead of a modal).
- Rollback: revert the PR. There are no data or persisted-state changes: the theme preview never writes the setting or the boot cache, and no new localStorage keys are added.
How to review
Commit by commit. The first nine carry (cherry picked from commit …) lines and a "Ported to main:" note where they were adapted. The last five are fixes made on this branch:
- the Workspaces command opening the switcher
- chat results hidden for
# - the Settings list
WorkspaceSwitcherRowLeadsplit into its own file- comment cleanup
Summary by cubic
Reworks the desktop command palette so workspace switching, search, file open, and theme picking live in one place: a new ⌘. workspace switcher, a root search that ranks workspaces and commands on the same score, and ⌘P file search inside the palette.
- ⌘. / Ctrl+. opens the switcher; holding the modifier and pressing again steps down the list, and releasing switches. ⌘; now opens the same switcher (the old hold-to-cycle strip is removed).
- A root query searches workspaces and commands together;
>narrows to commands,#to workspaces only. - The theme list previews each theme live on hover, arrow keys, or typing; Esc or the back arrow restores the saved theme.
- The palette's Settings list now reads the same list as the sidebar, fixing missing pages (Agents, Connections, Browser, Environments, Plugins, Mobile) and stale names.
- Ships without a flag: in v2 workspaces, ⌘P opens a palette frame instead of a modal. No persisted state changes, so rolling back is a plain revert.
Summary by CodeRabbit
- New Features
- Added a unified workspace switcher with keyboard shortcuts, searchable and grouped workspace results, and quick actions for the selected workspace.
- Expanded the command palette to search workspaces alongside commands, with a commands-only search mode and clearer match highlighting.
- Added Quick Open for finding files and recently viewed items in a workspace.
- Added theme previews while browsing themes.
- Settings navigation and command search now reflect which sections are available.
- Improvements
- Updated command palette guidance, workspace search prompts, and translations across supported languages.