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): stop onMouseDown bubble to keep history button clickable (#2597)

Divanshu780cd871d301
diff --git a/apps/screenpipe-app-tauri/components/standalone-chat.tsx b/apps/screenpipe-app-tauri/components/standalone-chat.tsx
index d97c7e15e..2318b5702 100644
--- a/apps/screenpipe-app-tauri/components/standalone-chat.tsx
+++ b/apps/screenpipe-app-tauri/components/standalone-chat.tsx
@@ -2915,6 +2915,7 @@ export function StandaloneChat({ className }: { className?: string } = {}) {
<Button
variant={showHistory ? "secondary" : "ghost"}
size="sm"
+ onMouseDown={(e) => e.stopPropagation()}
onClick={async (e) => {
e.stopPropagation();
if (!showHistory) {
@@ -2923,7 +2924,7 @@ export function StandaloneChat({ className }: { className?: string } = {}) {
}
setShowHistory(!showHistory);
}}
- className="h-7 px-2 gap-1 text-xs"
+ className="relative z-10 h-7 px-2 gap-1 text-xs"
title="Chat history"
>
<History size={14} />
@@ -2932,13 +2933,14 @@ export function StandaloneChat({ className }: { className?: string } = {}) {
<Button
variant="default"
size="sm"
+ onMouseDown={(e) => e.stopPropagation()}
onClick={async (e) => {
e.stopPropagation();
piStoppedIntentionallyRef.current = true;
await startNewConversation();
// Pi will auto-restart on the next message via the sendPiMessage flow
}}
- className="h-7 px-3 gap-1.5 text-xs bg-foreground text-background hover:bg-background hover:text-foreground transition-colors duration-150"
+ className="relative z-10 h-7 px-3 gap-1.5 text-xs bg-foreground text-background hover:bg-background hover:text-foreground transition-colors duration-150"
title="New chat"
>
<Plus size={14} />