You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bubble Tea is Charm's Elm-inspired framework for building terminal UIs on The Elm Architecture (Model / Update / View). v2 brought the charm.land vanity import path, the ncurses-based Cursed Renderer, declarative terminal features via the tea.View struct, automatic color downsampling, and Kitty-protocol keyboard enhancements.
Selected today because it is the most-recently-active unreviewed direct dependency — repo pushed_at2026-07-03, with v2.0.8 cut the same day.
Current Usage in gh-aw
gh-aw uses Bubble Tea in a deliberately tiny, focused way: a single spinner status-line component.
Files: 1 non-test file (pkg/console/spinner.go) + its test.
Import count: 1 direct import (tea "charm.land/bubbletea/v2"), paired with charm.land/bubbles/v2/spinner.
Pattern: WithoutRenderer() + manual fmt.Fprintf inside Update() renders a single carriage-return-refreshed status line (instead of taking the whole screen). WithInput(nil) stops the spinner from swallowing keystrokes destined for a later huh form; Ctrl+C still works via SIGINT. Lifecycle is mutex + WaitGroup guarded with a recover() around Run().
v2.0.7 (current, 2026-06-01) — notably fix: skip input reader restore when input is disabled ([WIP] Merge add reactions step into activation job #1680) and fix: panic when input not available, plus a mouse/Kitty data-race fix. The first two directly harden the exact tea.WithInput(nil) code path this project depends on.
Best Practices
v2 favors declarative terminal features (fields on tea.View) over the old imperative tea.EnterAltScreen-style commands.
Update model state via message passing (program.Send), never by mutating the model from another goroutine — which is exactly what UpdateMessage does here.
Improvement Opportunities
🏃 Quick Wins
Patch bump v2.0.7 → v2.0.8 — go get charm.land/bubbletea/v2@v2.0.8 && go mod tidy. Emoji-only, low impact on a MiniDot spinner, but keeps the dep current.
✨ Feature Opportunities
None warranted. Program.Println/tea.Println (printing above the renderer) don't apply under WithoutRenderer(); the manual single-line fmt.Fprintf is the right call. The declarative tea.View feature set is intentionally unused for a non-fullscreen status indicator.
Optional: add a one-line comment near tea.WithInput(nil) noting that the input-disabled path is officially supported as of v2.0.7 ([WIP] Merge add reactions step into activation job #1680), so future readers don't read it as a workaround.
Recommendations
(Low) Bump to v2.0.8 on the next dependency-refresh pass.
🐹 Go Fan Report: charm.land/bubbletea/v2
Module Overview
Bubble Tea is Charm's Elm-inspired framework for building terminal UIs on The Elm Architecture (Model / Update / View). v2 brought the
charm.landvanity import path, the ncurses-based Cursed Renderer, declarative terminal features via thetea.Viewstruct, automatic color downsampling, and Kitty-protocol keyboard enhancements.Selected today because it is the most-recently-active unreviewed direct dependency — repo
pushed_at2026-07-03, with v2.0.8 cut the same day.Current Usage in gh-aw
gh-aw uses Bubble Tea in a deliberately tiny, focused way: a single spinner status-line component.
pkg/console/spinner.go) + its test.tea "charm.land/bubbletea/v2"), paired withcharm.land/bubbles/v2/spinner.tea.NewProgram(model, tea.WithOutput, tea.WithoutRenderer(), tea.WithInput(nil)); thetea.Modelinterface (Init/Update/View() tea.View);program.Run(),program.Quit(),program.Send().WithoutRenderer()+ manualfmt.FprintfinsideUpdate()renders a single carriage-return-refreshed status line (instead of taking the whole screen).WithInput(nil)stops the spinner from swallowing keystrokes destined for a laterhuhform; Ctrl+C still works via SIGINT. Lifecycle is mutex + WaitGroup guarded with arecover()aroundRun().Research Findings
Recent Updates
ultravioletfor emoji-rendering edge cases (rendering only).tea.WithInput(nil)code path this project depends on.Best Practices
tea.View) over the old imperativetea.EnterAltScreen-style commands.program.Send), never by mutating the model from another goroutine — which is exactly whatUpdateMessagedoes here.Improvement Opportunities
🏃 Quick Wins
go get charm.land/bubbletea/v2@v2.0.8 && go mod tidy. Emoji-only, low impact on a MiniDot spinner, but keeps the dep current.✨ Feature Opportunities
Program.Println/tea.Println(printing above the renderer) don't apply underWithoutRenderer(); the manual single-linefmt.Fprintfis the right call. The declarativetea.Viewfeature set is intentionally unused for a non-fullscreen status indicator.📐 Best Practice Alignment
View() tea.Viewsignature, message-passing updates. ✅WithoutRenderer()+ manual print inUpdate()is a documented, legitimate pattern for a status line that must coexist with a laterhuhform.🔧 General Improvements
recover()aroundprogram.Run()is now partly redundant given v2.0.7's [WIP] Merge add reactions step into activation job #1680 fix, but keeping it as defensive depth is reasonable.tea.WithInput(nil)noting that the input-disabled path is officially supported as of v2.0.7 ([WIP] Merge add reactions step into activation job #1680), so future readers don't read it as a workaround.Recommendations
WithInput(nil)comment.Next Steps
Generated by Go Fan
Module summary saved to: scratchpad/mods/bubbletea.md