-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[DxD] Add 'Automatic' as a mode for CloseOnExit #13560
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plumbing wise this is all great, but let's workshop the naming / phrasing
src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- update the schema plz
- update the docs plz
- update defaults.json (we're setting
closeOnExit
there) (check userDefaults.json too)
src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h
Outdated
Show resolved
Hide resolved
src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@carlos-zamora I've updated the schema and the defaults, will get to the docs after the PR merges |
Please make sure you update the pull request title and body to reflect what we settled on / what the PR actually does! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guys lemme tell you, I missed the discussion where you came up with "automatic" but I friggen love it
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Hey, since you're storing default terminal state on the pane... have you made absolutely certain it propagates to the correct child if you split it? And goes back up to the parent when you un-split it? This seems potentially risky to manage as pane specific state. |
I can confirm that no, it doesn't work once you split the pane. |
## Summary of the Pull Request In #13560 we added a member to `Pane` that lets it know if it was spawned as a default terminal session, but did not propagate that value when the pane gets split or when the pane closes. This commit fixes that. ## Validation Steps Performed A session spawned by a def term invocation remembers it even as it goes through splits
## Summary of the Pull Request Adds a new mode to `CloseOnExit`: `Automatic`. In this mode, if a process handed off by defterm terminates for whatever reason, we always close (i.e. we treat the mode as `Always`), but for processes launched by Terminal we terminate as with the `Graceful` behaviour. ## PR Checklist * [x] Closes #13325 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Detailed Description of the Pull Request / Additional comments - Adds a new enum value to `CloseOnExit` - Adds a new function to `Pane`: `FinalizeConfigurationGivenDefault`: this is a function that should be called when the pane is created via default terminal handoff, and can contain any special configurations we should set given that the pane was created via handoff ## Validation Steps Performed (cherry picked from commit 89d57e8) Service-Card-Id: 84836029 Service-Version: 1.15
## Summary of the Pull Request In #13560 we added a member to `Pane` that lets it know if it was spawned as a default terminal session, but did not propagate that value when the pane gets split or when the pane closes. This commit fixes that. ## Validation Steps Performed A session spawned by a def term invocation remembers it even as it goes through splits (cherry picked from commit 1a77834) Service-Card-Id: 84836635 Service-Version: 1.15
🎉 Handy links: |
Summary of the Pull Request
Adds a new mode to
CloseOnExit
:Automatic
. In this mode, if a process handed off by defterm terminates for whatever reason, we always close (i.e. we treat the mode asAlways
), but for processes launched by Terminal we terminate as with theGraceful
behaviour.PR Checklist
closeOnExit
should be sensible when launched via defterm #13325Detailed Description of the Pull Request / Additional comments
CloseOnExit
Pane
:FinalizeConfigurationGivenDefault
: this is a function that should be called when the pane is created via default terminal handoff, and can contain any special configurations we should set given that the pane was created via handoffValidation Steps Performed