Skip to content

refactor(deps): migrate Charm TUI ecosystem from v1 to v2#788

Merged
cpcloud merged 3 commits intomainfrom
worktree-mutable-petting-hickey
Mar 17, 2026
Merged

refactor(deps): migrate Charm TUI ecosystem from v1 to v2#788
cpcloud merged 3 commits intomainfrom
worktree-mutable-petting-hickey

Conversation

@cpcloud
Copy link
Owner

@cpcloud cpcloud commented Mar 17, 2026

Summary

  • Upgrade bubbletea, bubbles, lipgloss, huh, glamour, and bubblezone to v2 releases under charm.land/* vanity module paths
  • Replace bubbletea-overlay dependency with an inlined compositeOverlay function using lipgloss v2 primitives
  • Migrate View() string to View() tea.View with AltScreen/MouseMode fields, removing tea.WithAltScreen()/tea.WithMouseCellMotion() program options
  • Replace tea.KeyMsg struct with tea.KeyPressMsg (Code/Text/Mod fields) across all key dispatch and tests
  • Split tea.MouseMsg into concrete MouseClickMsg/MouseReleaseMsg/MouseWheelMsg types
  • Remove lipgloss.AdaptiveColor (dropped in v2); introduce adaptiveColor.resolve(isDark) pattern with tea.BackgroundColorMsg detection
  • Update bubbles v2 API: viewport/textinput Width/Height/YOffset become getter/setter methods, progress.WithGradientWithColors, viewport.New() takes functional options
  • Migrate huh v2 theme to ThemeFunc returning *huh.Styles with isDark parameter
  • Scope Go 1.26 (required by huh v2) to the dev shell and build derivation via buildGoModule.override
  • Bump CI and security workflows from Go 1.25 to 1.26
  • Remove obsolete stdlib vulnerability ignores from osv-scanner.toml (fixed in Go 1.26)

closes #693

🤖 Generated with Claude Code

cpcloud and others added 2 commits March 17, 2026 10:26
Upgrade bubbletea, bubbles, lipgloss, huh, glamour, and bubblezone
to their v2 releases under the charm.land vanity module path. Replace
bubbletea-overlay with an inlined compositeOverlay using lipgloss v2
primitives. Scope Go 1.26 (required by huh v2) to the dev shell and
build derivation instead of overriding it globally via a nixpkgs overlay.

Key API changes:
- View() returns tea.View (with AltScreen/MouseMode fields) instead of string
- tea.KeyMsg struct replaced by tea.KeyPressMsg (Code/Text/Mod fields)
- tea.MouseMsg split into MouseClickMsg/MouseReleaseMsg/MouseWheelMsg
- lipgloss.AdaptiveColor removed; replaced by adaptiveColor.resolve(isDark)
  with isDark obtained from tea.BackgroundColorMsg
- Viewport/textinput Width/Height/YOffset become getter/setter methods
- progress.WithGradient replaced by progress.WithColors
- huh theme uses ThemeFunc returning *huh.Styles with isDark parameter

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
lipgloss v2 does not detect tmux-256color as truecolor-capable,
causing degraded color output. Work around by setting TERM in the
dev shell until upstream fixes the detection.

closes #789

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cpcloud cpcloud force-pushed the worktree-mutable-petting-hickey branch from 2270036 to 43c8cbb Compare March 17, 2026 14:27
- Bump setup-go from 1.25 to 1.26 in CI and security workflows
- Use buildGoModule.override to properly pass Go 1.26 to Nix builds
- Update vendorHash for new charm.land v2 dependencies
- Remove obsolete stdlib vulnerability ignores from osv-scanner.toml
- Disable osv-scanner call analysis (bundled govulncheck is Go 1.25)
- Move TERM override to shellHook so it takes effect in interactive shells

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 81.58845% with 51 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.45%. Comparing base (8a1a434) to head (f9fdccd).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/micasa/help.go 0.00% 21 Missing ⚠️
internal/app/view.go 81.81% 7 Missing and 3 partials ⚠️
internal/app/model.go 80.48% 8 Missing ⚠️
cmd/micasa/main.go 0.00% 7 Missing ⚠️
internal/app/table.go 40.00% 3 Missing ⚠️
internal/app/extraction.go 90.00% 1 Missing ⚠️
internal/app/mouse.go 91.66% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
internal/app/calendar.go 96.09% <ø> (ø)
internal/app/chat.go 72.42% <100.00%> (+0.07%) ⬆️
internal/app/column_finder.go 79.08% <100.00%> (-0.22%) ⬇️
internal/app/dashboard.go 87.31% <ø> (ø)
internal/app/docopen.go 44.00% <ø> (ø)
internal/app/filter.go 95.26% <ø> (ø)
internal/app/form_filepicker.go 64.28% <ø> (ø)
internal/app/form_select.go 88.00% <100.00%> (ø)
internal/app/forms.go 86.12% <100.00%> (+0.07%) ⬆️
internal/app/fuzzy.go 100.00% <ø> (ø)
... and 16 more

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cpcloud cpcloud merged commit 0fa8e90 into main Mar 17, 2026
25 checks passed
@cpcloud cpcloud deleted the worktree-mutable-petting-hickey branch March 17, 2026 15:15
cpcloud added a commit that referenced this pull request Mar 17, 2026
Cover #788 (Charm TUI v2 migration) and #787 (--demo promoted to
demo subcommand). Fix "Try it" section to use new `micasa demo`
syntax.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
cpcloud added a commit that referenced this pull request Mar 19, 2026
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.

refactor(app): eliminate reflect-based filepicker access before v2 upgrade

1 participant