Fix deletions not sticking (git sync resurrection), persist folder
collapse state, make merge provider picker visibly clickable Deleted conversations coming back: exportAllConversations() only ever wrote files for conversations that currently exist — it never removed the exported markdown file for a conversation that had been deleted locally. That file just sits in the sync repo forever, so every future pull+import (including on every app startup) silently resurrects it, since importAllConversations() only skips an import when a matching local ID already exists. Fixed by having export also delete orphaned files (conversation ID no longer present locally), and added GitSyncService.syncAfterDeletion() — a debounced export+push triggered right after any delete/bulk-delete/merge-cleanup, so the removal reaches the remote promptly instead of waiting on an unrelated future auto-save. Existing duplicates need one more manual delete to clear, but they'll stay gone after that. Folder collapse state now persists (SettingsService.collapsedFolderIds, JSON-encoded like favoriteModelIds) and is restored on app launch, in both the sidebar and the advanced conversation list. Merge model picker: the provider switcher was legitimate (it does load each provider's own catalog independently) but looked like plain text — no chevron, no button styling — so it wasn't obviously clickable. Restyled to match HeaderView's provider menu affordance (icon + label + chevron on a colored pill).
This commit is contained in:
@@ -94,6 +94,7 @@ enum ConversationMergeService {
|
||||
for id in conversationIds {
|
||||
_ = try? DatabaseService.shared.deleteConversation(id: id)
|
||||
}
|
||||
GitSyncService.shared.syncAfterDeletion()
|
||||
}
|
||||
|
||||
Log.db.info("Combined \(conversationIds.count) conversations into '\(name)' (mode: \(mode.rawValue), deleteOriginals: \(deleteOriginals))")
|
||||
|
||||
Reference in New Issue
Block a user