diff --git a/src/renderer/features/agent-graph/adapters/TeamGraphAdapter.ts b/src/renderer/features/agent-graph/adapters/TeamGraphAdapter.ts index fb446754..97d0fdcf 100644 --- a/src/renderer/features/agent-graph/adapters/TeamGraphAdapter.ts +++ b/src/renderer/features/agent-graph/adapters/TeamGraphAdapter.ts @@ -494,6 +494,9 @@ export class TeamGraphAdapter { if (this.#seenMessageIds.has(msgKey)) continue; this.#seenMessageIds.add(msgKey); + // Skip system/noise messages (idle notifications, JSON blobs) + if (TeamGraphAdapter.#isSystemMessage(msg)) continue; + const edgeId = TeamGraphAdapter.#resolveMessageEdge(msg, teamName, leadId, leadName, edges); if (!edgeId) continue; @@ -691,6 +694,18 @@ export class TeamGraphAdapter { return `member:${teamName}:${name}`; } + /** Filter out system/noise messages that shouldn't show as particles */ + static #isSystemMessage(msg: InboxMessage): boolean { + const text = msg.text ?? ''; + // JSON system messages (idle_notification, shutdown, etc.) + if (text.startsWith('{"type":') || text.startsWith('{"type" :')) return true; + // Very short system messages + if (text.length < 3) return true; + // System notification source + if (msg.source === 'system_notification') return true; + return false; + } + static #buildParticleLabel( text: string | undefined, kind: 'inbox' | 'comment',