This repository was archived by the owner on Oct 23, 2026. It is now read-only.
Repository navigation
docs: note ambiguous-width limitation of block-art banner - #1177
Merged
Merged
Conversation
Document that bannerLinesWidth counts code points, which assumes single-width block glyphs; in CJK terminals configured with ambiguous-as-wide, the Block Elements glyphs render double-width and the banner may wrap. This isn't portably detectable (and string-width also treats ambiguous as narrow by default), so it's an accepted limitation — the plain text mark is unaffected. Addresses Seer review feedback on #1169. Also fixes stale threshold values in the bannerLinesForWidth doc (66/52, not 78/58) after the brand-art update.
Contributor
|
Contributor
Codecov Results 📊✅ Patch coverage is 100.00%. Project has 5175 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 81.59% 81.60% +0.01%
==========================================
Files 405 405 —
Lines 28124 28124 —
Branches 18328 18328 —
==========================================
+ Hits 22946 22949 +3
- Misses 5178 5175 -3
- Partials 1880 1879 -1Generated by Codecov Action |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
bannerLinesWidthmeasures 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"
string-width) is a no-op by default —string-widthalso 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.So this is an inherent limitation of block-element art. We document it on
bannerLinesWidthrather than add a dependency or an unreliable locale heuristic.Also
Fixes stale threshold values in the
bannerLinesForWidthJSDoc (66/52, not the pre-brand-art78/58).Testing
biome check/tsc --noEmit→ clean. Doc-only change; no behavior change.