Skip to content

[Code Quality] Replace manual %-*s column padding with lipgloss.Style.Width() at 3 call sites #51080

Closed

Description

@github-actions

Description

Three call sites hand-roll column alignment with fmt.Sprintf("%-*s", width, ...) instead of using lipgloss.Style.Width() / lipgloss/table, risking incorrect alignment for unicode/wide-character names.

Suggested Changes

  • pkg/cli/engine_secrets.go:788 (secret name padding) - replace manual padding with lipgloss.NewStyle().Width(n)
  • pkg/cli/compile_schedule_calendar.go:269 (day-label padding) - replace manual padding with lipgloss.NewStyle().Width(n)
  • pkg/console/render.go:174 (struct field name padding) - replace manual padding with lipgloss.NewStyle().Width(n) (lower priority since it is the shared formatter; verify no regressions in table rendering)

Files Affected

  • pkg/cli/engine_secrets.go
  • pkg/cli/compile_schedule_calendar.go
  • pkg/console/render.go

Success Criteria

  • All 3 call sites use lipgloss.Style.Width() instead of fmt.Sprintf("%-*s", ...)
  • Output alignment unchanged for ASCII names; correctly handles wide/unicode names
  • All existing tests pass

Source

Extracted from Terminal Stylist: Console Output Analysis discussion #51041

Priority

Low - cosmetic consistency improvement, small scope

🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · auto · 48.8 AIC · ⌖ 3.58 AIC · ⊞ 10.2K · ◷

  • expires on Aug 8, 2026, 5:10 AM UTC-08:00

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions