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

Keep Web Shell and backing ConsoleShell PTY widths in sync #296

Open
notthetup opened this issue Nov 21, 2023 · 3 comments
Open

Keep Web Shell and backing ConsoleShell PTY widths in sync #296

notthetup opened this issue Nov 21, 2023 · 3 comments
Assignees

Comments

@notthetup
Copy link
Collaborator

Currently, we use xterm and xterm's add-on fit to paint the web-based terminal and resize it when the webpage is resized.

However, that changes the width of the terminal and we need to let the PTY know that this has happened so it can re-render.

Now, the problem is we use a single PTY to serve multiple web shells, so there is no way we can keep all those web shells in sync while they resize.

So we need to explore of ways we can resize the web shell without changing it's width.

@notthetup notthetup changed the title Keep Web Shell and backing ConsoleShell PTY width's in sync Keep Web Shell and backing ConsoleShell PTY widths in sync Nov 21, 2023
@notthetup
Copy link
Collaborator Author

1920x1080 Monitor : rows: 56 cols: 212
MBP Monitor : rows: 47 cols: 167
iPhone SE : rows: 102 cols: 108
iPhone 14 : rows: 124 cols: 108
Samsung Galaxy S8+ : rows: 118 cols: 108
Samsung Galaxy S20 : rows: 126 cols: 109
iPad Air :  rows: 69 cols: 90

@ettersi
Copy link
Collaborator

ettersi commented Jul 12, 2024

We discussed that one option might be to have the shell size follow the first connected web shell.

  • Advantage: We get the ideal behaviour if there is only a single connected shell.
  • Disadvantage: Might be confusing / annoying if you forget / lose track of the first tab you opened.

@notthetup
Copy link
Collaborator Author

We discussed that one option might be to have the shell size follow the first connected web shell.

  • Advantage: We get the ideal behaviour if there is only a single connected shell.
  • Disadvantage: Might be confusing / annoying if you forget / lose track of the first tab you opened.

Indeed. But there is no clean way to support using a single PTY to serve multiple web shells where each could have a different number of rows/columns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants