Repository navigation
Conversation
…nt is detected Closes the bug half of sirmalloc#604 (the theme half is handled by sirmalloc#607). The default powerline separator is the private-use-area glyph U+E0B0. Without a Powerline/Nerd Font it renders as mojibake, and while checkPowerlineFonts() can detect the absence of fonts, that warning only surfaced in the TUI setup flow — enabling powerline via config/CLI on a machine without fonts produced garbage glyphs in every render. The same applies to regular-mode separators when users type PUA characters as their separator. Render-time font-safe pass, applied to powerline separators, startCaps and endCaps, regular-mode separator characters and the default separator: detected-safe text passes through, anything else falls back to a plain |. The detection result is cached per process (setCachedPowerlineFontStatus as a test seam) and the cache respects CCSTATUSLINE_FONT_CHECK=skip. Regenerated the font-safe separator fallback tests for the current renderer. Co-Authored-By: Claude Code <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
Closes #604 (the separator-fallback half; the theme half is handled by #607).
The default powerline separator is the private-use-area glyph U+E0B0. Without a Powerline/Nerd Font it renders as mojibake, and while
checkPowerlineFonts()can detect the absence of fonts, that warning only surfaced in the TUI setup flow — enabling powerline via config/CLI on a machine without fonts produced garbage glyphs in every render. Regular-mode separators suffer the same when users type PUA characters as their separator.What this does
Render-time font-safe pass, applied to:
separators,startCaps,endCaps(renderer's powerline path);characteranddefaultSeparator(renderer's regular path).Mechanics:
fontSafeSeparator(): detected-safe text passes through, anything else falls back to a plain|;setCachedPowerlineFontStatusas a test seam) and respectsCCSTATUSLINE_FONT_CHECK=skip.Regarding the behavior question raised on the issue: this keeps the fallback tied to a local negative scan (the approach this fork has run in production for a while). The scan result is cached, so the decision is made once per process, and
CCSTATUSLINE_FONT_CHECK=skipgives a way to trust the local detection is wrong.Verification
??=modernization in the touched function was required by the current lint rules).separator-font-fallback.test.ts, 50 renderer/sanity tests pass).🤖 Generated with Claude Code