bug(ui) fix flicker refreshing background color - #19041
Conversation
Summary of ChangesHello @jacob314, 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 resolves a UI flickering issue by refining the mechanism for refreshing the static UI elements, particularly in response to terminal background color changes and theme selections. The changes ensure that UI refreshes are triggered only when genuinely necessary, preventing redundant re-renders and improving the overall visual stability and performance of the application's user interface. Highlights
Changelog
Activity
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 a UI flicker issue related to background color refreshing. The refactoring centralizes the refreshStatic call, ensuring it's triggered only once per theme or background color change, which successfully prevents the double-refresh that caused the flicker. The logic is sound, moving the responsibility for the refresh into the useThemeCommand hook for explicit theme selections and handling adaptive theme refreshes correctly within useTerminalTheme. The updated tests accurately reflect and validate this improved behavior. Overall, this is a solid fix that enhances UI stability.
|
Size Change: +123 B (0%) Total Size: 24.4 MB ℹ️ View Unchanged
|
Summary
We accidentally updated the theme and called refresh static even if the background color was unchanged
To test:
Dial "Terminal Background Polling Interval" to 1s and verify you do not see flicker in iterm2 when you have a somewhat long chat conversation.
Verify that after changing the background color of your terminal (the iterm2 appearance tab of the settings dialog makes this easy) that the theme still updates fully in gemini cli after a second has passed.
Verify that the ThemeDialog still successfully fully updates the theme after you change it.
Fixes #19040