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

Restore terminal sessions across application restarts #131634

Closed
Tyriar opened this issue Aug 25, 2021 · 3 comments
Closed

Restore terminal sessions across application restarts #131634

Tyriar opened this issue Aug 25, 2021 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality on-release-notes Issue/pull request mentioned in release notes on-testplan terminal Integrated terminal issues

Comments

@Tyriar
Copy link
Member

Tyriar commented Aug 25, 2021

I have looked in the past at supporting the auto creation of terminals for workspaces and my conclusion was that the amount of customization that people wanted would be too much to add to core and would be best left to an extension. With the upcoming terminal location API extensions will be able to accomplish this properly.

The major case of restoring terminals across restarts without bringing in the complexity of a pty host that lives outside of the main process could be solved by saving the all terminal buffers/cwd/icon/etc. on a restart and restoring them similar to how Terminal.app restored when macOS is updated where it will restore the buffer, print something like [Session restored from <datetime>] and then create a new shell. This in combination with task reconnection and similar restoration should make the restart VS Code experience really nice.

Right now the plan is to look at this in the November iteration after our clean up iteration.

cc @alexr00: I'm not sure right now how tasks would get their buffer restored yet but it would probably need something beyond #117408 to create a new task using an existing terminal.

@Tyriar Tyriar added feature-request Request for new features or functionality terminal Integrated terminal issues labels Aug 25, 2021
@Tyriar Tyriar added this to the On Deck milestone Aug 25, 2021
@bpasero
Copy link
Member

bpasero commented Aug 25, 2021

Important for me would be that terminals used for tasks (watch etc.) are not piling up more and more:

image

I.e. are being reused when I run the build task again.

What is the particular challenge to connect back to an existing terminal, esp. for the window reload case where shared process is not going down?

@Tyriar
Copy link
Member Author

Tyriar commented Aug 25, 2021

@bpasero window reload to reconnect to existing task processes is tracked in #117408. No particular challenge AFAIK apart from resources/time.

This issue is about restarting and restoring the buffer but creating new processes and running new tasks.

@Tyriar
Copy link
Member Author

Tyriar commented Sep 16, 2021

Just merged this in, will likely get a bit of polish over the next week.

@Tyriar Tyriar closed this as completed Sep 16, 2021
Tyriar added a commit that referenced this issue Sep 20, 2021
@rzhao271 rzhao271 added verification-needed Verification of issue is requested on-testplan and removed verification-needed Verification of issue is requested labels Sep 29, 2021
@meganrogge meganrogge added the on-release-notes Issue/pull request mentioned in release notes label Oct 1, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-release-notes Issue/pull request mentioned in release notes on-testplan terminal Integrated terminal issues
Projects
None yet
Development

No branches or pull requests

4 participants