feat(site): add collapsible archived agents section to sidebar#22551
Merged
DanielleMaywood merged 11 commits intomainfrom Mar 3, 2026
Merged
feat(site): add collapsible archived agents section to sidebar#22551DanielleMaywood merged 11 commits intomainfrom
DanielleMaywood merged 11 commits intomainfrom
Conversation
Adds a collapsible 'Archived' section at the bottom of the agents sidebar. Archived agents (chat.archived === true) are separated from active agents and displayed in their own section that is collapsed by default. - Split visible root chats into active and archived lists - Active chats continue to render in time groups (Today, Yesterday, etc.) - Archived section shows toggle with chevron, archive icon, label, and count - Section auto-expands when search matches archived agents - Empty state only shows when both active and archived lists are empty - Added 4 storybook stories covering collapsed, expanded, search, and no-archived states - Fixed missing onArchiveAndDeleteWorkspace in story meta args
Replace the manual button/state toggle with the Radix-based Collapsible, CollapsibleTrigger, and CollapsibleContent components from components/Collapsible.
Use asChild on CollapsibleTrigger to delegate to a plain button with explicit border-0, bg-transparent, p-0 resets. Also align the left margin with the time group headers (ml-2.5 instead of ml-0.5).
Replaces the raw <button> with manual style resets with the project's Button component using variant=subtle, which already provides border-none, bg-transparent, and the correct hover color.
Renders an <hr> with border-border-default between the time-grouped active chats and the archived section. The divider only appears when both active and archived agents are visible.
Replace the raw <hr> with the project's Separator component (Radix-based, renders with bg-border) to match the rest of the site.
Replace the Button-based trigger with a plain div using the same classes as the time group headers (Today, Yesterday, etc.): mb-1 ml-2.5 flex items-center justify-between text-xs font-medium text-content-secondary. Only additions are cursor-pointer and a small chevron on the right side for the expand/collapse affordance. Removes the ArchiveIcon and separate count badge from the trigger in favor of inline 'Archived (N)' text that matches the simplicity of the other section labels. Also updates stories to match the new label format.
Wrap the active and archived sections in a div with divide-y divide-border. The active group gets pb-2 and the archived Collapsible gets pt-2 for symmetric spacing around the divider. Removes the Separator component import and the manual conditional that checked activeRootIDs.length.
Biome's formatter inserted literal space text nodes between JSX elements. They're meaningless inside Collapsible/ChatTreeContext and just add noise.
The asChild prop on CollapsibleTrigger uses React.Children.only, which requires exactly one child. Previous formatting had multiple elements concatenated on single lines, causing whitespace text nodes to be parsed as extra children. Fixed by placing each element on its own line.
kylecarbs
approved these changes
Mar 3, 2026
johnstcn
approved these changes
Mar 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a collapsible Archived section at the bottom of the agents sidebar. Archived agents (
chat.archived === true) are separated from active agents and displayed in their own section that is collapsed by default.Changes
AgentsSidebar.tsxactiveRootIDsandarchivedRootIDsAgentsSidebar.stories.tsxArchivedAgentsCollapsed,ArchivedAgentsExpanded,ArchivedAgentsSearchAutoExpands,NoArchivedSectiononArchiveAndDeleteWorkspacein story meta args