Repository navigation
fix(tui): make the question selection highlight visible in light themes - #153
Merged
Merged
Conversation
The selected answer row and the hovered question tab painted theme.backgroundElement over theme.backgroundPanel. In light themes those are adjacent gray steps (#f5f5f5 on #fafafa for codev, 1.04x contrast), so the highlight was effectively invisible. Derive the highlight from the panel blended toward the theme's text color instead, which keeps a neutral band at ~1.2x in both modes and works for generated themes too. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Problem
In the question panel (
AskUserQuestion), the selected answer row and the hovered question tab painttheme.backgroundElementovertheme.backgroundPanel. In light themes those are adjacent gray steps —#f5f5f5on#fafafaforcodev, a 1.04x contrast ratio — so the selection had no visible highlight at all.Fix
A
highlightmemo —tint(theme.backgroundPanel, theme.text, 0.1)— now backs the active option's number/label boxes, the "Type your own answer" row, and the tab hover state. Blending the panel toward the theme's own text color keeps the band neutral and works for any theme, including the terminal-generatedsystemone, instead of hardcoding a darker gray.Measured highlight-vs-panel contrast, before → after:
The selected label text (
theme.secondary) still clears 3.9x against the new background oncodev.Notes
bun typecheckpasses inpackages/tui.DIVERGENCES.mdgains a row forquestion.tsx;CHANGELOG.mdgains an Unreleased TUI entry.🤖 Generated with Claude Code