fix(interactive): use library LaunchProcess instead of custom pty bypass

The custom Porta.Pty bypass (own read loop, key tunneling, resize sync) rendered
wrong, lagged, and dropped input. The spike proved TerminalControl.LaunchProcess()
renders correctly and stays responsive, so hand pty/input/render/resize/focus back
to the library. PtyTerminalSession shrinks to a thin wrapper: apply descriptor.Env
process-wide (Porta.Pty inherits the process env; no per-launch env seam), set
Process/Args/StartingDirectory, LaunchProcess(). Process="" still suppresses the
control's auto-launch so exactly one process starts.
This commit is contained in:
mika kuns
2026-07-23 16:47:15 +02:00
parent bb62740ac8
commit 2b06ab0ab4
2 changed files with 26 additions and 264 deletions
@@ -7,8 +7,9 @@
x:Name="Root">
<!--
Process="" suppresses TerminalView.OnLoaded's built-in auto-launch (it otherwise spawns its
own cmd.exe/bash the moment this control loads). We drive the pty ourselves via
PtyTerminalSession/InteractiveTerminalViewModel instead.
own cmd.exe/bash the moment this control loads). PtyTerminalSession sets Process/Args/
StartingDirectory to our real target and calls TerminalControl.LaunchProcess() exactly once,
once the view model's descriptor is known (see AttachControl/Start).
-->
<term:TerminalControl x:Name="TerminalHost" Process="" />
</UserControl>