Skip to content

[plan] Upgrade experiments_command.go manual text table to console.RenderTable() #41703

Description

@github-actions

Objective

Replace the manual fmt.Fprintf text-table formatting in pkg/cli/experiments_command.go with console.RenderTable() to get styled borders, zebra rows, and adaptive colors.

Context

From discussion #41645 (Terminal Stylist analysis): experiments_command.go builds manual text tables using fmt.Fprintf(os.Stderr, " %-20s %d (%d%%)\n", ...). With console.RenderTable() already available this can be upgraded to a proper styled table — especially valuable for the experiments breakdown output.

Current Pattern

fmt.Fprintf(os.Stderr, "  %-20s %d (%d%%)\n", experimentName, count, percent)

Approach

  1. Open pkg/cli/experiments_command.go and identify all manual table-formatting blocks
  2. Inspect the signature of console.RenderTable() in pkg/console/ to understand required headers/rows format
  3. Replace manual fmt.Fprintf table rows with a console.RenderTable() call:
    • Build headers []string slice (e.g., ["Experiment", "Count", "Percent"])
    • Build rows [][]string slice from the experiment data
    • Call console.RenderTable(headers, rows) and print the result to stderr
  4. Remove the now-unused manual format string
  5. Add pkg/console import if not already present
  6. Run make fmt and make agent-report-progress to validate

Files to Modify

  • pkg/cli/experiments_command.go

Acceptance Criteria

  • Manual fmt.Fprintf text-table formatting is replaced with console.RenderTable()
  • Output includes styled borders and adaptive colors (TTY) or plain text (non-TTY) via console.RenderTable()'s built-in TTY detection
  • make agent-report-progress passes

Generated by 📋 Plan Command · 27.8 AIC · ⌖ 10.1 AIC · ⊞ 4.6K ·
Comment /plan to run again

  • expires on Jun 28, 2026, 5:22 AM UTC-08:00

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions