Skip to content

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

fix: performance improvements, remved duplicate useeffect, blur causing re-renders

Gabriel Stein6254f96829cc
diff --git a/main.js b/main.js
index a59668893..250d6eaf4 100644
--- a/main.js
+++ b/main.js
@@ -196,7 +196,6 @@ app.on("window-all-closed", () => {
// On macOS, keep the app running even without windows
});
-// Re-apply always-on-top when app becomes active
app.on("browser-window-focus", (event, window) => {
// Only apply always-on-top to the dictation window, not the control panel
if (windowManager && windowManager.mainWindow && !windowManager.mainWindow.isDestroyed()) {
@@ -205,7 +204,7 @@ app.on("browser-window-focus", (event, window) => {
windowManager.enforceMainWindowOnTop();
}
}
-
+
// Control panel doesn't need any special handling on focus
// It should behave like a normal window
});
diff --git a/src/App.jsx b/src/App.jsx
index e83cd3ab9..f4d267094 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -214,11 +214,6 @@ export default function App() {
window.electronAPI.hideWindow();
};
- useEffect(() => {
- setWindowInteractivity(false);
- return () => setWindowInteractivity(false);
- }, [setWindowInteractivity]);
-
useEffect(() => {
if (!isCommandMenuOpen) {
return;
diff --git a/src/helpers/windowManager.js b/src/helpers/windowManager.js
index 02429572f..be52d70dc 100644
--- a/src/helpers/windowManager.js
+++ b/src/helpers/windowManager.js
@@ -272,12 +272,6 @@ class WindowManager {
this.enforceMainWindowOnTop();
});
- this.mainWindow.on("blur", () => {
- setTimeout(() => {
- this.enforceMainWindowOnTop();
- }, 100);
- });
-
this.mainWindow.on("closed", () => {
this.dragManager.cleanup();
this.mainWindow = null;