swiftbar / SwiftBar

Powerful macOS menu bar customization tool
https://swiftbar.app
MIT License
2.93k stars 92 forks source link

Show a warning when a menubar item has not updated withing 2X the amount of time specified in the filename #422

Open macintacos opened 3 months ago

macintacos commented 3 months ago

Describe the bug

This has happened to me a few times - I'll be using my laptop, moving around to different locations, never truly turning my computer off, but hopping in-between networks / VPNs / etc. all the while. Today, when I opened my laptop, I noticed that one of the menubar items that should normally change fairly often has not updated in what feels like a long time. When I clicked on the item, I saw that it said that the last time it updated was 2 days ago - for context, this was for an item that is supposed to refresh every 5 minutes.

It was probably some kind of network interruption or something that caused something to crash in the backend - I didn't have time to debug it. I restarted SwiftBar and it fixes itself. However, it would be great if SwiftBar could update the menubar item itself to let me know that it hasn't actually been updated for a while, outside of the refresh time that I've set on the file.

To Reproduce

I'm not sure how to reproduce it. Right now, SwiftBar is working fine - at some point in the future, I'll have to restart it again.

Expected behavior

I want all of my menubar items to reliably refresh, but if that's a more complicated bug to solve, it would be ideal if SwiftBar could just tell me that the item is stale after a certain amount of time.

Screenshots

N/A

Environment:

melonamin commented 2 months ago

@macintacos Obviously, it is hard for me to guess what broke and went wrong. My best guess would be that your Mac went to sleep, and upon waking up, SwiftBar didn't re-enable plugin refresh.

But this issue gave me an idea to add some sort of a watchdog that will compare the expected refresh schedule vs the actual one.