Skip to content

Revert "fix(ui): persist expansion in AskUser dialog when navigating options"#21042

Merged
jacob314 merged 1 commit intomainfrom
revert-20559-fix/persist-expansion-ask-user
Mar 4, 2026
Merged

Revert "fix(ui): persist expansion in AskUser dialog when navigating options"#21042
jacob314 merged 1 commit intomainfrom
revert-20559-fix/persist-expansion-ask-user

Conversation

@jacob314
Copy link
Copy Markdown
Contributor

@jacob314 jacob314 commented Mar 4, 2026

Reverts #20559

This causes too much flicker as it impacts all tools. Until we land the updated regular buffer renderer we need to hold off on landing this.

@jacob314 jacob314 requested a review from a team as a code owner March 4, 2026 01:28
@gemini-cli
Copy link
Copy Markdown
Contributor

gemini-cli bot commented Mar 4, 2026

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!

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 addresses a UI flickering issue by reverting a prior change that introduced expansion persistence. The original implementation, intended to maintain UI state, inadvertently caused visual instability across various tools. By rolling back these modifications, the system's behavior for UI expansion and global keypress handling is restored to a stable state, providing a temporary solution until a more robust rendering mechanism can be integrated.

Highlights

  • Revert UI Expansion Persistence: Reverted a previous change (fix(ui): persist expansion in AskUser dialog when navigating options #20559) that aimed to persist UI expansion in the AskUser dialog, as it caused excessive flickering across tools.
  • Test Removal: Removed the dedicated test suite for 'Expansion Persistence' from AppContainer.test.tsx, which covered scenarios like keypress handling and Ctrl+O toggling.
  • Keypress Priority Adjustment: Restored the priority of the global keypress handler in AppContainer.tsx to its original setting by changing priority: KeypressPriority.Low back to priority: true.
Changelog
  • packages/cli/src/ui/AppContainer.test.tsx
    • Removed the entire 'Expansion Persistence' test suite, including tests for keypress-based expansion reset, Ctrl+O toggling, and high-priority component handling.
  • packages/cli/src/ui/AppContainer.tsx
    • Reverted the useKeypress hook's priority for the handleGlobalKeypress function from KeypressPriority.Low to true.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

Size Change: -22 B (0%)

Total Size: 25.9 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 25.5 MB -22 B (0%)
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 221 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 227 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 11.5 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B 0 B
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B

compressed-size-action

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request reverts a recent feature that caused UI flickering. While the removal of the related tests is correct, the revert of the implementation in AppContainer.tsx appears to be incomplete. The change to the useKeypress priority, without reverting the corresponding logic in the handleGlobalKeypress handler, will likely introduce a critical regression. I've added a comment detailing the issue.

Note: Security Review is unavailable for this PR.

isActive: true,
priority: KeypressPriority.Low,
});
useKeypress(handleGlobalKeypress, { isActive: true, priority: true });
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This revert appears to be incomplete and will likely cause a significant regression.

By changing the priority to true without also reverting the logic inside handleGlobalKeypress, the expanded view will now collapse on every keypress, not just unhandled ones.

The problematic logic is the if (!constrainHeight) block within handleGlobalKeypress (around line 1713), which unconditionally collapses the view. With high priority, this will run before other key handlers, making it impossible to interact with the UI in an expanded state.

To complete the revert, the logic that was introduced to auto-collapse the view should also be removed from handleGlobalKeypress.

References
  1. Maintain consistency with existing UI behavior across components. Defer non-standard UX pattern improvements to be addressed holistically rather than in a single component.

@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Mar 4, 2026
@jacob314
Copy link
Copy Markdown
Contributor Author

jacob314 commented Mar 4, 2026

Fyi @jerop this adds too much flicker to all tool calls. We should revisit after I land some ink changes.

@jacob314 jacob314 enabled auto-merge March 4, 2026 01:40
@jacob314 jacob314 added this pull request to the merge queue Mar 4, 2026
Merged via the queue into main with commit 0659ad1 Mar 4, 2026
30 checks passed
@jacob314 jacob314 deleted the revert-20559-fix/persist-expansion-ask-user branch March 4, 2026 01:53
@jacob314
Copy link
Copy Markdown
Contributor Author

jacob314 commented Mar 4, 2026

/patch preview

@jacob314
Copy link
Copy Markdown
Contributor Author

jacob314 commented Mar 4, 2026

/patch stable

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

Patch workflow(s) dispatched successfully!

📋 Details:

  • Channels: preview
  • Commit: 0659ad1702f0efbba4c24da448f72c8ffece7868
  • Workflows Created: 1

🔗 Track Progress:

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

Patch workflow(s) dispatched successfully!

📋 Details:

  • Channels: stable
  • Commit: 0659ad1702f0efbba4c24da448f72c8ffece7868
  • Workflows Created: 1

🔗 Track Progress:

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

🚀 Patch PR Created!

📋 Patch Details:

📝 Next Steps:

  1. Review and approve the hotfix PR: #21047
  2. Once merged, the patch release will automatically trigger
  3. You'll receive updates here when the release completes

🔗 Track Progress:

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

🚀 Patch PR Created!

📋 Patch Details:

📝 Next Steps:

  1. Review and approve the hotfix PR: #21048
  2. Once merged, the patch release will automatically trigger
  3. You'll receive updates here when the release completes

🔗 Track Progress:

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

🚀 Patch Release Started!

📋 Release Details:

  • Environment: prod
  • Channel: stable → publishing to npm tag latest
  • Version: v0.32.0
  • Hotfix PR: Merged ✅
  • Release Branch: release/v0.32.0-pr-21042

⏳ Status: The patch release is now running. You'll receive another update when it completes.

🔗 Track Progress:

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

🚀 Patch Release Started!

📋 Release Details:

  • Environment: prod
  • Channel: preview → publishing to npm tag preview
  • Version: v0.33.0-preview.0
  • Hotfix PR: Merged ✅
  • Release Branch: release/v0.33.0-preview.0-pr-21042

⏳ Status: The patch release is now running. You'll receive another update when it completes.

🔗 Track Progress:

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

Patch Release Complete!

📦 Release Details:

  • Version: 0.32.1
  • NPM Tag: latest
  • Channel: stable
  • Dry Run: false

🎉 Status: Your patch has been successfully released and published to npm!

📝 What's Available:

🔗 Links:

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

Patch Release Complete!

📦 Release Details:

🎉 Status: Your patch has been successfully released and published to npm!

📝 What's Available:

🔗 Links:

BryanBradfo pushed a commit to BryanBradfo/gemini-cli that referenced this pull request Mar 5, 2026
struckoff pushed a commit to struckoff/gemini-cli that referenced this pull request Mar 6, 2026
liamhelmer pushed a commit to badal-io/gemini-cli that referenced this pull request Mar 12, 2026
yashodipmore pushed a commit to yashodipmore/geemi-cli that referenced this pull request Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/need-issue Pull requests that need to have an associated issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants