Skip to content

Fix dashboard picker not resizing on terminal resize - #653

Merged
lsegal merged 3 commits into
mainfrom
fix/issue-651-tui-resize
Sep 10, 2026
Merged

lsegal merged 3 commits into
mainfrom
fix/issue-651-tui-resize

Conversation

@lsegal

@lsegal lsegal commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Root cause

glorp ui shows an interactive picker (dashboardPicker in uicmd.go) when more than one glorp dashboard is running locally. Unlike the main terminal dashboard (ui.go), the picker never handled tea.WindowSizeMsg at all, so it never learned the terminal's width. Its labels (port %d β€” target1, target2, ... (N running, M queued)) can be long, and resizing the terminal β€” narrower or wider β€” had no effect on the rendered output: the picker simply never adapted, which matches the reported "tui not resizing on term resize" behavior.

Change

  • dashboardPicker now tracks a width field and updates it on tea.WindowSizeMsg.
  • View() truncates each dashboard's label to fit the current terminal width, reusing the existing truncate helper already used by the main dashboard.

Verification

Before the fix, the picker's label ignored terminal width entirely:

--- before any resize (width=0, unclamped) ---
Select a glorp dashboard to open

> port 8765 β€” lsegal/glorp, lsegal/glorp-www, lsegal/glorp-docs (3 running, 5 queued)

↑/↓ move Β· enter open Β· q cancel

After the fix, resizing the terminal to 30 columns truncates the label to fit:

--- after resizing terminal to 30 cells wide ---
Select a glorp dashboard to open

> port 8765 β€” lsegal/glorp,...

↑/↓ move Β· enter open Β· q cancel

Tests

  • Added TestDashboardPickerResizesToTerminalWidth covering both narrowing (label truncates, no line exceeds the new width) and widening (full label reappears) after a resize.
  • go vet ./... and go test ./... pass.

Changelog

Added an ## Unreleased entry in CHANGELOG.md.

UI capture

This is a terminal (non-browser) interface with no browser-automation tooling available in this environment. Text captures of the picker's rendered output before and after the fix are included above per repository convention.

Closes #651

Agents: claude-code (claude-sonnet-5)

@lsegal lsegal changed the title Fix TUI not resizing on terminal resize Fix dashboard picker not resizing on terminal resize Sep 10, 2026
@lsegal
lsegal marked this pull request as ready for review September 10, 2026 22:47
@lsegal
lsegal merged commit 86c0d83 into main Sep 10, 2026
4 checks passed
@lsegal
lsegal deleted the fix/issue-651-tui-resize branch September 10, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: tui not resizing on term resize

1 participant