Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

feat: replace CLI banner with block-art SENTRY wordmark - #1169

Merged
BYK merged 5 commits into
mainfrom
feat/cli-banner-block-art
Jul 2, 2026
Merged

BYK merged 5 commits into
mainfrom
feat/cli-banner-block-art

Conversation

@BYK

@BYK BYK commented Jul 2, 2026 •

Copy link
Copy Markdown
Member

What

Replaces the old ANSI Shadow figlet banner with a block-element transcription of the Sentry brand — the arch mark + SENTRY wordmark with a vertical purple gradient — shown in sentry help / bare sentry (TTY-gated) and the sentry init wizard intro.

The banner is responsive: it renders the widest variant that fits the terminal, so it never wraps on narrow / split-pane terminals.

Full banner (8 rows, 66 cols) — official Sentry brand ASCII art:

       ▄▖            ▄▄▄▄▄▄▄▄▄▖▗▄▄▄▖  ▄▄▄            ▗▄▄▄▄▖
      ▟██▄        ▗▟██████████▘▐████▖ ███ ██████████▌ ▜████▖▗████▘
    ▗▟▛ ▝▜▙       ▐███▘  ▗▄▄▄▄▖▐█████▄███ ██████████▌  ▝████████▘
    ▝▜▙▖  ▜▙▖     ▝███▙  ▐██▛▀▘▐██▛██████   ▐██▌▗▄▄▄▄▄▄▄▄▜█████▘
  ▗█▄ ▝█▄  ▜█▖     ▝▜███▖▐██▙▖ ███▌ ▜████   ▐██▌▐██▛ ▝███▌▜███▌
 ▗█▘▀█▖▝▜▙  ▜█▖ ▐██▌ ▐██▙▐██▀▘ ▀▀▀▘  ▀▀▀▀   ▐██▌▐██████▀▀ ▐███▌
▗▄▝▙▖▝█▖▝█▌  ▜█▖▝███████▛▐█████████████████▌▐██▌▐██▌▝██▙▖ ▐███▌
▟▙▄▟▙ ▐█▄██ ▐██▛  ▀▀▀▀▀▘ ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘▝▀▀▘▝▀▀▀ ▝▀▀▀▘▝▀▀▀▘

How

  • Art: both the arch mark and wordmark are transcribed to quadrant block glyphs (U+2580–U+259F). The art is the official Sentry brand ASCII (arch mark + wordmark); the gradient uses the brand team's saturated stops (#9E86FF top -> #7553FF mid -> #583FC1 bottom), interpolated across the 8 rows.
  • Responsive sizing (bannerLinesForWidth(columns) / formatBanner(columns?)):
    • >= 66 cols → full arch + wordmark
    • >= 52 cols → wordmark only
    • >= 6 cols → compact sentry text mark
    • otherwise → nothing
      The Ink intro screen re-fits on resize; help skips an empty banner on tiny terminals.

Changes

  • src/lib/banner.ts — bitmap-derived art (full + wordmark variants), 8-stop gradient, formatBanner(cols) / bannerLinesForWidth(cols)
  • src/lib/init/ui/ink-ui.ts — sources the banner from banner.ts (removes the duplicated arrays)
  • src/lib/init/ui/ink-app.tsx — IntroScreen fits the banner to the current width
  • src/lib/help.ts — skips an empty banner when the terminal is too narrow
  • test/lib/help.test.ts — responsive variant tests + a never exceeds the terminal width regression test (widths 6–200)

Notes

  • The full banner fits standard 80-col terminals and common ~74-col half-screen splits; narrower panes degrade to the wordmark, then a text mark — never wrapping.
  • The ink-app.snapshot.test.tsx / wizard-runner.test.ts tests remain independent (self-contained banner fixture / mocked formatBanner).
  • Follow-up idea (separate PR): on terminals that support graphics protocols (sixel / kitty / iTerm2), blit the real logo pixel-perfect, falling back to this block art everywhere else.

