Skip to content

[plan] Fix list height not updating on terminal resize in pkg/console/list.go #21517

@github-actions

Description

@github-actions

Objective

Fix pkg/console/list.go so that the list height is updated when the terminal is resized, not just the width.

Context

The list model initializes with hardcoded dimensions list.New(listItems, delegate, 80, 20) (line 154) and handles tea.WindowSizeMsg to update width — but does not update the height. This is a v1-compatible quick win identified in discussion #21351.

Approach

  1. Open pkg/console/list.go
  2. Find the tea.WindowSizeMsg handler (around line 49)
  3. Add m.list.SetHeight(msg.Height - (vertical_padding)) alongside the existing SetWidth call
  4. Choose an appropriate height (e.g., msg.Height - 4 to leave room for borders/status bar)
  5. Run make fmt && make test-unit

Files to Modify

  • pkg/console/list.go
    • Where tea.WindowSizeMsg is handled: add m.list.SetHeight(...)
    • Consider leaving some padding for header/footer rows

Acceptance Criteria

  • tea.WindowSizeMsg updates both list width AND height
  • The list doesn't overflow or leave large empty spaces when the terminal is resized
  • Existing tests pass (make test-unit)

Generated by Plan Command for issue #discussion #21351 ·

  • expires on Mar 20, 2026, 2:47 AM UTC

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