charmbracelet / charmbracelet/bubbletea
v2: Scrollback lost on tea.Quit
- Dominant language
- Go
- Stars
- 44.9k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
I have a couple of Cobra CLI's that I've upgraded to v2 of all available Charmbracelet packages. On my Debian Bookworm VM over SSH via Termius, the TUI's exit just fine and I can still scroll my history with up/down arrows. On MacOS using WezTerm, exiting both TUI's breaks the terminal on exit, forcing me to run `reset` to regain that functionality.
NOTE: I tested with kitty and this issue is not present, so the issue appears to be specific to WezTerm.
**Setup**
Working:
- OS: Debian 12 (Bookworm)
- Shell: Bash
- Terminal Emulator: Termius (SSH)
- Terminal Multiplexer: N/A
Not Working:
- OS: macOS
- Shell: zsh
- Terminal Emulator: WezTerm
- Terminal Multiplexer: N/A
**To Reproduce**
Steps to reproduce the behavior:
1. Open WezTerm and launch a TUI app running v2.
2. Press the quit / exit keybinding.
3. Scroll up or down - you should see random characters printing instead of previous commands.
**Expected behavior**
Scrollback maintained.
Contributor guide
Research direction
Start by reproducing the issue in a v2 TUI running under WezTerm, then compare its behavior with kitty and the working Termius setup. Trace the tea.Quit exit path and terminal cleanup behavior. Done means exiting under WezTerm preserves scrollback and scrolling no longer prints random characters or requires reset.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100