Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yellow icon with exclimation point saying there are notifications available. But I can't find them anywhere #285

Open
snab43 opened this issue Sep 30, 2024 · 5 comments

Comments

@snab43
Copy link

snab43 commented Sep 30, 2024

My Syncthing Tray icon is green with an exclamation point. When I hover it says "Notifications available". But I can't find where these notifications are? I've looked everywhere and can't find any notifications to view or dismiss. Is it because one of my remote devices is disconnected? I have 3 devices syncing together and they're not always on at the same time.

Very minor issue, but I'm just a bit baffled by this.

@Martchus
Copy link
Owner

Martchus commented Oct 1, 2024

Are you using the Plasmoid or the Qt Widgets based version? A screenshot would help as well. It would generally be helpful to not completely dismiss the issue template - it is there for a reason.

@snab43
Copy link
Author

snab43 commented Oct 1, 2024

Sorry about that! I read through it but figured it wasn't too relevant to my very minor issue. Figured I was just dumb and missing something obvious.


Relevant components

  • Standalone tray application (based on Qt Widgets)
  • Plasmoid/applet for Plasma desktop
  • Dolphin integration
  • Command line tool (syncthingctl)
  • Integrated Syncthing instance (libsyncthing)
  • Backend libraries

Is your feature request specific to a certain platform/environment? Please specify.
Windows 10

Is your feature request related to a problem? Please describe.
Persistent "Notifications available" and green icon

Describe the solution you'd like
Where to find the notifications and how to dismiss or attend to them.

Describe alternatives you've considered
Checking off all the "Notify on" options under Settings > Tray > Notifications. This didn't fix it.

Additional context
image

image

image

@Martchus Martchus changed the title Green icon with exclimation point saying there are notifications available. But I can't find them anywhere Yellow icon with exclimation point saying there are notifications available. But I can't find them anywhere Oct 3, 2024
@Martchus
Copy link
Owner

Martchus commented Oct 3, 2024

Ok - so you could even reproduce the issue again and recreate screenshots.

I've just tested the behavior of Syncthing Tray on notifications. There are definitely some limitations that I should probably fix. However, if there's a notification (according to Syncthing Tray) it will allow you to show it by clicking on the Syncthing Tray icon itself and within the GUI of Syncthing Tray itself you should be able to see a dropdown menu regarding notifications. You can "Show" and "Dismiss" them. This part definitely worked in my tests (even though "Show" also dismissed them at the same time but I guess that's how I initially designed it).

Note that the web GUI might not show the notifications anymore because they are already dismissed. Unfortunately you'll have to dismiss the notifications in Syncthing Tray additionally at this point. That's one of the limitations.

I suppose I'll rework the notification handling code so it will always show the exact same set of notifications that the web GUI does instead of cutting corners. Note that it'll be never perfect because Syncthing has no event API for notifications. So it will always take a little bit of time for the state of notifications to become in-sync between different GUIs.

Martchus added a commit that referenced this issue Oct 3, 2024
* Always consider full set of errors for when to show exclmation icon and
  button
    * Consider notifications as gone if the set of error became empty, e.g.
      cleared by web GUI
    * Remove code for tracking unread notifications
* Emit notifications only for errors that occurred after the connection has
  been established to avoid showing undismissed notifications multiple
  times on re-connects (like it was already before this change)
* Use a model to show errors
* Do not implicitly clear errors when opening the dialog to show them; add
  a clear button to the dialog instead
* See #285
@snab43
Copy link
Author

snab43 commented Oct 3, 2024

I appreciate you looking into this! Also sorry, I'm colorblind and have trouble with green/yellow lol.

Yeah it was that yellow icon for a few days, but I just checked today and it's back to normal. Maybe it was a computer restart, can't remember anything I did differently:
image

I couldn't see any notifications on the Syncthing Tray settings, personally. When I click on the icon it brings up a Chromium window for Syncthing. In the settings I've never seen any drop downs.

But regardless, it seems like you may understand what's going on and I really appreciate the help again! Sorry for my initial lack of info, hopefully this was a helpful thread!

@Martchus
Copy link
Owner

Martchus commented Oct 3, 2024

Also sorry, I'm colorblind and have trouble with green/yellow lol.

No problem; I've just felt compelled to correct this. Note that you could configure more distinctive colors in the settings - although the exclamation mark is probably distinctive enough.

I couldn't see any notifications on the Syncthing Tray settings, personally.

I didn't mean the settings dialog but the UI shown in this screenshot.

When I click on the icon it brings up a Chromium window for Syncthing.

If you're not getting the mentioned UI by clicking on the icon you have probably configured this in the settings. In this case you really won't have a way of dismissing notifications because even when doing this in the web-based UI Syncthing Tray will still show them.

However, I've just pushed changes on the master branch that will remove this limitation. So dismissing notifications in the web-based UI will also lead to the yellow/exclamation icon go away. It might take up to 30 seconds, though. (Depends on the polling interval for errors.) So I hope the next version will be an improvement in that regard.


Note that one can easily play with notifications/errors by posting them manually via a command like this:

curl -X POST -H "Authorization: Bearer $api_key" http://localhost:8080/rest/system/error -d 'Test notification'

Martchus added a commit that referenced this issue Oct 5, 2024
Considering the Syncthing Tray UI can be skipped at this point (e.g. like
the user did in #285) it is
probably useful to allow showing notifications from the context menu as
well. This is also consistent with the ability to show internal error from
there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants