fix(#539): expose Fd/Write/Close on csiuReader for raw mode#549
Closed
oryaacov wants to merge 1 commit intoasheshgoplani:mainfrom
Closed
fix(#539): expose Fd/Write/Close on csiuReader for raw mode#549oryaacov wants to merge 1 commit intoasheshgoplani:mainfrom
oryaacov wants to merge 1 commit intoasheshgoplani:mainfrom
Conversation
… Tea enables raw mode The csiuReader wrapper introduced in 2afee24 only implemented io.Reader, which caused Bubble Tea to skip terminal detection and raw mode setup (it needs the term.File interface: Fd(), Write(), Close()). Without raw mode the terminal echoes keystrokes instead of routing them to the TUI. Delegate Fd(), Write(), and Close() to the underlying *os.File when present. Fixes asheshgoplani#539, asheshgoplani#544 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9 tasks
Owner
|
Thanks for this — exposing If we decide to re-introduce CSI u translation later, this approach is a good starting point — worth pairing with the SGR mouse terminator whitelist fix from #541 and explicit Closing for now. 🙏 |
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.
Summary
csiuReader(introduced in 2afee24 / Shift+letter keys silently dropped — CSI u reader not wired into input pipeline #535) only implementsio.Reader. Bubble Tea checks for theterm.Fileinterface (Fd() uintptr,Write(),Close()) to detect a terminal and enable raw mode viatcsetattr. Without raw mode, the terminal stays in cooked mode and echoes keystrokes as text instead of routing them to the TUI.Fd(),Write(), andClose()to the underlying*os.Filewhen present. This preserves the CSI u translation while allowing Bubble Tea to set raw mode normally.DisableKittyKeyboard.Fixes #539, #544
Test plan
TestCSIuReader*andTestParseCSIu*tests pass (23 tests)agent-deckin a terminal — arrow keys, j/k, mouse scroll all workresetneeded)🤖 Generated with Claude Code