Skip to content

Upgrade to bubbletea v2, lipgloss v2, and bubbles v2 + fix CI Go version#9

Merged
topfunky merged 3 commits intomainfrom
copilot/upgrade-to-bubbletea-v2
Mar 18, 2026
Merged

Upgrade to bubbletea v2, lipgloss v2, and bubbles v2 + fix CI Go version#9
topfunky merged 3 commits intomainfrom
copilot/upgrade-to-bubbletea-v2

Conversation

Copy link
Contributor

Copilot AI commented Mar 15, 2026

Migrates from github.com/charmbracelet/* v1 to charm.land/*/v2 per the bubbletea v2 upgrade guide. Also bumps the CI Go version to 1.25, required transitively by charm.land/lipgloss/v2.

Dependency changes

  • github.com/charmbracelet/bubbleteacharm.land/bubbletea/v2 v2.0.2
  • github.com/charmbracelet/lipglosscharm.land/lipgloss/v2 v2.0.2
  • github.com/charmbracelet/bubblescharm.land/bubbles/v2 v2.0.0

bubbletea v2 API changes

  • View() now returns tea.View via tea.NewView(...) instead of string
  • Key events: tea.KeyMsgtea.KeyPressMsg; field-based matching replaced with msg.String() and msg.Text
// Before
case tea.KeyMsg:
    switch msg.Type {
    case tea.KeyEnter:
    case tea.KeyRunes:
        for _, r := range msg.Runes { ... }
    }

// After
case tea.KeyPressMsg:
    switch msg.String() {
    case "enter":
    default:
        for _, r := range msg.Text { ... }
    }

bubbles v2 API changes

  • progress.WithGradient(a, b)progress.WithColors(lipgloss.Color(a), lipgloss.Color(b))
  • Width setters changed from field assignment to methods: .Width = n.SetWidth(n) (progress, help)
  • progress.Update() no longer returns tea.Model — type assertion removed
  • Table now requires explicit table.WithWidth() (viewport defaults to 0 in v2)
  • Added s.Selected = s.Cell on unfocused tables — lipgloss v2 emits ANSI in test environments, previously causing alignment assertions to fail

lipgloss v2 API changes

  • lipgloss.Color is now a function (func(string) color.Color), not a type — Theme struct fields changed to color.Color; messageFg != ""messageFg != nil

CI

  • Updated go-version in go.yml: 1.241.25 (charm.land/lipgloss/v2 requires Go 1.25)
Original prompt

This section details on the original issue you should resolve

<issue_title>Upgrade to bubbletea v2</issue_title>
<issue_description>Upgrade as shown at https://github.com/charmbracelet/bubbletea/blob/main/UPGRADE_GUIDE_V2.md</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Co-authored-by: topfunky <26+topfunky@users.noreply.github.com>
Copilot AI changed the title [WIP] Upgrade to bubbletea v2 Upgrade to bubbletea v2, lipgloss v2, and bubbles v2 Mar 15, 2026
Copilot AI requested a review from topfunky March 15, 2026 00:49
Co-authored-by: topfunky <26+topfunky@users.noreply.github.com>
Copilot AI changed the title Upgrade to bubbletea v2, lipgloss v2, and bubbles v2 Upgrade to bubbletea v2, lipgloss v2, and bubbles v2 + fix CI Go version Mar 15, 2026
@topfunky topfunky marked this pull request as ready for review March 15, 2026 01:44
@topfunky topfunky merged commit c53013d into main Mar 18, 2026
1 check passed
@topfunky topfunky deleted the copilot/upgrade-to-bubbletea-v2 branch March 18, 2026 23:11
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.

Upgrade to bubbletea v2

2 participants