Skip to content

Conversation

@code-yeongyu
Copy link
Contributor

Fix unreadable diff text on light mode themes by passing fg prop to diff component.

Problem

When using light mode themes, syntax-unhighlighted tokens in diff view render as white text (hardcoded default in opentui's CodeRenderable), making them invisible on light backgrounds.

Solution

Pass fg={theme.text} to the <diff> component so unhighlighted text uses the theme's text color.

Dependency

Requires sst/opentui#390 to be merged first (adds fg prop support to DiffRenderable).

@code-yeongyu code-yeongyu marked this pull request as ready for review December 9, 2025 01:25
@code-yeongyu code-yeongyu force-pushed the fix/diff-fg-light-mode branch from 27868fd to 1d04899 Compare December 9, 2025 01:35
@code-yeongyu code-yeongyu force-pushed the fix/diff-fg-light-mode branch from 1d04899 to 73c5c32 Compare December 9, 2025 01:37
@code-yeongyu
Copy link
Contributor Author

This fix has already been applied in commit 1e7d78a by @kommander ("bump opentui to v0.1.58, fixing diff color issues in light themes").

Thanks for the quick fix! 🙏

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.

1 participant