fix(cli): refine platform-specific undo/redo and smart bubbling for WSL#26202
fix(cli): refine platform-specific undo/redo and smart bubbling for WSL#26202cocosheng-g merged 9 commits intomainfrom
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 optimizes the CLI's keyboard shortcut handling to improve the user experience on WSL/Linux environments while maintaining standard behavior for native Windows and macOS users. By implementing smarter input consumption and platform-aware key mapping, it resolves conflicts with OS-level shortcuts and ensures consistent, expected behavior for text manipulation commands. Highlights
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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces platform-specific keyboard shortcuts for undo and redo operations across Windows, macOS, and Linux/WSL. It updates the documentation, refines the useTextBuffer hook to prevent handling undo/redo when the respective stacks are empty, and adds comprehensive unit tests to verify the new behavior and key bindings. I have no feedback to provide.
|
Size Change: +638 B (0%) Total Size: 33.9 MB
ℹ️ View Unchanged
|
|
from Thanks for the PR! The overall approach for smart bubbling is a great idea to solve the WSL collision, and the tests properly wrap synchronous React state updates in However, there is a critical bug where the implementation contradicts the PR description:
Recommended Fix: |
devr0306
left a comment
There was a problem hiding this comment.
Approving but just want to make sure this has been manually tested on Windows
Summary
This PR refines the platform-specific Undo/Redo shortcuts to specifically address WSL users on Windows 11 while ensuring no regressions for other platforms.
Details
Related Issues
Fixes #23648
How to Validate
npm test -w @google/gemini-cli -- src/ui/key/keyBindings.test.tsnpm test -w @google/gemini-cli -- src/ui/components/shared/text-buffer.test.ts