fix(cli-ui): revert backspace handling to fix Windows regression#25941
fix(cli-ui): revert backspace handling to fix Windows regression#25941
Conversation
This reverts commit 80764c8. The original PR (#21447) assumed that a plain backspace on Windows always sends \x7f and that \b is only sent for Ctrl+Backspace. This assumption breaks terminals like VS Code and Git Bash which often send \b for a plain backspace, resulting in the whole word being deleted instead of a single character. Fixes #25856
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 addresses a regression in backspace handling within the CLI UI. The previous implementation incorrectly assumed that '\b' was exclusively used for Ctrl+Backspace on Windows, which caused issues in common terminal emulators that use '\b' for standard backspace. By reverting this logic and treating both '\b' and '\x7f' as standard backspace inputs, the fix restores expected behavior across various platforms and terminal environments. 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
|
|
Size Change: -214 B (0%) Total Size: 33.7 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request simplifies backspace handling in the CLI by treating both \b and \x7f as standard backspace characters, eliminating environment-specific logic for Windows and Windows Terminal. Related test files were updated to reflect these changes, including the removal of now-obsolete test cases and the adjustment of backspace character constants. I have no feedback to provide.
|
/patch preview |
|
🚀 [Step 1/4] Patch workflow(s) waiting for approval! 📋 Details:
⏳ Status: The patch creation workflow has been triggered and is waiting for deployment approval. Please visit the specific workflow links below and approve the runs. 🔗 Track Progress: |
|
🚀 [Step 2/4] Patch PR Created! 📋 Patch Details:
📝 Next Steps:
🔗 Track Progress: |
|
🚀 [Step 3/4] Patch Release Waiting for Approval! 📋 Release Details:
⏳ Status: The patch release has been triggered and is waiting for deployment approval. Please visit the specific workflow run link below and approve the deployment. You'll receive another update when it completes. 🔗 Track Progress: |
|
✅ [Step 4/4] Patch Release Complete! 📦 Release Details:
🎉 Status: Your patch has been successfully released and published to npm! 📝 What's Available:
🔗 Links: |
Summary
This reverts commit 80764c8.
Details
The original PR (#21447) assumed that a plain backspace on Windows always sends \x7f and that \b is only sent for Ctrl+Backspace. This does not seem to be true for some windows users using node 22.
Related Issues
Fixes #25856