Testing

  • vitest run test/lib/help.test.ts test/lib/init/ui/ink-app.snapshot.test.tsx test/lib/init/wizard-runner.test.ts → 94 passed
  • biome check on changed files → clean
  • tsc --noEmit → clean (0 errors)
  • Manual: pnpm cli / pnpm cli init at 120/74/60/40 cols — banner fits every width without wrapping

Rendering

image

Replace the ANSI Shadow figlet wordmark with a block-element transcription
of the Sentry logo — a slanted, stacked SENTRY rendered in solid block glyphs
with the vertical purple gradient re-fit across 13 rows.

- src/lib/banner.ts: new BANNER_ROWS (13) + 13-stop gradient
- src/lib/init/ui/ink-ui.ts: duplicate copy kept in sync
- test/lib/help.test.ts: row-count assertion 6 -> 13
@github-actions

github-actions Bot commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-1169/

Built to branch gh-pages at 2026-07-02 17:49 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

github-actions Bot commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ Patch coverage is 82.14%. Project has 5176 uncovered lines.
❌ Project coverage is 81.6%. Comparing base (base) to head (head).

Files with missing lines (2)
File Patch % Lines
src/lib/help.ts 0.00% ⚠️ 5 Missing
src/lib/banner.ts 100.00% ⚠️ 1 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    81.65%    81.60%    -0.05%
==========================================
  Files          405       405         —
  Lines        28103     28124       +21
  Branches     18308     18328       +20
==========================================
+ Hits         22946     22948        +2
- Misses        5157      5176       +19
- Partials      1888      1880        -8

Generated by Codecov Action

Rework the banner to use quadrant block glyphs (U+2580-259F, 2x2 sub-cell
per char) so the wordmark keeps the logo's proportions and legibility while
fitting standard 80-col terminals. Prefix the SENTRY wordmark with the Sentry
arch mark, also rendered as quadrant block art. 8 rows, max 78 cols.

- src/lib/banner.ts: composed arch+wordmark rows + 8-stop gradient
- src/lib/init/ui/ink-ui.ts: duplicate copy kept in sync
- test/lib/help.test.ts: row-count assertion -> 8
@BYK
BYK requested review from MathurAditya724 and betegon and removed request for MathurAditya724 July 2, 2026 14:04
Re-extract the SENTRY wordmark directly from the reference bitmap (reading the
digit grid) instead of sampling the striped source. This fixes the artifacts:
the E's arms and R's counter are now preserved and edges are smooth.

Make the banner responsive so it never wraps on narrow/split-pane terminals:
render the full arch+wordmark (>=78 cols), the wordmark alone (>=58), or a
compact text mark (>=6), sized to the terminal width. Removes the duplicated
banner arrays in ink-ui.ts (now sourced from banner.ts); the Ink intro screen
re-fits on resize.

- src/lib/banner.ts: bitmap-derived art + bannerLinesForWidth/formatBanner(cols)
- src/lib/init/ui/ink-ui.ts: use shared banner source (dedup)
- src/lib/init/ui/ink-app.tsx: IntroScreen fits banner to width
- src/lib/help.ts: skip empty banner on tiny terminals
- test/lib/help.test.ts: responsive + never-exceeds-width tests

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3ddce86. Configure here.

Comment thread src/lib/init/ui/ink-app.tsx Resolved
Address review gaps:
- Seed the wizard store with the full banner (FULL_BANNER_LINES) so IntroScreen
  re-fits in both directions on resize (grow back to full, not just shrink).
- Add an Ink snapshot test that seeds an over-wide banner and renders narrow,
  verifying it downsizes to a fitting variant instead of wrapping.
