Skip to content

feat(palette): add nav keys, sections, and columns [4]#144

Draft
AbysmalBiscuit wants to merge 3 commits into
mathix420:masterfrom
AbysmalBiscuit:feat/palette-nav-columns
Draft

feat(palette): add nav keys, sections, and columns [4]#144
AbysmalBiscuit wants to merge 3 commits into
mathix420:masterfrom
AbysmalBiscuit:feat/palette-nav-columns

Conversation

@AbysmalBiscuit

@AbysmalBiscuit AbysmalBiscuit commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

DO NOT MERGE YET. MUST MERGE AFTER #138


Adds command-palette list navigation, section headings, and a real column layout.

Stacks on #138 — the palette groups the SidebarSearch* actions that PR introduces, so this branch is based on feat/sidebar-search-actions. Until #138 merges, the diff below carries its two commits; the change here is 88b11917 alone.

  • Nav keys — new PaletteTop / PaletteBottom / PalettePageUp / PalettePageDown actions, defaulting to unmodified Home / End / PageUp / PageDown and rebindable like any other. Palette-scoped (is_palette_scoped(), mirroring the existing sidebar and search scoping), so they act only while the modal is up and the same keys still reach the sidebar and the PTY otherwise. A page is 10 rows.
  • Sections — every row carries a PaletteSection; group() regroups the ranked list so a section appears where its best-ranked row does. The top match still leads, and an empty query keeps the natural order.
  • ColumnsDESCRIPTION | ACTION | KEYS on a fixed grid shared by the rows and a pinned header, replacing the right-packed layout. A multi-bound action is now one row listing all its keys (Ctrl+=, Ctrl++) rather than one row per binding.
  • Wrapping — the description column wraps over as many lines as it needs and row height follows. Modal widened 640 → 760 px to give it room.

The footer hint is generated from the live bindings, so a rebind shows up there instead of the hint going stale.

Trade-off: Home / End no longer move the caret in the palette's query box — the palette consumes them before the TextEdit sees them.

487 tests pass; clippy warnings unchanged from baseline.

🤖 Generated with Claude Code

AbysmalBiscuit and others added 3 commits July 25, 2026 10:24
Search-mode Enter/Esc were hardcoded in panel_filter and could not be
rebound, and Enter never scrolled the activated row into view.

Add three search-scoped actions — SidebarSearchConfirm (Enter),
SidebarSearchCancel (Esc), and SidebarSearchCancelToTerminal
(Shift+Esc) — dispatched through the keyboard binding system from the
focused panel's nav pass. handle_shortcuts drops search-scoped actions
so the terminal's own Enter/Esc still reach the PTY. Confirm scrolls the
acted-on row into view via a focus-independent pending target, resolving
a now-hidden child to its owning project header. Cancel returns the
cursor to the seed row and preserves the s/a toggle filters.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Confirming a fuzzy search ran the row's full activation: a project
header toggled its expansion, and a worktree or session switched
workspace and moved focus to the terminal. Search is how you find a
row, so acting on it in the same keystroke is surprising — and for a
header destructive, collapsing the project you had just gone looking
for.

Confirm now only leaves search, puts the cursor on the highlighted row
and scrolls it in, keeping focus in the sidebar. Activation stays a
second, explicit Enter in browsing mode. That makes confirm the twin of
cancel, so both share one landing helper per panel, and the git panel
follows the same rule instead of opening a diff.

Search lists matched worktrees and sessions whatever their project's
expanded flag says, so a child under a collapsed project vanished the
moment the query cleared. Confirm expands that project first —
expand-only, and never for a header, which is what keeps selecting a
project from behaving as a toggle.

Dropping activation also drops the reason for the focus-independent
pending scroll target, which existed only because activation focused
the terminal and nulled the paint-time cursor. The ordinary cursor-move
scroll suffices once its moved flag is forced rather than keyed on
cursor identity: restoring the unfiltered list can move the same row
far off-screen. That also fixes git cancel, which could leave a
surviving row unscrolled.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The palette was one flat fifty-row list with right-packed fields, a row
per binding, and arrows as its only way to move.

Add PaletteTop/PaletteBottom/PalettePageUp/PalettePageDown, defaulting to
unmodified Home/End/PageUp/PageDown. They are palette-scoped, so they
share the sidebar's keys without shadowing them and still reach the PTY
when the palette is closed.

Group rows under section headings, ordered so the section holding the best
match leads. Lay the list out as description | action | keys against a
fixed grid, with the description wrapping instead of being cut off, and
collapse a multi-bound action to one row listing every key bound to it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@AbysmalBiscuit
AbysmalBiscuit force-pushed the feat/palette-nav-columns branch from 88b1191 to b67354c Compare July 25, 2026 08:32
@AbysmalBiscuit AbysmalBiscuit changed the title feat(palette): add nav keys, sections, and columns feat(palette): add nav keys, sections, and columns [4] Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant