fix(deps): migrate from lipgloss v1 to charm.land/lipgloss/v2

Replaces the deprecated github.com/charmbracelet/lipgloss v1 with
charm.land/lipgloss/v2. Key changes:

- Import path: github.com/charmbracelet/lipgloss → charm.land/lipgloss/v2
- AdaptiveColor replaced with LightDark() for controlled background
  detection (avoids compat package which probes terminal at init time,
  reintroducing the OSC 11 leak from GH#1303)
- SetColorProfile() replaced with DisableColors() function that resets
  all styles to plain text for hook/non-TTY contexts
- Colors and styles initialized in init() for controlled lifecycle
- Removes direct dependency on github.com/muesli/termenv

Supersedes Renovate PR #2841 which only updated go.mod without fixing
import paths or API changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
beads/crew/emma 2026-03-30 12:43:22 -07:00 • committed by Steve Yegge
commit 20b39b3616
5 changed files with 195 additions and 153 deletions

View file

@ -9,11 +9,10 @@ import (
"path/filepath"
"strings"
"github.com/charmbracelet/lipgloss"
"github.com/muesli/termenv"
"github.com/spf13/cobra"
"github.com/steveyegge/beads/internal/beads"
"github.com/steveyegge/beads/internal/git"
"github.com/steveyegge/beads/internal/ui"
)
// managedHookNames lists the git hooks managed by beads.
@ -1037,10 +1036,10 @@ installed bd version - upgrading bd automatically updates hook behavior.`,
// Disable terminal color probing to prevent OSC 11 escape sequence leaks (GH#1303).
// Our shell shims set BD_GIT_HOOK=1 before invoking bd, but third-party hook
// runners (lefthook, husky, etc.) call 'bd hooks run' directly without it.
// By this point ui.init() has already run, so we must also reset the lipgloss
// color profile — the env var alone only helps if set before process start.
// By this point ui.init() has already run, so we must also reset styles
// to suppress ANSI output — the env var alone only helps if set before process start.
_ = os.Setenv("BD_GIT_HOOK", "1")
lipgloss.SetColorProfile(termenv.Ascii)
ui.DisableColors()
hookName := args[0]
hookArgs := args[1:]

View file

@ -5,7 +5,7 @@ import (
"fmt"
"slices"
"github.com/charmbracelet/lipgloss"
lipgloss "charm.land/lipgloss/v2"
"github.com/steveyegge/beads/internal/ui"
)

8
go.mod
View file

@ -5,15 +5,13 @@ go 1.25.8
require (
charm.land/glamour/v2 v2.0.0
charm.land/huh/v2 v2.0.3
charm.land/lipgloss/v2 v2.0.1
github.com/BurntSushi/toml v1.6.0
github.com/JohannesKaufmann/html-to-markdown/v2 v2.5.0
github.com/anthropics/anthropic-sdk-go v1.27.1
github.com/cenkalti/backoff/v4 v4.3.0
github.com/cenkalti/backoff/v5 v5.0.3
github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834
github.com/dolthub/driver v1.84.1
github.com/go-sql-driver/mysql v1.9.3
github.com/muesli/termenv v0.16.0
github.com/olebedev/when v1.1.0
github.com/spf13/cobra v1.10.2
github.com/spf13/viper v1.21.0
@ -37,6 +35,7 @@ require (
require (
github.com/JohannesKaufmann/dom v0.2.0 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
)
@ -44,7 +43,6 @@ require (
cel.dev/expr v0.25.1 // indirect
charm.land/bubbles/v2 v2.0.0 // indirect
charm.land/bubbletea/v2 v2.0.2 // indirect
charm.land/lipgloss/v2 v2.0.1 // indirect
cloud.google.com/go v0.120.0 // indirect
cloud.google.com/go/auth v0.16.2 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
@ -94,7 +92,6 @@ require (
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.16 // indirect
github.com/aws/smithy-go v1.22.2 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/bcicen/jstream v1.0.1 // indirect
github.com/catppuccin/go v0.3.0 // indirect
@ -102,7 +99,6 @@ require (
github.com/charmbracelet/colorprofile v0.4.2 // indirect
github.com/charmbracelet/ultraviolet v0.0.0-20260205113103-524a6607adb8 // indirect
github.com/charmbracelet/x/ansi v0.11.6 // indirect
github.com/charmbracelet/x/cellbuf v0.0.15 // indirect
github.com/charmbracelet/x/exp/ordered v0.1.0 // indirect
github.com/charmbracelet/x/exp/slice v0.0.0-20250327172914-2fdc97757edf // indirect
github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0 // indirect

8
go.sum
View file

@ -314,8 +314,6 @@ github.com/aws/smithy-go v1.11.2/go.mod h1:3xHYmszWVx2c0kIwQeEVf9uSm4fYZt67FBJnw
github.com/aws/smithy-go v1.17.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE=
github.com/aws/smithy-go v1.22.2 h1:6D9hW43xKFrRx/tXXfAlIZc4JI+yQe6snnWcQyxSyLQ=
github.com/aws/smithy-go v1.22.2/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg=
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
github.com/aymanbagabas/go-udiff v0.4.1 h1:OEIrQ8maEeDBXQDoGCbbTTXYJMYRCRO1fnodZ12Gv5o=
github.com/aymanbagabas/go-udiff v0.4.1/go.mod h1:0L9PGwj20lrtmEMeyw4WKJ/TMyDtvAoK9bf2u/mNo3w=
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
@ -341,14 +339,10 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/charmbracelet/colorprofile v0.4.2 h1:BdSNuMjRbotnxHSfxy+PCSa4xAmz7szw70ktAtWRYrY=
github.com/charmbracelet/colorprofile v0.4.2/go.mod h1:0rTi81QpwDElInthtrQ6Ni7cG0sDtwAd4C4le060fT8=
github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834 h1:ZR7e0ro+SZZiIZD7msJyA+NjkCNNavuiPBLgerbOziE=
github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834/go.mod h1:aKC/t2arECF6rNOnaKaVU6y4t4ZeHQzqfxedE/VkVhA=
github.com/charmbracelet/ultraviolet v0.0.0-20260205113103-524a6607adb8 h1:eyFRbAmexyt43hVfeyBofiGSEmJ7krjLOYt/9CF5NKA=
github.com/charmbracelet/ultraviolet v0.0.0-20260205113103-524a6607adb8/go.mod h1:SQpCTRNBtzJkwku5ye4S3HEuthAlGy2n9VXZnWkEW98=
github.com/charmbracelet/x/ansi v0.11.6 h1:GhV21SiDz/45W9AnV2R61xZMRri5NlLnl6CVF7ihZW8=
github.com/charmbracelet/x/ansi v0.11.6/go.mod h1:2JNYLgQUsyqaiLovhU2Rv/pb8r6ydXKS3NIttu3VGZQ=
github.com/charmbracelet/x/cellbuf v0.0.15 h1:ur3pZy0o6z/R7EylET877CBxaiE1Sp1GMxoFPAIztPI=
github.com/charmbracelet/x/cellbuf v0.0.15/go.mod h1:J1YVbR7MUuEGIFPCaaZ96KDl5NoS0DAWkskup+mOY+Q=
github.com/charmbracelet/x/conpty v0.1.1 h1:s1bUxjoi7EpqiXysVtC+a8RrvPPNcNvAjfi4jxsAuEs=
github.com/charmbracelet/x/conpty v0.1.1/go.mod h1:OmtR77VODEFbiTzGE9G1XiRJAga6011PIm4u5fTNZpk=
github.com/charmbracelet/x/errors v0.0.0-20240508181413-e8d8b6e2de86 h1:JSt3B+U9iqk37QUU2Rvb6DSBYRLtWqFqfxf8l5hOZUA=
@ -868,8 +862,6 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA=
github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo=
github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc=
github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/ncw/swift v1.0.52/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM=

View file

@ -4,22 +4,78 @@ package ui
import (
"fmt"
"image/color"
"os"
"strings"
"github.com/charmbracelet/lipgloss"
"github.com/muesli/termenv"
lipgloss "charm.land/lipgloss/v2"
"github.com/steveyegge/beads/internal/types"
)
func init() {
if !ShouldUseColor() {
// Disable colors when not appropriate (non-TTY, NO_COLOR, etc.)
lipgloss.SetColorProfile(termenv.Ascii)
} else {
// Use TrueColor for distinct priority/status colors in modern terminals
lipgloss.SetColorProfile(termenv.TrueColor)
return // all colors remain NoColor, all styles remain empty
}
// Detect dark background for adaptive colors.
// Only probed when color is enabled (prevents OSC 11 leaks in hook contexts).
isDark := lipgloss.HasDarkBackground(os.Stdin, os.Stdout)
initColors(isDark)
initStyles()
}
// DisableColors resets all styles to plain text output.
// Called from hook contexts to prevent ANSI escape sequence leaks.
func DisableColors() {
// Reset all color vars to NoColor
ColorPass = lipgloss.NoColor{}
ColorWarn = lipgloss.NoColor{}
ColorFail = lipgloss.NoColor{}
ColorMuted = lipgloss.NoColor{}
ColorAccent = lipgloss.NoColor{}
ColorStatusOpen = lipgloss.NoColor{}
ColorStatusInProgress = lipgloss.NoColor{}
ColorStatusClosed = lipgloss.NoColor{}
ColorStatusBlocked = lipgloss.NoColor{}
ColorStatusPinned = lipgloss.NoColor{}
ColorStatusHooked = lipgloss.NoColor{}
ColorPriorityP0 = lipgloss.NoColor{}
ColorPriorityP1 = lipgloss.NoColor{}
ColorPriorityP2 = lipgloss.NoColor{}
ColorPriorityP3 = lipgloss.NoColor{}
ColorPriorityP4 = lipgloss.NoColor{}
ColorTypeBug = lipgloss.NoColor{}
ColorTypeFeature = lipgloss.NoColor{}
ColorTypeTask = lipgloss.NoColor{}
ColorTypeEpic = lipgloss.NoColor{}
ColorTypeChore = lipgloss.NoColor{}
ColorID = lipgloss.NoColor{}
// Reset all styles to empty (no ANSI output)
PassStyle = lipgloss.NewStyle()
WarnStyle = lipgloss.NewStyle()
FailStyle = lipgloss.NewStyle()
MutedStyle = lipgloss.NewStyle()
AccentStyle = lipgloss.NewStyle()
IDStyle = lipgloss.NewStyle()
StatusOpenStyle = lipgloss.NewStyle()
StatusInProgressStyle = lipgloss.NewStyle()
StatusClosedStyle = lipgloss.NewStyle()
StatusBlockedStyle = lipgloss.NewStyle()
StatusPinnedStyle = lipgloss.NewStyle()
StatusHookedStyle = lipgloss.NewStyle()
PriorityP0Style = lipgloss.NewStyle()
PriorityP1Style = lipgloss.NewStyle()
PriorityP2Style = lipgloss.NewStyle()
PriorityP3Style = lipgloss.NewStyle()
PriorityP4Style = lipgloss.NewStyle()
TypeBugStyle = lipgloss.NewStyle()
TypeFeatureStyle = lipgloss.NewStyle()
TypeTaskStyle = lipgloss.NewStyle()
TypeEpicStyle = lipgloss.NewStyle()
TypeChoreStyle = lipgloss.NewStyle()
CategoryStyle = lipgloss.NewStyle()
BoldStyle = lipgloss.NewStyle()
CommandStyle = lipgloss.NewStyle()
}
// IsAgentMode returns true if the CLI is running in agent-optimized mode.
@ -45,155 +101,163 @@ func IsAgentMode() bool {
// Source: https://github.com/ayu-theme/ayu-colors
var (
// Core semantic colors (Ayu theme - adaptive light/dark)
ColorPass = lipgloss.AdaptiveColor{
Light: "#86b300", // ayu light bright green
Dark: "#c2d94c", // ayu dark bright green
}
ColorWarn = lipgloss.AdaptiveColor{
Light: "#f2ae49", // ayu light bright yellow
Dark: "#ffb454", // ayu dark bright yellow
}
ColorFail = lipgloss.AdaptiveColor{
Light: "#f07171", // ayu light bright red
Dark: "#f07178", // ayu dark bright red
}
ColorMuted = lipgloss.AdaptiveColor{
Light: "#828c99", // ayu light muted
Dark: "#6c7680", // ayu dark muted
}
ColorAccent = lipgloss.AdaptiveColor{
Light: "#399ee6", // ayu light bright blue
Dark: "#59c2ff", // ayu dark bright blue
}
ColorPass color.Color = lipgloss.NoColor{}
ColorWarn color.Color = lipgloss.NoColor{}
ColorFail color.Color = lipgloss.NoColor{}
ColorMuted color.Color = lipgloss.NoColor{}
ColorAccent color.Color = lipgloss.NoColor{}
// === Workflow Status Colors ===
// Only actionable states get color - open/closed match standard text
ColorStatusOpen = lipgloss.AdaptiveColor{
Light: "", // standard text color
Dark: "",
}
ColorStatusInProgress = lipgloss.AdaptiveColor{
Light: "#f2ae49", // yellow - active work, very visible
Dark: "#ffb454",
}
ColorStatusClosed = lipgloss.AdaptiveColor{
Light: "#9099a1", // slightly dimmed - visually shows "done"
Dark: "#8090a0",
}
ColorStatusBlocked = lipgloss.AdaptiveColor{
Light: "#f07171", // red - needs attention
Dark: "#f26d78",
}
ColorStatusPinned = lipgloss.AdaptiveColor{
Light: "#d2a6ff", // purple - special/elevated
Dark: "#d2a6ff",
}
ColorStatusHooked = lipgloss.AdaptiveColor{
Light: "#59c2ff", // cyan - actively worked
Dark: "#59c2ff",
}
ColorStatusOpen color.Color = lipgloss.NoColor{}
ColorStatusInProgress color.Color = lipgloss.NoColor{}
ColorStatusClosed color.Color = lipgloss.NoColor{}
ColorStatusBlocked color.Color = lipgloss.NoColor{}
ColorStatusPinned color.Color = lipgloss.NoColor{}
ColorStatusHooked color.Color = lipgloss.NoColor{}
// === Priority Colors ===
// Only P0/P1 get color - they need attention
// P2/P3/P4 are neutral (medium/low/backlog don't need visual urgency)
ColorPriorityP0 = lipgloss.AdaptiveColor{
Light: "#f07171", // bright red - critical, demands attention
Dark: "#f07178",
}
ColorPriorityP1 = lipgloss.AdaptiveColor{
Light: "#ff8f40", // orange - high priority, needs attention soon
Dark: "#ff8f40",
}
ColorPriorityP2 = lipgloss.AdaptiveColor{
Light: "#e6b450", // muted gold - medium priority, visible but calm
Dark: "#e6b450",
}
ColorPriorityP3 = lipgloss.AdaptiveColor{
Light: "", // neutral - low priority
Dark: "",
}
ColorPriorityP4 = lipgloss.AdaptiveColor{
Light: "", // neutral - backlog
Dark: "",
}
ColorPriorityP0 color.Color = lipgloss.NoColor{}
ColorPriorityP1 color.Color = lipgloss.NoColor{}
ColorPriorityP2 color.Color = lipgloss.NoColor{}
ColorPriorityP3 color.Color = lipgloss.NoColor{}
ColorPriorityP4 color.Color = lipgloss.NoColor{}
// === Issue Type Colors ===
// Bugs and epics get color - they need attention
// All other types use standard text
ColorTypeBug = lipgloss.AdaptiveColor{
Light: "#f07171", // bright red - bugs are problems
Dark: "#f26d78",
}
ColorTypeFeature = lipgloss.AdaptiveColor{
Light: "", // standard text color
Dark: "",
}
ColorTypeTask = lipgloss.AdaptiveColor{
Light: "", // standard text color
Dark: "",
}
ColorTypeEpic = lipgloss.AdaptiveColor{
Light: "#d2a6ff", // purple - larger scope work
Dark: "#d2a6ff",
}
ColorTypeChore = lipgloss.AdaptiveColor{
Light: "", // standard text color
Dark: "",
}
ColorTypeBug color.Color = lipgloss.NoColor{}
ColorTypeFeature color.Color = lipgloss.NoColor{}
ColorTypeTask color.Color = lipgloss.NoColor{}
ColorTypeEpic color.Color = lipgloss.NoColor{}
ColorTypeChore color.Color = lipgloss.NoColor{}
// Note: Orchestrator-specific types (agent, role, rig) have been removed.
// Use labels (gt:agent, gt:role, gt:rig) with custom styling if needed.
// === Issue ID Color ===
// IDs use standard text color - subtle, not attention-grabbing
ColorID = lipgloss.AdaptiveColor{
Light: "", // standard text color
Dark: "",
}
ColorID color.Color = lipgloss.NoColor{}
)
// initColors sets adaptive light/dark color values.
func initColors(isDark bool) {
ld := lipgloss.LightDark(isDark)
ColorPass = ld(lipgloss.Color("#86b300"), lipgloss.Color("#c2d94c"))
ColorWarn = ld(lipgloss.Color("#f2ae49"), lipgloss.Color("#ffb454"))
ColorFail = ld(lipgloss.Color("#f07171"), lipgloss.Color("#f07178"))
ColorMuted = ld(lipgloss.Color("#828c99"), lipgloss.Color("#6c7680"))
ColorAccent = ld(lipgloss.Color("#399ee6"), lipgloss.Color("#59c2ff"))
// Workflow status colors — empty strings mean standard text color (NoColor)
ColorStatusOpen = lipgloss.NoColor{} // standard text
ColorStatusInProgress = ld(lipgloss.Color("#f2ae49"), lipgloss.Color("#ffb454"))
ColorStatusClosed = ld(lipgloss.Color("#9099a1"), lipgloss.Color("#8090a0"))
ColorStatusBlocked = ld(lipgloss.Color("#f07171"), lipgloss.Color("#f26d78"))
ColorStatusPinned = ld(lipgloss.Color("#d2a6ff"), lipgloss.Color("#d2a6ff"))
ColorStatusHooked = ld(lipgloss.Color("#59c2ff"), lipgloss.Color("#59c2ff"))
// Priority colors — only P0/P1/P2 get color
ColorPriorityP0 = ld(lipgloss.Color("#f07171"), lipgloss.Color("#f07178"))
ColorPriorityP1 = ld(lipgloss.Color("#ff8f40"), lipgloss.Color("#ff8f40"))
ColorPriorityP2 = ld(lipgloss.Color("#e6b450"), lipgloss.Color("#e6b450"))
ColorPriorityP3 = lipgloss.NoColor{} // neutral
ColorPriorityP4 = lipgloss.NoColor{} // neutral
// Issue type colors — only bugs and epics get color
ColorTypeBug = ld(lipgloss.Color("#f07171"), lipgloss.Color("#f26d78"))
ColorTypeFeature = lipgloss.NoColor{} // standard text
ColorTypeTask = lipgloss.NoColor{} // standard text
ColorTypeEpic = ld(lipgloss.Color("#d2a6ff"), lipgloss.Color("#d2a6ff"))
ColorTypeChore = lipgloss.NoColor{} // standard text
ColorID = lipgloss.NoColor{} // standard text
// Command style - uses adaptive color for subtle contrast
CommandStyle = lipgloss.NewStyle().Foreground(
ld(lipgloss.Color("#5c6166"), lipgloss.Color("#bfbdb6")),
)
}
// Core styles - consistent across all commands
var (
PassStyle = lipgloss.NewStyle().Foreground(ColorPass)
WarnStyle = lipgloss.NewStyle().Foreground(ColorWarn)
FailStyle = lipgloss.NewStyle().Foreground(ColorFail)
MutedStyle = lipgloss.NewStyle().Foreground(ColorMuted)
AccentStyle = lipgloss.NewStyle().Foreground(ColorAccent)
PassStyle = lipgloss.NewStyle()
WarnStyle = lipgloss.NewStyle()
FailStyle = lipgloss.NewStyle()
MutedStyle = lipgloss.NewStyle()
AccentStyle = lipgloss.NewStyle()
)
// Issue ID style
var IDStyle = lipgloss.NewStyle().Foreground(ColorID)
var IDStyle = lipgloss.NewStyle()
// Status styles for workflow states
var (
StatusOpenStyle = lipgloss.NewStyle().Foreground(ColorStatusOpen)
StatusInProgressStyle = lipgloss.NewStyle().Foreground(ColorStatusInProgress)
StatusClosedStyle = lipgloss.NewStyle().Foreground(ColorStatusClosed)
StatusBlockedStyle = lipgloss.NewStyle().Foreground(ColorStatusBlocked)
StatusPinnedStyle = lipgloss.NewStyle().Foreground(ColorStatusPinned)
StatusHookedStyle = lipgloss.NewStyle().Foreground(ColorStatusHooked)
StatusOpenStyle = lipgloss.NewStyle()
StatusInProgressStyle = lipgloss.NewStyle()
StatusClosedStyle = lipgloss.NewStyle()
StatusBlockedStyle = lipgloss.NewStyle()
StatusPinnedStyle = lipgloss.NewStyle()
StatusHookedStyle = lipgloss.NewStyle()
)
// Priority styles
var (
PriorityP0Style = lipgloss.NewStyle()
PriorityP1Style = lipgloss.NewStyle()
PriorityP2Style = lipgloss.NewStyle()
PriorityP3Style = lipgloss.NewStyle()
PriorityP4Style = lipgloss.NewStyle()
)
// Type styles for issue categories
var (
TypeBugStyle = lipgloss.NewStyle()
TypeFeatureStyle = lipgloss.NewStyle()
TypeTaskStyle = lipgloss.NewStyle()
TypeEpicStyle = lipgloss.NewStyle()
TypeChoreStyle = lipgloss.NewStyle()
// Note: Orchestrator-specific type styles (agent, role, rig) have been removed.
)
// CategoryStyle for section headers - bold with accent color
var CategoryStyle = lipgloss.NewStyle()
// BoldStyle for emphasis
var BoldStyle = lipgloss.NewStyle()
// CommandStyle for command names - subtle contrast, not attention-grabbing
var CommandStyle = lipgloss.NewStyle()
// initStyles sets up styled versions using the current color values.
func initStyles() {
PassStyle = lipgloss.NewStyle().Foreground(ColorPass)
WarnStyle = lipgloss.NewStyle().Foreground(ColorWarn)
FailStyle = lipgloss.NewStyle().Foreground(ColorFail)
MutedStyle = lipgloss.NewStyle().Foreground(ColorMuted)
AccentStyle = lipgloss.NewStyle().Foreground(ColorAccent)
IDStyle = lipgloss.NewStyle().Foreground(ColorID)
StatusOpenStyle = lipgloss.NewStyle().Foreground(ColorStatusOpen)
StatusInProgressStyle = lipgloss.NewStyle().Foreground(ColorStatusInProgress)
StatusClosedStyle = lipgloss.NewStyle().Foreground(ColorStatusClosed)
StatusBlockedStyle = lipgloss.NewStyle().Foreground(ColorStatusBlocked)
StatusPinnedStyle = lipgloss.NewStyle().Foreground(ColorStatusPinned)
StatusHookedStyle = lipgloss.NewStyle().Foreground(ColorStatusHooked)
PriorityP0Style = lipgloss.NewStyle().Foreground(ColorPriorityP0).Bold(true)
PriorityP1Style = lipgloss.NewStyle().Foreground(ColorPriorityP1)
PriorityP2Style = lipgloss.NewStyle().Foreground(ColorPriorityP2)
PriorityP3Style = lipgloss.NewStyle().Foreground(ColorPriorityP3)
PriorityP4Style = lipgloss.NewStyle().Foreground(ColorPriorityP4)
)
// Type styles for issue categories
var (
TypeBugStyle = lipgloss.NewStyle().Foreground(ColorTypeBug)
TypeBugStyle = lipgloss.NewStyle().Foreground(ColorTypeBug)
TypeFeatureStyle = lipgloss.NewStyle().Foreground(ColorTypeFeature)
TypeTaskStyle = lipgloss.NewStyle().Foreground(ColorTypeTask)
TypeEpicStyle = lipgloss.NewStyle().Foreground(ColorTypeEpic)
TypeChoreStyle = lipgloss.NewStyle().Foreground(ColorTypeChore)
// Note: Orchestrator-specific type styles (agent, role, rig) have been removed.
)
TypeTaskStyle = lipgloss.NewStyle().Foreground(ColorTypeTask)
TypeEpicStyle = lipgloss.NewStyle().Foreground(ColorTypeEpic)
TypeChoreStyle = lipgloss.NewStyle().Foreground(ColorTypeChore)
// CategoryStyle for section headers - bold with accent color
var CategoryStyle = lipgloss.NewStyle().Bold(true).Foreground(ColorAccent)
CategoryStyle = lipgloss.NewStyle().Bold(true).Foreground(ColorAccent)
BoldStyle = lipgloss.NewStyle().Bold(true)
// CommandStyle is set in initColors where LightDark is available
}
// Status icons - consistent semantic indicators
const (
@ -550,15 +614,6 @@ func RenderClosedLine(line string) string {
return StatusClosedStyle.Render(line)
}
// BoldStyle for emphasis
var BoldStyle = lipgloss.NewStyle().Bold(true)
// CommandStyle for command names - subtle contrast, not attention-grabbing
var CommandStyle = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{
Light: "#5c6166", // slightly darker than standard
Dark: "#bfbdb6", // slightly brighter than standard
})
// RenderBold renders text in bold
func RenderBold(s string) string {
return BoldStyle.Render(s)