fix: use updated_at for sidebar chat timestamp (#26454)

The sidebar time-ago indicator rendered `created_at`, so the relative time stayed pinned to the chat's creation age and never reflected new activity. After sending a message the chat would jump to the top of the list (which sorts by `updated_at`) while still showing a stale label such as "3w", which is confusing.

The indicator was originally added using `updated_at` and was inadvertently switched to `created_at` during a later refactor. Restore `updated_at` (falling back to `created_at` when absent) so the timestamp matches the list ordering and updates whenever a chat is modified.

Fixes #26451
This commit is contained in:
Classic298
2026-07-01 09:08:56 +02:00
committed by GitHub
parent 9866a02863
commit 2d7fc04bfb

View File

@@ -570,9 +570,9 @@
</div>
<!-- Time ago indicator -->
{#if createdAt && !mouseOver}
{#if (updatedAt ?? createdAt) && !mouseOver}
<div class="shrink-0 self-center text-[10px] text-gray-400 dark:text-gray-500 pl-2">
{formatTimeAgo(createdAt)}
{formatTimeAgo(updatedAt ?? createdAt)}
</div>
{/if}
</a>