diff --git a/packages/ui/src/components/chat/work-status/DOCUMENTATION.md b/packages/ui/src/components/chat/work-status/DOCUMENTATION.md index ae573895..16c9e9a4 100644 --- a/packages/ui/src/components/chat/work-status/DOCUMENTATION.md +++ b/packages/ui/src/components/chat/work-status/DOCUMENTATION.md @@ -215,6 +215,10 @@ The Subagents section opens itself when subagents appear where there were none, on that edge only: re-expanding on every count change would fight a user who just collapsed it. +Its expanded list is capped at eight rows and scrolls independently, so a +session with many subagents does not crowd every section below it out of the +panel. + ## Tasks Icons and strike-through match the composer's todo dropdown, so one list does diff --git a/packages/ui/src/components/chat/work-status/WorkStatusSubagentsSection.tsx b/packages/ui/src/components/chat/work-status/WorkStatusSubagentsSection.tsx index f670efeb..6c354e76 100644 --- a/packages/ui/src/components/chat/work-status/WorkStatusSubagentsSection.tsx +++ b/packages/ui/src/components/chat/work-status/WorkStatusSubagentsSection.tsx @@ -82,29 +82,31 @@ export const WorkStatusSubagentsSection: React.FC = ({ sessionId, directo defaultExpanded summary={busyChildren > 0 ? `${busyChildren}/${children.length}` : children.length} > - {children.map((child) => { - const blocked = (permissions[child.id]?.length ?? 0) > 0; - const asked = (questions[child.id]?.length ?? 0) > 0; - const busy = statuses[child.id]?.type === 'busy'; - const label = child.title?.trim() || t('chat.workStatus.subagent.untitled'); - return ( - openChildSession(child.id, label) : undefined} - ariaLabel={t('chat.workStatus.action.openSubagent', { name: label })} - label={label} - value={blocked ? ( - {t('chat.workStatus.subagent.needsPermission')} - ) : asked ? ( - {t('chat.workStatus.subagent.askedQuestion')} - ) : busy ? ( - {t('chat.workStatus.subagent.working')} - ) : ( - {t('chat.workStatus.subagent.done')} - )} - /> - ); - })} +
+ {children.map((child) => { + const blocked = (permissions[child.id]?.length ?? 0) > 0; + const asked = (questions[child.id]?.length ?? 0) > 0; + const busy = statuses[child.id]?.type === 'busy'; + const label = child.title?.trim() || t('chat.workStatus.subagent.untitled'); + return ( + openChildSession(child.id, label) : undefined} + ariaLabel={t('chat.workStatus.action.openSubagent', { name: label })} + label={label} + value={blocked ? ( + {t('chat.workStatus.subagent.needsPermission')} + ) : asked ? ( + {t('chat.workStatus.subagent.askedQuestion')} + ) : busy ? ( + {t('chat.workStatus.subagent.working')} + ) : ( + {t('chat.workStatus.subagent.done')} + )} + /> + ); + })} +
); };