Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect resizing of CLI apps in Teleport Connect on Windows #37404

Closed
ravicious opened this issue Jan 29, 2024 · 3 comments
Closed

Incorrect resizing of CLI apps in Teleport Connect on Windows #37404

ravicious opened this issue Jan 29, 2024 · 3 comments
Labels
bug teleport-connect Issues related to Teleport Connect.

Comments

@ravicious
Copy link
Member

Expected behavior:

The top bar in nano takes all available space.

connect-12-1-1

Current behavior:

The top bar in nano is cut off after the last text character.

connect-14-3-3

This was introduced by the update of xterm to 5.1.0 and xterm-addon-fit to 0.7.0 (#20767). For example, in v12 it was added in v12.1.2. v12.1.1 works correctly.

Bug details:

  • Teleport version v12+
@gzdunek
Copy link
Contributor

gzdunek commented Jan 30, 2024

From what I tested, we could improve the behavior by enabling useConpty in nodePty options.
Additionally, we should pass windowsPty options to xterm.js.

I remember that the reason for disabling conpty was issues on windows server/11, but maybe we could enable it by default and add a config option to explicitly disable it, similarly to vscode? https://code.visualstudio.com/docs/terminal/advanced#_windows-and-conpty
Another benefit is that the terminal renders more accurate colors.

windows-conpty.mov

I checked if passing only backend: 'winpty' to xterm.js improves the current situation, but I didn't see much difference.

EDIT: I also looked at the PR that disabled conpty #22971.
Updating node-pty to 1.0.0-beta.6 fixes the error thrown when the shell is closed by closing the tab. Unfortunately, AttachConsole failed error after typing exit is still there.

@ravicious
Copy link
Member Author

The issue with resizing has been addressed by #36568 and which got released in 15.0.0. At the time of creating this issue I didn't check if the master version fixes the problem in any way. I probably forgot that Xterm.js was updated on master.

@gzdunek What do you say about closing this issue and creating another one specifically about enabling conpty on Windows? I can draft the issue later this week. Having a setting for Conpty and Winpty is a good idea, I think.

@gzdunek
Copy link
Contributor

gzdunek commented Feb 6, 2024

What do you say about closing this issue and creating another one specifically about enabling conpty on Windows? I can draft the issue later this week.

Sounds good, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug teleport-connect Issues related to Teleport Connect.
Projects
None yet
Development

No branches or pull requests

2 participants