kitlangton / kitlangton/tailcode
Terminal flooded with raw mouse tracking escape sequences upon quitting wizard (Ghostty)
- Dominant language
- TypeScript
- Stars
- 307
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
Description:
When attempting to quit the TAILCODE wizard, the application exits but fails to clean up the terminal state. Specifically, it appears to leave mouse reporting enabled, resulting in the terminal being flooded with raw escape sequences as the mouse is moved.
Installation:
```
# Linux (x64)
curl -L -o tailcode https://github.com/kitlangton/tailcode/releases/latest/download/tailcode-linux-x64
chmod +x tailcode
./tailcode
```
Environment:
* OS: Arch Linux
* Terminal: Ghostty
Steps to Reproduce:
Launch TAILCODE.
At the initial "Guided setup for OpenCode over Tailscale" screen, press q to quit.
Move the mouse around the terminal window.
Expected Behavior:
The application should exit cleanly and restore the terminal to its normal state, which includes sending the proper ANSI escape codes to disable mouse reporting (e.g., CSI ? 1000 l or 1003 l).
Actual Behavior:
The terminal prompt returns, but moving the mouse dumps a continuous stream of raw tracking characters (e.g., 35;69M22;71M33;71M...) directly into standard output, leaving the terminal in a dirty state.
Additional Context:
I have attached a screen recording demonstrating the issue. It looks like the TUI library being used is either crashing on exit or missing the teardown hook to reset the terminal's raw mode and mouse tracking before returning control to the shell.
https://github.com/user-attachments/assets/db7311d0-0f17-40e0-b45a-7a1bdd1cb0a4
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue by launching TAILCODE, quitting from the initial guided-setup screen with q, and moving the mouse after the prompt returns. Trace the TypeScript wizard's exit and terminal teardown path; done means the shell returns without mouse-tracking escape sequences being printed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100