Skip to content

[plan] Add explicit table wrapping configuration to all table creation #12625

@github-actions

Description

@github-actions

Objective

Make table wrapping behavior explicit by adding .Wrap(false) or .Wrap(true) to all table creation calls in the codebase.

Context

From discussion #12479 - Go Fan review of charmbracelet/lipgloss usage.

Since lipgloss v1.1.0, tables wrap content by default. The gh-aw codebase should be explicit about wrapping intent to:

  • Prevent layout surprises from default behavior
  • Make code intent clearer for maintainers
  • Ensure tables render as expected (especially numeric tables)

Approach

  1. Locate all table creation calls in pkg/console/console.go (lines 283-289 and similar)
  2. Add explicit .Wrap(false) for tables that should maintain fixed column width (numeric tables, status tables)
  3. Add explicit .Wrap(true) for tables where content wrapping is desired (long text descriptions)
  4. Add code comments explaining the wrapping choice

Files to Modify

  • pkg/console/console.go - Add .Wrap() calls to table creation
  • Any other files using lipgloss/table (search for table.New())

Example

// Before
t := table.New().
    Headers(headers...).
    Rows(rows...).
    Border(styles.RoundedBorder)

// After (for numeric/status tables)
t := table.New().
    Headers(headers...).
    Rows(rows...).
    Border(styles.RoundedBorder).
    Wrap(false)  // No wrapping for numeric columns

// After (for text tables)
t := table.New().
    Headers(headers...).
    Rows(rows...).
    Border(styles.RoundedBorder).
    Wrap(true)  // Allow content to wrap in cells

Acceptance Criteria

  • All table.New() calls have explicit .Wrap() configuration
  • Wrapping choice is documented with code comments
  • Tables render correctly in both TTY and non-TTY contexts
  • No visual regressions in existing table output

AI generated by Plan Command for discussion #12479

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions