claude-code - 💡(How to fix) Fix TUI: closing background-task detail panel leaves dead viewport space below input

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.

Root Cause

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.

Fix Action

Workaround

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

RAW_BUFFERClick to expand / collapse

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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix TUI: closing background-task detail panel leaves dead viewport space below input