spec: propose an evolution of closeOnExit#2039
Conversation
|
TODO:
|
|
Shouldn't You want it to close when there is a successful (0) exit code? Or am I getting mixed up? |
|
I also find this confusing. For me the default should be that But you could also support the opposite. Say someone has long running job in the background and if it fails he can immidiately see that terminal / tab closes (it's less important if it has just finished). |
|
@glen-84 correct: if If the default switched the other way (close if |
|
@mcpiroman that is what is suggested here (default= |
|
but there could be another option, |
|
@DHowett Since the spec text was not updated, I'm not sure if you realized that I was pointing out an issue on line |
|
@glen-84 I definitely misread your comment 😄 |
|
|
||
| 1. The existing `closeOnExit` profile key will become an enumerated string key with the following values/behaviours: | ||
| * `always` - a tab or pane hosting this profile will always be closed when the launched connection terminates. | ||
| * `graceful` - a tab or pane hosting this profile will be closed **iff** the launched connection closes with an exit code == 0. |
|
Shorthand for “if and only if” |
|
Is there already an issue that will implement the specified graceful behavior? I'd love to see this feature and an issue to subscribe would be nice. |
|
I am clearing the review status of all signed-off reviewers, and adding @mcpiroman. @mcpiroman: This spec is inspired by your work in #2091, with some minor refinements. Thank you. 😄 |
stale
1a1d5e0 to
5763be3
Compare
doc/specs/#2563 - closeOnExit and TerminalConnection evolution.md
Outdated
Show resolved
Hide resolved
doc/specs/#2563 - closeOnExit and TerminalConnection evolution.md
Outdated
Show resolved
Hide resolved
carlos-zamora
left a comment
There was a problem hiding this comment.
Just throwing a few discussion points out there. Looks good :)
doc/specs/#2563 - closeOnExit and TerminalConnection evolution.md
Outdated
Show resolved
Hide resolved
doc/specs/#2563 - closeOnExit and TerminalConnection evolution.md
Outdated
Show resolved
Hide resolved
Co-Authored-By: Carlos Zamora <carlos.zamora@microsoft.com>
zadjii-msft
left a comment
There was a problem hiding this comment.
I presumed that the UI considerations for this feature would be a part of this spec - like what the Terminal does in response to failed connections for graceful/never. That's what I'm really curious about here.
Carlos has some other nits I agree with, but the rest of this seems sane
doc/specs/#2563 - closeOnExit and TerminalConnection evolution.md
Outdated
Show resolved
Hide resolved
zadjii-msft
left a comment
There was a problem hiding this comment.
Yea I like the look of this
This pull request implements the new `ITerminalConnection::ConnectionState` interface (enum, event) and connects it through TerminalControl to Pane, Tab and App as specified in #2039. It does so to implement `closeOnExit` = `graceful` in addition to the other two normal CoE types. It also: * exposes the singleton `CascadiaSettings` through a function that looks it up by using the current Xaml application's `AppLogic`. * In so doing, we've broken up the weird runaround where App tells TerminalSettings to CloseOnExit and then later another part of App _asks TerminalControl_ to tell it what TerminalSettings said App told it earlier. `:crazy_eyes:` * wires up a bunch of connection state points to `AzureConnection`. This required moving the Azure connection's state machine to use another enum name (oops). * ships a helper class for managing connection state transitions. * contains a bunch of template magic. * introduces `WINRT_CALLBACK`, a oneshot callback like `TYPED_EVENT`. * replaces a bunch of disparate `_connecting` and `_closing` members with just one uberstate. * updates the JSON schema and defaults to prefer closeOnExit: graceful * updates all relevant documentation Specified in #2039 Fixes #2563 Co-authored-by: mcpiroman <38111589+mcpiroman@users.noreply.github.com>

Summary of the Pull Request
This pull request introduces a specification for the next generation of
closeOnExit.References
#1364 #1770
PR Checklist
Detailed Description of the Pull Request / Additional comments
Look at the spec.
Validation Steps Performed
It is a spec.