diff --git a/src/features/sidebar/ui/Sidebar.tsx b/src/features/sidebar/ui/Sidebar.tsx index cd6b08c..18aac3a 100644 --- a/src/features/sidebar/ui/Sidebar.tsx +++ b/src/features/sidebar/ui/Sidebar.tsx @@ -134,6 +134,14 @@ export function Sidebar({ standalone.push(item); } } + // Sort project chats by updatedAt descending (newest first) + for (const chats of Object.values(byProject)) { + chats.sort( + (a, b) => + new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime(), + ); + } + // Sort standalone by updatedAt descending, limit to MAX_RECENTS standalone.sort( (a, b) => diff --git a/src/features/sidebar/ui/SidebarProjectsSection.tsx b/src/features/sidebar/ui/SidebarProjectsSection.tsx index c4f1710..a21ad7b 100644 --- a/src/features/sidebar/ui/SidebarProjectsSection.tsx +++ b/src/features/sidebar/ui/SidebarProjectsSection.tsx @@ -12,7 +12,7 @@ import type { ProjectInfo } from "@/features/projects/api/projects"; import { SessionActivityIndicator } from "@/shared/ui/SessionActivityIndicator"; import { SidebarChatRow } from "./SidebarChatRow"; -const MAX_VISIBLE_CHATS = 3; +const MAX_VISIBLE_CHATS = 5; const PROJECT_ROW_TEXT_CLASS = "text-foreground-subtle group-hover:text-foreground";