feat: add direct pane resize keybindings - #2558
Conversation
Add optional keys.resize_pane_left/down/up/right actions so a single chord can resize the focused pane tmux-style without entering resize mode. Unset by default; bindable as prefix or direct shortcuts.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe change adds four optional directional pane-resize keybindings. Configuration supports defaults, overlays, profiles, parsing, and validation. Navigation resolves the bindings, resizes panes through API and state paths, exits navigate mode, and tests cover direct and prefix bindings. ChangesPane Resize Bindings
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Keybinds
participant NavigateAction
participant App
participant PaneAPI
Keybinds->>NavigateAction: resolve resize keybinding
NavigateAction->>App: execute directional resize
App->>PaneAPI: send tui.pane.resize request
PaneAPI-->>App: resize pane
App-->>NavigateAction: exit navigate mode
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis PR adds optional direct and prefix-chord keybindings for resizing the focused pane through the existing pane-resize runtime path.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/app/input/navigate.rs | Adds directional resize actions, key resolution, runtime dispatch, mode cleanup, and direct/prefix mapping tests. |
| src/config/model.rs | Adds four optional directional resize fields throughout key configuration deserialization, effective-profile generation, and defaults. |
| src/config/keybinds.rs | Propagates the new optional bindings into runtime keybind construction and layered configuration application. |
| src/ui/keybind_help.rs | Includes configured direct pane-resize actions in the keybinding help display. |
| src/main.rs | Lists the optional direct-resize keys in the generated default configuration. |
| docs/next/website/src/data/config-reference.json | Documents all four new configuration keys as unset by default. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Configured resize_pane direction binding] --> B{Input mode}
B -->|Terminal direct shortcut| C[Resolve NavigateAction]
B -->|Prefix chord| C
C --> D[ResizePane direction]
D --> E[tui.pane.resize runtime path]
E --> F[Resize focused pane]
D --> G[Leave navigate or prefix mode]
Reviews (2): Last reviewed commit: "fix: list resize keybindings in the defa..." | Re-trigger Greptile
|
hey @dhh, i tried pushing a small follow-up to the pr branch, but it looks like maintainer edits are blocked at the org level. would be great to expose the new resize keybindings in both |
|
Just allowed for maintainer fixes to be pushed. Feel free to make any changes as you see fit! |
|
Done in ca74d6c — the four resize keys now appear as commented entries in |
|
ty! |
Summary
keys.resize_pane_left,keys.resize_pane_down,keys.resize_pane_up, andkeys.resize_pane_rightactions that resize the focused pane in one keystroke, without entering resize modetui.pane.resizeruntime path used by resize modedocs/next/Configuration
For tmux-style direct resizing:
Testing
cargo fmt --check, fullcargo testsuite,scripts/config_reference_check.py, and the maintenance script tests pass locally (the pre-existinggenerated_workspace_ids_are_short_base32_handlesordering flake under plaincargo testfails identically on cleanmaster)