What happened?
While using pi in Windows Terminal, the terminal repeatedly scrolls to the top during normal TUI redraws.
The problem is caused by this sequence in pi-tui/dist/tui.js:
buffer += "\x1b[2J\x1b[H\x1b[3J";
\x1b[3J clears the terminal scrollback buffer. Removing only that sequence completely stops the unwanted scrolling:
buffer += "\x1b[2J\x1b[H";
The same extensions remained enabled before and after the modification.
This appears related to #4506, which was closed during the project refactor, but the problem is still present on Windows Terminal in pi 0.80.6.
Steps to reproduce
- Run pi in Windows Terminal.
- Use it until a full TUI redraw occurs. (I ask
pi to use find-skills skill to find some skills)
- Observe that the terminal viewport unexpectedly scrolls to the top.
- Remove
\x1b[3J from the fullRender clear sequence.
- Restart pi and observe that the scrolling no longer occurs.
Expected behavior
A full redraw should refresh the visible screen without clearing the terminal scrollback or changing the user's viewport position.
Version
0.80.6
What happened?
While using pi in Windows Terminal, the terminal repeatedly scrolls to the top during normal TUI redraws.
The problem is caused by this sequence in
pi-tui/dist/tui.js:\x1b[3Jclears the terminal scrollback buffer. Removing only that sequence completely stops the unwanted scrolling:The same extensions remained enabled before and after the modification.
This appears related to #4506, which was closed during the project refactor, but the problem is still present on Windows Terminal in pi 0.80.6.
Steps to reproduce
pito usefind-skillsskill to find some skills)\x1b[3Jfrom thefullRenderclear sequence.Expected behavior
A full redraw should refresh the visible screen without clearing the terminal scrollback or changing the user's viewport position.
Version
0.80.6