Slow Internet / Disconnected warning

Can you reproduce it by going to my profile with chrome, clicking any link you see there, and then going back and foward multiple times on your browser? That seems to do the trick for me >___>

1 Like

I don’t get any warnings while doing that, using Chrome and Firefox on Mac.

I think I’m probably as far away from the OGS servers as you are :slight_smile:

What version of Chrome do you have, what OS etc etc?

… and … is it saying “Slow” or “Disconnected”? @Feijoa … what about your Brave case?

I get “Disconnected”:

Screenshot_20231003-171037_copy_594x188

Interestingly I’m also online according to the blue dot.

1 Like

Yeah - making the blue dot more up to date and reliable is A Thing.

That “disconnected” is likely to be true: your socket connection probably really did go away and needs to come back, now that you have come back to the page.

The tricky thing is working out how to tell the difference between this case, and one that you want to know about :sob: Ideas welcome…

2 Likes

https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API

There are blur and focus events when the site goes out of focus. There is also an API to know if the site is visible.

Yes, probably. I was just mad at the flashing red sign.

My singular use case is perfectly solved by having a toggle, and when I’m somewhere with a better connection and want to play live games, I can toggle it on.

Yesterday it was raining here, and I had a worse connection than usual, so I turned experimental features on again just now to see how it behaves with a relatively good (for me) connection.

With a game page open, I get the slow internet warning pop up and disappear every few seconds. I’m not sure what that translates to in terms of latency but I am able to use the site generally - pages load, moves get submitted. Sometimes I get error submitting move but that’s normal.

@mafidufa

2 Likes

Maybe I’m just mad that someone wants to turn off this thing I worked hard to put in place :smiley: :smiley:

How dare you? :stuck_out_tongue_closed_eyes:

Suppose that we do decide it needs to be turn-off-able … what kind of visible indicator would you tolerate that shows that it’s turned off?

I’m asking because one of the motivations for this feature is to be able to see clearly when people submit screenshots of “bugs” whether they have bad internet or not. So we’d really like to be able to see if this is turned off.

2 Likes

A more subtle indicator would be welcome. How about a red dot next to or in replacement of the blue dot?

Is it possible that it doesn’t flash off and on? Once the server detects that I have a slow/intermittent connection, it puts a red dot on my profile picture, but doesn’t take it away until the page is reloaded.

Edit: Or a red dot showing that I’ve disabled the warning is also fine now that I reread your question.

3 Likes

I guess maybe this is sightly mixing two different use cases.

One use case is a person with reasonably stable internet playing a live game (it doesn’t have to be fast even just playable), then their connection drops suddenly. Maybe they get an error submitting moves, maybe they it looks like the move submitted and the opponents clock is going down but actually it didn’t and their clock is still running!

^^ this I what I imagine the current indicator is supposed to tell you - you are not currently connected or your internet is temporarily unstable, maybe try to reconnect or at least don’t leave moves to the last second of byo-yomi.

The other use case is

This seems like a separate thing, just telling people they have a slow but maybe still relatively stable connection. Maybe it takes a little bit longer to submit moves or load pages but it does do it. Maybe you want to know about that, and something like changing the connection dot in games makes sense.


I don’t think the current icon use case should apply though. At the moment @GreenAsJade if it’s just checking whether the users ping drops below a threshold, if your connection unfortunately happens to hover around that threshold I can imagine this indicator flashing on and off a lot.

What about instead running an average ping test, say when a user starts a game, store that in local storage, and if they happen to drop below that average at some point then show the message, and when it restores it’s gone.

It’s still not quite this exact use case of course - the only thing I can think of is to find the slowest connection speed possible to still play live games at or load pages in a reasonable time - enough to even see the message at least and then set that as the check for “disconnected” :slight_smile:

1 Like

Or maybe average is a bit too in the middle and would have some flashing, so maybe average plus 1, 2 or 3 sigma as a threshold for the user. I’m not sure what’s reasonable because I don’t have an intuition for the scale of the potential deviation :slight_smile:

