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.
This commit is contained in:
2026-04-28 23:11:39 -04:00
parent 2fabcd1c29
commit 1a631c9400

View File

@@ -184,7 +184,7 @@ const Inspector: React.FC<Props> = ({
>
<option value=""> pick a service </option>
{availableServices
.filter((s) => !node.services.includes(s))
.filter((s) => !(node.services as readonly string[]).includes(s))
.map((s) => (
<option key={s} value={s}>{s}</option>
))}