- Fix JSDoc wording (Block Elements, not only 'quadrant' glyphs).
Comment thread src/lib/banner.ts
Comment on lines +87 to +96
export function bannerLinesWidth(lines: readonly BannerLine[]): number {
let max = 0;
for (const { content } of lines) {
const width = [...content].length;
if (width > max) {
max = width;
}
}
return max;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The bannerLinesWidth function incorrectly calculates string width by counting code points, causing UI layout breakage in CJK terminals where some characters are double-width.
Severity: MEDIUM

Suggested Fix

Replace the manual code-point counting ([...content].length) with a library that correctly calculates the terminal display width of strings, such as string-width. This change should be applied to both the bannerLinesWidth function and its corresponding test suite to ensure the logic correctly handles full-width and ambiguous-width characters.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: src/lib/banner.ts#L87-L96

Potential issue: The `bannerLinesWidth` function calculates banner width by counting
Unicode code points using `[...content].length`. This method is inaccurate for
characters with ambiguous East Asian Width properties, such as Unicode Block Elements,
which render as double-width in CJK terminal environments. In these locales, the
function underestimates the banner's actual display width. For example, a banner
calculated as 78 columns wide might render as 156 columns. This causes the application
to display a banner that doesn't fit the terminal, leading to wrapping and a broken UI
layout.

Also affects:

  • src/lib/init/ui/ink-app.tsx:625~627
  • src/lib/banner.ts:108~119

Did we get this right? 👍 / 👎 to inform future reviews.

Per brand-team feedback, replace the wordmark art with the official Sentry
brand ASCII (tighter 66-col arch + wordmark) and use their saturated gradient
(#9E86FF top -> #7553FF mid -> #583FC1 bottom, interpolated across 8 rows).

The narrower full banner (66 vs 78) now fits more terminals fully, including
the common ~74-col half-screen split. Responsive tiers updated: full (>=66),
wordmark-only (>=52), compact text (>=6). Extracted the wordmark fallback from
the brand art (dropping the arch).
@BYK
BYK merged commit 332b27f into main Jul 2, 2026
32 checks passed
@BYK
BYK deleted the feat/cli-banner-block-art branch July 2, 2026 18:00
BYK added a commit that referenced this pull request Jul 2, 2026
Follow-up to #1169 addressing Seer's MEDIUM review comment.

## What

Documents a known limitation of the block-art banner and fixes a stale
doc.

Seer flagged that `bannerLinesWidth` measures width in Unicode code
points, which assumes each Block Elements glyph (U+2580–U+259F) is one
terminal cell. Those glyphs are East Asian **Ambiguous** width, so a
terminal configured to render ambiguous characters as *wide* (some CJK
setups) draws them double-width and the banner can wrap.

## Why document rather than "fix"

- The premise is correct, but there is **no portable way to detect** a
terminal's ambiguous-width setting.
- Seer's suggested fix (`string-width`) is a **no-op by default** —
`string-width` also treats ambiguous characters as narrow unless you
pass `{ambiguousIsNarrow:false}`, which would then wrongly double-count
on the overwhelming majority of (non-CJK / ambiguous=narrow) terminals.
- Impact is limited to the decorative, TTY-gated banner (worst case:
cosmetic wrap, no crash), and the plain ASCII text mark is unaffected.

So this is an inherent limitation of block-element art. We document it
on `bannerLinesWidth` rather than add a dependency or an unreliable
locale heuristic.

## Also

Fixes stale threshold values in the `bannerLinesForWidth` JSDoc
(`66`/`52`, not the pre-brand-art `78`/`58`).

## Testing

- `biome check` / `tsc --noEmit` → clean. Doc-only change; no behavior
change.
BYK added a commit that referenced this pull request Jul 2, 2026
Updates the README hero image (`.github/assets/banner.png`) to match the
CLI's new banner shipped in #1169.

## What
- Regenerated the terminal-mockup banner with the **Sentry arch mark +
wordmark** (official brand ASCII) rendered in the **saturated purple
gradient** (`#9E86FF → #7553FF → #583FC1`).
- Kept the existing mockup design — brand background, macOS window
chrome, prompt, tagline, command list, and hints — swapping only the
banner art in place.
- Re-encoded the PNG losslessly: **657KB → 157KB**.

## Before / After
The banner now shows the arch + wordmark (previously wordmark-only) with
the brighter brand gradient, matching what `sentry` / `sentry help`
renders in the terminal.

## Notes
- The baked-in help text (tagline wording, `docs.sentry.io/cli` link,
curated command list) is unchanged — out of scope here; happy to refresh
it in a follow-up if wanted.
- Website brand assets (site logo / wordmark / OG images) are tracked
separately and pending the brand files.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant