Add SSH backend and custom-backend row diff rendering#33
Add SSH backend and custom-backend row diff rendering#33laudney wants to merge 1 commit intopcharbon70:developfrom
Conversation
|
I have no problem with adding an extra backend but wondering where the issue is coming from. I have tested (actually even developped) the library over SSH and tested all the examples with both OTP 28 (raw) and TTY backend with Iex. Can you give me some more context? |
|
Thanks for the feedback! To clarify — this isn't about SSH-as-a-client not working. The existing Raw/TTY backends work fine when you SSH into a machine and run a TermUI app. This PR targets a different scenario: hosting TermUI apps inside an OTP
If this use case isn't on the roadmap, happy to close — but the session isolation changes in the Runtime (unique BufferManager names, gating global state mutations) may be worth considering regardless. |
|
Thanks for the explanation and this is definitely a good addition. The roadmap for v1 is not set in stone so this is a good addition now before the I start on the crazy idea for v2. I will merge this today when I have a few minutes to resolve the conflicts. |
Summary
Adds a first-class SSH backend and a custom-backend rendering path in
Runtimethat is optimized for remote PTY sessions.Why
Remote rendering over SSH has different failure modes than local raw TTY rendering:
This PR introduces a dedicated backend and runtime path so SSH sessions are stable without regressing local raw/TTY behavior.
What changed
New backend
TermUI.Backend.SSHwith:update_size/3)Runtime custom-backend support
:ssh_input,:ssh_resize).Terminalsingleton assumptions).Buffer.fill/2and optional runtime:backgroundsupport for deterministic first-frame rendering.BufferManagernames to avoid cross-session collisions.Tests
TermUI.Backend.SSH.Validation
mix test test/term_ui/backend/ssh_test.exs test/integration/ssh_runtime_rendering_test.exs