fix(tui): prevent mouse movement events from corrupting input on Windows#500
Merged
dwash96 merged 7 commits intocecli-dev:v0.99.9from Apr 30, 2026
Merged
Conversation
added 7 commits
April 27, 2026 21:16
Co-authored-by: cecli (openai/gemini_cli_local/gemini-2.5-pro)
Co-authored-by: cecli (openai/gemini_cli_local/gemini-2.5-pro)
Co-authored-by: cecli (openai/gemini_cli_local/gemini-2.5-pro)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses an issue where using the TUI on Windows would cause strange characters to appear in the input prompt after several interactions. The problem was caused by mouse movement tracking signals from the terminal that were not being properly handled, resulting in ANSI escape codes being printed as text.
The fix adds an
on_mouse_moveevent handler to the TUI application that specifically stops mouse movement events on Windows. This prevents the problematic signals from reaching the input processing while preserving all other mouse functionality including scrolling and clicking.Changes:
on_mouse_movemethod incecli/tui/app.pythat callsevent.stop()on Windowstests/tui/test_app.pyto verify:Testing:
The new tests ensure the fix works correctly on Windows without affecting the behavior on other operating systems. The tests use pytest and mock the platform system to verify the conditional logic.
Impact: