fix: optimize height calculations for ask_user dialog#19017
fix: optimize height calculations for ask_user dialog#19017jackwotherspoon wants to merge 10 commits intomainfrom
Conversation
|
Hi @jackwotherspoon, 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! |
Summary of ChangesHello @jackwotherspoon, 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 enhances the user interface experience by optimizing how dialogs calculate and utilize available terminal height. The changes ensure that interactive prompts, particularly 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 optimizations to the terminal height calculations for ask_user and exit_plan_mode dialogs, addressing an issue with "ghost space" and reclaiming vertical screen real estate. The changes in ToolConfirmationQueue.tsx correctly adjust the height subtraction based on whether the tool identity section is visible. In ToolConfirmationMessage.tsx, the height calculation is now bypassed for tools that handle their own UI layout, preventing redundant subtractions. The changes are logical, well-targeted, and align with the goal of improving the layout of interactive prompts. The code quality is good and I don't see any issues.
|
Size Change: +105 B (0%) Total Size: 24.4 MB ℹ️ View Unchanged
|

Summary
Fixes "ghost space" in the
ask_userandexit_plan_modedialogs by optimizing terminal height calculations. This change reclaims approximately 8 lines of vertical space that were previously being redundantly subtracted, allowing for more visible content in interactive prompts.Details
The investigation revealed that height was being over-subtracted in two layers:
ask_userhides the "Tool Identity" section, it now correctly only subtracts 4 lines, giving 2 lines back.ask_userhandles its own UI, these subtractions were redundant and have been removed for tools that manage their own layout.Related Issues
Related to #18907
How to Validate
ask_userdialog (e.g., a prompt that requires clarification).npm test -w @google/gemini-cli -- src/ui/components/ToolConfirmationQueue.test.tsxPre-Merge Checklist