feat: improve responsive terminal UI#114
Conversation
graykode
left a comment
There was a problem hiding this comment.
lgtm — security clean (UI-only diff, no new deps/network/shell, mouse capture is the standard TUI tradeoff). solid responsive split: NarrowTab/NarrowSection in App with clamp_* keeping state coherent across panel toggles, the <DESKTOP_WIDTH branch handles tabs/sections/zoom + mouse + keyboard + scroll, and the new compact tests pin both rendered text and click targets so future width-threshold tweaks won't silently regress hit-testing. nice incidental cleanup moving the sessions.rs test module to end-of-file (fixes the pre-existing items_after_test_module warning). also confirmed merging current main and running cargo build / cargo test / cargo clippy --all-targets -- -D warnings is all green (133/133, 0 lint warnings) on top of the merge.
couple of follow-up nits, none blocking:
src/ui/mod.rs::session_atduplicates thedetail_reservedecision tree fromsrc/ui/sessions.rs::draw_sessions_panel(theif app.show_timeline ... else if inner.height <= 12 ... else ...ladder). same story forports_kill_atmirroringdraw_ports_panel's row layout (header + live + orphan + kill). these have to stay in lockstep for click hit-testing to land on the right row, and right now nothing structurally enforces that. extracting the row-layout decisions into a helper used by both renderer and hit-tester would prevent silent drift the next time someone adjusts column logic.- mouse capture disables the terminal's native text selection for most terminals (users have to hold Shift). worth a one-liner in README or
?help so new users know. set_narrow_tab(tab)silently no-ops when the tab has no visible panels, so pressingw/u/son a config where that group is fully hidden does nothing. small UX surprise; a flash status message ("no panels in this tab") would smooth it. happy to land as a follow-up.
Summary
Improve responsive terminal layout for compact panes.
Verification
cargo test