-
Notifications
You must be signed in to change notification settings - Fork 295
Open
Labels
Description
Objective
Replace the manual Unicode box-drawing ASCII table in pkg/cli/gateway_logs.go with console.RenderTable(TableConfig{...}) to gain adaptive colors, TTY-aware rendering, and consistent border styling.
Context
Identified in the Terminal Stylist audit (discussion #21126). The file currently builds tables manually using Unicode box-drawing characters and fmt.Fprintf column alignment (~40 lines). This should be refactored to use the existing console.RenderTable infrastructure.
File to Modify
pkg/cli/gateway_logs.go — Manual ASCII table rendering (20-40 lines)
Current pattern (approximate):
var sb strings.Builder
sb.WriteString("┌──────────┬──────────┐\n")
sb.WriteString(fmt.Sprintf("│ %-8s │ %-8s │\n", col1, col2))
// ... more manual box-drawing ...
fmt.Fprintf(os.Stderr, sb.String())Target pattern:
fmt.Fprintln(os.Stderr, console.RenderTable(console.TableConfig{
Headers: []string{"Column1", "Column2"},
Rows: [][]string{...},
}))Approach
- Inspect
pkg/cli/gateway_logs.goto identify the full extent of manual table rendering - Review
console.RenderTablesignature andTableConfigfields inpkg/console/ - Identify the table data (headers, rows) being rendered manually
- Replace the manual rendering with
console.RenderTable(TableConfig{...}) - Also fix any remaining raw
fmt.Fprintf(os.Stderr, ...)calls in the file with appropriate console formatters - Run
make fmt && make test-unitto validate
Acceptance Criteria
- Manual Unicode box-drawing table code removed from
gateway_logs.go - Table rendered using
console.RenderTable(TableConfig{...}) - All remaining raw
fmt.Fprintf(os.Stderr, ...)in the file replaced with console formatters - Visual output is equivalent (same columns and data)
-
make fmtpasses with no changes -
make test-unitpasses
Generated by Plan Command for issue #discussion #21126 · ◷
- expires on Mar 18, 2026, 5:12 AM UTC
Reactions are currently unavailable