Repository navigation
Migrate the TUI stack to charmbracelet v2 - #48
Merged
Merged
Conversation
The charmbracelet v2 line landed under new module paths (charm.land/ <v2>), and the dependency bot's six v2 PRs sat unmergeable because the API changes need a real migration. This is that migration, in one place, verified end to end. The mechanical surface: View() now returns tea.View — alt-screen and mouse mode moved from program options onto the view itself; viewport dimensions went behind SetWidth/SetHeight accessors; KeyMsg became an interface with KeyPressMsg as the concrete press type; lipgloss.Color turned from a type into a constructor returning color.Color. The subtle one: lipgloss v2 removed the global renderer, so Style rendering now always emits full-fidelity ANSI — downsampling moved to the output layer. Every styled print in cmd/ therefore goes through the profile-aware lipgloss writers (per-call TTY detection, so output capture still works), which keeps non-TTY output exactly as plain as v1 made it. Verified both ways: a real terminal keeps its colors, a pipe stays clean. All three full-screen TUIs verified live in a PTY on the v2 stack (monitor replay with frame and streaming, skills picker, report browser), the huh v2 init wizard renders, and the race suite is green. 💘 Generated with Crush Assisted-by: Crush:rits/zai-org/glm-5-3
This was referenced Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The charmbracelet v2 line landed under new module paths (
charm.land/<lib>/v2), and the six dependency-bot v2 PRs (#29/#30/#31/#33/#34/#40) sat unmergeable because the API changes need a real migration. This is that migration, done in one place — merging this lets us close those bot PRs as superseded.View()returnstea.View; alt-screen and mouse mode moved from program options onto the view itself;KeyMsgbecame an interface withKeyPressMsgas the concrete press type.SetWidth/SetHeight/Width()/Height()accessors.Stylerendering always emits full-fidelity ANSI, and downsampling moved to the output layer. Every styled print incmd/goes through the profile-aware lipgloss writers (per-call TTY detection, so output capture in tests still works). Non-TTY output stays exactly as plain as v1 made it.Verification
runs | cat -vclean).init --yesidempotent smoke green.💘 Generated with Crush