Home Assistant Frontend behavious when disconnected

Hello,

Following building a new VM for Home Assistant (HassOS 7.17 and Supervisor 2020.12.2), I have found the following behaviour when testing what occurs when things become disconnected or out of sync.

My test env at present is the above HassIO (under vmware), together with an ESPHome ESP32 with some test switches. Everything works here are expected and I can control/automate the switches, get status etc.

The issue I have is when I began testing what occurs if the underlying network fails, i.e. if wifi, ethernet switch etc. goes down. I wanted to investigate how the frontend, either a PC or an iphone on the home network would respond.

If I’m connected to the frontend and have it open, and while opened I disable my network or pull the ethernet, I’m still able to toggle the ESPhome switches. There is no immediate indication that the connection to the HassIO server has been lost. In fact I can toggle on/off as I wish any switch. Clearly the actual switch is not toggling or controlling whatever device thats on it, but the problem here is that if one does not understand whats happening, they might well think that they have indeed turned on/off whatever device they were accessing, and be left with the impression all was well, while obviously the command never went through at all.
Restoring the connection does make the switches show their real state, and if for instance I had changed a switch to on when disconnected, it now reverts to off when reconnected.

under my previous version of HA (0.79), if I tried the same behaviour when disconnected the switch would initially turn on, but within a second revert back to off as it realised the command was never acknowledged. One difference in 0.79 setup was that I was using MQTT as opposed to now using ESPHome API - not sure if this is significant.

I initially suspected the problem was with the iphone app or ESPHome, but trying the above on my pc resulted in the same behaviour. This only occurs when the browser is already open, and the connection to the backend drops - if you try to open a browser connection to HA when no link in place the browser will not find the server and therefore you won’t get anything, but if already open its a different story.

I’m not sure if this is a bug, by design, or I’m testing a very unusual set of events, but I can see where this could be a problem if other non-technical users had their connection open and clicked a button, where they would see the state change and thought what they wanted to do was indeed done, where the fact that it didn’t go through would only be know when the underlying connection was restored.

Has anybody experienced this behaviour, or have any suggestions as to how it might be mitigated?

Thanks in advance, and hopefully I’ve explained myself enough to make sense - if not please let me know and I’ll try to elaborate further.

Kind regards
Ger