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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user