feat(sidebar): invert proc label colors on focused session card#51
Merged
Conversation
When a session card has the sidebar focus, text proc labels (e.g. "py", "node") now render with the session-name color as background and the selection color as foreground, so the chip pops against the selection row instead of blending into it. Icon labels (emoji, Nerd Font glyphs) skip the chip background entirely and inherit the selection bg, so they read as part of the row rather than as a separate chip.
Replace the ad-hoc 'all runes non-ASCII' check inside isIconLabel with the existing isIconRune helper (display width > 1 or Private Use Area), so the classifier matches the rest of the TUI and won't misclassify non-ASCII text like accented Latin as an icon.
Proc labels are either pure text or a single icon glyph, so iterating every rune was unnecessary. Decode the first rune of the trimmed text and pass it to isIconRune directly.
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.
Summary
py,node): bg = session-name color (ColorFgPrimary), fg = selection color (ColorSelected). Chip pops against the selection row instead of disappearing into it.isIconLabelhelper (whitespace-trimmed, all-non-ASCII rune check) so labels like" "(glyph + padding space) are recognized as icons.resolveProcLabelColorsinto a 3-arm switch so the override paths read top-to-bottom.Test plan
Automated:
go test ./internal/tui/ -count=1— 336 passedgo build ./...Manual:
demuxagainst a session list that includes:py,node) configured with custom fg/bg" "forclaude*, or any emoji)