From 524e93afd20393c05207ad0dfc9ee7033ebe7b31 Mon Sep 17 00:00:00 2001 From: tyulyukov Date: Fri, 24 Apr 2026 14:01:59 +0300 Subject: [PATCH] feat(sidebar): use latestUserMessageAt for thread row timestamp (upstream #1996) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Matches CommandPalette.logic.ts which already uses thread.latestUserMessageAt ?? thread.updatedAt ?? thread.createdAt. Sidebar row was still falling back to updatedAt/createdAt, so the relative-time label stopped refreshing on new user messages in the same thread. Ports only the behavioral change from upstream #1996. The rest of that PR is a store.ts cleanup refactor that collides with MarCode's Incremental Event Handling (FEATURES.md ยง1) without behavioral win, so we leave it out. MarCode already has latestUserMessageAt wired through SidebarThreadSummary (types.ts:158) and store projection (store.ts:275-319). --- apps/web/src/components/Sidebar.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index ba36bb20947c..f1aa7185fc9d 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -712,7 +712,9 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP : "text-muted-foreground/40" }`} > - {formatRelativeTimeLabel(thread.updatedAt ?? thread.createdAt)} + {formatRelativeTimeLabel( + thread.latestUserMessageAt ?? thread.updatedAt ?? thread.createdAt, + )} )}