Skip to content

fix(tui): make the empty cloud-providers hint bold instead of muted grey - #134

Merged
sosidudku1 merged 1 commit into
mainfrom
valeryb/cloud-empty-state-emphasis
Aug 18, 2026
Merged

fix(tui): make the empty cloud-providers hint bold instead of muted grey#134
sosidudku1 merged 1 commit into
mainfrom
valeryb/cloud-empty-state-emphasis

Conversation

@plombeer31

Copy link
Copy Markdown
Collaborator

What

No cloud providers configured. Press n to add one. was rendered in the same muted grey
as 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:

- �[37m  No cloud providers configured. Press n to add one.�[39m
+ �[1m  No cloud providers configured. Press n to add one.�[22m

On "white"

There is no white/foreground token in TuiColors (src/tui/theme/theme.ts:36-52), and the
theme 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 color unset renders the terminal's default foreground — white on every dark theme,
readable on the light ones — which is already the pattern in this file (Row deliberately
leaves baseColor undefined) and at 14 other <Text bold> sites in the TUI.

Scope

RowsSection is shared by five sections, so the emphasis is opt-in through a new
emphasiseEmpty prop 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 two
    new cases for the zero-provider state, which nothing exercised before
  • npm run lint (tsc --noEmit) clean
  • llm-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-library renders at
chalk level 0, so SGR sequences never reach lastFrame() — which is why every test in that
file strips ANSI anyway. The bytes quoted above came from raising chalk.level in a throwaway
harness that is not part of this change.

@sosidudku1
sosidudku1 merged commit b874df6 into main Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants