From 19b8bab5d8dcdcb9f12e68ae67aca0128f3db670 Mon Sep 17 00:00:00 2001 From: teernisse Date: Sat, 28 Feb 2026 00:05:20 -0500 Subject: [PATCH] fix(tui): force TrueColor profile for consistent background rendering Set lipgloss.SetColorProfile(termenv.TrueColor) before launching the Bubble Tea program to ensure ANSI escape codes are always generated for background styling. Without this fix, lipgloss may default to the Ascii profile on some terminals, causing all background colors to be stripped. This manifests as cards with missing backgrounds and inconsistent visual appearance where borders render but fills don't. This is particularly important for the visual polish work where components like cards, status bars, and tab bars rely heavily on background colors to create depth and visual hierarchy. Co-Authored-By: Claude Opus 4.5 --- cmd/tui.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/tui.go b/cmd/tui.go index b666dfb..5bcb392 100644 --- a/cmd/tui.go +++ b/cmd/tui.go @@ -8,6 +8,8 @@ import ( "github.com/theirongolddev/cburn/internal/tui/theme" tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/lipgloss" + "github.com/muesli/termenv" "github.com/spf13/cobra" ) @@ -26,6 +28,10 @@ func runTUI(_ *cobra.Command, _ []string) error { cfg, _ := config.Load() theme.SetActive(cfg.Appearance.Theme) + // Force TrueColor profile so all background styling produces ANSI codes + // Without this, lipgloss may default to Ascii profile (no colors) + lipgloss.SetColorProfile(termenv.TrueColor) + app := tui.NewApp(flagDataDir, flagDays, flagProject, flagModel, !flagNoSubagents) p := tea.NewProgram(app, tea.WithAltScreen())