feat(palette): add nav keys, sections, and columns [4]#144
Draft
AbysmalBiscuit wants to merge 3 commits into
Draft
feat(palette): add nav keys, sections, and columns [4]#144AbysmalBiscuit wants to merge 3 commits into
AbysmalBiscuit wants to merge 3 commits into
Conversation
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
force-pushed
the
feat/palette-nav-columns
branch
from
July 25, 2026 08:32
88b1191 to
b67354c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 onfeat/sidebar-search-actions. Until #138 merges, the diff below carries its two commits; the change here is88b11917alone.PaletteTop/PaletteBottom/PalettePageUp/PalettePageDownactions, defaulting to unmodifiedHome/End/PageUp/PageDownand 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.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.DESCRIPTION | ACTION | KEYSon 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.The footer hint is generated from the live bindings, so a rebind shows up there instead of the hint going stale.
Trade-off:
Home/Endno longer move the caret in the palette's query box — the palette consumes them before theTextEditsees them.487 tests pass; clippy warnings unchanged from baseline.
🤖 Generated with Claude Code