Skip to content

charm stack v1→v2 migration: glamour + lipgloss + bubbletea + bubbles #403

Description

@schmitthub

Sub-issue of #402 (dependency currency sweep).

Current vs available (verified via module proxy)

module ours (v1 gen) current v2
glamour github.com/charmbracelet/glamour v1.0.0 charm.land/glamour/v2 v2.0.1
lipgloss github.com/charmbracelet/lipgloss v1.1.1-0.2025... (untagged pseudo-version) charm.land/lipgloss/v2 v2.0.4
bubbletea github.com/charmbracelet/bubbletea v1.3.10 bubbletea v2
bubbles github.com/charmbracelet/bubbles v1.0.0 bubbles v2

All four are coherently on the v1 generation today (which is the correct current state — mixing generations is the smell). The pseudo-version lipgloss pin is pulled in by glamour@v1.0.0 requiring an untagged lipgloss commit.

Motivation

  • Changelog-notification wrap regression observed under glamour v1.0.0 (WithWordWrap(0)); glamour v2's headline is improved text wrapping (CJK/emoji) — may fix it natively.
  • Modern lipgloss v2 color model; drops the untagged pseudo-version for clean tags.
  • Removes muesli/termenv direct usage (v2 uses lipgloss for color downsampling).

Why it must be coordinated (not piecemeal)

lipgloss v2 is built for bubbletea v2 / bubbles v2; glamour v2 requires lipgloss v2. Bumping glamour alone forces lipgloss v2 → version skew with bubbletea/bubbles v1. Migrate the four together or not at all.

Blast radius

  • Import-path rewrites to charm.land/.../v2 (+ /ansi, /styles).
  • iostreams color handling: WithColorProfile removed → downsample via lipgloss.Print; delete markdownColorProfile(); WithStyles(ansi.StyleConfig) survives (new path).
  • lipgloss direct consumers: internal/iostreams/{styles,layout,table,colorscheme}.go (one package, contained by the "only iostreams imports lipgloss" rule).
  • TUI layer: internal/tui (bubbletea v1 components) — monitor up, image build display, all live-interactive views.
  • Golden regen: markdown_test, changelog_preview_test, any TUI goldens.

API breaks to handle

  • glamour: WithAutoStyle + WithColorProfile removed; new module path.
  • lipgloss v2: color types, renderer removal, adaptive-color API changes.

Effort

A whole-TUI-layer initiative, not a chore.

Interim

The glamour-v1 wrap regression is fixed separately on v1 — do not block that on this migration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions