Describe the problem
VncConsole from extensions is currently broken. It flickers, (component re-renders unnecessarily) and finally disconnects causing 'Connection lost' messages in console.
How do you reproduce the problem?
This is pretty hard to reproduce on the docs or demo-app page. I reproduce by building the console package, package it locally in a tar, and testing it against cockpit-machines.
Any other information?
Although this change seems correct, e024073#diff-bf986d61c9b208d09c9cff07c052d59c216f3f9f5abb28fd745813052de6ec27 , we are assuming that this caused the problem. These functions will change whenever the component updated. This will cause the code in useEffect to rerun, which is unwanted, and causes the above mentioned behavior.
A correct solution would be to use useCallbac for the functions used inside the useEffect. Shortly tried it without much success yet.