fix(ui): improve narration suppression and reduce flicker#24635
fix(ui): improve narration suppression and reduce flicker#24635gundermanc merged 5 commits intomainfrom
Conversation
Summary of ChangesHello, 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 improves the user interface experience by refining how the agent narrates its actions. By suppressing redundant thinking and intermediate tool-related text, the UI becomes cleaner and less prone to visual flashing. Additionally, this PR addresses a regression in the table rendering component to ensure stability. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces narration suppression logic to the MainContent component, hiding mechanical model narration and thinking states when experimental topic updates are active. Additionally, the TableRenderer was refactored to utilize StyledChar arrays for improved styling accuracy, and a vertical margin was added to table outputs. Review feedback highlighted an opportunity to improve maintainability by replacing a hardcoded margin value with a named constant and suggested that leaf components should generally remain flush to let parent layouts control spacing.
|
|
||
| return ( | ||
| <Box flexDirection="column"> | ||
| <Box flexDirection="column" marginY={1}> |
There was a problem hiding this comment.
The addition of a hardcoded margin value introduces magic numbers which hinder maintainability. Please replace this with a named constant. Additionally, avoid hardcoded vertical margins in leaf components; keep them flush and let the parent layout manage spacing to ensure consistency.
| <Box flexDirection="column" marginY={1}> | |
| <Box flexDirection="column" marginTop={TABLE_MARGIN_VERTICAL} marginBottom={TABLE_MARGIN_VERTICAL}> |
References
- Magic numbers, especially those used for layout or padding, should be replaced with named constants to improve readability and maintainability.
|
Size Change: +521 B (0%) Total Size: 34 MB
ℹ️ View Unchanged
|
|
Footnotes
|
Summary
Improved the narration suppression logic in
MainContent.tsxto resolve visual "flashing" and redundant "answering twice" issues when the Topics UX is enabled.Details
update_topictool call in the same turn is suppressed, as the Topic UI serves as a cleaner narrative alternative.TableRenderer.tsxwhereStyledLinewas missing from theinkdependency, and updated snapshots accordingly.Related Issues
Related to internal topic UX polish.
How to Validate
experimental.topicUpdateNarrationinsettings.json.npm test -w @google/gemini-cli -- src/ui/components/MainContent.test.tsxto verify suppression rules.Pre-Merge Checklist