feat(app): give composer track pills a segment per state

A mixed fan-out used to collapse the pill to its single most urgent
state, so a red dot beside "1 failed" over a child that was still
working read as the whole fan-out having stopped. Every state present
now gets its own mark and count, in the sidebar's status-group order.
This commit is contained in:
Mohamed Boudra
2026-08-18 21:51:25 +02:00
parent 5731f016c2
commit 25fbc939e0
17 changed files with 221 additions and 116 deletions
@@ -24,11 +24,12 @@ const TaskListCard = memo(function TaskListCard({ tasks }: { tasks: TodoEntry[]
// Counts only. The active task used to ride along in the header, where it was the first thing
// truncated on a phone; the panel shows it in full, in place, with the rest of the list.
const label = t("message.todo.tasksProgress", { completed, total: tasks.length });
const segments = useMemo(() => [{ bucket: null, text: label }], [label]);
return (
<ComposerTrackPill
testID="agent-task-list-header"
label={label}
segments={segments}
panelTitle={t("message.todo.title")}
>
{tasks.map((task, index) => (