feat(ui): improve startup warnings UX with dismissal and show-count limits#19584
feat(ui): improve startup warnings UX with dismissal and show-count limits#19584spencer426 merged 5 commits intomainfrom
Conversation
Summary of ChangesHello @spencer426, 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 significantly enhances the user experience for startup warnings in the CLI. By introducing dismissible warnings and limiting the frequency of low-priority notifications, it aims to reduce user friction and improve overall usability. The changes also include a robust system for categorizing and managing different types of warnings, ensuring that critical information is presented effectively while less urgent messages do not become intrusive. 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 introduces a new ui.showCompatibilityWarnings setting, defaulting to true, which controls the display of terminal and OS compatibility warnings. The core changes involve refactoring how startup warnings are handled: they are now represented by a structured StartupWarning object (containing an ID, message, and priority) instead of simple strings. This allows for more granular control, such as limiting the display count of low-priority warnings to three times and enabling dismissal of all warnings via keypress. The package-lock.json file was also updated, primarily removing "peer": true from various dependency entries. Documentation and tests were updated to reflect these changes, including new tests for warning prioritization, display limits, and dismissal.
aff21bb to
21bf909
Compare
There was a problem hiding this comment.
One minor improvement: in packages/cli/src/ui/components/Notifications.tsx, the useKeypress hook was being provided an inline arrow function as its callback. This causes the hook's useEffect dependencies to change on every render, which in turn causes it to unsubscribe and re-subscribe the event listener repeatedly. I fixed this by wrapping the callback in useCallback.
4270bf1 to
ff7ef5e
Compare
|
Size Change: +3.19 kB (+0.01%) Total Size: 25.2 MB
ℹ️ View Unchanged
|
ad7ec49 to
492297c
Compare
492297c to
c2b531d
Compare
Done |
jacob314
left a comment
There was a problem hiding this comment.
The changes look great. Preflight passes locally, tests are comprehensive, and the implementation aligns well with the stated goals. The use of useCallback with useKeypress is a good catch. LGTM!

Summary
Improved the UX for startup warnings by making them dismissible via any keypress and limiting the number of times low-priority "nag" warnings are shown to the user.
Details
WarningPriority(Low, High) andStartupWarninginterface in@google/gemini-cli-core.getCompatibilityWarningsandgetUserStartupWarningsto returnStartupWarningobjects.Lowpriority.Notificationscomponent to:persistentState.Related Issues
Related to internal UX feedback regarding excessive terminal compatibility warnings.
How to Validate
supportsTrueColor()).Pre-Merge Checklist