syncthing-macos icon indicating copy to clipboard operation
syncthing-macos copied to clipboard

Notification of sync status?

Open antkn33 opened this issue 4 months ago • 5 comments

Is there a way to receive notifications of sync status? Macos 15.6. Thanks

antkn33 avatar Aug 20 '25 23:08 antkn33

Thanks for the question, what do you expect? Currently the sync status is shown in the icon (few pixels only unfortunatly) and when hovering over the icon in the tooltip. I have a very old draft of native notifications when a new device wants to connect or shares a folder. Notifications can be very naggy, for new-device, new-share "notification types" they are one-offs. But giving sync status is possible, but with the filesystem watcher enabled for every file you can get a notification. Or we just bundle them with a notification hold-off time. The list of possible notifications including sync status is available from the event system.

  • https://docs.syncthing.net/dev/events.html#event-types
  • https://docs.syncthing.net/events/foldercompletion.html this is probably the event we are looking for if we want per-folder progress notifications
  • https://docs.syncthing.net/events/foldersummary.html we need to loop over every folder to generate a global state which is already implemented but without notification emit

xor-gate avatar Aug 21 '25 05:08 xor-gate

Oh I didn’t know that. I was just thinking of a notification when sync is finished and/or up to date.

-Anthony

On Thu, Aug 21, 2025 at 12:53 AM Jerry Jacobs @.***> wrote:

xor-gate left a comment (syncthing/syncthing-macos#260) https://github.com/syncthing/syncthing-macos/issues/260#issuecomment-3209092919

Thanks for the question, what do you expect? Currently the sync status is shown in the icon (few pixels only unfortunatly) and when hovering over the icon in the tooltip. I have a very old draft of native notifications when a new device wants to connect or shares a folder. Notifications can be very naggy, for new-device, new-share "notification types" they are one-offs. But giving sync status is possible, but with the filesystem watcher enabled for every file you can get a notification. Or we just bundle them with a notification hold-off time. The list of possible notifications including sync status is available from the event system.

  • https://docs.syncthing.net/dev/events.html#event-types
  • https://docs.syncthing.net/events/foldercompletion.html this is probably the event we are looking for if we want per-folder progress notifications
  • https://docs.syncthing.net/events/foldersummary.html we need to loop over every folder to generate a global state which is already implemented but without notification emit

— Reply to this email directly, view it on GitHub https://github.com/syncthing/syncthing-macos/issues/260#issuecomment-3209092919, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRQXPNNLTWAPSN2X4RLT5T3OVNEXAVCNFSM6AAAAACEM7XX3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTEMBZGA4TEOJRHE . You are receiving this because you authored the thread.Message ID: @.***>

antkn33 avatar Aug 21 '25 12:08 antkn33

I wish to have the same, not sure if it's possible, but, I copy a file to my Syncthing via a script, now I want to know it got synced to another device. The file is too small to notice the change and my browser is not running anymore. The rest API is not helpful, its folder API keeps the state "idle", it's completion API reports 100 all the time.

If this app is able to detect that something has synced and completed, a simple notification in the native notification panel of MacOS would do the job for me. A simple "Synchronization complete!" would help me a lot.

martin-braun avatar Nov 06 '25 02:11 martin-braun

Note that you're looking at the wrong side. When a file gets added locally, the Syncthing folder on this device will switch to scanning shortly and back to idle state. What will be "out of sync" / shortly in "synchronizing" state are the remote devices which need to pull the newly added file. Maybe you'll have more luck using the API with this context information?

acolomb avatar Nov 06 '25 20:11 acolomb

@acolomb This makes sense. Sure, the Mac instance is informed about sync status of other devices, which I should be able to request somehow, since it's displayed in the UI. However my completion API ofc reports 100, because it's never incomplete. What I would need to do is request the completion API on my remote device (phone in my case) or use a different API to request the completion API of my remote device directly.

I basically want to be notified about "Up to date" on one of my remote devices, for instance:

Image

Or more precisely, I want to know if there is at least one other remote device that got the file already. But this is a very specific use-case and has nothing to do with this issue, I believe.

Now the request of OP makes less sense to me, synchronization status of what .. pull files from other devices, pushing files to other devices? What if some remote devices are not in sync, because they are offline or out of reach ...

martin-braun avatar Nov 08 '25 09:11 martin-braun