Merged
Conversation
Feature 1: Shell Rename - Add ViewModeRenameShell modal with text input for custom display names - Press R to rename selected shell (max 50 chars, unique, non-empty) - Modal shows current name and stable tmux session ID - Validation with user-friendly error messages (empty, duplicate, length) - Keyboard navigation: Tab/Shift+Tab cycle focus, Enter confirms, Esc cancels - Mouse support: click input field or buttons - Add RenameShellDoneMsg for state update after rename - Renamed names display in sidebar for easy identification - Names persist via saveSelectionState() (tmux session name stays stable) Feature 2: Right-Align [+] Buttons - Move "+" buttons from inline to right edge of sidebar headers - Shells subheader: "+ " → fill spacing + "+" - Worktrees subheader: "+ " → fill spacing + "+" - Matches "New" button styling (already right-aligned) - Improves visual hierarchy and reduces text clutter - Updates hit region X coordinates for correct mouse interaction - Works at all terminal widths (minimum 1 space between) Implementation details: - types.go: Add ViewModeRenameShell enum, RenameShellDoneMsg struct - plugin.go: Modal state fields, region constants - keys.go: R key handler with validation logic, keyboard nav functions - view_modals.go: renderRenameShellModal with dimmed overlay - view_list.go: Add ViewModeRenameShell case, right-align button code - update.go: Handle RenameShellDoneMsg, update shell name - mouse.go: Hover tracking and click handlers for modal - commands.go: Add rename-shell command to footer - worktrees-plugin.md: Document shell management and rename feature Tests: Rename shell with R, verify persistence after restart, test validation, verify buttons right-aligned at various terminal widths. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…text() - Added ViewModeRenameShell case in Commands() to return proper footer commands (Rename/Cancel) - Added ViewModeRenameShell case in FocusContext() to dispatch keyboard events to correct context - These were critical bugs preventing the rename shell modal from functioning correctly The feature was missing support for: 1. Footer command hints during rename operation 2. Proper keyboard context for keybinding dispatch Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
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.
Created from worktree manager