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
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix(chat): parallel chats — stop aborting previous Pi on session switch
Louis Beaumont8b548405d093
diff --git a/apps/screenpipe-app-tauri/components/chat-sidebar.tsx b/apps/screenpipe-app-tauri/components/chat-sidebar.tsxindex 33f4a4dc3..fdfd766af 100644--- a/apps/screenpipe-app-tauri/components/chat-sidebar.tsx+++ b/apps/screenpipe-app-tauri/components/chat-sidebar.tsx@@ -169,11 +169,20 @@ export function ChatSidebar({ className }: ChatSidebarProps) {};return (+ // No `h-full`. The wrapper sizes to its CONTENT (sections + rows) but+ // the inner scroll region caps at `max-h-full` so a 500-row history+ // doesn't blow past the available sidebar height. Without this, an+ // earlier `h-full + flex-1` made the scroll viewport always equal to+ // the parent's flex-1 share — even with 8 rows of content, you could+ // drag the scrollbar through hundreds of pixels of dead space.<div- className={cn("flex flex-col h-full min-h-0 text-sm", className)}+ className={cn("flex flex-col min-h-0 text-sm", className)}data-testid="chat-sidebar">- <div className="flex-1 min-h-0 overflow-y-auto overflow-x-hidden">+ <div+ className="overflow-y-auto overflow-x-hidden"+ style={{ maxHeight: "100%" }}+ >{pinned.length > 0 && (<Section title="pinned">{pinned.map((s) => (diff --git a/apps/screenpipe-app-tauri/components/hooks/use-chat-conversations.ts b/apps/screenpipe-app-tauri/components/hooks/use-chat-conversations.tsindex f1b3dfd36..c61f169c0 100644--- a/apps/screenpipe-app-tauri/components/hooks/use-chat-conversations.ts+++ b/apps/screenpipe-app-tauri/components/hooks/use-chat-conversations.ts@@ -272,20 +272,26 @@ export function useChatConversations(opts: UseChatConversationsOpts) {};// ---- loadConversation ----+ // Switching conversations does NOT abort the previous session's Pi+ // process — parallel chats are the entire point of the multi-tab+ // sidebar, and aborting on switch would kill any chat the user+ // navigated away from. The previous Pi process keeps running in the+ // pool (capped at MAX_PI_SESSIONS=20) and continues writing to its+ // own on-disk session log; the user can come back later and reload+ // from disk to see what was produced while they were away.+ //+ // Panel-level streaming state IS reset though — the previous session's+ // streaming text/refs/loading flags belong to the panel, not the Pi+ // process, and rendering them on a different conversation would show+ // a misleading "loading…" indicator on a paused chat (the user-+ // reported "loading thing at the bottom despite the chat being+ // paused" symptom from 2026-04-25).const loadConversation = async (conv: ChatConversation) => {- // Abort any ongoing Pi processing on the current session before switching- if (isLoading || isStreaming) {- try {- await commands.piAbort(piSessionIdRef.current);- } catch (e) {- console.warn("[Pi] Failed to abort:", e);- }- piStreamingTextRef.current = "";- piMessageIdRef.current = null;- piContentBlocksRef.current = [];- setIsLoading(false);- setIsStreaming(false);- }+ piStreamingTextRef.current = "";+ piMessageIdRef.current = null;+ piContentBlocksRef.current = [];+ setIsLoading(false);+ setIsStreaming(false);// Switch to this conversation's session — each conversation is its own Pi processpiSessionIdRef.current = conv.id;diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.tomlindex 00739083f..e6d81ac2a 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.57"+version = "2.4.58"description = "24/7 memory for your desktop. 100% local."authors = ["you"]license = ""