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

@@ -359,10 +359,10 @@ pub fn print_list_issues(result: &ListResult) {
}
headers.extend(["Assignee", "Labels", "Disc", "Updated"]);
let mut table = LoreTable::new().headers(&headers).align(0, Align::Right);
let mut table = LoreTable::new().headers(&headers).align(0, Align::Right).flex_col(1);
for issue in &result.issues {
let title = render::truncate(&issue.title, 45);
let title = issue.title.clone();
let relative_time = render::format_relative_time_compact(issue.updated_at);
let labels = render::format_labels_bare(&issue.labels, 2);
let assignee = format_assignees(&issue.assignees);