From eb686b06898446425c6b14c916af732765890f2a Mon Sep 17 00:00:00 2001 From: Noah Gregory Date: Mon, 16 Mar 2026 03:48:06 -0400 Subject: [PATCH 1/3] fix: don't just show the creation time for threads in sidebar --- apps/web/src/components/Sidebar.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index 1b43eb4c18..4eb3f42fc6 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -1551,7 +1551,11 @@ export default function Sidebar() { : "text-muted-foreground/40" }`} > - {formatRelativeTime(thread.createdAt)} + {formatRelativeTime( + thread.lastVisitedAt ?? + thread.latestTurn?.completedAt ?? + thread.createdAt, + )} From ef379747d39a9358a32d0a57bde16779eac908c2 Mon Sep 17 00:00:00 2001 From: Noah Gregory Date: Mon, 16 Mar 2026 03:57:16 -0400 Subject: [PATCH 2/3] fix: use last message created date in sidebar --- apps/web/src/components/Sidebar.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index 4eb3f42fc6..d99d9a96d1 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -1552,9 +1552,7 @@ export default function Sidebar() { }`} > {formatRelativeTime( - thread.lastVisitedAt ?? - thread.latestTurn?.completedAt ?? - thread.createdAt, + thread.messages.at(-1)?.createdAt ?? thread.createdAt, )} From 6bd3fff52844c2706d89372f4dbfff8141665e99 Mon Sep 17 00:00:00 2001 From: jamesx0416 Date: Tue, 17 Mar 2026 16:11:24 +1100 Subject: [PATCH 3/3] sort sidebar threads by latest visible message time --- apps/web/src/components/Sidebar.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index d99d9a96d1..0f8427f504 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -386,8 +386,9 @@ export default function Sidebar() { const latestThread = threads .filter((thread) => thread.projectId === projectId) .toSorted((a, b) => { - const byDate = new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(); - if (byDate !== 0) return byDate; + const aTime = a.messages.at(-1)?.createdAt ?? a.createdAt; + const bTime = b.messages.at(-1)?.createdAt ?? b.createdAt; + if (aTime !== bTime) return bTime.localeCompare(aTime); return b.id.localeCompare(a.id); })[0]; if (!latestThread) return; @@ -1296,9 +1297,9 @@ export default function Sidebar() { const projectThreads = threads .filter((thread) => thread.projectId === project.id) .toSorted((a, b) => { - const byDate = - new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(); - if (byDate !== 0) return byDate; + const aTime = a.messages.at(-1)?.createdAt ?? a.createdAt; + const bTime = b.messages.at(-1)?.createdAt ?? b.createdAt; + if (aTime !== bTime) return bTime.localeCompare(aTime); return b.id.localeCompare(a.id); }); const isThreadListExpanded = expandedThreadListsByProject.has(project.id);