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(chat): chat hangs at "analyzing…" — bus regression

Louis Beaumont2b1bc216ae49
diff --git a/apps/screenpipe-app-tauri/components/hooks/use-chat-conversations.ts b/apps/screenpipe-app-tauri/components/hooks/use-chat-conversations.ts
index dc6bdfa8e..b5721aef1 100644
--- a/apps/screenpipe-app-tauri/components/hooks/use-chat-conversations.ts
+++ b/apps/screenpipe-app-tauri/components/hooks/use-chat-conversations.ts
@@ -570,6 +570,15 @@ export function useChatConversations(opts: UseChatConversationsOpts) {
piSessionIdRef.current = newSid;
piSessionSyncedRef.current = true;
store.actions.setCurrent(newSid);
+ // Set conversationId to the new Pi session id immediately. The chat
+ // panel's foreground bus registration (registerForeground) is keyed by
+ // conversationId, and Pi events arrive with sessionId === piSessionId.
+ // If we leave conversationId null until first save, the panel never
+ // registers — Pi events go to the default handler, the chat-shaped
+ // handlers in the panel never fire, and isLoading stays true forever
+ // ("analyzing…" stuck). Setting conversationId here keeps the
+ // foreground key in sync with piSessionIdRef from message 0.
+ setConversationId(newSid);
};
// ---- filteredConversations ----
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index bd93e67a6..7d27c5688 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -9726,7 +9726,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "2.4.92"
+version = "2.4.93"
dependencies = [
"anyhow",
"arboard",
@@ -9831,7 +9831,7 @@ dependencies = [
[[package]]
name = "screenpipe-audio"
-version = "0.3.297"
+version = "0.3.299"
dependencies = [
"anyhow",
"audiopipe",
@@ -9887,7 +9887,7 @@ dependencies = [
[[package]]
name = "screenpipe-config"
-version = "0.3.297"
+version = "0.3.299"
dependencies = [
"dirs 6.0.0",
"serde",
@@ -9899,7 +9899,7 @@ dependencies = [
[[package]]
name = "screenpipe-connect"
-version = "0.3.297"
+version = "0.3.299"
dependencies = [
"anyhow",
"async-trait",
@@ -9928,7 +9928,7 @@ dependencies = [
[[package]]
name = "screenpipe-core"
-version = "0.3.297"
+version = "0.3.299"
dependencies = [
"accessibility",
"accessibility-sys",
@@ -9976,7 +9976,7 @@ dependencies = [
[[package]]
name = "screenpipe-db"
-version = "0.3.297"
+version = "0.3.299"
dependencies = [
"anyhow",
"chrono",
@@ -10001,7 +10001,7 @@ dependencies = [
[[package]]
name = "screenpipe-engine"
-version = "0.3.297"
+version = "0.3.299"
dependencies = [
"anyhow",
"arc-swap",
@@ -10066,7 +10066,7 @@ dependencies = [
[[package]]
name = "screenpipe-events"
-version = "0.3.297"
+version = "0.3.299"
dependencies = [
"anyhow",
"chrono",
@@ -10082,7 +10082,7 @@ dependencies = [
[[package]]
name = "screenpipe-screen"
-version = "0.3.297"
+version = "0.3.299"
dependencies = [
"accessibility-sys",
"anyhow",
@@ -10135,7 +10135,7 @@ dependencies = [
[[package]]
name = "screenpipe-vault"
-version = "0.3.297"
+version = "0.3.299"
dependencies = [
"argon2",
"chacha20poly1305",
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index 1130af7bf..c23358086 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "2.4.92"
+version = "2.4.93"
description = "24/7 memory for your desktop. 100% local."
authors = ["you"]
license = ""