Skip to content

[Code Quality] Migrate two tabwriter tables in pkg/cli/logs_format_compact.go to console.RenderTable #50680

Description

@github-actions

Description

pkg/cli/logs_format_compact.go renders two aligned tables using text/tabwriter (around lines ~113 and ~286) instead of the repo's already-centralized console.RenderTable/console.TableConfig API. This bypasses the adaptive color/TTY-degradation logic that every other table in the CLI already benefits from.

Suggested Changes

  • Replace both tabwriter-based table renders with console.TableConfig + console.RenderTable.
  • Verify output still degrades gracefully to plain text on non-TTY output (CI logs, pipes), matching behavior of other console.RenderTable call sites.

Files Affected

  • pkg/cli/logs_format_compact.go (~line 113, ~line 286)
  • Reference implementation: pkg/console/console.go:245 (RenderTable), pkg/console/console.go:289 (renderTableWithTTY)

Success Criteria

  • Both tables render via console.RenderTable with consistent borders/coloring
  • Automatic plain-text degradation confirmed for non-TTY output
  • All existing tests pass

Source

Extracted from Terminal Stylist: Console Output & Lipgloss/Huh Consistency Report discussion #50525

Priority

Low-Medium - small consistency fix, low risk

🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · auto · 44.7 AIC · ⌖ 3.06 AIC · ⊞ 10.3K ·

  • expires on Aug 6, 2026, 11:12 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