fix(patch): cherry-pick 0659ad1 to release/v0.33.0-preview.0-pr-21042 to patch version v0.33.0-preview.0 and create version 0.33.0-preview.1#21047
Conversation
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 cherry-picks a critical fix from a previous commit to create a patch version 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
|
|
Size Change: -22 B (0%) Total Size: 25.9 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request introduces a critical regression in the UI's expansion behavior by changing a keypress handler's priority. This causes the expanded view to collapse on any keypress, which is incorrect. Compounding this issue, the tests that would have caught this regression have been deleted. My feedback includes two critical comments: one to revert the problematic code change in AppContainer.tsx and another to restore the deleted tests in AppContainer.test.tsx.
I am having trouble creating individual review comments. Click here to see my feedback.
packages/cli/src/ui/AppContainer.test.tsx (2547-2675)
This entire test suite for "Expansion Persistence" has been deleted. These tests were crucial for verifying that the UI's expanded view behaves correctly, specifically:
- It collapses when an unhandled key is pressed.
- It remains expanded when a key is handled by a higher-priority component (e.g., navigation arrows).
The change in AppContainer.tsx (increasing handleGlobalKeypress priority) breaks this functionality, and these tests would have failed, correctly identifying the regression. Deleting tests to make a build pass is a dangerous practice that hides bugs and prevents future regressions.
These tests should be restored, and the issue in AppContainer.tsx should be fixed so that they pass.
packages/cli/src/ui/AppContainer.tsx (1876)
Changing the keypress priority for handleGlobalKeypress from Low to High (since priority: true resolves to KeypressPriority.High) introduces a significant regression.
The logic within handleGlobalKeypress (lines 1713-1723) collapses the view (setConstrainHeight(true)) whenever it's expanded (!constrainHeight). With Low priority, this only happened for keypresses that were not handled by any other component (like the input prompt), which was the desired behavior for "collapse on any outside activity".
With High priority, this handler now runs before most others. As a result, any keypress (including typing characters into the input prompt) will cause the expanded view to collapse. This is a poor user experience and breaks the expansion persistence feature.
This change should be reverted to restore the correct behavior.
useKeypress(handleGlobalKeypress, {
isActive: true,
priority: KeypressPriority.Low,
});
References
- Maintain consistency with existing UI behavior across components. Defer non-standard UX pattern improvements to be addressed holistically rather than in a single component. This change introduces a regression in established UI behavior.

This PR automatically cherry-picks commit 0659ad1 to patch version v0.33.0-preview.0 in the preview release to create version 0.33.0-preview.1.