diff --git a/site/src/pages/AgentsPage/components/Sidebar/AgentsSidebar.tsx b/site/src/pages/AgentsPage/components/Sidebar/AgentsSidebar.tsx index c0b23f2524..745d988559 100644 --- a/site/src/pages/AgentsPage/components/Sidebar/AgentsSidebar.tsx +++ b/site/src/pages/AgentsPage/components/Sidebar/AgentsSidebar.tsx @@ -855,9 +855,9 @@ export const AgentsSidebar: FC = (props) => { onReorderPinnedAgent?.(activeId, newIndex + 1); }; - // The filter dropdown attaches to the first visible section - // header. When pinned chats exist, that's the Pinned header; - // otherwise it falls through to the first non-empty time group. + // Attach the archived filter to the first visible section header. + // When the list is empty, fall back to contextual empty-state links + // instead of a floating standalone icon. const showFilterOnPinned = pinnedChats.length > 0; const firstNonEmptyGroup = showFilterOnPinned ? undefined @@ -1069,15 +1069,19 @@ export const AgentsSidebar: FC = (props) => { ? "No archived agents" : "No agents yet"}

- {archivedFilter === "archived" && ( - - )} + ) : (