refactor(ui): standardize on lipgloss semantic color system
Replace all fatih/color usages with internal/ui package that provides: - Semantic color tokens (Pass, Warn, Fail, Accent, Muted) - Adaptive light/dark mode support via Lipgloss AdaptiveColor - Ayu theme colors for consistent, accessible output - Tufte-inspired data-ink ratio principles Files migrated: 35 command files in cmd/bd/ Add docs/ui-philosophy.md documenting: - Semantic token usage guidelines - Light/dark terminal optimization rationale - Tufte and perceptual UI/UX theory application - When to use (and not use) color in CLI output
This commit is contained in:
@@ -3,15 +3,16 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"github.com/fatih/color"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/steveyegge/beads/internal/rpc"
|
||||
"github.com/steveyegge/beads/internal/types"
|
||||
"github.com/steveyegge/beads/internal/ui"
|
||||
"github.com/steveyegge/beads/internal/utils"
|
||||
)
|
||||
var reopenCmd = &cobra.Command{
|
||||
Use: "reopen [id...]",
|
||||
Short: "Reopen one or more closed issues",
|
||||
Use: "reopen [id...]",
|
||||
GroupID: "issues",
|
||||
Short: "Reopen one or more closed issues",
|
||||
Long: `Reopen closed issues by setting status to 'open' and clearing the closed_at timestamp.
|
||||
This is more explicit than 'bd update --status open' and emits a Reopened event.`,
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
@@ -76,12 +77,11 @@ This is more explicit than 'bd update --status open' and emits a Reopened event.
|
||||
reopenedIssues = append(reopenedIssues, &issue)
|
||||
}
|
||||
} else {
|
||||
blue := color.New(color.FgBlue).SprintFunc()
|
||||
reasonMsg := ""
|
||||
if reason != "" {
|
||||
reasonMsg = ": " + reason
|
||||
}
|
||||
fmt.Printf("%s Reopened %s%s\n", blue("↻"), id, reasonMsg)
|
||||
fmt.Printf("%s Reopened %s%s\n", ui.RenderAccent("↻"), id, reasonMsg)
|
||||
}
|
||||
}
|
||||
if jsonOutput && len(reopenedIssues) > 0 {
|
||||
@@ -120,12 +120,11 @@ This is more explicit than 'bd update --status open' and emits a Reopened event.
|
||||
reopenedIssues = append(reopenedIssues, issue)
|
||||
}
|
||||
} else {
|
||||
blue := color.New(color.FgBlue).SprintFunc()
|
||||
reasonMsg := ""
|
||||
if reason != "" {
|
||||
reasonMsg = ": " + reason
|
||||
}
|
||||
fmt.Printf("%s Reopened %s%s\n", blue("↻"), fullID, reasonMsg)
|
||||
fmt.Printf("%s Reopened %s%s\n", ui.RenderAccent("↻"), fullID, reasonMsg)
|
||||
}
|
||||
}
|
||||
// Schedule auto-flush if any issues were reopened
|
||||
|
||||
Reference in New Issue
Block a user