Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

fix(chat): fix duplicate conversations — includeArchived filter returned all instead of only archived

Gabriel Steina9a1e36dc61f
diff --git a/src/helpers/database.js b/src/helpers/database.js
index c729c9435..004a32db5 100644
--- a/src/helpers/database.js
+++ b/src/helpers/database.js
@@ -1284,7 +1284,9 @@ class DatabaseManager {
getAgentConversationsWithPreview(limit = 50, offset = 0, includeArchived = false) {
try {
if (!this.db) throw new Error("Database not initialized");
- const archiveFilter = includeArchived ? "" : "WHERE c.archived_at IS NULL";
+ const archiveFilter = includeArchived
+ ? "WHERE c.archived_at IS NOT NULL"
+ : "WHERE c.archived_at IS NULL";
return this.db
.prepare(
`SELECT c.id, c.title, c.created_at, c.updated_at, c.archived_at, c.cloud_id,