fix(tui): handle timeout/error subagent statuses in /agents (#26687)
Accept delegation timeout/error statuses in the TUI subagent model, normalize unknown status strings defensively, and harden /agents overlay rendering/sorting so unknown statuses cannot crash glyph/color lookup. Add regression tests for live event normalization and disk snapshot replay.
This commit is contained in:
@@ -327,7 +327,11 @@ function SubagentAccordion({
|
||||
const aggregate = node.aggregate
|
||||
|
||||
const statusTone: 'dim' | 'error' | 'warn' =
|
||||
item.status === 'failed' ? 'error' : item.status === 'interrupted' ? 'warn' : 'dim'
|
||||
item.status === 'error' || item.status === 'failed'
|
||||
? 'error'
|
||||
: item.status === 'interrupted' || item.status === 'timeout'
|
||||
? 'warn'
|
||||
: 'dim'
|
||||
|
||||
const prefix = item.taskCount > 1 ? `[${item.index + 1}/${item.taskCount}] ` : ''
|
||||
const goalLabel = item.goal || `Subagent ${item.index + 1}`
|
||||
|
||||
Reference in New Issue
Block a user