You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Closing the window to the background corrupts the saved session (right panes dropped, or tab list emptied) #19101
With "Continue where you left off" and "Leave app running in the background when the window is closed" both enabled, closing the window (so the app parks in the background) corrupts LastSessionTabList:
If the restored tabs have not been displayed since start-up, the tabs are kept but every RightPaneNavPathParam is emptied, so dual-pane tabs come back single-pane.
If the tabs have been displayed, the list is overwritten with a single empty entry, [""]; reopening shows only one Home tab.
With "Leave app running" off, closing the window saves the session correctly in both cases (tested with the same 8 dual-pane tabs, displayed and not displayed).
Likely cause (v4.3)
Window_Closed saves the session first (App.xaml.cs ~L308, AppLifecycleHelper.SaveSessionTabs()), then the background path unloads and clears all tabs (~L370-371). Unloading the tabs appears to raise navigation events whose handler in MainPage.xaml.cs (~L189) calls SaveSessionTabs() again after AppInstances has been cleared, so DefaultIfEmpty() yields [""] (or partially unloaded tabs lose their right pane).
Steps To Reproduce
Enable "Continue where you left off" and Settings > Advanced > "Leave app running in the background when the window is closed".
Open several tabs in dual-pane mode with different right panes; restart Files so the session is restored.
Close the window immediately: in user_settings.json the right panes are now empty.
Restore the session again, click through all tabs, then close the window: LastSessionTabList is [""]; reopening Files shows a single Home tab.
Activity
Josh65-2201 commentedon Nov 4, 2026
AI issue, likely #19098