fix(desktop): make compact tool label map type honest

The labels Record was annotated Record<CompactToolKind, ...> 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<CompactToolKind,
"buzz"> so tsc accepts it, and drop the redundant labelsMap re-cast.
No runtime behavior change.

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
This commit is contained in:
npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w
2026-06-15 01:50:14 -07:00
co-authored by Taylor Ho
parent 9f65106822
commit 781a286338
@@ -131,7 +131,7 @@ function compactToolLabel(
}
const labels: Record<
CompactToolKind,
Exclude<CompactToolKind, "buzz">,
{ 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;