bug(tui): TUI layout does not reflow on terminal resize
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 8.7k
- Forks
- 1.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 253
Description
Agent Diagnostic
- Skills loaded: tui-development, cavecrew-investigator
- OpenShell version tested: v0.0.85 (latest as of 2026-07-16)
- Latest release checked: v0.0.85 — confirmed via gh release list --repo NVIDIA/OpenShell
- Possible duplicates reviewed: searched NVIDIA/OpenShell for "resize", "tui layout", "button hint", "nav bar", "window resize" — no matches for this specific bug
- Findings: Resize handler at lib.rs:419 discards the event with {}. ratatui 0.26.3 uses diff-based rendering — stale cells from a prior larger frame persist after terminal shrink+expand cycles. draw_nav_bar (mod.rs:469) and layout (mod.rs:33) are both responsive to frame.size(), but the buffer is never cleared on resize
Description
Actual behavior: Resizing the terminal window does not reflow the TUI. Button hints in the nav bar and some fields remain at their original rendered size, either clipped (when shrinking) or leaving stale cells from a prior larger frame (when expanding after shrink).
Expected behavior: All UI elements — nav bar hints, fields, panels, scale to the new terminal dimensions immediately after resize.
Before resizing
After
Reproduction Steps
- Launch the TUI:
openshell term - Navigate to Dashboard (default screen)
- Drag terminal window edge to shrink horizontally or vertically
- Observe: nav bar hints at bottom clip and do not reflow to new width
- Drag window edge back to original size
- Observe: stale cells from prior larger frame persist; layout does not re-expand
After resize, pressing any key does not fix rendering. draw() runs but stale cells persist — autoresize() + clear() does not resolve the artifact.
Environment
- OS: macOS (Darwin 25.5.0)
- OpenShell: v0.0.85 (latest as of 2026-07-16)
- TERM=xterm-256color
- Terminal emulator: tested across multiple — reproduces universally
Logs
Agent-First Checklist
- I pointed my agent at the repo and had it investigate this issue
- I loaded relevant skills (e.g.,
debug-openshell-cluster,debug-inference,openshell-cli) - I checked the latest OpenShell release and either reproduced the issue there or explained why I cannot upgrade/test it
- I searched existing issues for possible duplicates or explained why I could not
- My agent could not resolve this — the diagnostic above explains why
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the resize handler in lib.rs:419, then read the TUI layout in mod.rs:33 and draw_nav_bar in mod.rs:469. Run openshell term and reproduce the shrink, expand, and redraw sequence while tracing the render path. Done means the nav bar, fields, and panels reflow immediately at the new dimensions without clipped or stale cells.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100