As simple as it sounds: if the websocket closes, try to re-establish the connection periodically. For example, maybe the network connection dropped and then came back up. Most people expect webmail applications to automatically handle this and not just stop - this way, people can continue to receive notifications without even knowing that anything happened.
As part of this, a hidden menu could be added somewhere to show how long the current connection has been active, for users that want to see these stats on demand.
You must be
10/3/2024 5:54 PM — InterLinked
Autoresolved by code commit on GitHub:
wssmail: Add option to autoreconnect upon disconnect.
https://github.com/InterLinked1/wssmail/commit/962475a16eddbebf232d074ce5e2f043e29165aa