From 2b371bf9af5684a9d1f38475bab0058abc0f6695 Mon Sep 17 00:00:00 2001 From: Hikari Date: Wed, 25 Feb 2026 20:24:18 -0800 Subject: [PATCH] fix: initialise unread counts on mount to prevent false unread dots (#164) --- src/lib/components/ConversationTabs.svelte | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/components/ConversationTabs.svelte b/src/lib/components/ConversationTabs.svelte index 75fe9e1..d45a4b8 100644 --- a/src/lib/components/ConversationTabs.svelte +++ b/src/lib/components/ConversationTabs.svelte @@ -216,6 +216,14 @@ // Keyboard shortcuts onMount(() => { + // Initialise all conversations as seen on mount so that remounting + // this component (e.g. after closing the file editor) doesn't falsely + // mark existing messages as unread. + for (const [id, conversation] of $conversations) { + lastSeenMessageCount.set(id, conversation.terminalLines.length); + } + lastSeenMessageCount = lastSeenMessageCount; + function handleGlobalKeydown(event: KeyboardEvent) { // Ctrl/Cmd + T: New tab if ((event.ctrlKey || event.metaKey) && event.key === "t") {