diff --git a/desktop/src/features/sidebar/ui/SidebarSection.tsx b/desktop/src/features/sidebar/ui/SidebarSection.tsx index 9d20b034d..327ed80af 100644 --- a/desktop/src/features/sidebar/ui/SidebarSection.tsx +++ b/desktop/src/features/sidebar/ui/SidebarSection.tsx @@ -131,8 +131,8 @@ function ChannelWorkingAgents({ pubkey, }; }); - const visibleAgents = agents.slice(0, 3); - const overflowCount = Math.max(0, agents.length - visibleAgents.length); + const visibleAgents = agents.slice(0, agents.length > 3 ? 2 : 3); + const overflowCount = agents.length > 3 ? agents.length - 2 : 0; const label = agents.length > 1 ? `${agents.length} agents working ยท ${elapsed}` @@ -158,10 +158,10 @@ function ChannelWorkingAgents({ 0 ? ( +{overflowCount}