From 9ef46a76b1d0c85e7a45de3874ca203a86dad567 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 23 Feb 2026 01:30:45 +0900 Subject: fix(licenses): add table headers and bordered summary output Match Composer's Symfony Table formatting: add Name/Version/Licenses header row to text output and use bordered ASCII table for summary. Co-Authored-By: Claude Opus 4.6 --- crates/mozart/src/commands/licenses.rs | 62 +++++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 8 deletions(-) (limited to 'crates') diff --git a/crates/mozart/src/commands/licenses.rs b/crates/mozart/src/commands/licenses.rs index 577d0b5..d07305e 100644 --- a/crates/mozart/src/commands/licenses.rs +++ b/crates/mozart/src/commands/licenses.rs @@ -222,9 +222,28 @@ fn render_text( return; } - // Compute column widths - let name_width = entries.iter().map(|e| e.name.len()).max().unwrap_or(0); - let version_width = entries.iter().map(|e| e.version.len()).max().unwrap_or(0); + // Compute column widths (factor in header strings for minimum width) + let name_width = entries + .iter() + .map(|e| e.name.len()) + .max() + .unwrap_or(0) + .max("Name".len()); + let version_width = entries + .iter() + .map(|e| e.version.len()) + .max() + .unwrap_or(0) + .max("Version".len()); + + // Print header row + println!( + "{: