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 <noreply@anthropic.com>
This commit is contained in:
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user