fix(cli): make footer items equally spaced#21843
Conversation
|
Hi @jacob314, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this. We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines. Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed. Thank you for your understanding and for being a part of our community! |
|
Size Change: +333 B (0%) Total Size: 26.1 MB ℹ️ View Unchanged
|
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 focuses on refining the user interface of the CLI's footer component. The primary goal was to resolve an issue where footer items lacked consistent spacing. By introducing more granular control over flexbox properties and adjusting the rendering logic, the changes ensure that all footer elements are now evenly distributed and aligned, leading to a cleaner and more professional presentation. 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
|
e7d45c9 to
99c49f1
Compare
There was a problem hiding this comment.
Code Review
This pull request refactors the footer layout to ensure items are equally spaced by using flexible separators instead of a fixed columnGap. The implementation is sound and correctly achieves the desired visual effect, as verified by the updated snapshots. The change also includes a new test for the footer's appearance when labels are hidden. I have one suggestion on the new test to improve its long-term maintainability.
| // Move to "Show footer labels" (which is the second to last item) | ||
| for (let i = 0; i < ALL_ITEMS.length; i++) { | ||
| act(() => { | ||
| stdin.write('\u001b[B'); // Down arrow | ||
| }); |
There was a problem hiding this comment.
The use of the magic number 10 to navigate to the 'Show footer labels' item makes this test fragile. If the number of configurable footer items changes in the future, this test will break. To make the test more robust, please avoid hardcoding the number of navigation steps. You could, for example, determine the required number of steps dynamically based on the length of the items list.
References
- Magic numbers, especially those used for layout or padding, should be replaced with named constants to improve readability and maintainability. This makes the intent clearer and simplifies future updates.
Summary
See SVG snapshot to verify that the spacing is nicely distributed in both modes.
Fixes #21842