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): restore inline history in overlay window via hideInlineHistory prop

Louis Beaumont15b419ec72ca
diff --git a/apps/screenpipe-app-tauri/app/home/page.tsx b/apps/screenpipe-app-tauri/app/home/page.tsx
index 15568a2d5..162ceee6c 100644
--- a/apps/screenpipe-app-tauri/app/home/page.tsx
+++ b/apps/screenpipe-app-tauri/app/home/page.tsx
@@ -697,7 +697,7 @@ function HomeContent() {
activeSection !== "home" && "hidden"
)}
>
- <StandaloneChat className="h-full" />
+ <StandaloneChat className="h-full" hideInlineHistory />
</div>
{/* Non-chat sections render on top when active. */}
diff --git a/apps/screenpipe-app-tauri/components/standalone-chat.tsx b/apps/screenpipe-app-tauri/components/standalone-chat.tsx
index 1dd38ddf6..935f9dbb9 100644
--- a/apps/screenpipe-app-tauri/components/standalone-chat.tsx
+++ b/apps/screenpipe-app-tauri/components/standalone-chat.tsx
@@ -1052,7 +1052,18 @@ function CollapsibleUserMessage({ label, fullContent }: { label: string; fullCon
);
}
-export function StandaloneChat({ className }: { className?: string } = {}) {
+export function StandaloneChat({
+ className,
+ hideInlineHistory,
+}: {
+ className?: string;
+ /** When true, the in-panel History button + slide-in panel are hidden.
+ * Set this from the home page where the chat list lives in the main
+ * app sidebar (avoids two history UIs side-by-side). The overlay
+ * chat at `/chat` leaves it false so users still have a history
+ * affordance in the floating window — that window has no AppSidebar. */
+ hideInlineHistory?: boolean;
+} = {}) {
const { settings, updateSettings, isSettingsLoaded, reloadStore } = useSettings();
const { isMac } = usePlatform();
const { items: appItems } = useSqlAutocomplete("app");
@@ -3474,10 +3485,27 @@ export function StandaloneChat({ className }: { className?: string } = {}) {
{!isMac && !className && (
<div className="absolute top-0 left-0 w-8 h-8 border-l-2 border-t-2 border-foreground/10 rounded-tl-lg" />
)}
- {/* Chat history is now rendered inside the main app sidebar
- (see ChatSidebar embedded in app-sidebar). The inline history
- toggle here is removed to avoid duplicating the same list in
- two places. */}
+ {/* Inline history toggle. Shown in the floating overlay chat
+ (`/chat`) where there's no app sidebar. Hidden on the home
+ page where the same list is rendered in the AppSidebar. */}
+ {!hideInlineHistory && (
+ <Button
+ variant={showHistory ? "secondary" : "ghost"}
+ size="icon"
+ onMouseDown={(e) => e.stopPropagation()}
+ onClick={async (e) => {
+ e.stopPropagation();
+ if (!showHistory) {
+ await reloadStore();
+ }
+ setShowHistory(!showHistory);
+ }}
+ className="relative z-10 h-7 w-7"
+ title="Chat history"
+ >
+ <History size={14} />
+ </Button>
+ )}
<div className="flex-1" />
<Button
variant="default"
@@ -3500,16 +3528,13 @@ export function StandaloneChat({ className }: { className?: string } = {}) {
</kbd>
</div>
- {/* Main content area. The history sidebar previously rendered here
- has been removed in favor of the embedded ChatSidebar in the
- main app sidebar — single source of truth for the chat list. */}
+ {/* Main content area with optional history sidebar — only used in
+ the floating overlay window. Home page hides this entirely
+ (`hideInlineHistory`) and the same list is rendered in the
+ main AppSidebar instead. */}
<div className="flex-1 flex overflow-hidden">
- {/* History Sidebar — DELETED. Kept conditional below as `false`
- so the JSX block is dead but still parses; will be removed in
- a follow-up cleanup once we're sure nothing else references
- showHistory state. */}
<AnimatePresence>
- {false && showHistory && (
+ {!hideInlineHistory && showHistory && (
<motion.div
initial={{ width: 0, opacity: 0 }}
animate={{ width: 280, opacity: 1 }}
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index c6f45ad95..274ab1214 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.59"
+version = "2.4.60"
description = "24/7 memory for your desktop. 100% local."
authors = ["you"]
license = ""