diff --git a/src/cli/commands/list/notes.rs b/src/cli/commands/list/notes.rs index a5bb039..a5e7130 100644 --- a/src/cli/commands/list/notes.rs +++ b/src/cli/commands/list/notes.rs @@ -166,7 +166,7 @@ pub fn print_list_notes(result: &NoteListResult) { let body = note .body .as_deref() - .map(std::borrow::ToOwned::to_owned) + .map(|b| b.replace('\n', " ")) .unwrap_or_default(); let path = format_note_path(note.position_new_path.as_deref(), note.position_new_line); let parent = format_note_parent(note.noteable_type.as_deref(), note.parent_iid); diff --git a/src/cli/commands/me/render_human.rs b/src/cli/commands/me/render_human.rs index 9a0739e..131d3e1 100644 --- a/src/cli/commands/me/render_human.rs +++ b/src/cli/commands/me/render_human.rs @@ -8,7 +8,7 @@ use super::types::{ // ─── Layout Helpers ───────────────────────────────────────────────────────── /// Compute the title/summary column width for a section given its fixed overhead. -/// Returns a width clamped to [20, 80]. +/// Returns a terminal-aware width with a minimum of 20. fn title_width(overhead: usize) -> usize { render::flex_width(overhead, 20) } @@ -505,7 +505,8 @@ pub fn print_activity_section(events: &[MeActivityEvent], single_project: bool) if let Some(preview) = &event.body_preview && !preview.is_empty() { - let truncated = render::truncate(preview, render::flex_width(8, 30)); + let clean = preview.replace('\n', " "); + let truncated = render::truncate(&clean, render::flex_width(8, 30)); println!(" {}", Theme::dim().render(&format!("\"{truncated}\""))); } } @@ -606,7 +607,8 @@ pub fn print_since_last_check_section(since: &SinceLastCheck, single_project: bo if let Some(preview) = &event.body_preview && !preview.is_empty() { - let truncated = render::truncate(preview, render::flex_width(10, 30)); + let clean = preview.replace('\n', " "); + let truncated = render::truncate(&clean, render::flex_width(10, 30)); println!( " {}", Theme::dim().render(&format!("\"{truncated}\""))