gitify-app / gitify

GitHub notifications on your menu bar. Available on macOS, Windows & Linux.
https://gitify.io
MIT License
4.55k stars 258 forks source link

Gitify jumps to another Space #563

Open EricWVGG opened 1 year ago

EricWVGG commented 1 year ago

I am using multiple "Mission Control Spaces." When I hit the menu bar item, instead of the window popping up on the active Space, my Mac jumps to another arbitrarily Space.

This is actually a problem that I'm facing with many apps, ever since "upgrading" to Ventura. Is anyone else here experiencing this issue? I'm slowly going insane, and none of my other popup apps have active enough user communities to determine whether this issue is widespread, or just me and some MacOS plist file…

screen cap: https://user-images.githubusercontent.com/617762/216146490-0b4ebbe5-ee32-4f01-9798-95ae6e3d8b5c.mp4

thanks!

JakeSidSmith commented 1 year ago

Hey, @EricWVGG, I'm currently running Monterey and this issue isn't present. I was planning on upgrading in a day or 2, so I'll report back if I have any similar issues. Sounds like it'll likely be an operating system level issue, and so we may not be able to provide a fix. 😢

EricWVGG commented 1 year ago

This definitely came up with Ventura. My guess is that if it is an OS bug, it was introduced by that awful new Stage Manager thing… I have dumped loads of Preferences files to reset my Mac UI and gotten nowhere… but yes please if you could use it for a few days in Ventura, I'd love to know.

JakeSidSmith commented 1 year ago

Hey, @EricWVGG, finally got round to upgrading. I'm now on MacOS 13.2.1 and it doesn't skip away from full screen apps when I click Gitify. Are you on the same MacOS version as me? If not, maybe try an upgrade.

tomchkk commented 1 year ago

I've also had this issue since updating. Currently on MacOS 13.2.1 and it's still present for me. Restarting Gitify fixes it, but only for so long...

EricWVGG commented 1 year ago

Thanks for chiming in, @tomchkk . You're the first other person I've encountered with this problem.

I'm on MacOS 13.3. Still present. I recently tried dumping all of my com.apple.* entries in /Library/Preferences, still no dice. I'm going to try running from a brand new user account when work slows down a little (next month, I hope).

EricWVGG commented 1 year ago

@JakeSidSmith Just to clarify, it doesn't just jump away from full-screen apps, it also jumps away from various other window Spaces. It's like my popup apps have picked one space as their "home" and always want to go there.

JakeSidSmith commented 1 year ago

I've just had this take me to my main desktop for the first time. 🤔 Restarting Gitify has (at least temporarily) fixed it.

That makes me think that this is something that could be fixed within Gitify, but it could still be a lower level electron issue, or something to do with Ventura.

JakeSidSmith commented 1 year ago

Having a look back through the history, it appears that a crucial line of code was removed during some changes to allow people to switch between having a popover window, and a regular windowed app.

https://github.com/manosim/gitify/commit/3aadb382c709aea68f7ef849f038fc5b35709f96#diff-58417e0f781b6656949d37258c8b9052ed266e2eb7a5163cad7b0863e6b2916aL146

And it was never replaced when that functionality was removed...

So it may have been purely by chance that it has worked as we all expected up til now. 😂 Unless the new implementation should just open on the current window anyway. 🤷

EricWVGG commented 1 year ago

"when that functionality was removed" could you elaborate on that?

I'm trying to figure out if this is a Ventura change. Gitify is actually the least of my problems, I have popup apps that I use dozens of times per hour. I'm losing my mind on this.

JakeSidSmith commented 1 year ago

The app became a regular old windowed app in v2 (https://github.com/manosim/gitify/releases/tag/2.0.0). And was moved back to a tray icon in v3 (https://github.com/manosim/gitify/releases/tag/v3.0.0).

I believe the crucial line of code was removed in v2, and never replaced in v3.

JakeSidSmith commented 1 year ago

That said, I've just tested out a few of my other tray icon apps...

Aside from Gitify, I have another 2 apps that work in a similar way. 1 of these directed me away from my full screen apps (which I don't remember it doing previously), while the other one still correctly overlays. After restarting my Mac, none of them directed me away from my full screen apps.

Although I think we could add a line of code to Gitify that may fix the problem, it seems that there is some kind of underlying issues with MacOS, so that won't help you with all of the other apps taking you away constantly.

EricWVGG commented 1 year ago

yeah this problem always goes away after a fresh reboot, but only for an hour or so

one of these days I'm going to take the nuclear option and just delete my user account and start fresh (I like to do that about once every five years anyway), but not until work slows down. le sigh

Thanks for looking into this for me.

stackptr commented 1 year ago

I've also been encountering this issue, where Gitify seems to "stick" to a certain space. I don't think this has happened during a session, i.e., as I'm actively using the device, but seems to happen when I log back in to macOS. At least a few times a week, I have to restart Gitify until it functions as expected.

Experiencing this issue just now prompted me to check GitHub and also experiment with the app. I use dual monitors, with each monitor using a different set of spaces, and typically only interact with Gitify on one of them. However, I find that I can reproduce a type of "stickiness" if I do the following:

If the first window is closed by clicking the menubar icon, or the other monitor is interacted with prior to trying to instantiate the window, then the window opens in the right monitor.

If the above is the same issue as the window opening in a different space in the same monitor, then this behavior might be an issue in macOS; I can reproduce this with the battery icon as well as with SoundSource.

afonsojramos commented 1 year ago

I suspect that the issue here is with the menubar config, namely the preloadWindow and the delayedHideAppIcon function call. Will need some further looking into for sure though.

adufr commented 7 months ago

I am not experiencing this bug anymore! (🎉)

I think that the rollback to electron@19 might have helped?

setchy commented 7 months ago

@EricWVGG - I'd love to hear if this issue still exists on gitify@5.0.0

bmulholland commented 7 months ago

I still get it on v5 -- though restarting Gitify fixed it just now.

Wonder what triggers it...

graemer957 commented 7 months ago

v5.2.0 has fixed this for me 🎉

adufr commented 7 months ago

@graemer957 Agreed, looks like this time the electron update has fixed this issue for good. I think it can be closed as completed.

bmulholland commented 7 months ago

Cool, then closing this for now. We can re-open if there's a new report.

setchy commented 7 months ago

Fantastic news 🥳

bmulholland commented 6 months ago

This is happening for me again :( v5.2.0

tomchkk commented 6 months ago

Happened for me again once today as well 😢 v.5.2.0

graemer957 commented 6 months ago

I just checked again, and I am also experiencing this on v5.2.0, which was weird as previously it had been behaving!

Restarting gitify has fixed it for me.

I am wondering if some kind of interaction I (we) are having is causing this behaviour 🤔 Will keep an eye out for a reproducible case and report back.

bmulholland commented 6 months ago

Yep, restarting fixes it. I suspect sleep or something triggers the problem.

JakeSidSmith commented 6 months ago

Yep, restarting fixes it. I suspect sleep or something triggers the problem.

Just make sure you've had plenty of caffeine. 😜

tomchkk commented 6 months ago

It's back! 😨 Happened yet again - yes restarting fixes it, but only until the next time... 😭

schester44 commented 4 months ago

+1 here, this happens for me from time to time. currently on 5.8.1

setchy commented 4 months ago

Thanks for all the confirmed sightings.

We'll open an upstream GitHub issue with max-mapper/menubar shortly and x-ref here.