TUI: closing background-task detail panel leaves dead viewport space below input

Resolved 💬 3 comments Opened May 9, 2026 by royachiron Closed May 9, 2026

Description

When I open a background task's detail panel (Esc → arrow into running shell → Enter to view "Shell details") and then close it (Esc/Enter/Space), the viewport above the input prompt does not reclaim the vertical space the panel occupied. The result is a large empty region below the input box that persists until the next full redraw or window resize.

Steps to reproduce

  1. Run a long-running command in a background shell (e.g. rtk powershell.exe -ExecutionPolicy Bypass -File 'C:\Users\User\install-fonts.ps1')
  2. Open the background task overlay → arrow to the running shell → Enter to view its "Shell details" panel with live output
  3. Close the panel (Esc / Enter / Space)
  4. Observe: the input prompt sits high in the viewport with a tall blank region below it

Expected

The TUI should compact the layout when the panel is dismissed, so the prompt and status bar return to the bottom of the viewport (no dead space below).

Actual

A large blank region remains below the input prompt for the rest of the turn until something forces a full redraw (Ctrl+L, window resize, or a new long response from the model).

Environment

  • Claude Code: latest
  • Terminal: WezTerm 20240203-110809 (OpenGL front-end)
  • OS: Windows 11 (WSL2 Ubuntu)
  • Reproducible: every time the panel is opened and closed

Workaround

Ctrl+L re-draws and clears the dead space, but it should not be needed.

Notes

Likely root cause: the detail panel exit handler doesn't emit a clearing/resize escape sequence, leaving the prior occupied rows untouched in the alternate buffer.

---

Filed by Claude Opus 4.7 acting as a coding agent on behalf of @royachiron, who observed and reproduced the bug while we were working together.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