Etherpad shutdown does not display disconnect info - information is just lost
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Spin up a 2.x Etherpad instance
- Access any pad
- Stop the server
- Nothing is displayed and you can still type
Expected behavior You should see a reconnect symbol and shouldn't be able to write anymore
was trying to reproduce this and with latest I do see a message:
It just takes almost 30 seconds to show
testing next on your branch to see the new behavior
Here is what I see now:
It says Reconnecting to your Pad but is it really reconnecting?
If I restart the server nothing really changes, also if we tab away the "Reconnecting" popup goes away and we get is a "frozen" pad where we can't type
See these short clips of the two different behaviors:
latest
We can see in the console that it is trying to reconnect, and after some attempts the You have been disconnected pops up and that stays open no matter what we try, we can move to another tab or click around the message stays.
https://github.com/ether/etherpad-lite/assets/545474/c2d73bfc-5208-48af-b165-f9a0337de502
silent-disconnect
With this branch the message Reconnecting to your pad... comes up right away, but the console does not show any attempt at reconnecting, I could turn the server back on but nothing changes, and if we move away from the tab the message goes away, and end user might think that it did reconnect but the UI is locked
https://github.com/ether/etherpad-lite/assets/545474/b67407a1-ff89-4d65-b1ac-ad574b1811a3
my 2-cents
I think is OK to silently try to reconnect a couple of times, latest is certainly trying too many times before we show the user some info, but if we are going to show a Reconnecting to your pad... it should really be trying to connect and the message should stay maybe after a few more tries show the same force button
If I'm reading the code correctly the existing retry behavior happens here:
https://github.com/ether/etherpad-lite/blob/b2be2ca71464f4da4852b9218d871adee04d194d/src/static/js/collab_client.js#L76-L104
maybe we should expose all those hardcoded values in the settings:
- How long between retry
- How long to wait before we show Reconnect message
If I'm reading the code correctly the existing retry behavior happens here:
perhaps is not there but here:
https://github.com/ether/etherpad-lite/blob/b2be2ca71464f4da4852b9218d871adee04d194d/src/static/js/pad.js#L219-L227
... or a combination of both places
If I'm reading the code correctly the existing retry behavior happens here:
https://github.com/ether/etherpad-lite/blob/b2be2ca71464f4da4852b9218d871adee04d194d/src/static/js/collab_client.js#L76-L104
maybe we should expose all those hardcoded values in the settings:
- How long between retry
- How long to wait before we show Reconnect message
The question would be how to sync those changes. For the settings sync to the client there needs to exist a socket io connection.
See these short clips of the two different behaviors:
latest
We can see in the console that it is trying to reconnect, and after some attempts the
You have been disconnectedpops up and that stays open no matter what we try, we can move to another tab or click around the message stays.Kazam_screencast_00013.mp4
silent-disconnect
With this branch the message
Reconnecting to your pad...comes up right away, but the console does not show any attempt at reconnecting, I could turn the server back on but nothing changes, and if we move away from the tab the message goes away, and end user might think that it did reconnect but the UI is locked https://github.com/ether/etherpad-lite/assets/545474/b67407a1-ff89-4d65-b1ac-ad574b1811a3my 2-cents
I think is OK to silently try to reconnect a couple of times, latest is certainly trying too many times before we show the user some info, but if we are going to show a
Reconnecting to your pad...it should really be trying to connect and the message should stay maybe after a few more tries show the same force button
I'm wondering why it is not working anymore. Normally the connect logic should be the same. Only the message changed. Do you have time to follow this up with a pr?
Do you have time to follow this up with a pr?
I'm still thinking about the best user experience... I do not like the "in your face" popup and frozen UI as soon as a connection is lost, maybe we show a small red label on the toolbar when a disconnection is detected, and just keep the existing "you have been disconnected" message
Do you have time to follow this up with a pr?
I'm still thinking about the best user experience... I do not like the "in your face" popup and frozen UI as soon as a connection is lost, maybe we show a small red label on the toolbar when a disconnection is detected, and just keep the existing "you have been disconnected" message
Hopefully this is fixed with the latest develop version. I'll create a release for that.