[BUG] Plugin Pane: an absolute Box with overflow="hidden" draws its clipped content near the window's top after scrolling past it
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
In a plugin Pane on the fullscreen terminal, a Box with position="absolute" and overflow="hidden" clips its content correctly while its row is in view. Once the pane scrolls past that row, some of the clipped content is drawn on rows near the top of the window, and it stays there as the pane scrolls on.
What Should Happen?
Content that an overflow="hidden" Box clips is never drawn, wherever the window is scrolled.
Error Messages/Logs
None.
Steps to Reproduce
- A plugin draws this tree in a
Pane: 60 one-line rows, where row 2 is three lines tall and has an absolute Box that clips a 40-line column to the row.
<Box flexDirection="column">
{rows.map(n =>
n === 2 ? (
<Box key={`row-${n}`} flexDirection="column" paddingLeft={4}>
<Text>row {n} (clips a 40-line column)</Text>
<Text>second line</Text>
<Text>third line</Text>
<Box position="absolute" top={0} bottom={0} left={1} width={1} overflow="hidden">
<Text color="red">{Array(40).fill('X').join('\n')}</Text>
</Box>
</Box>
) : (
<Box key={`row-${n}`} paddingLeft={4}>
<Text>row {n}</Text>
</Box>
),
)}
</Box>
- Open the pane in a terminal wide enough to dock it. At the top, row 2 shows three
Xcells, as expected. - Scroll down with the wheel until row 2 is above the window.
- The window's first two rows show a red
Xat every scroll position after that:
X row 18
X row 19
row 20
row 21
A full repaint (ctrl+L) doesn't clear them.
Claude Model
Not model-related.
Is this a regression?
Don't know.
Claude Code Version
2.1.292 (Claude Code)
Platform
Anthropic API
Operating System
macOS 15.7.3
Terminal/Shell
Herdr in Ghostty. Also reproduced in tmux 3.7c.
Additional Information
Where it came up. A plugin draws tree lines beside list rows that wrap to any height. Each line is an absolute Box spanning its row, clipping a tall column of │. Once a row scrolled out of view, stray │ cells showed up elsewhere in the pane, with the row's background color. In that larger layout, they appeared at several rows, not only the window's first two.
Workaround. Put overflow="hidden" on the absolute Box's parent row instead of on the absolute Box. The row then clips the same content, and nothing leaks.