View Full Version : Page reload cause disconnect that can't be reconnected

27 Aug 2015, 12:18 AM
Ok, I've just started playing with the beta. I'm developing a ExtJS5.1 based application and connecting the inspector works really well and gives me lots of interesting info.

As I'm developing there are plenty of browser reloads being done and this doesn't work very well with the inspector. As soon as I reload I get a disconnect message in the inspector (as expected). Problem is that the disconnect seems permanent. To be able to inspect the new codes behavior I have to close the open window and then open a new from the main inspector window. This is quite annoying so I hope this can be fixed. I just want the open application window to detect that browser has reconnected and resume working (pressing a OK button is fine).

27 Aug 2015, 3:10 AM
We have thought very hard about that problem... but we constantly run into the issue of state.

Sencha Inspector shows you the current state of an application -- components in the UI, stores that are loaded, currently applied properties, etc. Those are all blown away when the client app reloads... and there are use cases for leaving the "disconnected" window open (namely to compare if something has changed).

I guess we could always reconsider depending on community feedback.


On the technical side, it's also incredibly difficult to reconnect things. We bind the Sencha Inspector window to the client application using WebSockets -- and it's nearly impossible to reconnect an existing socket when one of these parts has reloaded (the socket IDs are generated randomly). Being smart enough to know that your specific app running in a specific browser is the SAME as the one that just disconnected isn't foolproof.

27 Aug 2015, 3:17 AM
Yeah, I fully understand that you don't want to just reconnect with the application and try to "merge" the state info in some way. What I'd love to see is a easier way of reconnecting. Today you get the disconnect dialog and can only OK it and then open a new window from the main window. My suggestion is that you detect the reconnect and give the user the option to either reload the application window (complete refresh) or open a new window (if you want to keep that old one). This would make the interaction much nicer.

27 Aug 2015, 3:25 AM
Oops, failed to read your technical detail (triggered on the --- as a signature thing :-P ). Yeah, I understand that you can't reconnect fully. But URL and application name should be a pretty good indicator. If you detect such a match you should be able to use it as a pretty good hint that it's the same application again and tell the user that it's available. As long as you don't do more then pop a dialog about it that the user can close it should give a improved user experience.