Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

fix: windows visiblity issues

Gabriel Stein00b3420d284d
diff --git a/WINDOWS_TROUBLESHOOTING.md b/WINDOWS_TROUBLESHOOTING.md
index 62c8681d6..872acf00e 100644
--- a/WINDOWS_TROUBLESHOOTING.md
+++ b/WINDOWS_TROUBLESHOOTING.md
@@ -4,6 +4,29 @@ This guide addresses common Windows-specific issues in OpenWhispr.
## Quick Fixes
+### Issue: "App starts but no window appears"
+
+**Symptoms:**
+- OpenWhispr.exe runs in Task Manager, but no window shows up
+- You only see background processes or a tray icon
+
+**Solutions:**
+
+1. **Check the system tray**
+ - Click the ^ caret in the Windows tray
+ - Look for the OpenWhispr icon
+ - Click it to open the Control Panel
+
+2. **Start with debug logging**
+ - Open Command Prompt in the install directory
+ - Run: `OpenWhispr.exe --log-level=debug`
+ - Check logs in: `%APPDATA%\OpenWhispr\logs`
+
+3. **Disable GPU acceleration**
+ - Some Windows 11 builds have GPU/driver issues with Electron
+ - Run: `OpenWhispr.exe --disable-gpu`
+ - If that works, keep using the flag and report your GPU model
+
### Issue: "No transcriptions" or "Audio file is empty"
**Symptoms:**
diff --git a/src/helpers/windowConfig.js b/src/helpers/windowConfig.js
index 79c647f23..daa52e51e 100644
--- a/src/helpers/windowConfig.js
+++ b/src/helpers/windowConfig.js
@@ -15,11 +15,12 @@ const MAIN_WINDOW_CONFIG = {
frame: false,
alwaysOnTop: true,
resizable: false,
- transparent: true,
+ transparent: process.platform !== 'win32',
+ ...(process.platform === 'win32' ? { backgroundColor: '#1a1a1a' } : {}),
show: false, // Start hidden, show after setup
skipTaskbar: false, // Keep visible in Dock/taskbar so app stays discoverable
focusable: true,
- visibleOnAllWorkspaces: true,
+ visibleOnAllWorkspaces: process.platform !== 'win32',
fullScreenable: false,
hasShadow: false, // Remove shadow for cleaner look
acceptsFirstMouse: true, // Accept clicks even when not focused
@@ -42,9 +43,15 @@ const CONTROL_PANEL_CONFIG = {
title: "Control Panel",
resizable: true,
show: false,
- titleBarStyle: "hiddenInset",
- trafficLightPosition: { x: 20, y: 20 },
- frame: false,
+ // macOS-specific options
+ ...(process.platform === 'darwin' ? {
+ titleBarStyle: "hiddenInset",
+ trafficLightPosition: { x: 20, y: 20 },
+ frame: false,
+ } : {
+ // Windows/Linux: use standard frame for reliability
+ frame: true,
+ }),
transparent: false,
backgroundColor: "#ffffff",
minimizable: true,
@@ -90,9 +97,7 @@ class WindowPositionUtil {
window.setAlwaysOnTop(true, "floating", 1);
}
} else if (process.platform === 'win32') {
- // Windows-specific always-on-top
- window.setAlwaysOnTop(true, "screen-saver");
- // Don't skip taskbar on Windows to maintain visibility
+ window.setAlwaysOnTop(true, "pop-up-menu");
} else {
// Linux and other platforms
window.setAlwaysOnTop(true, "screen-saver");
diff --git a/src/helpers/windowManager.js b/src/helpers/windowManager.js
index 64925d9a7..9e748617c 100644
--- a/src/helpers/windowManager.js
+++ b/src/helpers/windowManager.js
@@ -1,4 +1,4 @@
-const { app, screen, BrowserWindow } = require("electron");
+const { app, screen, BrowserWindow, dialog } = require("electron");
const HotkeyManager = require("./hotkeyManager");
const DragManager = require("./dragManager");
const MenuManager = require("./menuManager");
@@ -18,6 +18,7 @@ class WindowManager {
this.dragManager = new DragManager();
this.isQuitting = false;
this.isMainWindowInteractive = false;
+ this.loadErrorShown = false;
app.on("before-quit", () => {
this.isQuitting = true;
@@ -28,15 +29,23 @@ class WindowManager {
const display = screen.getPrimaryDisplay();
const position = WindowPositionUtil.getMainWindowPosition(display);
+ console.log("[WindowManager] Creating main window with position:", position);
+ console.log("[WindowManager] Display bounds:", display.bounds);
+ console.log("[WindowManager] Display workArea:", display.workArea);
+ console.log("[WindowManager] Platform:", process.platform);
+
this.mainWindow = new BrowserWindow({
...MAIN_WINDOW_CONFIG,
...position,
});
+ console.log("[WindowManager] Main window created, id:", this.mainWindow.id);
+
if (process.platform === "darwin") {
this.mainWindow.setSkipTaskbar(false);
} else if (process.platform === "win32") {
- this.mainWindow.setSkipTaskbar(true);
+ // Keep in taskbar on Windows for discoverability
+ this.mainWindow.setSkipTaskbar(false);
}
this.setMainWindowInteractivity(false);
@@ -49,7 +58,10 @@ class WindowManager {
this.mainWindow.webContents.on(
"did-fail-load",
- async (_event, errorCode, errorDescription, validatedURL) => {
+ async (_event, errorCode, errorDescription, validatedURL, isMainFrame) => {
+ if (!isMainFrame) {
+ return;
+ }
console.error(
"Failed to load main window:",
errorCode,
@@ -68,6 +80,13 @@ class WindowManager {
this.mainWindow.reload();
}
}, 2000);
+ } else {
+ this.showLoadFailureDialog(
+ "Dictation panel",
+ errorCode,
+ errorDescription,
+ validatedURL
+ );
}
}
);
@@ -150,7 +169,25 @@ class WindowManager {
this.controlPanelWindow = new BrowserWindow(CONTROL_PANEL_CONFIG);
+ const visibilityTimer = setTimeout(() => {
+ if (!this.controlPanelWindow || this.controlPanelWindow.isDestroyed()) {
+ return;
+ }
+ if (!this.controlPanelWindow.isVisible()) {
+ console.warn(
+ "Control panel did not become visible in time; forcing show"
+ );
+ this.controlPanelWindow.show();
+ this.controlPanelWindow.focus();
+ }
+ }, 10000);
+
+ const clearVisibilityTimer = () => {
+ clearTimeout(visibilityTimer);
+ };
+
this.controlPanelWindow.once("ready-to-show", () => {
+ clearVisibilityTimer();
if (process.platform === "win32") {
this.controlPanelWindow.setSkipTaskbar(false);
}
@@ -176,6 +213,7 @@ class WindowManager {
});
this.controlPanelWindow.on("closed", () => {
+ clearVisibilityTimer();
this.controlPanelWindow = null;
});
@@ -183,9 +221,38 @@ class WindowManager {
MenuManager.setupControlPanelMenu(this.controlPanelWindow);
this.controlPanelWindow.webContents.on("did-finish-load", () => {
+ clearVisibilityTimer();
this.controlPanelWindow.setTitle("Control Panel");
});
+ this.controlPanelWindow.webContents.on(
+ "did-fail-load",
+ (_event, errorCode, errorDescription, validatedURL, isMainFrame) => {
+ if (!isMainFrame) {
+ return;
+ }
+ clearVisibilityTimer();
+ console.error(
+ "Failed to load control panel:",
+ errorCode,
+ errorDescription,
+ validatedURL
+ );
+ if (process.env.NODE_ENV !== "development") {
+ this.showLoadFailureDialog(
+ "Control panel",
+ errorCode,
+ errorDescription,
+ validatedURL
+ );
+ }
+ if (!this.controlPanelWindow.isVisible()) {
+ this.controlPanelWindow.show();
+ this.controlPanelWindow.focus();
+ }
+ }
+ );
+
console.log("📱 Loading control panel content...");
await this.loadControlPanel();
}
@@ -289,6 +356,25 @@ class WindowManager {
WindowPositionUtil.setupAlwaysOnTop(this.mainWindow);
}
}
+
+ showLoadFailureDialog(windowName, errorCode, errorDescription, validatedURL) {
+ if (this.loadErrorShown) {
+ return;
+ }
+ this.loadErrorShown = true;
+ const detailLines = [
+ `Window: ${windowName}`,
+ `Error ${errorCode}: ${errorDescription}`,
+ validatedURL ? `URL: ${validatedURL}` : null,
+ "Try reinstalling the app or launching with --log-level=debug.",
+ ].filter(Boolean);
+ dialog.showMessageBox({
+ type: "error",
+ title: "OpenWhispr failed to load",
+ message: "OpenWhispr could not load its UI.",
+ detail: detailLines.join("\n"),
+ });
+ }
}
module.exports = WindowManager;