From b37eec24bc4e5394c7c6815c5e7f4b71c04e9dec Mon Sep 17 00:00:00 2001 From: Helios Agent Date: Thu, 5 Mar 2026 20:10:28 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20emoji=20column=20alignment=20+=20remove?= =?UTF-8?q?=20'=C2=B7=20exit=200'=20from=20success=20output?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add unicode-width crate, emoji_cell() pads 1-wide symbols (ℹ, ☀) to 2 cols - All action/status cells now occupy exactly 2 terminal display columns - exec success: show only first output line, no trailing '· exit 0' --- crates/client/Cargo.toml | 1 + crates/client/src/display.rs | 19 ++++++++++++++++--- crates/client/src/main.rs | 6 ++---- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/crates/client/Cargo.toml b/crates/client/Cargo.toml index 812c005..f4738a8 100644 --- a/crates/client/Cargo.toml +++ b/crates/client/Cargo.toml @@ -25,6 +25,7 @@ png = "0.17" futures-util = "0.3" colored = "2" terminal_size = "0.3" +unicode-width = "0.1" [build-dependencies] winres = "0.1" diff --git a/crates/client/src/display.rs b/crates/client/src/display.rs index c94d0cc..f7ffe5f 100644 --- a/crates/client/src/display.rs +++ b/crates/client/src/display.rs @@ -1,10 +1,22 @@ /// Terminal display helpers — table-style command rows with live spinner. /// /// Layout (no borders, aligned columns): -/// {2 spaces}{action_emoji}{2 spaces}{name: String { + let w = UnicodeWidthStr::width(s); + if w < 2 { + format!("{s} ") + } else { + s.to_string() + } +} // Fixed column widths (in terminal display columns, ASCII-only content assumed for name/payload/result) const NAME_W: usize = 14; @@ -52,12 +64,13 @@ fn format_row(action: &str, name: &str, payload: &str, status: &str, result: &st let (payload_w, result_w) = col_widths(); let p = trunc(payload, payload_w); let r = trunc(result, result_w); + // emoji_cell ensures every action/status occupies exactly 2 terminal columns format!( " {} {: