Repository navigation
feat: replace CLI banner with block-art SENTRY wordmark - #1169
Conversation
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
|
Codecov Results 📊✅ Patch coverage is 82.14%. Project has 5176 uncovered lines. Files with missing lines (2)
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 -8Generated 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
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
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
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).
| 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; | ||
| } |
There was a problem hiding this comment.
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~627src/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).
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.
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.

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/ baresentry(TTY-gated) and thesentry initwizard 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
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.bannerLinesForWidth(columns)/formatBanner(columns?)):>= 66cols → full arch + wordmark>= 52cols → wordmark only>= 6cols → compactsentrytext markThe Ink intro screen re-fits on resize;
helpskips 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 frombanner.ts(removes the duplicated arrays)src/lib/init/ui/ink-app.tsx—IntroScreenfits the banner to the current widthsrc/lib/help.ts— skips an empty banner when the terminal is too narrowtest/lib/help.test.ts— responsive variant tests + anever exceeds the terminal widthregression test (widths 6–200)Notes
ink-app.snapshot.test.tsx/wizard-runner.test.tstests remain independent (self-contained banner fixture / mockedformatBanner).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 passedbiome checkon changed files → cleantsc --noEmit→ clean (0 errors)pnpm cli/pnpm cli initat 120/74/60/40 cols — banner fits every width without wrappingRendering