Skip to content

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

Description

@letv1nnn

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

Environment

  • OS: macOS (Darwin 25.5.0)
  • OpenShell: v0.0.85 (latest as of 2026-07-16)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:triage-neededOpened without agent diagnostics and needs triage

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions