home-assistant / iOS

:iphone: Home Assistant for Apple platforms
https://companion.home-assistant.io
Other
1.53k stars 297 forks source link

App suddenly opening in foreground, intrusive #2459

Open ShadowJonathan opened 9 months ago

ShadowJonathan commented 9 months ago

Device model, version and app version

Model Name: MBP 14-inch 2021, Apple M1 Pro, 16 GB (MKGR3LL/A) macOS Version: 14.0 App Version: 2023.471 Safari Version: 19616.1.27.211.1

Home Assistant Core Version 2023.11.2

Describe the bug Whenever my home assistant macos app is prompted, it opens up intrusively in the foreground.

This happens whenever i prompt all my devices for a location every hour, my mac included.

To Reproduce

  1. close home assistant
  2. use automation or developer service caller to send notification
  3. observe opening in the foreground for no reason

Expected behavior Opening in the background, without stealing focus

Additional context This is exacerbated with another problem, as this causes home assistant to almost always run in the background, where it sometimes steals massive amounts of CPU for no reason, and bloats memory; https://github.com/home-assistant/iOS/issues/2389

bgoncal commented 9 months ago

I wasn't able to reproduce on my macbook, rebooting the mac or some workaround like this doesn't help? Let me know if you can find some pattern

ShadowJonathan commented 9 months ago

No, this seems to happen sporadically.

This seems to happen either via delayed notifications, siri activation, or other.


I just tried the following;

And Home Assistant would open up in the foreground.

I forgot to mention; I use stage manager heavily, and the switch is disruptive. However, even without it, it still opens "in front" of the active window, as i just tested.

bgoncal commented 8 months ago

It happened to me today that when testflight updates the app in background, the app open itself afterwards

bgoncal commented 5 months ago

Is this still happening on the latest app version?

ShadowJonathan commented 5 months ago

What's the latest app version?

I can't remember being irritated by this the last couple of days, so probably not. Though https://github.com/home-assistant/iOS/issues/2389 is still a factor.

bgoncal commented 5 months ago

What's the latest app version?

I can't remember being irritated by this the last couple of days, so probably not. Though https://github.com/home-assistant/iOS/issues/2389 is still a factor.

2024.4

bgoncal commented 5 months ago

I'll close this issue but feel free to reopen if needed

ShadowJonathan commented 4 months ago

@bgoncal you'd need to reopen the issue again for me, I just had this issue again, where Home Assistant ate half my keypresses when i was in the middle of writing something down, because it stole focus.

I had closed it earlier, because I was clearing out programs I wasn't using, and it likely got triggered by a clear_notification notification.

bgoncal commented 1 month ago

Can you try on latest tetsflight beta? Also have you noticed if this happens only when you are out of your local network or while you are in there?

ShadowJonathan commented 1 month ago

It definitely happens on my local network, though let me try with the app version i have right now (2024.6 (2024.696))

ShadowJonathan commented 1 month ago

Yes, and I'm consistently able to get this by sending a request_location_update notification to all my devices, including the macOS client.

Curiously, even though I closed the app, it re-opened itself with the "about" window intact, even though the app should've been purged from all state. Possibly this might be a factor?


Can you try on latest tetsflight beta?

I currently have a ton of stuff on my plate, and I'm hanging on on some reliable apps to work reliably (so that I can function properly). I may do that in the future, but I hope the reproduction steps can help narrow down the issue.