This commit is contained in:
Timothy Jaeryang Baek committed 2026-07-11 23:37:38 -05:00
1 parent ba32b68412
commit a86dab246e
3 files changed
+12 -1

No files matched your search

@@ -427,7 +427,7 @@
<span class="max-w-30 overflow-hidden text-ellipsis">
{tab.type === 'files' ? ($activeWorkspace?.name ?? $t('bar.files')) : tab.label}
</span>
{#if tab.type === 'chat' && isChatUnread(chatStatus)}
{#if tab.type === 'chat' && !isActive && isChatUnread(chatStatus)}
<span class="size-1.5 shrink-0 rounded-full bg-sky-500" aria-hidden="true"></span>
{/if}
{#if tab.unsaved}<span class="w-1.5 h-1.5 rounded-full bg-gray-400 shrink-0"></span>{/if}
+10
View File
@@ -111,6 +111,16 @@ class Chat(Base):
await db.commit()
return result.rowcount > 0
@staticmethod
async def touch(chat_id: str, updated_at: int) -> bool:
"""Record a completed background update without changing chat content."""
async with await get_db() as db:
result = await db.execute(
update(Chat).where(Chat.id == chat_id).values(updated_at=updated_at)
)
await db.commit()
return result.rowcount > 0
@staticmethod
async def update_last_read_at(chat_id: str, user_id: str, last_read_at: int) -> bool:
"""Mark a chat read without changing its activity timestamp."""
+1
View File
@@ -2638,6 +2638,7 @@ async def run_chat_task(
_task_chat.pop(message_id, None)
if chat_id not in get_active_chat_ids():
try:
await Chat.touch(chat_id, now_ms())
chat = await Chat.get_by_id(chat_id)
await emit_to_user(
user_id,