Skip to content

fix: fix rendering bubbletea v2 regressions for local install#354

Merged
zeroshade merged 3 commits intomainfrom
fix/install-from-local-garbled-terminal
Apr 15, 2026
Merged

fix: fix rendering bubbletea v2 regressions for local install#354
zeroshade merged 3 commits intomainfrom
fix/install-from-local-garbled-terminal

Conversation

@amoeba
Copy link
Copy Markdown
Member

@amoeba amoeba commented Apr 10, 2026

This fixes two regressions in bubbletea v2,

  1. tea.Println inside Update() breaks scrollback
  2. If a subcommand with a TUI (i.e., install) returns too quickly, bubbletea runs into a timing issue between switching between cooked and raw mode. I think bubbletea starts in cooked mode, switches to raw mode while showing the TUI (i.e., during prog.Run()), and switches back to cooked mode after. prog.Run() starts and stops so quickly when we run dbc install on local archive that some terminals haven't sent their terminal probe response before bubbletea switches back into cooked mode so the probe response shows up.

The fix for (2) was LLM written so a review there would be good.

This PR is split into separate commits so when you review this, you'll need to find a terminal that reproduces the issue (Ghostty, iTerm2, WezTerm I think too) and then work through the commits one by one to see the fixes. Issues (1) and (2) above are fixed by separate standalone commits.

Closes #351

@amoeba amoeba force-pushed the fix/install-from-local-garbled-terminal branch from 7f90a30 to e8e5bcf Compare April 10, 2026 23:49
@amoeba amoeba marked this pull request as ready for review April 10, 2026 23:57
@amoeba amoeba requested a review from zeroshade April 13, 2026 15:40
@amoeba
Copy link
Copy Markdown
Member Author

amoeba commented Apr 13, 2026

Hey @zeroshade, could you take a look at this, specifically if you can reproduce the original two issues and verify each of the fixes.

@amoeba amoeba added this to the 0.3.0 milestone Apr 13, 2026
Copy link
Copy Markdown
Member

@zeroshade zeroshade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to reproduce the issues and verified the fixes. Nice! Thanks!

@zeroshade zeroshade merged commit 0ffcdcf into main Apr 15, 2026
15 checks passed
@zeroshade zeroshade deleted the fix/install-from-local-garbled-terminal branch April 15, 2026 17:51
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.

dbc install from local package gives garbled output

2 participants