Skip to content

Gracefully handle websocket disconnection in web terminal

Description

Currently when Workhorse closes the websocket connection the web terminal becomes just unresponsive - the text that I type in does not appear in the screen. In the Chrome developers console I get:

WebSocket is already in CLOSING or CLOSED state.

We should at least provide some feedback to the user or, ideally, attempt to reconnect.

Proposal

  1. Display a message that connection was terminated
  2. Try to reconnect

UX

pipelines-environments__terminal--closed

Links / references

/cc @nick.thomas @fatihacet