Conversation
`gray` is not a COLOR_MAP entry, and getColorAnsiCode returns '' on a lookup miss, so every site that fell back to it rendered with no color: the default separator path in the renderer and the default color of the Git SHA, Terminal Width and Version widgets. Use `brightBlack`, the neutral entry the map actually has. The Ink `<Text color='gray'>` usages in the TUI are untouched; Ink resolves that name itself. Closes sirmalloc#540 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01StkifHpSLWH4J5TvuP56ur
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.
Fixes #540.
Problem
grayis not aCOLOR_MAPentry (the neutral one isbrightBlack,src/utils/colors.ts:29), andgetColorAnsiCodereturns''on a lookup miss. Every site that fell back to'gray'therefore rendered with no color at all:src/utils/renderer.ts—let separatorColor = widget.color ?? 'gray', the default path for every separator with no explicit color whileinheritSeparatorColorsis off (the shipped default line has three of them).getDefaultColor()ofGitSha,TerminalWidthandVersion.The Ink
<Text color='gray'>usages inside the TUI are unrelated: Ink resolves that name itself.Fix
Swap the four sites to
brightBlack. No new color name is introduced, so saved settings and the color menu are unaffected.Tests
src/utils/__tests__/default-colors.test.ts:WIDGET_MANIFESTreturns a default color that exists inCOLOR_MAP(fails onmainwithgit-sha -> 'gray');main:|comes out uncolored).bun testandbun run lintgreen.🤖 Generated with Claude Code