NVIDIA / NVIDIA/OpenShell

bug(tui): TUI layout does not reflow on terminal resize

Open
#2,320 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

state:triage-needed
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

Image

After

Image
Reproduction Steps
  1. Launch the TUI: openshell term
  2. Navigate to Dashboard (default screen)
  3. Drag terminal window edge to shrink horizontally or vertically
  4. Observe: nav bar hints at bottom clip and do not reflow to new width
  5. Drag window edge back to original size
  6. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.