From faf0de21e480302a296ac3bf1cfc100c176c122a Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 21 Feb 2026 11:40:43 +0000 Subject: [PATCH] feat(cli): use framed box drawing for playbook banners MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces simple horizontal separators with Unicode box drawing characters (┌, ┐, └, ┘, │, ─) for the playbook execution banner. This improves visual hierarchy and makes the start of a playbook run more distinct in verbose logs. - Updates `OutputFormatter::banner` to render a full box. - Uses `measure_text_width` to correctly calculate padding for Unicode titles. - Retains `bright_blue` color scheme for consistency. Co-authored-by: dolagoartur <146357947+dolagoartur@users.noreply.github.com> --- .Jules/palette.md | 4 ++++ src/cli/output.rs | 30 +++++++++++++++++++++++------- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/.Jules/palette.md b/.Jules/palette.md index c3c9ca50..2808b404 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -52,3 +52,7 @@ ## 2026-07-28 - [Box Drawing for Modern Aesthetics] **Learning:** Legacy CLI tools often use ASCII characters (like `*`) for separators, which can feel dated. Replacing them with Unicode box-drawing characters (like `─`) creates a cleaner, more continuous visual flow that matches modern design sensibilities without sacrificing terminal compatibility. **Action:** Replace repeated ASCII separator characters with their Unicode box-drawing equivalents (`─`, `━`, `═`) in headers and banners to improve visual polish. + +## 2024-05-25 - [Framed Banners for Context Switching] +**Learning:** Simple horizontal lines often get lost in verbose CLI output. Framing major context switches (like starting a playbook) with a full Unicode box (`┌`, `│`, `└`) creates a strong visual anchor that helps users rapidly identify the beginning of a new execution phase. +**Action:** Use box-drawing characters to enclose high-level banners, ensuring proper padding calculation (`measure_text_width`) to handle Unicode titles correctly. diff --git a/src/cli/output.rs b/src/cli/output.rs index fbdc4dc3..4c0d53ba 100644 --- a/src/cli/output.rs +++ b/src/cli/output.rs @@ -124,15 +124,31 @@ impl OutputFormatter { } let width = measure_text_width(title); - let line = "─".repeat(width + 4); + let horizontal = "─".repeat(width + 2); + if self.use_color { - println!("\n{}", line.bright_blue()); - println!("{}", format!(" {} ", title).bright_blue().bold()); - println!("{}\n", line.bright_blue()); + println!( + "\n{}{}{}", + "┌".bright_blue(), + horizontal.bright_blue(), + "┐".bright_blue() + ); + println!( + "{} {} {}", + "│".bright_blue(), + title.bright_blue().bold(), + "│".bright_blue() + ); + println!( + "{}{}{}\n", + "└".bright_blue(), + horizontal.bright_blue(), + "┘".bright_blue() + ); } else { - println!("\n{}", line); - println!(" {} ", title); - println!("{}\n", line); + println!("\n┌{}┐", horizontal); + println!("│ {} │", title); + println!("└{}┘\n", horizontal); } }