-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Separate pruning of elevated/unelevated session buffers #19546
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
base: main
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
carlos-zamora
left a comment
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.
There's a few changes I'm confused about:
- Package-Dev.appxmanifest
- common.build.pre.props
I also think we want to keep the distinction between PersistLayout and PersistAll for #19341. May be worth testing persistence with both values, to be safe.
| <!-- For ALL build types--> | ||
| <PropertyGroup Label="Configuration"> | ||
| <PlatformToolset>v143</PlatformToolset> | ||
| <PlatformToolset>v145</PlatformToolset> |
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.
Intentional? Why?
| sessionIds.emplace(terminalArgs.SessionId()); | ||
| control.PersistTo(reinterpret_cast<int64_t>(file.get())); | ||
| bufferFilenames.emplace(std::move(filename)); |
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.
Shouldn't we only do this if _app.Logic().Settings().GlobalSettings().FirstWindowPreference() == FirstWindowPreference::PersistedLayoutAndContent?
| MovePane, | ||
| PersistLayout, | ||
| PersistAll | ||
| Persist, |
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.
Don't we want to keep the distinction between PersistLayout and PersistAll? See #19341
| <com:Extension Category="windows.comInterface"> | ||
| <com:ComInterface> | ||
| <com:ProxyStub Id="DEC4804D-56D1-4F73-9FBE-6828E7C85C56" DisplayName="OpenConsoleHandoffProxy" Path="OpenConsoleProxy.dll"/> | ||
| <com:Interface Id="E686C757-9A35-4A1C-B3CE-0BCC8B5C69F4" ProxyStubClsid="DEC4804D-56D1-4F73-9FBE-6828E7C85C56"/> | ||
| <com:Interface Id="6F23DA90-15C5-4203-9DB0-64E73F1B1B00" ProxyStubClsid="DEC4804D-56D1-4F73-9FBE-6828E7C85C56"/> <!-- ITerminalHandoff3 --> | ||
| <com:Interface Id="746E6BC0-AB05-4E38-AB14-71E86763141F" ProxyStubClsid="DEC4804D-56D1-4F73-9FBE-6828E7C85C56"/> | ||
| </com:ComInterface> | ||
| </com:Extension> | ||
| <com:Extension Category="windows.comServer"> | ||
| <com:ComServer> | ||
| <com:ExeServer DisplayName="OpenConsole" Executable="OpenConsole.exe"> | ||
| <com:Class Id="1F9F2BF5-5BC3-4F17-B0E6-912413F1F451"/> | ||
| </com:ExeServer> | ||
| <com:ExeServer DisplayName="WindowsTerminal" Executable="WindowsTerminal.exe"> | ||
| <com:Class Id="051F34EE-C1FD-4B19-AF75-9BA54648434C"/> | ||
| </com:ExeServer> | ||
| <com:SurrogateServer DisplayName="WindowsTerminalShellExt"> | ||
| <com:Class Id="52065414-e077-47ec-a3ac-1cc5455e1b54" Path="WindowsTerminalShellExt.dll" ThreadingModel="STA"/> | ||
| </com:SurrogateServer> | ||
| </com:ComServer> | ||
| </com:Extension> |
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.
Why?
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.
Woops. I keep this staged locally, because this makes it build & deploy with VS 2026 for me. I didn't intend to push this.
| } | ||
| break; | ||
| } | ||
| case BuildStartupKind::PersistLayout: |
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.
Seems like we'd want to keep the branches separate
Previously, launching an unelevated session after an elevated one would delete the latter's persisted buffers, and vice versa of course. Also, elevated buffers didn't have an ACL forbidding access to unelevated users. That's also fixed now.
Closes #19526
Validation Steps Performed
buffer_are renamed toelevated_if needed ✅