feat(claudbg-vqhj): '/' key focuses filter/search bar

Press '/' to immediately focus the filter input on the session-list
screen and the search input on the transcript screen, matching the
less(1) convention. Updates help modal and placeholder hint text.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
Elijah Voigt 2 months ago
parent 7696a5560f
commit 1fd9f8c259

@ -1,10 +1,11 @@
--- ---
# claudbg-vqhj # claudbg-vqhj
title: 'TUI: ''/'' key focuses filter/search bar' title: 'TUI: ''/'' key focuses filter/search bar'
status: todo status: in-progress
type: feature type: feature
priority: normal
created_at: 2026-04-01T06:10:47Z created_at: 2026-04-01T06:10:47Z
updated_at: 2026-04-01T06:10:47Z updated_at: 2026-04-01T06:13:37Z
--- ---
Pressing '/' in the session list or transcript screen should immediately focus the filter/search input, matching the less(1) convention. Currently 't' and Tab are the only bindings that open the filter. The '/' binding should work on both the session-list screen (opens the filter bar) and the transcript screen (opens the search bar). Pressing '/' in the session list or transcript screen should immediately focus the filter/search input, matching the less(1) convention. Currently 't' and Tab are the only bindings that open the filter. The '/' binding should work on both the session-list screen (opens the filter bar) and the transcript screen (opens the search bar).

@ -16,7 +16,7 @@ use crate::tui::state::AppState;
/// Dialog dimensions. /// Dialog dimensions.
const DIALOG_WIDTH: u16 = 32; const DIALOG_WIDTH: u16 = 32;
const DIALOG_HEIGHT: u16 = 20; const DIALOG_HEIGHT: u16 = 26;
/// Compute a centered [`Rect`] of the given size within `area`. /// Compute a centered [`Rect`] of the given size within `area`.
fn centered_rect(width: u16, height: u16, area: Rect) -> Rect { fn centered_rect(width: u16, height: u16, area: Rect) -> Rect {
@ -43,9 +43,14 @@ const HELP_TEXT: &str = "\
Tab cycle panes\n\ Tab cycle panes\n\
Enter open/select\n\ Enter open/select\n\
Esc go back\n\ Esc go back\n\
\n\
Filter (sessions)\n\
t / / open filter\n\
Enter apply & close\n\
Esc clear input\n\
\n\ \n\
Search (transcript)\n\ Search (transcript)\n\
t open search\n\ t / / open search\n\
n / N next/prev match\n\ n / N next/prev match\n\
Enter apply & close\n\ Enter apply & close\n\
Esc clear & close\n\ Esc clear & close\n\

@ -182,7 +182,7 @@ fn render_filter_bar(f: &mut Frame, area: Rect, state: &AppState) {
Line::from(vec![ Line::from(vec![
label, label,
Span::styled( Span::styled(
"Press 't' or Tab to focus — type a query and press Enter", "Press '/', 't', or Tab to focus — type a query and press Enter",
Style::default().fg(Color::DarkGray), Style::default().fg(Color::DarkGray),
), ),
]) ])
@ -259,7 +259,7 @@ pub fn handle_session_list_event(event: Event, state: &mut AppState) -> bool {
true true
} }
// Focus the filter input directly. // Focus the filter input directly.
KeyCode::Char('t') => { KeyCode::Char('t') | KeyCode::Char('/') => {
state.focus = Focus::FilterInput; state.focus = Focus::FilterInput;
true true
} }

@ -584,7 +584,7 @@ pub fn handle_transcript_event(event: Event, state: &mut AppState) -> bool {
true true
} }
// Jump directly to the search input. // Jump directly to the search input.
KeyCode::Char('t') => { KeyCode::Char('t') | KeyCode::Char('/') => {
state.focus = Focus::SearchInput; state.focus = Focus::SearchInput;
true true
} }

Loading…
Cancel
Save