diff --git a/.beans/claudbg-e49f--tui-homeend-keys-jump-to-topbottom-of-transcript.md b/.beans/claudbg-e49f--tui-homeend-keys-jump-to-topbottom-of-transcript.md index c0c7353..b0141dc 100644 --- a/.beans/claudbg-e49f--tui-homeend-keys-jump-to-topbottom-of-transcript.md +++ b/.beans/claudbg-e49f--tui-homeend-keys-jump-to-topbottom-of-transcript.md @@ -1,10 +1,11 @@ --- # claudbg-e49f title: 'TUI: Home/End keys jump to top/bottom of transcript' -status: todo +status: in-progress type: feature +priority: normal created_at: 2026-04-01T06:11:02Z -updated_at: 2026-04-01T06:11:02Z +updated_at: 2026-04-01T06:16:58Z --- Add Home and End key bindings in the transcript screen to complement the existing gg/G vim-style bindings:\n- Home → jump to top of transcript (same as gg)\n- End → jump to bottom of transcript (same as G)\n\nHandle in handle_transcript_event() in src/tui/screens/transcript.rs alongside the existing Char('g')/Char('G') cases. diff --git a/src/tui/modals/help_modal.rs b/src/tui/modals/help_modal.rs index dff2117..036a48f 100644 --- a/src/tui/modals/help_modal.rs +++ b/src/tui/modals/help_modal.rs @@ -16,7 +16,7 @@ use crate::tui::state::AppState; /// Dialog dimensions. const DIALOG_WIDTH: u16 = 32; -const DIALOG_HEIGHT: u16 = 26; +const DIALOG_HEIGHT: u16 = 28; /// Compute a centered [`Rect`] of the given size within `area`. fn centered_rect(width: u16, height: u16, area: Rect) -> Rect { @@ -40,6 +40,8 @@ const HELP_TEXT: &str = "\ Spc/PgDn page down\n\ \u{21e7}Spc/PgUp page up\n\ \u{2190}/\u{2192} h/l scroll lr\n\ + Home/gg jump to top\n\ + End/G jump to bottom\n\ Tab cycle panes\n\ Enter open/select\n\ Esc go back\n\ diff --git a/src/tui/screens/transcript.rs b/src/tui/screens/transcript.rs index 7455a3f..3b69cad 100644 --- a/src/tui/screens/transcript.rs +++ b/src/tui/screens/transcript.rs @@ -678,6 +678,19 @@ pub fn handle_transcript_event(event: Event, state: &mut AppState) -> bool { false } } + // Home → jump to top of transcript. + KeyCode::Home => { + state.transcript_scroll = 0; + true + } + // End → jump to bottom of transcript. + KeyCode::End => { + let total_lines = + build_chat_lines(&state.transcript_entries, state.color_enabled).len(); + state.transcript_scroll = + total_lines.saturating_sub(state.transcript_page_height as usize); + true + } // gg → jump to top of transcript (vim-style). KeyCode::Char('g') => { if std::mem::take(&mut state.pending_g) {