fix(desktop): re-show hidden window on dock/Finder activate + log gate flow
The close handler hides the BrowserWindow instead of destroying it, so once closed, subsequent dock or Finder activations were no-ops because the activate handler only created a new window when mainWindow === null. Show + focus the existing window if it's hidden so relaunch behaves as expected. Also add console.log breadcrumbs in DesktopLaunchGate so we can diagnose why the chooser sometimes appears not to render. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -262,7 +262,15 @@ export function run(): void {
|
||||
if (mainWindow === null) {
|
||||
const window = createMainWindow();
|
||||
window.show();
|
||||
return;
|
||||
}
|
||||
// The close handler hides the window instead of destroying it, so a
|
||||
// subsequent dock/Finder activate must explicitly show + focus it —
|
||||
// otherwise the app appears to do nothing when relaunched.
|
||||
if (!mainWindow.isVisible()) {
|
||||
mainWindow.show();
|
||||
}
|
||||
mainWindow.focus();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user