From 987e9da770051f4c2304b81c7cede3ed60caf526 Mon Sep 17 00:00:00 2001 From: Aayam Bansal Date: Sun, 5 Jul 2026 17:23:23 +0530 Subject: [PATCH] fix(cli): keep the banner glyphs aligned through yargs' help formatter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The help formatter trims leading whitespace per line, which stripped the O glyph's indentation and sheared the whole OPEN SCIENCE banner. Lead each line with braille blanks (U+2800) — they render as blank cells but aren't whitespace, so the margin survives formatting in every consumer (--help, upgrade, web, uninstall). --- backend/cli/src/cli/ui.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/cli/src/cli/ui.ts b/backend/cli/src/cli/ui.ts index 87d2866..334258d 100644 --- a/backend/cli/src/cli/ui.ts +++ b/backend/cli/src/cli/ui.ts @@ -87,7 +87,13 @@ export namespace UI { for (const line of glyphs.lines) { if (pad) result.push(pad) - for (const ch of line) { + // yargs' help formatter trims leading whitespace per line, which + // destroys the glyph indentation (the O's top row shifts left and the + // letters shear). Braille blank (U+2800) renders as a blank cell but + // isn't whitespace, so the margin survives formatting. + const lead = line.length - line.trimStart().length + result.push("⠀".repeat(lead)) + for (const ch of line.slice(lead)) { if (structural.has(ch)) { result.push(dim, ch, reset) } else if (ch === " ") {