diff --git a/src/tui/screens/session_list.rs b/src/tui/screens/session_list.rs index 17d634b..40682fa 100644 --- a/src/tui/screens/session_list.rs +++ b/src/tui/screens/session_list.rs @@ -73,12 +73,13 @@ pub fn render_session_list(f: &mut Frame, area: Rect, state: &AppState) { // Compute the max width available for the project column so we can truncate. // Fixed widths: 8+20+20+6+7 = 61, plus 5 separators = 66, plus 2 borders = 68. - // Use 30 chars as a safe default; the Min constraint will expand it. + // Use 10 chars as a minimum; the Min constraint will expand it. + // We pass this exact value to truncate_project so it left-truncates before + // ratatui ever sees the string — ensuring the *end* of the path is shown. let project_max: usize = table_area .width .saturating_sub(68) // subtract fixed columns + separators + borders .max(10) as usize; - let project_display_max = project_max + 30; // generous — actual render clips // Apply active filter to the session rows. let active_filter = Filter::parse(&state.filter_active).ok(); @@ -96,7 +97,7 @@ pub fn render_session_list(f: &mut Frame, area: Rect, state: &AppState) { let rows: Vec = filtered_sessions .iter() .map(|s| { - let project = truncate_project(&s.project, project_display_max); + let project = truncate_project(&s.project, project_max); Row::new(vec![ s.short_id.clone(), s.date.clone(),