-
Notifications
You must be signed in to change notification settings - Fork 307
Closed
Closed
Copy link
Labels
Description
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
- Open
pkg/console/list.go - Find the
tea.WindowSizeMsghandler (around line 49) - Add
m.list.SetHeight(msg.Height - (vertical_padding))alongside the existingSetWidthcall - Choose an appropriate height (e.g.,
msg.Height - 4to leave room for borders/status bar) - Run
make fmt && make test-unit
Files to Modify
pkg/console/list.go- Where
tea.WindowSizeMsgis handled: addm.list.SetHeight(...) - Consider leaving some padding for header/footer rows
- Where
Acceptance Criteria
-
tea.WindowSizeMsgupdates 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
Reactions are currently unavailable
Metadata
Metadata
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.