webui: implement pinned conversations support (#21387)

* webui: implement pinned conversations support

* webui: linter/prettier pass

* Fix the unused handleMobileSidebarItemClick from the component.

* the search should find pinned conversations as well

Co-authored-by: Pascal <admin@serveurperso.com>

---------

Co-authored-by: Pascal <admin@serveurperso.com>
This commit is contained in:
Rémy MathieuandPascal authored and GitHub committed 2026-06-09 21:33:22 +02:00
1 parent d73cd07674
commit 76da2450a4
5 files changed
+117 -7

No files matched your search

@@ -344,6 +344,22 @@ export class DatabaseService {
*
*/
/**
* Toggles the pinned status of a conversation.
*
* @param id - Conversation ID
* @returns The new pinned status
*/
static async toggleConversationPin(id: string): Promise<boolean> {
const conversation = await db.conversations.get(id);
if (!conversation) {
throw new Error(`Conversation ${id} not found`);
}
const newPinnedState = !conversation.pinned;
await this.updateConversation(id, { pinned: newPinnedState });
return newPinnedState;
}
/**
* Updates the conversation's current node (active branch).
* This determines which conversation path is currently being viewed.