Overhaul command palette UX
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.
This commit is contained in:
@@ -31,8 +31,10 @@ func findItem(p *paletteState, want string) (int, *paletteItem) {
|
||||
|
||||
func TestContextItemsScratchpad(t *testing.T) {
|
||||
p := newPalette(nil, "", "notes.md", preset.Set{})
|
||||
if i, _ := findItem(p, "pad-delete"); i != 0 {
|
||||
t.Fatalf("pad-delete at %d; want top", i)
|
||||
// pad-delete is the first selectable row; the Focused section header
|
||||
// (a non-selectable row) sits above it.
|
||||
if i, _ := findItem(p, "pad-delete"); i != 1 {
|
||||
t.Fatalf("pad-delete at %d; want 1 (after Focused header)", i)
|
||||
}
|
||||
if _, it := findItem(p, "pad-rename-form"); it == nil || it.action.padName != "notes.md" {
|
||||
t.Fatalf("pad-rename-form missing or wrong padName: %+v", it)
|
||||
|
||||
Reference in New Issue
Block a user