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 · ◷
Description
pkg/cli/logs_format_compact.gorenders two aligned tables usingtext/tabwriter(around lines ~113 and ~286) instead of the repo's already-centralizedconsole.RenderTable/console.TableConfigAPI. This bypasses the adaptive color/TTY-degradation logic that every other table in the CLI already benefits from.Suggested Changes
tabwriter-based table renders withconsole.TableConfig+console.RenderTable.console.RenderTablecall sites.Files Affected
pkg/cli/logs_format_compact.go(~line 113, ~line 286)pkg/console/console.go:245(RenderTable),pkg/console/console.go:289(renderTableWithTTY)Success Criteria
console.RenderTablewith consistent borders/coloringSource
Extracted from Terminal Stylist: Console Output & Lipgloss/Huh Consistency Report discussion #50525
Priority
Low-Medium - small consistency fix, low risk