The problem is that if you are playing live then you want to know immediately, not after an average has been calculated. The timing precision that people expect for live games is well below the kind of latency that counts as “still connected”.

I’m in the process of making it show up promptly and clearly on the Game page (only), and have it more subtle on other pages.

Similarly, if you’re reporting a bug, we don’t want to be disguising the fact that you have poor internet, we want to know about that.

Actually, I think it may help to list the reasons for this feature, in priority order:

  1. To let players who are playing live know that they have a connection/latency problem
  2. To let us know when players report bugs if they have a connection/latency problem

These are what the current implementation tackles.

  1. To let players who are playing live know if they have a latency higher than their game speed.

#3 is not explicitly tackled yet. I’m not even sure if we need to do this, since the clock system already supposedly helps with this. But this would be the only reason for telling someone “slow but stable”.

(I think we’ve solved the Koba/Feijoa “it appears when I change tabs etc” case :crossed_fingers: . The solution for that is in review/test )

1 Like

The issue for me is getting a brief red box when navigating around ogs and switching tabs while the other tabs are loading, i dont really need a brightly coloured box teeling that things are slow, but its very distracting to have one constantly appear and then disappear. Please make it discreet so its not visually so annoying when it flashes on and off, or dont show it at all outside the game pages.

Having a red box appear and disappear all the time without actually telling users how to fix it isnt very useful, its just distracting.

If you mean like a corr game with 24 hour byo-yomis and im already on the last one and i only have 1-23 hours on my clock, i would prefer not having that at all. Only for games where theres the 5-minute disconnection timer might be ok enough.

1 Like

That is nothing to do with slow internet, it turns out it is simply a bug, to do with the way that connections work when you change tabs.

As I said:

2 Likes

FWIW the changes with anoek for review make so that the only times you’d see a red box are

  • If you are unexpectedly disconnected completely from the server

    • browser back and forth is “expected disconnection”: no red box :crossed_fingers:
  • If your connection latency deteriorates badly

    • In this case, you’ll only have the red box while it’s deteriorating: it will disappear if you reach a slow-but-stable state.
  • If your connection latency is truly awful (>15s pings)

I’ve tested it with 6s latency, there are no red boxes.

Also, if you’re not on the “Game” page, the warning is a discreet little thing in the very top right.

I’m hoping that between these tweaks, we might not need the “turn off” setting at all :crossed_fingers:

3 Likes

I’m happy to test it out. If it works as advertised, I think it will work for me. Thanks for making the changes, and quite fast too.

I think the changes are not live yet, correct?

3 Likes

Correct - all changes go through a review and a test, which is in anoek’s hands.

1 Like

Well that was the point in storing it in local storage. How often is the server pinged during a live game - compute the average in the first few second or minute of the game, store it as reference. When a new game is started, do the same again and overwrite the old value.

I’m not sure, but I think you’re maybe viewing the latency as static during the game?

Wheras the goal here is to detect when it changes during the game, quickly enough to alert the player that their internet has “gone band”.

For people with a good connection, we’ll ping every couple of seconds, so we can usefully alert someone in all but the worst case scenarios of blitz or byoyomi.

Sure but what I’m suggesting is that maybe comparing it to a flat baseline doesn’t necessarily work equally well for everyone. What I mean is, maybe someone with 5s latency knows and is used to having 5s latency and they make their games settings to take that into account.

What I was suggesting was a way to compute a per user benchmark rather than a flat user benchmark for everyone. You take some average over a number of pings and call that the “usual” latency for that player and store it or use the default if none is stored. Then when it gets worse than what they’re used to, the average maybe plus some standard deviation, then you give them the warning.

If someone is used to 0.14s say and then it starts dropping to 1s, 2s maybe they still want to know that since they’re expecting faster connection (even though it’s not 5 or 6s), and may need to adjust how they play, or refresh the connection, do something with their internet, or move location closer to their router, who knows.

Maybe someone with a bad connection some day ends up somewhere with fast wifi another day or vice versa.

Do you know what I mean?