/plugin panel clips off the top edge in small terminal splits
Description
When running /plugin in a small terminal pane (e.g. Ghostty built-in splits), the interactive selector panel renders partially offscreen — clipped at the top edge of the pane.
Root cause
Claude Code detects that the cursor is near the bottom of the pane and correctly flips the panel to render upward. However, it doesn't check whether there is sufficient space above the cursor before choosing that direction. With a short pane (~24 rows) and the cursor partway down, the panel overflows the top edge.
The fix should check available space in both directions and either:
- Choose the direction with more room, or
- Clamp the panel height to fit whichever direction is chosen
Environment
- OS: Arch Linux
- Wayland compositor: Hyprland
- Terminal: Ghostty (using built-in split panes)
- Pane height: 24 rows (
tput lines= 24) - Claude Code version: latest
Steps to reproduce
- Open Ghostty and create a horizontal split, leaving one pane ~24 rows tall
- Run
claudein that pane - Type
/pluginand press Enter - Observe the panel renders upward and is clipped at the top of the pane
Expected behavior
The panel should fit within the visible pane area, either by rendering downward, rendering upward with clamped height, or scrolling within the panel.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