refactor(cli): adopt flex-width rendering, remove data-layer truncation

Replace hardcoded truncation widths across CLI commands with
render::flex_width() calls that adapt to terminal size. Remove
server-side truncate_to_chars() in timeline collect/seed stages so
full text is preserved through the pipeline — truncation now happens
only at the presentation layer where terminal width is known.

Affected commands: explain, file-history, list (issues/mrs/notes),
me, timeline, who (active/expert/workload).
This commit is contained in:
teernisse
2026-03-13 11:01:17 -04:00
parent ef8a316372
commit 6d85474052
15 changed files with 59 additions and 66 deletions

View File

@@ -553,9 +553,10 @@ fn test_collect_discussion_thread_body_truncation() {
.unwrap();
if let TimelineEventType::DiscussionThread { notes, .. } = &thread.event_type {
assert!(
notes[0].body.chars().count() <= crate::timeline::THREAD_NOTE_MAX_CHARS,
"Body should be truncated to THREAD_NOTE_MAX_CHARS"
assert_eq!(
notes[0].body.chars().count(),
10_000,
"Body should preserve full text without truncation"
);
} else {
panic!("Expected DiscussionThread");