#17170 · @mynameistito · opened Mar 12, 2026 at 10:47 AM UTC · last updated Mar 21, 2026 at 7:22 PM UTC

fix(cli): remove stray dot from --help logo

tuifix
66
+211 files

Score breakdown

Impact

4.0

Clarity

9.0

Urgency

3.0

Ease Of Review

9.0

Guidelines

9.0

Readiness

9.0

Size

10.0

Trust

6.0

Traction

2.0

Summary

This PR addresses a minor visual bug in the opencode --help output where the logo was misaligned due to whitespace stripping. The fix is localized to ui.ts and employs non-breaking spaces and an ANSI escape to correct rendering. Clear before/after screenshots are provided.

Open in GitHub

Description

Issue for this PR

Closes #17171 #11278

Type of change

  • [x] Bug fix
  • [ ] New feature
  • [ ] Refactor / code improvement
  • [ ] Documentation

What does this PR do?

The logo in opencode --help was broken because yargs' .usage() strips leading whitespace, collapsing the first row and misplacing the (the 'd' bump).

Two changes in ui.ts:

  1. Emit NBSP (\u00A0) instead of regular spaces in draw() so yargs can't collapse them
  2. Prefix row 0 with left.fg (an ANSI escape) so yargs sees it as non-whitespace

No changes to logo.ts or logo.tsx. Follows the single source of truth established in #10912.

How did you verify your code works?

Ran bun run src/index.ts --help and bun run src/index.ts upgrade from packages/opencode — both render correctly.

Screenshots / recordings

Before: <img width="786" height="203" alt="image" src="https://github.com/user-attachments/assets/c4f6d849-47b3-4c0f-92aa-91a7f691fa64" />

<img width="786" height="225" alt="image" src="https://github.com/user-attachments/assets/abdb556f-a020-46fe-8bbd-d32fecd45ebe" />

After: <img width="835" height="161" alt="image" src="https://github.com/user-attachments/assets/379b4296-2802-4fda-8139-d1c0b3e247ad" />

<img width="837" height="137" alt="image" src="https://github.com/user-attachments/assets/df44d9c5-c7fb-45df-b4a7-4d44bfb7a0f7" />

Checklist

  • [x] I have tested my changes locally
  • [x] I have not included unrelated changes in this PR

Linked Issues

#17171 bug(cli): white dot appears at top of logo in --help output

View issue

Comments

PR comments

Cateds

Isn't it actually the top block of the character 'd' ? It's opencooe now.

mynameistito

Isn't it actually the top block of the character 'd' ? It's opencooe now.

Hmm true! I didn't even realise that lmao

fixed now

Changed Files

packages/opencode/src/cli/ui.ts

+21
@@ -70,7 +70,7 @@ export namespace UI {
continue
}
if (char === " ") {
parts.push(" ")
parts.push("\u00A0")
continue
}
parts.push(fg, char, reset)
@@ -79,6 +79,7 @@ export namespace UI {
}
glyphs.left.forEach((row, index) => {
if (pad) result.push(pad)
if (index === 0) result.push(left.fg)
result.push(draw(row, left.fg, left.shadow, left.bg))
result.push(gap)
const other = glyphs.right[index] ?? ""