fix(tui): make the empty cloud-providers hint bold instead of muted grey - #134
Merged
Conversation
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.
What
No cloud providers configured. Press n to add one.was rendered in the same muted greyas every other empty section, so the one line telling a new user what to do read like
"nothing to see here". It is now bold, in the terminal's default foreground.
Raw bytes from the rendered frame, before and after:
On "white"
There is no white/foreground token in
TuiColors(src/tui/theme/theme.ts:36-52), and thetheme module exists specifically to keep bare colour literals out of components. A hardcoded
color="white"would also be near-invisible on the four light palettes (GITHUB_LIGHT,CATPPUCCIN_LATTE,GRUVBOX_LIGHT,SOLARIZED_LIGHT).Leaving
colorunset renders the terminal's default foreground — white on every dark theme,readable on the light ones — which is already the pattern in this file (
Rowdeliberatelyleaves
baseColorundefined) and at 14 other<Text bold>sites in the TUI.Scope
RowsSectionis shared by five sections, so the emphasis is opt-in through a newemphasiseEmptyprop and only Cloud providers passes it. Local text models, local embeddings,cloud embeddings and external llama.cpp keep the quiet grey empty state — those are merely
empty, not a call to action.
Testing
npx vitest run src/tui/components/llm-mode-rows-cloud.test.tsx— 7 passed, including twonew cases for the zero-provider state, which nothing exercised before
npm run lint(tsc --noEmit) cleanllm-panel.test.tsx,manage-panel-fit.test.tsx,llm-fallback-rows.test.tsx— 19 passed,so the fixed-height frame assertions still hold
The styling itself is not asserted in the committed test:
ink-testing-libraryrenders atchalk level 0, so SGR sequences never reach
lastFrame()— which is why every test in thatfile strips ANSI anyway. The bytes quoted above came from raising
chalk.levelin a throwawayharness that is not part of this change.