diff --git a/apps/desktop/src/components/HistorySidebar.tsx b/apps/desktop/src/components/HistorySidebar.tsx index 32df287..794ce83 100644 --- a/apps/desktop/src/components/HistorySidebar.tsx +++ b/apps/desktop/src/components/HistorySidebar.tsx @@ -3,14 +3,14 @@ import { Plus, MessageSquare, Trash2, Phone, Blocks, Images, Wallet, Sparkles, Search, Grid2x2, ChevronRight, Terminal, Server, Bot, Folder, FolderPlus, Pin, PinOff, } from "lucide-react"; -import type { ChatSpace, Conversation } from "../hooks/use-chat-history"; +import { conversationActivityAt, type ChatSpace, type Conversation } from "../hooks/use-chat-history"; import type { WalletInfo } from "../lib/wire"; import type { AgentConnectionState } from "../lib/ws"; import { useTryLang } from "../lib/i18n"; import { MoreMenu } from "./MoreMenu"; import { WalletPill } from "./WalletPill"; import franklinAvatar from "../assets/franklin-avatar.png"; -import type { TeamWorkspaceNavItem } from "../lib/team-workspace-events"; +import type { TeamWorkspaceNavItem } from "../hooks/use-cloud-workspace"; import { useSidebarPreferences } from "../hooks/use-sidebar-preferences"; export type TryView = "chat" | "agents" | "phone" | "tools" | "gallery" | "wallet" | "skills" | "cli" | "mcp"; @@ -58,7 +58,7 @@ export function HistorySidebar({ conversations, activeId, onNewChat, onNewProjec setMoreOpen(true); }; - const sorted = [...conversations].sort((a, b) => b.updatedAt - a.updatedAt); + const sorted = [...conversations].sort((a, b) => conversationActivityAt(b) - conversationActivityAt(a)); const pinned = sorted.filter((conversation) => conversation.pinnedAt).sort((a, b) => (b.pinnedAt ?? 0) - (a.pinnedAt ?? 0)); const recent = sorted.filter((conversation) => !conversation.pinnedAt); @@ -100,22 +100,22 @@ export function HistorySidebar({ conversations, activeId, onNewChat, onNewProjec
Connecting…
{t.connectingProjects}
No projects
{t.noProjects}
{t.noConversations}