From 781a286338d20ff552c0fe7307eca9109d910a25 Mon Sep 17 00:00:00 2001 From: npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w <52a228d6edf316ec6812ac3c9fc0d696ab59fc7954d77e7be31eedcddf91335b@sprout-oss.stage.blox.sqprod.co> Date: Mon, 15 Jun 2026 01:50:14 -0700 Subject: [PATCH] fix(desktop): make compact tool label map type honest The labels Record was annotated Record but only spreads generic + developerToolLabels(), which excludes the buzz kind. buzz is handled by an early return in compactToolLabel, so it never indexes this map. Narrow the annotation to Exclude so tsc accepts it, and drop the redundant labelsMap re-cast. No runtime behavior change. Co-authored-by: Taylor Ho Signed-off-by: Taylor Ho --- .../src/features/agents/ui/agentSessionToolSummary.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/desktop/src/features/agents/ui/agentSessionToolSummary.ts b/desktop/src/features/agents/ui/agentSessionToolSummary.ts index 96b024469..f82fbd4c2 100644 --- a/desktop/src/features/agents/ui/agentSessionToolSummary.ts +++ b/desktop/src/features/agents/ui/agentSessionToolSummary.ts @@ -131,7 +131,7 @@ function compactToolLabel( } const labels: Record< - CompactToolKind, + Exclude, { completed: string; running: string; failed: string } > = { generic: { @@ -142,12 +142,7 @@ function compactToolLabel( ...developerToolLabels(), }; - const labelsMap = labels as Record< - CompactToolKind, - { completed: string; running: string; failed: string } - >; - - const set = labelsMap[kind]; + const set = labels[kind]; if (failed) return set.failed; if (running) return set.running; return set.completed;