Command Palette
One palette per window lists every registered command, so a command that exists is a command people can find. The
pure parts (FuzzyMatch, MatchText, the key helper, PickerKeys in Editora and PaletteKeys in the copies, and the
caret-key helper, TextInputKeymap in Editora and TextInputKeys in the copies) are shared with Termina and Mirada.
Torrenta shares MatchText and ranks with its own CommandMatcher.
- PAL-01 MUST Every app has one Command Palette per window, opened by
palette.show:M-xin the Emacs keymap andCtrl+Shift+P(Cmd+Shift+Pon macOS) in the others.- Check (code): the window builds one
CommandPalette, and each bundled keymap binds that chord topalette.show. - Reference: Editora
ui/CommandPalette.java, built once inMainController;keymaps/emacs.json(M-x),cua.jsonandvscode.json(C-S-p),cua.mac.json(Cmd-S-p).
- Check (code): the window builds one
- PAL-02 MUST The palette lists every registered command, with its title from
command.<id>and its description fromcommand.<id>.desc.- Check (code): the palette’s rows come from the whole registry, filtered only by the query; a command that
cannot run stays listed, grayed. A catalog parity test fails on a command title with no
.desc. - Reference: Editora
CommandPalette.filter(registry.all()),MessagesTest; the Spec table below.
- Check (code): the palette’s rows come from the whole registry, filtered only by the query; a command that
cannot run stays listed, grayed. A catalog parity test fails on a command title with no
- PAL-03 MUST The palette is an in-scene overlay in the window’s root
StackPane, over a faint scrim, not ajavafx.stage.Popup.- Why: on Windows a popup does not reliably take keyboard focus.
- Check (code): the palette shows its card through the overlay host installed in the root
StackPane; noPopupis created for it. - Reference: Editora
ui/OverlayHost.java(install),CommandPalette.show.
Anatomy
Section titled “Anatomy”1M-xgit2
4Git: PullC-x v S-=5
Git: PushC-x v S-p
Git: Fetch
3Git: Commit…C-x g
Git: Pull (Rebase)
6Git: Continue Merge / Rebase / Cherry-Pick
Unavailable — no merge, rebase, cherry-pick or revert is in progress.
Git: Stage All Changes
Git: Switch Branch…
7 Pull and merge changes from the remote.
8 ↑↓ / C-n C-p move · ↵ run · C-h docs · Esc / C-g cancel
- 1Opener chip. The chord that opened the palette, read from the active keymap. No chip when the user has unbound it, never a wrong one.
- 2Query field. The first row is the input; there is no title. Prompt "Run command…". Emacs caret keys work inside it.
- 3Match highlight. The characters the fuzzy matcher scored, bold in the accent color. The highlight and the ranking come from the same call, so they never disagree.
- 4Selected row. Tinted background plus a 2 px accent bar on its inside edge. The bar is what makes the selection readable in a long list.
- 5Key chip. The command's binding in the active keymap, in the keyboard color (brace periwinkle). Absent when unbound.
- 6Unavailable command. Listed, grayed, never selected and inert to clicks. Its tooltip says why and what to do ("Unavailable — no merge, rebase, cherry-pick or revert is in progress.").
- 7Description. The selected command's
command.<id>.desc, one line with an ellipsis, always one line tall so the card never jumps. - 8Key legend. The palette's own keys, rendered from the active keymap.
| Property | Value | Reference |
|---|---|---|
| Kind | In-scene overlay in the window’s root StackPane, over a faint scrim. Not a javafx.stage.Popup: on Windows a popup does not reliably take keyboard focus. | OverlayHost |
| Width | 620 px | content.setPrefWidth(620) |
| Rows | 36 px high, 8 visible before the list scrolls | ROW_HEIGHT, VISIBLE_ROWS |
| Card | -color-bg-overlay, 1 px -color-border-default, radius 12, padding 6, one wide drop shadow | .command-palette in app.css |
| Row text | 12.5 px; padding 7 × 16 | .command-palette .list-cell |
| Scrim | rgba(0,0,0,0.18); a click on it closes the palette | .overlay-backdrop |
| Content | Every registered command: title from command.<id>, description from command.<id>.desc | CommandRegistry, MessagesTest |
| Ranking | Fuzzy score over title, id and description; a query that names a title outranks a fuzzy hit | FuzzyMatch, titlePhraseScore |
Behavior
Section titled “Behavior”- PAL-04 SHOULD The palette opens from the
palette.showcommand, by its chord or a menu item, with an empty query that lists every command.- Check (code):
showclears the field and filters on the empty query before the card appears. - Reference: Editora
CommandPalette.show.
- Check (code):
- PAL-05 SHOULD Typing filters the list, and the first enabled match is selected.
- Check (test): a test with a disabled command at the top finds the cursor on the first enabled row.
- Reference: Editora
CommandPalette.selectFirstEnabled,CommandPaletteDisabledFxTest.
- PAL-06 SHOULD ↑ ↓,
C-nC-pand Page Up/Down move the selection; Enter, or a click on an enabled row, runs the command. The palette closes first, then the command runs.- Check (code): the run path hides the card before it calls the registry, and does nothing on a disabled row.
- Reference: Editora
CommandPalette.runSelected,PickerKeys.
- PAL-07 SHOULD Esc,
C-gor a click on the scrim cancels, and focus returns to where it was.- Check (code): the cancel key and a press on the backdrop both hide the overlay, and hiding focuses the node that had focus before it opened.
- Reference: Editora
PickerKeys(CANCEL),OverlayHost(previousFocus).
- PAL-08 SHOULD
C-h, or the first ofC-h,F1,Shift+F1the active keymap leaves free, opens the selected command’s page on the website, for the running version.- Check (code): the docs chord is the first free one of the three, and the URL is built from the app’s versioned docs address.
- Reference: Editora
CommandPalette(PickerKeys.freeChord,docsUrl),AppInfo.docsUrl.
- PAL-09 SHOULD A live keymap switch re-renders the key chips, the opener chip and the key legend.
- Check (code): applying a new keymap calls the palette’s rebind method, which rebuilds the opener, the legend and the rows.
- Reference: Editora
CommandPalette.refreshBindings, called fromSettingsReapply.
| Key | English |
|---|---|
palette.prompt | Run command… |
palette.disabled.<reason> | Unavailable — what is missing. What to do first. |
In the apps
Section titled “In the apps”


Pauta 4.0.1 · · Changelog · This page in the latest edition