I often have tens of GitHub tabs open and GitHub somehow isn't good at keeping the notifications icon up to date: I often see the blue marker even if I read all the notifications in some other tab.
Would it be in the scope of this extension to periodically poll GitHub and clear the bell icon when all notifications have been read?
NPG does that already. It polls for notifications and keeps the number updated. Plus gives same page pop-overs to quickly glance/act on notifications. See if it helps! Cheers :)
NPG seems to customize the experience a lot (and I already encountered several bugs, like seeing zero notifications while I had some), ideally, Refined GitHub would only fix the blue dot presence.
@borekb um I have been using it for quite a few months and have not seen the issues you are experiencing.
Why don't you open an issue there?
@yakov116 because I'm not a user of NPG :) The scope of this feature request is much smaller than the ambition of NPG, and personally I want to stay close to the default GitHub experience. I think that the proposed visual fix would fit into Refined GitHub quite nicely, though I'm not sure if it's easy to implement.
@tanmayrajani correct me if I'm wrong. I think the only way to do that would be to make an api request every few seconds.
Which would mean that this feature would require a token (in order not to max out requests )
I am not 100% sure I am correct
Which would mean that this feature would require a token
Yes, but not if we fetch the /notifications page every few seconds (like we do with NPG).
@borek NPG has pretty much the same maintainers as this extension and technically already does what you ask.
The only thing missing is the option to disable the dropdown entirely, to just leave the number. Edit: it's there now
The number is actually another feature I don't want :)
From what I know and have experienced, GitHub already does this (It does update the notification icon, and removes the blue dot if there are no notifications left to read).
@notlmn I suspect it has something to do with having many tabs open and putting the computer to sleep occasionally. GitHub certainly _should_ hide the blue dot as you suggest but in practice, I often click a bell with a blue dot in some "old" tab only to find out that there are no actual notifications to read.
putting the computer to sleep occasionally
Yeah that's it; GH closes the websocket once the computer sleeps and the pages no longer update... sometimes.
I think it would be better to report this as a bug to GitHub => [email protected] They should re-establish the websocket connection when the computer awakes. They could use the page visibility API for this.
For now, NPG solves this problem.
That's right; recently I added a couple of options to NPG to hide the dropdown and number. Once everything is disabled, NPG will just keep the indicator up to date more reliably.
But this is essentially a GitHub websocket bug and you could report it to them
Most helpful comment
@borekb um I have been using it for quite a few months and have not seen the issues you are experiencing.
Why don't you open an issue there?