+ {team.failure !== undefined && (
+
{t('failure', { message: team.failure })}
+ )}
+ {tasks.length > 0 && (
+
+ {tasks.map(task => (
+ { setExpandedTaskId(current => current === task.id ? null : task.id) }}
+ t={t}
+ />
+ ))}
+
+ )}
+
)
}
+
+/**
+ * Render the tasks' progress beside the section title, one line that clips.
+ * @param props - the `agentTeam` projection and copy.
+ * @returns the progress phrase, or null without visible tasks.
+ */
+export function TeamProgress({ useProjection, t }: TeamProgressProps) {
+ const team = useProjection('agentTeam')
+ if (!team?.enabled) return null
+ const progress = progressLabel(visibleTasks(team), t)
+ if (progress === '') return null
+ return