MoonshotAI / MoonshotAI/kimi-code

TUI: Markdown bold in assistant messages renders dark-on-dark, ignoring theme textStrong

Open
#1,872 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

Summary

In the terminal TUI, markdown bold (**text**) in assistant messages renders as dark gray on a dark terminal background — nearly unreadable — even though the active theme's textStrong token (documented as "Emphasized / bold text") is near-white. Reproduced with both a custom theme and the built-in dark theme, so it is independent of the theme file.

Environment

  • kimi-code 0.27.0 (current release)
  • macOS (arm64), iTerm2, terminal background pure black (#000000)
  • Themes tested: custom nord (textStrong #ECEFF4) and built-in dark (textStrong #F5F5F5), applied with /reload-tui

Expected

Per the custom themes documentation, textStrong controls "Emphasized / bold text", so markdown bold should render at least as bright as body text (textStrong is brighter than text in both palettes).

Actual

  • Regular body text renders bright and readable.
  • Every **bold** span — including a fully-bold paragraph — renders in a distinctly darker gray (visually ~#4C5566 on black), darker than the surrounding body text.
  • Persists after switching custom theme → built-in dark + /reload-tui.

Ruled out

  • iTerm2 profile settings: all profiles have Bold Color = white (1.0, 1.0, 1.0) and Use Bright Bold = true; Minimum Contrast unset (0).
  • Version lag: reproduced on 0.27.0, the latest release at time of report.
  • Theme file validity: kimi doctor tui passes; the same custom theme file renders its other tokens correctly.

Repro

  1. Use a dark terminal background (pure black or near-black).
  2. Get any assistant response containing **bold** markdown spans.
  3. Observe the bold spans render darker than the surrounding body text.

Suspected cause

The markdown renderer's strong/emphasis path appears not to use the textStrong theme token — possibly a hardcoded or dim/faint SGR style — since neither custom nor built-in theme tokens affect it. (Related to, but distinct from, #209: that one is incomplete element rendering; this one is bold specifically rendering with a dark color despite a bright textStrong.)

Screenshots available on request; I can reproduce reliably and test any fix.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the terminal TUI markdown renderer's strong/emphasis path and how it reads theme tokens; compare it with the documented textStrong token and test after switching themes with /reload-tui. Use the bold-span reproduction on a dark terminal background, and confirm with kimi doctor tui that theme validity is not involved. Done means markdown bold renders at least as brightly as surrounding body text under both custom and built-in dark themes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.