Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix(notifications): raise Chat window when "automate something" / pipe-suggestion notification is clicked (#4521)

Louis Beaumont523615534af1
diff --git a/apps/screenpipe-app-tauri/lib/chat-utils.ts b/apps/screenpipe-app-tauri/lib/chat-utils.ts
index f227917db..d1eba09b5 100644
--- a/apps/screenpipe-app-tauri/lib/chat-utils.ts
+++ b/apps/screenpipe-app-tauri/lib/chat-utils.ts
@@ -258,7 +258,14 @@ export async function showChatWithPrefill(data: ChatPrefillData): Promise<void>
// drop prefill events because no chat listener exists yet.
await commands.showWindow({ Home: { page: "home" } });
} else {
- await commands.showWindow("Chat");
+ // Use show_window_activated, not show_window: this path is reached from
+ // notification clicks (e.g. the "automate something" pipe-suggestion
+ // action), which fire from outside the app's active space. The Chat
+ // overlay is a NonActivating panel, so plain show_window resolves Ok
+ // without ever raising the window — the prefilled prompt then runs with
+ // the window hidden and the user sees nothing happen. Matches the
+ // open_chat / open_timeline notification handlers.
+ await commands.showWindowActivated("Chat");
}
await waitForChatReady(targetWindow);