From 00a8d3126e2f4a4eb2ada5a08d0c9fd566562aa6 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Mon, 6 Apr 2026 17:06:45 -0600 Subject: [PATCH] fix: reduce TUI minimum width from 86 to 80 columns --- CHANGELOG.md | 6 ++++++ Cargo.toml | 2 +- src/tui.rs | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5c0436..e20cb41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [0.2.2] - 2026-04-06 + +### Fixed + +- TUI now fits in 80-column terminals (was 86). + ## [0.2.1] - 2026-04-06 ### Fixed diff --git a/Cargo.toml b/Cargo.toml index 5190f6b..6875c82 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "donglora-bridge" -version = "0.2.1" +version = "0.2.2" edition = "2024" authors = ["Stephen Waits "] license = "MIT" diff --git a/src/tui.rs b/src/tui.rs index 47db82b..eef9d87 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -245,8 +245,8 @@ fn draw_ui( series: &TimeSeries, ) { // Minimum terminal size for the 3-column layout. - if area.width < 86 || area.height < 12 { - let msg = format!("Terminal too small ({}x{}), need 86x12+", area.width, area.height); + if area.width < 80 || area.height < 12 { + let msg = format!("Terminal too small ({}x{}), need 80x12+", area.width, area.height); frame.render_widget( Paragraph::new(msg).alignment(Alignment::Center).style(Style::default().fg(C_RATE_DROP)), area, @@ -266,7 +266,7 @@ fn draw_ui( // Packet log columns: Age=5 Hash=8 RF=4 Net=4 Size=6 RSSI=6 SNR=5 Act=5 = 43 + 2 border + 1 pad = 46 let cols = Layout::default() .direction(Direction::Horizontal) - .constraints([Constraint::Length(30), Constraint::Length(46), Constraint::Min(10)]) + .constraints([Constraint::Length(30), Constraint::Length(46), Constraint::Min(4)]) .split(rows[1]); // Left column: Network, Radio, Stats stacked.