lichess-org / lila

♞ lichess.org: the forever free, adless and open source chess server ♞
https://lichess.org
GNU Affero General Public License v3.0
15.53k stars 2.27k forks source link

No notification of game start from analysis page if tourney page also open #11601

Open JakeQZ opened 2 years ago

JakeQZ commented 2 years ago

Exact URL where the bug happened

https://lichess.org/

Steps to reproduce the bug

  1. Create a private tournament
  2. Have one other player join (using link you sent them)
  3. Play a game
  4. Return to tourney, ready to play another
  5. (Whilst wiating) click on previous opponent in list of players
  6. Click on the game you just played (top-right - opens new tab)
  7. Keep the analysis board tab active
  8. Wait until you are paired again

What did you expect to happen?

Some notification (in the active analysis tab) that you have been paired for a new game, and should switch to it, because you only have 20 seconds to make your first move. Perhaps even automatically switching to the tab with the new game, if that's possible (window.opener.focus() may do the trick, depending how the analysis tab/window was opened).

What happened instead?

Nothing.

Operating system and browser version

Windows 10 Home, 21H1, 19043.2006 Firefox 105.0 (64-bit)

Please note

  1. This is part feature request, and part bug report
  2. The software/server clearly knows what other active Lichess tabs you have open, because if, whilst playing a game, you right-click on the tourney to 'open in a new tab' you get a big alert message saying "You are playing a game!"
  3. Addressing this issue would reduce the number of false starts (where a player gets timed out after 20 seconds)
  4. This is probably the most common reason for false starts during our private tourneys; never a week goes by without someone moaning that this has happened to them
  5. See also #11596, #11597 and #11599. I hope that by reporting these problems from a user perspective we can eliminate most false starts other than those that really are deliberate.
benediktwerner commented 2 years ago

It already plays a sound when a game starts (providing your browser doesn't block it) and sends you a native notification if you aren't on the page (provided you haven't blocked notifications for lichess.org).

JakeQZ commented 2 years ago

It already plays a sound when a game starts (providing your browser doesn't block it) and sends you a native notification if you aren't on the page (provided you haven't blocked notifications for lichess.org).

The things you put in brackets are the problem.

Re the sound, please see #11596.

Re notifications. Nobody should want nor accept native notifications. We do not want notifications from a website when we are not using it and have no tabs open on it. Maybe we don't understand how it works, but we don't want this invasion of privacy, or a whole extra plethora of native browser settings to deal with.

Please don't get with the W3C programme - it is rubbish.

Please do not dismiss and close these issues out-of-hand.

ornicar commented 2 years ago

I don't think we should aim to reinvent browser features. Browsers have a notification system, so we use it instead of redeveloping our own within Lichess.

JakeQZ commented 2 years ago

I don't think we should aim to reinvent browser features. Browsers have a notification system, so we use it instead of redeveloping our own within Lichess.

I must have inadvertently disabled it in my browser for all sites then. It also seems that everyone else I know has too.

Or maybe the browser feature isn't working in Firefox. Or perhaps there is a bug in Lichess wherein use of this feature has not been implemented correctly.

Please re-open this bug and look into it.

JakeQZ commented 2 years ago

@ornicar reopened this 25 minutes ago

Thanks for re-opening. Might be an issue specifically with Firefox, which most of us are using.

JakeQZ commented 2 years ago

@ornicar reopened this 25 minutes ago

Thanks for re-opening. Might be an issue specifically with Firefox, which most of us are using.

That said, I really don't think the built-in browser notification feature is fit for the purpose anyway. AFAIAA it does not stop notifications from websites you don't currently have open; and, thus, no-one in their right mind should use it. It is only suitable for social media sites for users who want constant updates, and for webmail to receive new email notifications without having the page open. Unless I have misunderstood how notifications work - but I assumed they are akin to push notifications on a phone.

ornicar commented 2 years ago

Browser notifications are great at notifying people, and it's exactly what we want to do, and I don't think there exist alternatives. Staring at the Lichess page waiting for a visual notification is not a solution, people will tab away. Start game sound is unreliable, as browsers tend to mute pages until they have a user interaction. And we can't expect players to give each other phone calls.

it does not stop notifications from websites you don't currently have open; and, thus, no-one in their right mind should use it

It should be enabled on a per-site basis.

schlawg commented 2 years ago

Browser notifications are great at notifying people, and it's exactly what we want to do

The best solution is user education. Yet another notification mechanism is definitely a headache that we don't need. Unfortunately, we still have ppl who love to play tournaments and refuse to learn how browsers work. Showing a flash header on site/study/tv/etc pages with a tournament link (or similar) when all relevant permissions are withheld is doable but should be a last resort.

I would leave this issue open and query some tournament organizers to assess how large this problem is (if that has not been done yet).

Note to JakeQZ: That is not an invitation to pepper this issue with further declarations that everyone will stop donating and delete their accounts if it's not addressed.

kraktus commented 1 year ago

The sound when paired will be played before switching to the game. Of course if the user didn't interact with the tournament lobby page there still is the same issue about autoplay sound restriction