From 3cd72ee6a8e93dc39a4d4c173117056e25326c8a Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sun, 26 Jul 2026 23:19:20 -0400 Subject: [PATCH] refac --- backend/open_webui/routers/folders.py | 2 ++ src/lib/components/layout/Sidebar/SharedFolderItem.svelte | 1 + 2 files changed, 3 insertions(+) diff --git a/backend/open_webui/routers/folders.py b/backend/open_webui/routers/folders.py index cfce4ad996..01090157ad 100644 --- a/backend/open_webui/routers/folders.py +++ b/backend/open_webui/routers/folders.py @@ -550,6 +550,8 @@ async def get_shared_folder_chats( owner_cache[uid] = u.name if u else 'Unknown' chat['owner_name'] = owner_cache[uid] chat['active'] = False + if chat['user_id'] != user.id: + chat['last_read_at'] = chat['updated_at'] if await has_active_tasks(request.app.state.redis, chat['id']): chat['active'] = await ChatMessages.has_unfinished_assistant_by_chat_id(chat['id'], db=db) diff --git a/src/lib/components/layout/Sidebar/SharedFolderItem.svelte b/src/lib/components/layout/Sidebar/SharedFolderItem.svelte index 98a92f9042..076d51bde8 100644 --- a/src/lib/components/layout/Sidebar/SharedFolderItem.svelte +++ b/src/lib/components/layout/Sidebar/SharedFolderItem.svelte @@ -124,6 +124,7 @@ title={chat.title} createdAt={chat.created_at} updatedAt={chat.updated_at} + lastReadAt={chat.last_read_at} active={chat.active ?? false} ownerName={chat.owner_name} ownerUserId={chat.user_id}