Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/features/sidebar/ui/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand Down
2 changes: 1 addition & 1 deletion src/features/sidebar/ui/SidebarProjectsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
Loading