feat(claudbg-e49f): add Home/End key bindings to jump to top/bottom of transcript

Home jumps to the top (scroll = 0) and End jumps to the bottom, mirroring
the existing gg/G vim-style bindings. Help modal updated to document both.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
Elijah Voigt 2 months ago
parent 52f33202d3
commit ae81563983

@ -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.

@ -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\

@ -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) {

Loading…
Cancel
Save