From 485bd12d24c9ecdf85c500a4a3f3fc40a29cd754 Mon Sep 17 00:00:00 2001 From: Jonatan Dahl Date: Wed, 28 Jan 2026 15:22:00 -0500 Subject: [PATCH] fix: apply consistent colors to status warning messages Use ui.Branch() for branch names (cyan) in sync issue messages. Change ui.Command() to use green instead of cyan to differentiate commands from branch names. Co-Authored-By: Claude Opus 4.5 --- cmd/status.go | 6 +++--- internal/ui/color.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/status.go b/cmd/status.go index b27fd61..5ec91d1 100644 --- a/cmd/status.go +++ b/cmd/status.go @@ -366,7 +366,7 @@ func detectSyncIssues(gitClient git.GitClient, stackBranches []stack.StackBranch if verbose { fmt.Printf(" ✗ PR base (%s) doesn't match configured parent (%s)\n", pr.Base, branch.Parent) } - issues = append(issues, fmt.Sprintf(" - Branch '%s' PR base (%s) doesn't match parent (%s)", branch.Name, pr.Base, branch.Parent)) + issues = append(issues, fmt.Sprintf(" - Branch '%s' PR base (%s) doesn't match parent (%s)", ui.Branch(branch.Name), ui.Branch(pr.Base), ui.Branch(branch.Parent))) } else if verbose { fmt.Printf(" ✓ PR base matches configured parent\n") } @@ -383,7 +383,7 @@ func detectSyncIssues(gitClient git.GitClient, stackBranches []stack.StackBranch if verbose { fmt.Printf(" ✗ Branch is behind %s (needs rebase)\n", branch.Parent) } - issues = append(issues, fmt.Sprintf(" - Branch '%s' is behind %s (needs rebase)", branch.Name, branch.Parent)) + issues = append(issues, fmt.Sprintf(" - Branch '%s' is behind %s (needs rebase)", ui.Branch(branch.Name), ui.Branch(branch.Parent))) } else if err == nil && verbose { fmt.Printf(" ✓ Branch is up to date with %s\n", branch.Parent) } else if err != nil && verbose { @@ -401,7 +401,7 @@ func detectSyncIssues(gitClient git.GitClient, stackBranches []stack.StackBranch if verbose { fmt.Printf(" ✗ Local branch differs from origin/%s (needs push)\n", branch.Name) } - issues = append(issues, fmt.Sprintf(" - Branch '%s' differs from origin (needs push)", branch.Name)) + issues = append(issues, fmt.Sprintf(" - Branch '%s' differs from origin (needs push)", ui.Branch(branch.Name))) } else if localErr == nil && remoteErr == nil && verbose { fmt.Printf(" ✓ Local branch matches origin/%s\n", branch.Name) } else if verbose { diff --git a/internal/ui/color.go b/internal/ui/color.go index 696fd53..ed1b1f8 100644 --- a/internal/ui/color.go +++ b/internal/ui/color.go @@ -62,9 +62,9 @@ func ErrorText(msg string) string { return red.Sprint(msg) } -// Command returns a command in cyan (for help text) +// Command returns a command in green (for help text) func Command(cmd string) string { - return cyan.Sprint(cmd) + return green.Sprint(cmd) } // Dim returns dimmed/gray text