fix(patch): cherry-pick 3e50be1 to release/v0.18.0-preview.2-pr-13428 to patch version v0.18.0-preview.2 and create version 0.18.0-preview.3#13821
Conversation
… banner has been displayed (#13428)
Summary of ChangesHello @gemini-cli-robot, 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 automates a patch by cherry-picking a commit that significantly refactors the application's header banner display mechanism. The core change involves moving the banner's state management and visibility logic into a new custom React hook. This improves code organization and enables more granular control over banner presentation by tracking individual banner message display counts, ensuring that specific messages adhere to their own visibility limits. 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
|
|
Size Change: +956 B (0%) Total Size: 21.1 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This PR refactors the banner display logic into a new useBanner hook, which is a great improvement for modularity. The new logic tracks banner display counts per banner text using a hash, which is more robust. I've found a couple of critical issues in the new useBanner hook related to state management that could cause incorrect behavior, and I've left detailed comments with suggestions. Additionally, it seems an existing test case in AppHeader.test.tsx for when the banner count reaches its limit may now be broken by these changes but was not updated in this PR. It should be updated to reflect the new data structure for defaultBannerShownCount.
ea3d022
into
release/v0.18.0-preview.2-pr-13428
This PR automatically cherry-picks commit 3e50be1 to patch version v0.18.0-preview.2 in the preview release to create version 0.18.0-preview.3.