From 1a631c9400b9de425baf6c29f84b7bab5871fe33 Mon Sep 17 00:00:00 2001 From: anti Date: Tue, 28 Apr 2026 23:11:39 -0400 Subject: [PATCH] fix(ui): narrow services type for Inspector live-add picker ObservedNode.services is the literal tuple ['*']; narrowing inside the .filter() callback was tripping TS2345. We already gate the live controls on node.kind !== 'observed', so casting to readonly string[] inside the filter is safe and keeps the discriminated union strict elsewhere. --- decnet_web/src/components/MazeNET/Inspector.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decnet_web/src/components/MazeNET/Inspector.tsx b/decnet_web/src/components/MazeNET/Inspector.tsx index 8672c40e..492c68b6 100644 --- a/decnet_web/src/components/MazeNET/Inspector.tsx +++ b/decnet_web/src/components/MazeNET/Inspector.tsx @@ -184,7 +184,7 @@ const Inspector: React.FC = ({ > {availableServices - .filter((s) => !node.services.includes(s)) + .filter((s) => !(node.services as readonly string[]).includes(s)) .map((s) => ( ))}