replit / desktop

Replit Desktop App
114 stars 3 forks source link

Fix restore repls logic when window is closed/focused #88

Closed sergeichestakov closed 1 year ago

sergeichestakov commented 1 year ago

Why

The restore repls logic was kinda buggy, especially when you close/open new windows. For example, we only reset the last open repl in the "CLOSE_CURRENT_WINDOW" event (which is only fired in certain cases by the web app) instead of all close events. Additionally, we weren't handling the change in focused events which handles the case where you may have N windows open and you close one then refocus to another window.

Fixes WS-640

What changed

Fix restore repls logic when window is closed/focused

Test plan

linear[bot] commented 1 year ago

WS-640 Restore Repl logic is buggy after opening and closing new windows