feat(site/src/pages/AgentsPage): surface subagents in the chat sidebar by tracyjohnsonux · Pull Request #28234 · coder/coder · GitHub
Skip to content

feat(site/src/pages/AgentsPage): surface subagents in the chat sidebar - #28234

Merged
tracyjohnsonux merged 4 commits into
mainfrom
feat/agents-show-subagents
Aug 18, 2026
Merged

feat(site/src/pages/AgentsPage): surface subagents in the chat sidebar#28234
tracyjohnsonux merged 4 commits into
mainfrom
feat/agents-show-subagents

Conversation

@tracyjohnsonux

Copy link
Copy Markdown
Contributor

What

Makes subagents more discoverable in the agent chat sidebar, without disturbing the existing status icon or layout.

  • Parent chat rows show a subagent count with a bot icon (e.g. 3 🤖) at the start of the metadata line, next to the diff stats. Only shown when a chat has subagents; uses lucide BotIcon, the same icon this codebase already uses to denote agents. Passive indicator (the leading status icon, timestamp, and kebab are untouched).
  • The chat actions menu gains a "Show subagents (N)" / "Hide subagents" toggle, grouped directly under "Rename chat" in both the kebab (⋮) and the right-click context menu. It expands/collapses the row's subagents and is only rendered when the chat has subagents.

Expansion still uses the existing sidebar expand state, so the hover chevron, the menu toggle, and the count all stay in sync.

Notes / decisions

  • Subagent children are capped at depth 1, so the count and toggle only appear on parent chats.
  • The menu toggle lives in the shared ChatActionsMenuItems, so it appears in both the kebab and the right-click menu; the top-bar kebab intentionally does not pass the props, so it stays hidden there.
  • The on-row N 🤖 indicator is currently passive (clicking the row opens the chat as before). Can be made a click-to-expand control if wanted.

Testing

Validated in Storybook (ChatsSidebar stories) with 0 TypeScript errors. Added a SubagentsMenuToggle story with a play function asserting the label swaps between "Show subagents (3)" and "Hide subagents" and that children expand. Existing ChatsSidebar.test.tsx does not assert menu contents and is unaffected.


This PR was generated by Coder Agents on behalf of @tracyjohnsonux.

Add a subagent count indicator (bot icon) to parent chat rows and a
"Show/Hide subagents" toggle to the chat actions menu (kebab and
right-click), grouped under Rename chat. Includes a Storybook story with
a play test for the menu toggle.
Comment thread site/src/pages/AgentsPage/components/ChatsSidebar/tree/ChatTreeNode.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/ChatActionsMenuItems.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/ChatActionsMenuItems.tsx Outdated
@tracyjohnsonux
tracyjohnsonux marked this pull request as ready for review August 18, 2026 14:35
@tracyjohnsonux
tracyjohnsonux merged commit b3f05a2 into main Aug 18, 2026
25 of 26 checks passed
@tracyjohnsonux
tracyjohnsonux deleted the feat/agents-show-subagents branch August 18, 2026 20:25
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants