[Sprint/TrendyTurtle](feat): Added in error message on socket connection breaking. #2115
Summary
Closes #2115 MR to add an error message in to show the user when their connection to live comments has been lost.
Steps to test
This can be tested pretty simply.
- Make a post or go to visit one https://feat-socket-error-comments-2115.minds.io/newsfeed/1049089523444617221
- Keep the page open, drag the tab into its own window so you can watch it whilst you do step 3.
- On the pipeline of this MR. Run the stop job. Do not refresh the page.
- Wait and the disconnect message will show (because the stop job killed the sockets container)
- Don't close the window!
- Start the job again.
- The message should go away when the connection is re-established.
Estimated Regression Scope
The worst-case scenario is are that something could break in sockets or thread comments. E.g. the error showing at inappropriate times if the error is for some reason called more times than necessary on prod, or maybe the load more of the comments thread.
added scoped label
added scoped label
changed the description
added scoped label and automatically removed label
- Developer
Just to highlight, this would not be particularly difficult to implement in other areas of the site.
approved this merge request
- Developer
Error messaging looks great. Fantastic steps to recreate, Ben.
assigned to @xander-miller
assigned to @edgebal
- Developer
I need help replicating this @benhayward.ben When I stopped the pod through gitlab. I couldn't start it up again.
- Resolved by Ben Hayward
- Developer
@xander-miller I'll be happy to help but the pipelines appear to be up and working now. Drop me a message if you run into this issue again.
assigned to @benhayward.ben and unassigned @edgebal and @xander-miller
added scoped label and automatically removed label
- Developer
Spoke with Mark about this.
This should also cover a "false connection" state that can be simulated by deleting cookies when on the site. The message should also reload the comments, to get any ones missed during the outage, as the socket messages are not in a LIFO queue as I'd originally anticipated.
added 38 commits
-
41448c5b...ea067e71 - 36 commits from branch
master
- ff3bf7f9 - Merge branch 'master' of gitlab.com:minds/front into feat/socket-error-comments-2115
- 72d2d7c5 - Added in retry logic
-
41448c5b...ea067e71 - 36 commits from branch
resolved all threads
- Developer
I could not replicate the false connection state by clearing my local storage, but did add the reconnect feature in.
- Developer
@brianhatchet @markeharding can we merge this in and try to find the false connection state in another card? This change is stagnating.
- Developer
Fine by me.
approved this merge request