You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(tui): responsive layout optimizations for small panes #5
In multi-pane layouts (4x2 to 6x6+), individual panes can be as small as 30x7 columns. The current UI has several issues at these sizes:
Input box can grow to 10 lines, leaving 0 rows for messages
Info widget overlays overlap the transcript when the messages area is tiny
Status line text overflows silently in narrow panes (< 35 cols)
The idle donut reserves 14 rows even in 7-row panes
Changes
1. Input height cap at pane_height / 3
crates/jcode-tui/src/tui/ui.rs
Clamps base_input_height to min(wrapped_lines, 10, pane_height / 3). In a 7-row pane this limits input to 2 rows (was 5), giving the transcript 3 extra rows.
2. Suppress info widget overlays when messages area < 5 rows
crates/jcode-tui/src/tui/ui.rs
Adds messages_area.height >= 5 to the overlay rendering condition. When the messages area is too small, overlays are skipped entirely.
3. Truncate status line in narrow panes
crates/jcode-tui/src/tui/ui_input.rs
New truncate_line_for_narrow() helper truncates status line spans to fit within max_cols with ellipsis when area.width < 35. Tracks cumulative width across multiple spans to prevent overflow.
4. Suppress idle donut in small panes
crates/jcode-tui/src/tui/ui_animations.rs
Adds available_height parameter to idle_donut_reserved_height(). When pane height < 8 rows (MIN_PANE_FOR_DONUT), donut is suppressed unconditionally so every row is available for content.
Testing
truncate_line_for_narrow: 4 unit tests (short text, long text with ellipsis, multi-span cumulative width, empty line)
idle_donut_reserved_height: 1 new test for small-pane suppression + updated existing test for new signature
Activity
test(openrouter): add 7 deterministic FR-A/B/C/D regression tests
test(openrouter): add 7 deterministic FR-A/B/C/D regression tests