Unset foreground in default themes#9765
Conversation
Summary of ChangesHello @miguelsolorio, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a long-standing readability issue by modifying the default Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request effectively addresses the text visibility issue on light-themed terminals by unsetting the foreground color in the default themes, allowing the terminal's native color to be used. The accompanying change in displayUtils.ts is a crucial bug fix that ensures an empty string color value is handled correctly, preventing it from incorrectly falling back to an error color. I have one suggestion to improve code consistency.
|
Size Change: -16 B (0%) Total Size: 17.4 MB ℹ️ View Unchanged
|
| if (value >= thresholds.yellow) { | ||
| return theme.status.warning; | ||
| } | ||
| return options.defaultColor || theme.status.error; |
There was a problem hiding this comment.
did you gemini cli catch this or did you manually debug to fix this? For what it is worth this seems wrong both before and after. Likely we should have a red/error threshold and return theme.status.error in that case
and always return options.defaultColor for this default case.
There was a problem hiding this comment.
Gemini originally made the change but then GCA suggested this instead (you can see the resolved thread above). Happy to add your suggestions.
There was a problem hiding this comment.
Let me follow up in a subsequent PR to address this

TLDR
This fixes a long standing issue where users on light terminals can't really see the text.
Dive Deeper
By unsetting the foreground color, it relies on using the terminal foreground color. This only applies to our default dark/light themes, other themes will have custom foreground colors.
Before
After
Reviewer Test Plan
Testing Matrix
Linked issues / bugs