Overhaul command palette UX #4

Merged
harry merged 1 commits from feat/palette-ux-overhaul into main 2026-05-15 18:25:38 +01:00
Owner

Summary

Six-phase UX sweep of the command palette (Ctrl-K) to make it scannable, discoverable, and accelerator-friendly.

  • Section headers── Focused / Open / Spawn / Quit ── bands replace the flat list; cursor navigation skips header rows transparently.
  • Filter chip strip — visible [All] Open Spawn Close chips below the query line; Tab / Shift-Tab cycle them. Existing typed-prefix macros (sw , sp , k ) still drive the same filter, and a single backspace now collapses the trailing macro instead of leaving a stray sw.
  • Unified verbsRun process: / New Terminal / Spawn process… all become Spawn … (terminal, process, custom).
  • Dropped duplicate global Close list — close is reachable via the Focused-section action, the [Close] chip, or new Ctrl-X inline close on a Switch row.
  • Scored matching — prefix > word-boundary > substring > scattered-fuzzy, with matched characters bolded in accent so the user sees why a row matched. Ties fall back to section order.
  • Title-bar focus contextpatterm · on: claude-foo · Ctrl-K so the user knows which Focused row is targeting what.
  • Rename forms — long subject (scratchpad: really-long.md) now lives on its own dim row above the input instead of truncating in the title bar.
  • AcceleratorsAlt-1..9 quick-pick, Home / End, ? inline help overlay, Ctrl-R toggles relaunch inside the spawn-process form without leaving the command field.
  • Affordances▼ N more / ▲ N above scroll indicator on the middle divider; cursor/total counter in the footer; empty-state hint no matches · ⌫ to widen; focused Switch row marked with leading instead of • … (current) suffix.

Test plan

  • go test ./internal/app/... -run Palette -count=1 -race — 30 palette tests pass (12 existing + 18 new covering verbs, headers, chips, scoring, Ctrl-X, ?, Home/End, Alt-N, Ctrl-R, counter)
  • go test ./... — full repo test suite passes (the one harness failure sidebar_survives_linefeed_scroll.json is a pre-existing flake on main, unrelated)
  • go build -o ./bin/patterm ./cmd/patterm — clean compile
  • Updated rename_process_via_palette.json harness scenario for the new split-subject form layout
## Summary Six-phase UX sweep of the command palette (Ctrl-K) to make it scannable, discoverable, and accelerator-friendly. - **Section headers** — `── Focused / Open / Spawn / Quit ──` bands replace the flat list; cursor navigation skips header rows transparently. - **Filter chip strip** — visible `[All] Open Spawn Close` chips below the query line; `Tab` / `Shift-Tab` cycle them. Existing typed-prefix macros (`sw `, `sp `, `k `) still drive the same filter, and a single backspace now collapses the trailing macro instead of leaving a stray `sw`. - **Unified verbs** — `Run process:` / `New Terminal` / `Spawn process…` all become `Spawn …` (terminal, process, custom). - **Dropped duplicate global Close list** — close is reachable via the Focused-section action, the `[Close]` chip, or new `Ctrl-X` inline close on a Switch row. - **Scored matching** — prefix > word-boundary > substring > scattered-fuzzy, with matched characters bolded in accent so the user sees why a row matched. Ties fall back to section order. - **Title-bar focus context** — `patterm · on: claude-foo · Ctrl-K` so the user knows which Focused row is targeting what. - **Rename forms** — long subject (`scratchpad: really-long.md`) now lives on its own dim row above the input instead of truncating in the title bar. - **Accelerators** — `Alt-1..9` quick-pick, `Home` / `End`, `?` inline help overlay, `Ctrl-R` toggles relaunch inside the spawn-process form without leaving the command field. - **Affordances** — `▼ N more` / `▲ N above` scroll indicator on the middle divider; `cursor/total` counter in the footer; empty-state hint `no matches · ⌫ to widen`; focused Switch row marked with leading `▶` instead of `• … (current)` suffix. ## Test plan - [x] `go test ./internal/app/... -run Palette -count=1 -race` — 30 palette tests pass (12 existing + 18 new covering verbs, headers, chips, scoring, Ctrl-X, ?, Home/End, Alt-N, Ctrl-R, counter) - [x] `go test ./...` — full repo test suite passes (the one harness failure `sidebar_survives_linefeed_scroll.json` is a pre-existing flake on `main`, unrelated) - [x] `go build -o ./bin/patterm ./cmd/patterm` — clean compile - [x] Updated `rename_process_via_palette.json` harness scenario for the new split-subject form layout
harry added 1 commit 2026-05-15 16:42:43 +01:00
Six-phase sweep: section headers (Focused / Open / Spawn / Quit) with
header-skip cursor; chip strip mirroring sw/sp/k macros, driven by
Tab; unified Spawn verbs across agent / process / terminal / custom;
dropped duplicate global Close list in favor of Ctrl-X inline close
on a Switch row plus the [Close] chip; scored matching (prefix >
word-boundary > substring > fuzzy) with matched-char highlighting;
title bar surfaces focus subject; rename forms split long subject
onto its own row; new Alt-1..9 quick-pick, Home/End, ? help overlay,
and Ctrl-R relaunch toggle inside the spawn-process form. Scroll
indicator and cursor/total counter round out the footer.
harry merged commit 1bf51bb784 into main 2026-05-15 18:25:38 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: harry/patterm#4