vadimdemedes / ink

🌈 React for interactive command-line apps
https://term.ink
MIT License
26.4k stars 593 forks source link

SSH integration issue - each update is rendered as a separate output, without replacing the previous one #411

Open HemTech opened 3 years ago

HemTech commented 3 years ago

I’m trying to use ink controls to create server side react app. I’m using putty to test my app using telnet and ssh2. I’m able to control routing and focus of ink control in console/telnet server but ssh2 render it twice and each update is rendered as a separate output, without replacing the previous one.

Minimal reproducible example - https://gitlab.com/Hemendra.patel/inkapp

  1. start: "npm run build && node dist/cli.js" //command prompt,
  2. start_telnet: "npm run build && node dist/telnet/telnetserver.js",
  3. start_ssh: "npm run build && node dist/ssh/sshserver.js",

Do you have any idea what I could do to control ssh rendering?

vadimdemedes commented 3 years ago

I'm not sure if ssh affects terminal output in any way, so unfortunately I can't be helpful here. Where I'd start in debugging this is try to write a simple program that uses log-update and see how ssh handles output that is erased on every frame.