Currently the TerminalView rehosting can cause a crash in SwiftUI (this is worked-around for now, but it was tracked as issue #60). And while there is a workaround, a better design is probably warranted.
The Terminal generally tracks most of the terminal state, and TerminalView has a little bit of UI-level state. Independelty of this, SSH-capabilities were added in a subclass.
The idea would be to create as many TerminalView UIViews as necessary, which are only views into the underlying Terminal.
The reality is a bit more complicated due to SSH and the class hierarchy in place.
Perhaps the UIView state from TerminalView and the SSH state from SshTerminalView need to be moved out, the former into a TerminalViewSettings and the latter as being a separate capability. So that we could create as many TerminalViews as desired that are all just visual representations of the underlying Terminal+SSH connection state.
Currently the TerminalView rehosting can cause a crash in SwiftUI (this is worked-around for now, but it was tracked as issue #60). And while there is a workaround, a better design is probably warranted.
The
Terminal
generally tracks most of the terminal state, andTerminalView
has a little bit of UI-level state. Independelty of this, SSH-capabilities were added in a subclass.The idea would be to create as many
TerminalView
UIViews as necessary, which are only views into the underlyingTerminal
.The reality is a bit more complicated due to SSH and the class hierarchy in place.
Perhaps the
UIView
state fromTerminalView
and the SSH state fromSshTerminalView
need to be moved out, the former into aTerminalViewSettings
and the latter as being a separate capability. So that we could create as many TerminalViews as desired that are all just visual representations of the underlyingTerminal
+SSH connection state
.