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

Improving session restore functionality #46

Open
Aetf opened this issue Jun 13, 2024 · 2 comments
Open

Improving session restore functionality #46

Aetf opened this issue Jun 13, 2024 · 2 comments
Labels
big This will require a lot of work enhancement New feature or request

Comments

@Aetf
Copy link
Contributor

Aetf commented Jun 13, 2024

Overview

Shpool currently has a session restore feature that uses an in-memory terminal emulator implementation to record shell output, and then generate appropriate format codes and data to restore the last known screen state when a user reconnects. There are some issues with the current functionality that we would like to address.

Problem

The current in-memory terminal crate we use, shpool_vt100, has some issues. In particular, it does not use a very memory efficient representation of the terminal, and a lack of correct text wrapping supports means we need to make each line 10k characters long. Worse than the excessive resource consumption though is the fact that not all control sequences are correctly handled, resulting in output being occasionally mangled.

List of control sequences we may consider support:

Potential Solution

Fixing the shpool_vt100 crate and replacing it with a new crate, which could either be written from the ground up or extracted from one of several existing rust terminals.

Currently wezterm-term looks promising, but it is not published to crates.io, and we need more investigation to see if it actually fits shpool's use case.

Other terminals considered:

@Aetf Aetf added the enhancement New feature or request label Jun 13, 2024
@Aetf
Copy link
Contributor Author

Aetf commented Jun 13, 2024

+@ethanpailes @jalberss

@Aetf
Copy link
Contributor Author

Aetf commented Jun 14, 2024

I'll try to integrate wezterm-term, and @jalberss will give alacritty a try. We will see which one works better, or we need to write one from scratch after all.

In the end of the day, if we end up with both. We can have a selection of backends for the user to choose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
big This will require a lot of work enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants