Open pschisa opened 9 months ago
Workaround is to utilize a larger terminal or the web UI for session recording replay
I think Teleport is doing the right thing here. We capture the size of the terminal in the session recording (both at startup and any time it changes thereafter), and during playback we emit the ANSI escape codes to resize the window.
It's up the the user's terminal emulator to decide whether or not to react to those codes.
For example, macOS's Terminal.app sees these escape codes and automatically resizes itself before playback starts. Here's what it looks like: https://www.loom.com/share/3ad4078e6ef841ecaad3c07afb5fb1c9?sid=bfea93e1-186b-4d3a-b2a6-3aa4e95e0a73
iTerm2 behaves differently. It has a dedicated setting for Disable session-initiated window resizing, but I was unable to get it to work even with this setting unchecked:
tl;dr: in order for console programs like vim to play back correctly, the terminal needs to be the correct size. Teleport is telling the terminal what size it should be, but some terminals choose not to listen to us.
Expected behavior: Teleport will present a auditable session recording with the
tsh play
in a terminal when vim is used during the sessionCurrent behavior: If the terminal is smaller than the one used to make the recording and vim is used, the recording becomes mangled upon replay during the vim session.
https://github.com/gravitational/teleport/assets/75806143/17f3bbf8-b269-4e10-b956-ceef23e63e90
Bug details: