Skip to content

chore: migrate to Charm v2 libraries#141

Merged
sethrylan merged 7 commits intomainfrom
charm-v2
Feb 26, 2026
Merged

chore: migrate to Charm v2 libraries#141
sethrylan merged 7 commits intomainfrom
charm-v2

Conversation

@sethrylan
Copy link
Owner

Upgrade all Charm dependencies from github.com/charmbracelet/* to charm.land/*/v2 vanity import paths:

  • bubbletea v2: View() returns tea.View with declarative AltScreen, KeyMsg replaced by KeyPressMsg with new field names
  • lipgloss v2: Color is now a function returning color.Color
  • bubbles v2: textinput styles via getter/setter, viewport New() with SetWidth/SetHeight, Width field becomes Width() getter
  • glamour v2: import path change only (pseudo-version from v2-exp)

Replace termenv.HasDarkBackground() with tea.RequestBackgroundColor and tea.BackgroundColorMsg for non-blocking background detection.

BREAKING CHANGE: requires Charm v2 ecosystem (charm.land module paths)

Upgrade all Charm dependencies from github.com/charmbracelet/* to
charm.land/*/v2 vanity import paths:

- bubbletea v2: View() returns tea.View with declarative AltScreen,
  KeyMsg replaced by KeyPressMsg with new field names
- lipgloss v2: Color is now a function returning color.Color
- bubbles v2: textinput styles via getter/setter, viewport New()
  with SetWidth/SetHeight, Width field becomes Width() getter
- glamour v2: import path change only (pseudo-version from v2-exp)

Replace termenv.HasDarkBackground() with tea.RequestBackgroundColor
and tea.BackgroundColorMsg for non-blocking background detection.

BREAKING CHANGE: requires Charm v2 ecosystem (charm.land module paths)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sethrylan sethrylan self-assigned this Feb 26, 2026
github-actions bot and others added 6 commits February 26, 2026 20:01
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
In lipgloss v2, Style.Width() now includes border size in the total
width (borders are drawn inside the specified width). Add
GetHorizontalBorderSize() to header width calculations so the header
boxes match the viewport box alignment.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
In lipgloss v2, BorderStyle() only sets the visual style of the border
but does not enable border rendering. Border() both sets the style and
enables all sides. This caused the viewport box to render without
borders, breaking alignment with the header boxes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor

🎬 Demo

demo

Generated by workflow run.

Run gh workflow run demo.yml -R sethrylan/readis -f pr_number=141 to regenerate.

@sethrylan sethrylan marked this pull request as ready for review February 26, 2026 22:58
@sethrylan sethrylan merged commit c59296b into main Feb 26, 2026
8 checks passed
@sethrylan sethrylan deleted the charm-v2 branch February 26, 2026 22:59
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.

1 participant