fix: white-on-white text in light terminal themes#640
Conversation
Two upstream bugs caused invisible text on light terminal backgrounds:
1. The experimental `<markdown>` element was missing `fg={theme.text}`,
falling back to OpenTUI's hardcoded white default (`RGBA(1,1,1,1)`)
2. The `markup.raw` / `markup.raw.block` syntax scopes lacked a
`background` property, so fenced code blocks had no contrast
Fixes:
- Add `fg={theme.text}` to the `<markdown>` element (matching all
sibling `<code>` elements)
- Add `background: theme.backgroundElement` to `markup.raw` scope
- Add 30 E2E tests verifying light theme contrast across 3 themes
Related upstream: anomalyco/opencode#17323, #17935, #18353
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 15 minutes and 48 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…background distinction Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
What does this PR do?
Fixes invisible (white-on-white) text when using light terminal themes with the experimental markdown renderer. Two root causes:
<markdown>element was missingfg={theme.text}, falling back to OpenTUI's hardcoded white default (RGBA(1,1,1,1))markup.raw/markup.raw.blocksyntax scopes lacked abackgroundproperty, so fenced code blocks had no contrast on light backgroundsThis is a well-known upstream issue (anomalyco/opencode#17323, #17935, #18353) with no merged fix.
Type of change
Issue for this PR
Closes #617
How did you verify your code works?
markup.rawscope has background setbun run typecheckpasses with 0 errorsbun run build:localsucceedsChecklist
Multi-model code review: Reviewed by 6 models (Claude, GPT 5.2 Codex, Gemini 3.1 Pro, Kimi K2.5, MiniMax M2.5, GLM-5). Convergence: 1 round.
fgtype issue caught during convergence and fixed with@ts-expect-error.🤖 Generated with Claude Code