Skip to content

fix(#539): expose Fd/Write/Close on csiuReader for raw mode#549

Closed
oryaacov wants to merge 1 commit intoasheshgoplani:mainfrom
oryaacov:fix/csiu-reader-raw-mode
Closed

fix(#539): expose Fd/Write/Close on csiuReader for raw mode#549
oryaacov wants to merge 1 commit intoasheshgoplani:mainfrom
oryaacov:fix/csiu-reader-raw-mode

Conversation

@oryaacov
Copy link
Copy Markdown
Contributor

@oryaacov oryaacov commented Apr 8, 2026

Summary

Fixes #539, #544

Test plan

  • Existing TestCSIuReader* and TestParseCSIu* tests pass (23 tests)
  • Launch agent-deck in a terminal — arrow keys, j/k, mouse scroll all work
  • Launch in Ghostty/Foot (Kitty protocol terminals) — Shift+letter hotkeys work
  • Quit the TUI — terminal returns to normal (no reset needed)

🤖 Generated with Claude Code

… 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>
@asheshgoplani
Copy link
Copy Markdown
Owner

Thanks for this — exposing Fd/Write/Close on csiuReader is the architecturally cleaner approach if we want to keep the reader. For the hotfix we went with PR #541's revert route because users across iTerm2/Ghostty/WezTerm were blocked and the revert was the lowest-risk path.

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 term.MakeRaw fallback. Feel free to reopen against main if you want to land this as a proper fix for a future release.

Closing for now. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v1.4.1: Arrow keys and keyboard input broken — CSIuReader strips raw terminal mode

2 participants