Skip to content

feat: add group picker (C-p) to rename dialog#323

Merged
njbrake merged 1 commit intonjbrake:mainfrom
hansonkim:feature/rename-dialog-group-picker
Feb 25, 2026
Merged

feat: add group picker (C-p) to rename dialog#323
njbrake merged 1 commit intonjbrake:mainfrom
hansonkim:feature/rename-dialog-group-picker

Conversation

@hansonkim
Copy link
Copy Markdown
Contributor

@hansonkim hansonkim commented Feb 25, 2026

Closes #321

Description

Add a group picker to the rename dialog, activated with Ctrl+P when the group field is focused. Shows existing groups in a list picker overlay for quick selection instead of manual typing.

The C-p groups keyboard hint is shown only when the group field is focused (focused_field == 1), matching the actual Ctrl+P behavior.

Changes

  • src/tui/dialogs/rename.rs - Add existing_groups and ListPicker to RenameDialog, handle Ctrl+P key event on group field, render group picker overlay, show contextual hints only when relevant
  • src/tui/home/input.rs - Collect existing groups from group_tree and pass to RenameDialog::new()

PR Type

  • New Feature
  • Bug Fix
  • Refactor
  • Documentation
  • Infrastructure / CI

Checklist

  • I understand the code I am submitting
  • New and existing tests pass
  • Documentation was updated where necessary
  • For UI changes: included screenshot or recording

Test Results

  • cargo test --lib -- tui::dialogs::rename - 36 tests pass (10 new tests for group picker)
  • cargo clippy -- -D warnings - no warnings
  • cargo fmt -- --check - clean

AI Usage

  • No AI was used
  • AI was used for drafting/refactoring
  • This is fully AI-generated

AI Model/Tool used: Claude Code (claude-opus-4-6)

  • I am an AI Agent filling out this form (check box if true)

The rename dialog bottom hint line showed "C-p groups" on all fields,
but Ctrl+P only works on the group field (focused_field == 1). Add the
same focused_field guard already used in handle_key and group_hint
rendering so the hint matches the actual behavior.
@hansonkim hansonkim marked this pull request as ready for review February 25, 2026 06:51
@njbrake njbrake merged commit c2ce2a5 into njbrake:main Feb 25, 2026
25 of 26 checks passed
@njbrake
Copy link
Copy Markdown
Owner

njbrake commented Feb 25, 2026

Great improvement and cleanly implemented. Thanks! 🙏

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.

feat: Add Ctrl+P group picker to rename dialog

2 participants