Open pyrareae opened 5 months ago
Thank you very much for opening up this issue! I am currently a bit overwhelmed by the many requests that arrive each week, so please forgive me, if I fail to respond personally. I am still very likely to at least skim read your request and I'll probably try to fix all (real) bugs if possible and I will likely review every single PR being made (please, give me a heads up if you intent to do so) and I will try to work on popular requests (please upvote via thumbs up on the original issue) whenever possible, but trying to respond to every single issue over the last years has been kind of draining and I need to adjust my approach for this project to remain fun for me and to make any progress with actually coding new stuff. Thanks for your understanding!
Problem Statement
Possible solution for #2942
There is nothing stopping you from opening multiple instances of the spa/web-app, which in turn may lead to data corruption issues such as in #2948.
:grey_question: Possible Solution
It should be possible to query if there are any running instances via a BroadcastChannel message. We should be able to ping for any other running instances on startup and abort if we get a response from one.
Flow:
:arrow_heading_up: Describe alternatives you've considered
There are some other inter-window/tab communication techniques/apis but BroadcastChannel seems to be the most flexible. it would be possible for example set a cookie or local storage flag but that has issues such as a bad shutdown could leave it in a bad state.
:heavy_plus_sign: Additional context
Related: #2942 Related: #2948