Skip to content

[plan] Migrate pkg/logger/logger.go from hardcoded ANSI codes to Lipgloss colors #21467

Description

@github-actions

Objective

Migrate pkg/logger/logger.go from hardcoded ANSI escape sequences to Lipgloss-based color strings for consistency with the rest of the codebase.

Context

From the Terminal Stylist audit (discussion #21455), pkg/logger/logger.go uses 12 hardcoded \033[38;5;Xm ANSI escape sequences instead of Lipgloss. While it has TTY detection, this diverges from the Lipgloss-based approach used everywhere else and doesn't support adaptive light/dark colors.

Current Pattern (to replace)

// Current — hardcoded ANSI
colorReset = "\033[0m"
colors = []string{"\033[38;5;33m", "\033[38;5;35m", ...}

Target Pattern

// Preferred — use Lipgloss
lipgloss.NewStyle().Foreground(lipgloss.Color("33")).Render(text)

Approach

  1. Open pkg/logger/logger.go and identify all hardcoded ANSI sequences
  2. Replace them with Lipgloss style definitions using lipgloss.NewStyle().Foreground(lipgloss.Color(...))
  3. Ensure TTY detection is preserved (logger already has TTY detection — keep it)
  4. Use AdaptiveColor where appropriate to support light/dark terminal themes

Acceptance Criteria

  • No hardcoded \033[ or \x1b[ escape sequences remain in pkg/logger/logger.go
  • Colors use lipgloss.Color or lipgloss.AdaptiveColor
  • TTY-gating is preserved (no color output when not a TTY)
  • make fmt && make lint && make test-unit pass

Generated by Plan Command for issue #discussion #21455 · ◷

  • expires on Mar 19, 2026, 11:44 PM UTC

Activity

  1. github-actions commented on Mar 20, 2026

    @github-actions
    ContributorAuthor

    This issue was automatically closed because it expired on 2026-03-19T23:44:05.370Z.

    Closed by Workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions