feat: filter homepage to show only root agents

Skip agents with parentAgentId when building the aggregated agents list
for the homepage. This ensures only top-level (root) agents are displayed,
while child agents are only accessible through their parent agent's menu.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Mohamed Boudra
2025-12-21 17:22:42 +00:00
parent cb78f29b31
commit 11afd22858
2 changed files with 9 additions and 2 deletions

View File

@@ -62,6 +62,10 @@ export function useAggregatedAgents(): AggregatedAgentsResult {
const serverLabel = connectionStates.get(serverId)?.daemon.label ?? serverId;
for (const agent of agents.values()) {
// Use agent's own lastActivityAt field directly
// Skip child agents - only show root agents on homepage
if (agent.parentAgentId) {
continue;
}
allAgents.push({
id: agent.id,
serverId,
@@ -74,6 +78,7 @@ export function useAggregatedAgents(): AggregatedAgentsResult {
requiresAttention: agent.requiresAttention,
attentionReason: agent.attentionReason,
attentionTimestamp: agent.attentionTimestamp,
parentAgentId: agent.parentAgentId,
});
}
}