fix(agent-status): drop identity icon on subagent child rows

The child's agentType carries its NAME (e.g. "pr-reviewer"), which is not
an iconable agent and rendered the unknown "?" glyph. Nesting under the
parent row already conveys identity.
This commit is contained in:
Brennan Benson
2026-07-10 21:43:31 -07:00
parent c84fc40b3e
commit de7a329bfc
2 changed files with 10 additions and 3 deletions
@@ -340,8 +340,11 @@ const DashboardAgentRow = React.memo(function DashboardAgentRow({
on the top row. The sub-rows (tool step, assistant response) are
about the same agent and do not need the icon repeated next to
them — keeping the icon only on the prompt row lets the sub-rows
indent under the prompt text cleanly. */}
{!hideIdentityIcon && (
indent under the prompt text cleanly. Subagent child rows carry
the child's NAME in agentType (not an iconable agent — it would
render the unknown "?" glyph), and nesting under the parent
already conveys identity. */}
{!hideIdentityIcon && agent.rowSource !== 'subagent' && (
<span className="inline-flex shrink-0" title={identityTitle}>
<AgentIcon agent={agentTypeToIconAgent(agent.agentType)} size={14} />
</span>
@@ -120,6 +120,10 @@ export const CompactAgentRow = React.memo(function CompactAgentRow({
typeof childAgentCount === 'number' &&
childAgentCount > 0 &&
typeof onToggleChildAgents === 'function'
// Why: subagent child rows carry the child's NAME (e.g. "pr-reviewer") in
// agentType, which is not an iconable agent and would render the unknown
// "?" glyph. Nesting under the parent already conveys identity.
const hideIcon = hideIdentityIcon || agent.rowSource === 'subagent'
const dotState = getAgentDotState(agent)
const primary = getCompactAgentPrimary(agent)
const isLineageChild = agent.lineage?.depth === 1
@@ -196,7 +200,7 @@ export const CompactAgentRow = React.memo(function CompactAgentRow({
<span className="size-4 shrink-0" aria-hidden />
) : null}
<AgentStateDot state={dotState} size="sm" />
{!hideIdentityIcon && (
{!hideIcon && (
<span className="inline-flex shrink-0" title={formatAgentTypeLabel(agent.agentType)}>
<AgentIcon agent={agentTypeToIconAgent(agent.agentType)} size={13} />
</span>