diff --git a/apps/mobile/src/features/threads/thread-subagent-group.tsx b/apps/mobile/src/features/threads/thread-subagent-group.tsx
index 4c478c1a819b2..3370c7cb1b463 100644
--- a/apps/mobile/src/features/threads/thread-subagent-group.tsx
+++ b/apps/mobile/src/features/threads/thread-subagent-group.tsx
@@ -136,6 +136,7 @@ export function ThreadSubagentGroup(props: {
};
});
const grouped = agents.length > 1;
+ const visibleAvatarCount = agents.length <= 4 ? agents.length : 3;
const label = gt("{count, plural, one {{count} subagent} other {{count} subagents}}", {
count: agents.length,
});
@@ -159,14 +160,16 @@ export function ThreadSubagentGroup(props: {
className="min-h-14 flex-row items-center gap-3 rounded-lg py-2 active:bg-subtle"
>
- {agents.slice(0, 3).map((agent, index) => (
+ {agents.slice(0, visibleAvatarCount).map((agent, index) => (
))}
- {agents.length > 3 ? (
+ {agents.length > visibleAvatarCount ? (
- +{agents.length - 3}
+
+ +{agents.length - visibleAvatarCount}
+
) : null}
diff --git a/apps/web/src/components/chat/TimelineV2EventRow.tsx b/apps/web/src/components/chat/TimelineV2EventRow.tsx
index 5ea743025444f..08a7f4b5fc471 100644
--- a/apps/web/src/components/chat/TimelineV2EventRow.tsx
+++ b/apps/web/src/components/chat/TimelineV2EventRow.tsx
@@ -82,6 +82,7 @@ const V2SubagentGroup = memo(function V2SubagentGroup({
completedAt: live?.completedAt ?? item.completedAt,
};
});
+ const visibleAvatarCount = agents.length <= 4 ? agents.length : 3;
const summary = subagentGroupSummary(agents, m);
const label = gt("{count, plural, one {{count} subagent} other {{count} subagents}}", {
count: members.length,
@@ -111,7 +112,7 @@ const V2SubagentGroup = memo(function V2SubagentGroup({
)}
>
- {agents.slice(0, 3).map(({ item, status }) => (
+ {agents.slice(0, visibleAvatarCount).map(({ item, status }) => (
))}
- {agents.length > 3 ? (
+ {agents.length > visibleAvatarCount ? (
- +{agents.length - 3}
+ +{agents.length - visibleAvatarCount}
) : null}