fix(patch): cherry-pick ab6b229 to release/v0.15.1-pr-13101 to patch version v0.15.1 and create version 0.15.2#13111
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 automates the creation of a patch release, version "0.15.2", by cherry-picking a specific commit. The primary functional change involves enhancing the system's ability to differentiate between various mouse button presses during events, particularly for drag interactions, by introducing a "button" property to mouse events and updating the parsing and handling logic accordingly. This ensures more precise and intended mouse behavior within the application. 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. 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 cherry-picks a fix to correctly handle mouse drag events, ensuring that only left-button drags trigger certain UI behaviors. This is implemented by adding a button property to the MouseEvent type and populating it during mouse event parsing for both SGR and X11 protocols. The changes are logical and well-tested. I have one suggestion to improve the maintainability of the X11 parsing logic, but otherwise, the changes look solid.
| if (name === 'left-release' && button === 'none') { | ||
| button = 'left'; | ||
| } |
There was a problem hiding this comment.
The condition name === 'left-release' && button === 'none' is brittle as it relies on coupling between the name variable (set earlier in the function) and the result of getButtonFromCode. A more direct and robust approach is to check the button code from b directly. This avoids the indirect dependency on name and makes the logic for handling the ambiguous X11 release event clearer and more maintainable.
| if (name === 'left-release' && button === 'none') { | |
| button = 'left'; | |
| } | |
| if ((b & 3) === 3) { | |
| button = 'left'; | |
| } |
|
Size Change: +495 B (0%) Total Size: 20.5 MB ℹ️ View Unchanged
|

This PR automatically cherry-picks commit ab6b229 to patch version v0.15.1 in the stable release to create version 0.15.2.