feat(site/src/pages/AgentsPage): show "Archived chats" sidebar heading when viewing archived chats (#26926)

In the agents sidebar, show "Archived chats" instead of "Chats" when the
archive filter is set to `archived`. The heading reads the existing
`sidebarFilters.archiveStatus` state, the same condition already used
for the archived empty-state message.

---

_This PR was opened by [Coder Agents](https://coder.com/) on behalf of
@tracyjohnsonux._

---------

Co-authored-by: Coder Agents <noreply@coder.com>
This commit is contained in:
TJ
2026-07-16 06:04:52 -07:00
committed by GitHub
co-authored by Coder Agents
parent e489092154
commit 529b2ead78
@@ -335,9 +335,11 @@ export const ChatsPanel: FC<ChatsPanelProps> = ({
}))
).filter((section) => section.chats.length > 0);
const isShowingEmptyState = visibleRootIDs.length === 0;
const isViewingArchived = sidebarFilters.archiveStatus === "archived";
const chatsHeadingLabel = isViewingArchived ? "Archived chats" : "Chats";
const emptyStateMessage = hasAppliedResultFilters
? "No agents match these filters"
: sidebarFilters.archiveStatus === "archived"
: isViewingArchived
? "No archived agents"
: "No agents yet";
const clearResultFilters = () => {
@@ -429,7 +431,7 @@ export const ChatsPanel: FC<ChatsPanelProps> = ({
<div className="mx-2 pt-6 mb-1.5">
<div className="ml-2.5 mr-2 flex h-7 items-center justify-between">
<h2 className="m-0 text-sm font-normal leading-6 text-content-secondary">
Chats
{chatsHeadingLabel}
</h2>
<div className="flex items-center gap-1">
{onOpenSearchDialog && (