Draw the edge sparkline only for a value it can plot

The popover showed a non-numeric value twice: only numbers are recorded,
so MessageSparkline fell through to a collapsed ValuePreview and the
inspector rendered its own expanded one below it.
This commit is contained in:
2026-08-25 22:13:32 +02:00
parent 801bab07e1
commit 1511d71dcd
@@ -132,15 +132,18 @@ export function EdgeInspector({
</div>
{/* The same curve the node panel draws for this message: one value
says little, how it has been moving says the rest. */}
{live === undefined ? null : (
says little, how it has been moving says the rest. Only for a
number, because only numbers are recorded — for anything else the
sparkline falls through to its own copy of the value, which the
popover already shows below. */}
{typeof live?.value === "number" ? (
<div className="mt-2">
<MessageSparkline
flow={flow}
name={displayName(flow, edge.message)}
/>
</div>
)}
) : null}
{/* Several nodes can publish one message, and so can a dashboard or
another flow — so the value alone does not say what caused it. */}