Skip to content

Keep TUI layouts readable and selections visible in small terminals - #151

Merged
lance0 merged 3 commits into
masterfrom
fix/responsive-tui-layouts
Oct 16, 2026
Merged

lance0 merged 3 commits into
masterfrom
fix/responsive-tui-layouts

Conversation

@lance0

@lance0 lance0 commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Small terminals currently squeeze every hop column until headings and numbers lose digits, and selecting a hop or target below the viewport leaves it invisible. Help and settings also clip their last controls at 80×24.

This change chooses complete columns that fit, keeps numeric cells intact (including large values), scrolls the selected hop and target into view, and gives IPv6 target addresses their own line. Help gains PgUp/PgDn/Home/End scrolling; settings follows the active section and API-key cursor. Close controls stay fixed, the status bar keeps help visible, and header warnings precede long destination/routing text. The Recent column is labelled and latency headings include milliseconds.

Stacked on #145 so its extension indicators and hop-detail scrolling remain available. Additional statistics are available in Enter → hop details when columns are omitted. Layout follows Ratatui's explicit sizing model: https://ratatui.rs/concepts/layout/.

Validation: full build, test suite (library, binary, integration and doctest), clippy with warnings denied, formatting, and documentation with warnings denied. Added buffer regressions at 60×20, 80×24 and 160×40 across all display modes, 64-hop selection, 20 IPv6 targets, short help/settings, long API keys, Unicode cell widths and large numbers.

@lance0
lance0 changed the base branch from fix/hop-extension-display to master October 16, 2026 15:49
lance0 and others added 3 commits October 16, 2026 11:50
PgUp/PgDn in help moved a fixed 10 rows, so on short terminals the rows
between pages were unreachable; page by the popup's visible height as hop
details now do. The mid-width status hints were chosen by a fixed 60-column
threshold that ignored the "? help" prefix and clipped "Enter details";
fall back to the short hints whenever the full set would not fit.
@lance0
lance0 force-pushed the fix/responsive-tui-layouts branch from 19f2404 to 58d364b Compare October 16, 2026 15:53
@lance0
lance0 marked this pull request as ready for review October 16, 2026 15:58
@lance0
lance0 merged commit aafd54e into master Oct 16, 2026
7 checks passed
@lance0
lance0 deleted the fix/responsive-tui-layouts branch October 16, 2026 16:13
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.

1 participant