Add searchable command palette with nested menus and shared dispatch

This commit is contained in:
2026-11-17 01:29:05 -08:00
parent 7782c47b38
commit 79553a180e
5 changed files with 1473 additions and 67 deletions
+13 -1
View File
@@ -105,6 +105,7 @@ run `psyterm --shutdown` on the remote host, for example through SSH.
| Input | Action |
| --- | --- |
| Ctrl/Cmd+Shift+P | Open the command palette |
| Click a tab | Switch the server's active tab |
| `+` or Ctrl+Shift+T | Create a tab |
| Ctrl+Shift+D | Add a pane beside the focused pane |
@@ -120,6 +121,12 @@ run `psyterm --shutdown` on the remote host, for example through SSH.
| Shift+PageUp / PageDown | Scroll one page |
| Shift+Home / End | Jump to oldest history / live screen |
The command palette searches command names and keywords as you type. Arrow keys
or Tab select a result; Enter runs it or opens a submenu. Escape returns to the
parent menu, then closes the palette. “Switch to tab…” and “Focus pane…” offer
live workspace lists. Commands without shortcuts, such as restoring automatic
pane names, are available here too. Palette input never reaches the shell.
Typing returns to the live screen. Ctrl+C, Ctrl+D, Alt combinations, arrows,
navigation keys, and function keys reach the terminal application.
Alternate-screen applications receive shifted navigation; the wheel sends
@@ -174,7 +181,8 @@ scrollback by default.
| `server.rs`, `session.rs` | Authoritative workspace, PTYs, child processes, parser, terminal grids, selection, scrolling, and resize |
| `protocol.rs`, `client.rs` | Versioned bounded messages, local socket / SSH transport, snapshot delivery |
| `launcher.rs` | Server startup, private paths, lifecycle locks, and the server-owned GUI zygote |
| `terminal.rs` | Snapshot-only GUI workspace and panes, input, focus, and animation scheduling |
| `terminal.rs` | Snapshot-only GUI workspace and panes, command dispatch, focus, and animation scheduling |
| `commands.rs`, `palette.rs` | Extensible command metadata, optional shortcuts, searchable nested menus |
| `pane_name.rs`, `label.rs` | Pane name editor, Unicode composition, and middle-truncated labels |
| `render.rs`, `cursor.rs` | Cached text and batched drawing; cursor motion and blink |
| `chrome.rs`, `colors.rs`, `fonts.rs` | Window chrome, terminal colors, font selection |
@@ -188,6 +196,10 @@ still happen in each child. This is a safe prefork foundation, not a guarantee
of the fastest possible launch time. Headless terminal/bridge use does not
start the zygote.
Add an action and registry entry in `commands.rs`, then handle it in the workspace
dispatcher to add a command. Shortcut hints are optional. The same recursive menu
model supports commands that lead to further choices.
Snapshot queues retain the newest frame for a slow client rather than an
unbounded backlog. GUI rows keep their shaped text until the snapshot changes.
ASCII runs, Unicode glyphs, backgrounds, and decorations are batched; cursor