fix(patch): cherry-pick ec5836c to release/v0.28.0-preview.4-pr-18343 to patch version v0.28.0-preview.4 and create version 0.28.0-preview.5#18472
Conversation
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 focuses on enhancing the user experience by refining keyboard shortcut behaviors and improving the clarity of their descriptions within the CLI. The changes centralize focus management for shell interactions, making the Highlights
Changelog
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 significant and well-executed refactoring of keyboard handling, particularly for focus management between the main input and shell components. The changes centralize logic, improve code clarity, and enhance user-facing documentation and hints. I've identified a keybinding conflict with Ctrl + L that makes one feature inaccessible, and a potential UX issue where Tab can unexpectedly unfocus an idle shell. Addressing these points will further solidify the improvements made in this PR.
| | Toggle background shell list. | `Ctrl + L` | | ||
| | Kill the active background shell. | `Ctrl + K` | | ||
| | Confirm selection in background shell list. | `Enter` | | ||
| | Dismiss background shell list. | `Esc` | | ||
| | Move focus from background shell to Gemini. | `Shift + Tab` | | ||
| | Move focus from background shell list to Gemini. | `Tab (no Shift)` | | ||
| | Show warning when trying to unfocus background shell via Tab. | `Tab (no Shift)` | | ||
| | Show warning when trying to unfocus shell input via Tab. | `Tab (no Shift)` | | ||
| | Move focus from Gemini to the active shell. | `Tab (no Shift)` | | ||
| | Move focus from the shell back to Gemini. | `Shift + Tab` | | ||
| | Clear the terminal screen and redraw the UI. | `Ctrl + L` | |
There was a problem hiding this comment.
| tabFocusTimeoutRef.current = setTimeout(() => { | ||
| if (lastOutputTimeRef.current === capturedTime) { | ||
| setEmbeddedShellFocused(false); | ||
| } else { | ||
| handleWarning('Use Shift+Tab to unfocus'); | ||
| } | ||
| }, 150); |
There was a problem hiding this comment.
The current logic allows Tab to unfocus an idle shell, which can be surprising for users who expect Tab to always be passed to the shell for indentation or navigation. The documented way to unfocus is Shift+Tab. To make the behavior more predictable, Tab should not unfocus the shell. A warning can still be shown when the shell is active (e.g., for autocomplete) to guide the user.
tabFocusTimeoutRef.current = setTimeout(() => {
if (lastOutputTimeRef.current !== capturedTime) {
handleWarning('Use Shift+Tab to unfocus');
}
}, 150);
|
Size Change: -5.17 kB (-0.02%) Total Size: 23.7 MB
ℹ️ View Unchanged
|
This PR automatically cherry-picks commit ec5836c to patch version v0.28.0-preview.4 in the preview release to create version 0.28.0-preview.5.