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): hide untitled label on new chats (#6760)
Louis Beaumontc92d8e5fd67b
diff --git a/apps/screenpipe-app-tauri/components/chat/standalone/hooks/use-chat-composer-shell.ts b/apps/screenpipe-app-tauri/components/chat/standalone/hooks/use-chat-composer-shell.tsindex 8bead6f5c..fe3511adf 100644--- a/apps/screenpipe-app-tauri/components/chat/standalone/hooks/use-chat-composer-shell.ts+++ b/apps/screenpipe-app-tauri/components/chat/standalone/hooks/use-chat-composer-shell.ts@@ -271,7 +271,7 @@ export function useChatComposerShellActions({isComposing?: boolean;keyCode?: number;};- const nativeIsComposing = nativeEvent.isComposing || nativeEvent.keyCode === 229;+ const nativeIsComposing = Boolean(nativeEvent.isComposing) || nativeEvent.keyCode === 229;if (isComposing || nativeIsComposing) return;if (diff --git a/apps/screenpipe-app-tauri/lib/chat/__tests__/conversation-title.test.ts b/apps/screenpipe-app-tauri/lib/chat/__tests__/conversation-title.test.tsindex 63032b527..c705b7eb0 100644--- a/apps/screenpipe-app-tauri/lib/chat/__tests__/conversation-title.test.ts+++ b/apps/screenpipe-app-tauri/lib/chat/__tests__/conversation-title.test.ts@@ -62,7 +62,7 @@ describe("resolveVisibleChatTitle", () => {it("falls back to untitled when there are messages but nothing to derive from", () => {const injected = { id: "1", role: "user", content: "", timestamp: 1 } as Message;- expect(resolveVisibleChatTitle({ messages: [injected] })).toBe("untitled");+ expect(resolveVisibleChatTitle({ messages: [injected] })).toBe("");});it("gives the header and the menu the same answer for the same input", () => {diff --git a/apps/screenpipe-app-tauri/lib/chat/conversation-title.ts b/apps/screenpipe-app-tauri/lib/chat/conversation-title.tsindex 4bebe63eb..bc12f678f 100644--- a/apps/screenpipe-app-tauri/lib/chat/conversation-title.ts+++ b/apps/screenpipe-app-tauri/lib/chat/conversation-title.ts@@ -35,8 +35,9 @@ export type VisibleChatTitleInput = {/*** Priority: a streaming AI title, then a real stored title, then a title- * derived from the first user message (or the in-flight one), then the- * "untitled" placeholder once there is anything to name, then nothing.+ * derived from the first user message (or the in-flight one). A brand-new+ * conversation stays unlabeled rather than showing the document-like+ * "untitled" placeholder.*/export function resolveVisibleChatTitle({storeTitle,@@ -62,6 +63,7 @@ export function resolveVisibleChatTitle({content: pendingTitleSource,} as Message): undefined;+ const hasRealUserContent = Boolean(firstUserMsg || pendingTitleSource);const storeTitleIsReal =Boolean(storeTitle) &&@@ -69,8 +71,10 @@ export function resolveVisibleChatTitle({!isInjectedTitle(storeTitle as string);if (storeTitleIsReal) return storeTitle as string;- if (derivedTitle) return derivedTitle;+ if (derivedTitle && hasRealUserContent) return derivedTitle;- const hasSomethingToName = messages.length > 0 || Boolean(pendingTitleSource);- return hasSomethingToName ? "untitled" : "";+ // Empty chats and prompt-only plumbing are intentionally unlabeled.+ // "New chat" is supplied by the creation affordance, not persisted as a+ // conversation title.+ return "";}