-
Notifications
You must be signed in to change notification settings - Fork 308
Closed
Labels
Description
Objective
Migrate pkg/console/ from charmbracelet/bubbles v1 to v2 (charm.land/bubbles/v2), fixing the 3 known breaking changes.
Context
charmbracelet/bubbles v2.0.0 was released 2026-02-24 and has a new import path. The project currently uses v1.0.0 across 3 files in pkg/console/. This is part of the Charm v2 ecosystem upgrade (alongside bubbletea and lipgloss v2).
Source: Discussion #21351 — Go Fan report on charmbracelet/bubbles.
Approach
- Update
go.mod/go.sumto usecharm.land/bubbles/v2(new module path) - Update all import paths in
pkg/console/fromgithub.com/charmbracelet/bubbles/...tocharm.land/bubbles/v2/... - Fix the 3 breaking changes (see below)
- Run
make fmt && make test-unitto validate
Breaking Changes to Fix
1. pkg/console/progress.go — WithScaledGradient renamed (≈line 53)
// v1 (current)
prog := progress.New(
progress.WithScaledGradient("#BD93F9", "#8BE9FD"),
progress.WithWidth(40),
)
// v2 fix — use image/color.Color values
import "image/color"
// ...
prog := progress.New(
progress.WithColors(color.RGBA{...}, color.RGBA{...}),
progress.WithScaled(true),
progress.WithWidth(40),
)2. pkg/console/progress.go — EmptyColor field type change (≈line 58)
// v1 (current) — string assignment
prog.EmptyColor = "#6272A4"
// v2 fix — requires image/color.Color
prog.EmptyColor = color.RGBA{98, 114, 164, 255} // #6272A4 as RGBA3. pkg/console/list.go — FilterPrompt/FilterCursor consolidated (≈lines 166–170)
// v1 (current)
l.Styles.FilterPrompt = lipgloss.NewStyle().Foreground(styles.ColorInfo)
l.Styles.FilterCursor = lipgloss.NewStyle().Foreground(styles.ColorSuccess)
// v2 fix — consult UPGRADE_GUIDE_V2.md; these are now part of Styles.Filter (a textinput.Styles)
// See: https://github.com/charmbracelet/bubbles/blob/main/UPGRADE_GUIDE_V2.mdFiles to Modify
go.mod— update import pathgo.sum— updated automatically viago mod tidypkg/console/progress.go— 2 breaking changespkg/console/list.go— 1 breaking changepkg/console/spinner.go— update import path (no API changes expected)
Notes
- Check if
bubbleteaandlipglossv2 are already on v2 ingo.mod; the Charm v2 ecosystem components should ideally be upgraded together - Consult the Bubbles v2 Upgrade Guide for exact migration steps for each component
- All components are TTY-gated; non-TTY fallbacks should remain unchanged
Acceptance Criteria
-
go.modusescharm.land/bubbles/v2 - All 3 breaking changes fixed
-
make fmt && make test-unitpass - Spinner, progress bar, and list still function correctly in TTY environments
Generated by Plan Command for issue #discussion #21351 · ◷
- expires on Mar 20, 2026, 2:47 AM UTC
Reactions are currently unavailable
Metadata
Metadata
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.