fix(ui): keep ConPTY sessions alive across Mission Control layout rebuilds
TerminalView kills its child process on any logical-tree detach unless BeginReparent() suppressed it, and RebuildOverviewGrid() detaches every existing pane whenever one is added - so opening a second interactive session killed the first. Focus-mode tab switches had the same defect. PtyTerminalSession now puts the control in permanent reparent mode after launch (teardown stays explicit via ConPtyPaneViewModel.Dispose -> Kill), and the new ConPtyPaneHost reparents each pane's single long-lived view across grid rebuilds and tab switches instead of letting the DataTemplate instantiate a dead replacement.
This commit is contained in:
@@ -8,8 +8,11 @@
|
||||
x:DataType="vm:MissionControlViewModel"
|
||||
x:Class="ClaudeDo.Ui.Views.MissionControl.MissionControlView">
|
||||
<UserControl.DataTemplates>
|
||||
<!-- ConPtyPaneHost reuses the pane's one long-lived view across layout rebuilds and
|
||||
tab switches — instantiating ConPtyPaneView here directly would detach (and, without
|
||||
reparent suppression, kill) the running session every time a pane is added. -->
|
||||
<DataTemplate DataType="vmm:ConPtyPaneViewModel">
|
||||
<mc:ConPtyPaneView Margin="6" />
|
||||
<mc:ConPtyPaneHost Margin="6" />
|
||||
</DataTemplate>
|
||||
</UserControl.DataTemplates>
|
||||
<DockPanel LastChildFill="True" Background="{DynamicResource VoidBrush}">
|
||||
|
||||
Reference in New Issue
Block a user