Repository navigation
feat(sessions): add an option to close tabs when a session ends - #35
Merged
Merged
Conversation
- Add a General setting to close the tab when a remote session ends cleanly, such as exit over SSH or signing out of a desktop - Keep the current Reconnect banner as the default - Keep tabs for failed sessions and user-requested disconnects - Defer the close so SSH surfaces aren't freed in their exit callback
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a remote session ended from the remote side, for example typing
exitover SSH, the tab always stayed open with a "Session disconnected" banner and a Reconnect button. Sometimes you just want the tab gone.Settings → General → Sessions now has a "When a remote session ends" option:
"Ends cleanly" means SSH exited with status 0, or an RDP/VNC session was ended by the remote side without an error, such as signing out of Windows. These cases always keep the tab, so you can still read the error or reconnect:
The tab closes a moment after the session ends rather than inside the terminal's exit callback. Freeing the SSH terminal surface from within its own callback could crash the app. If you reconnect or close the tab in that moment, the automatic close is skipped.
Testing
sshd, using a scratch library and a separate bundle ID:exit: the tab stays with the Reconnect banner.exit: the tab closes and the app keeps running.exit 3: the tab stays, showing "SSH exited with status 3."