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. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Gf7WaExcJ9bs3kfJXB3nK
This commit is contained in:
@@ -132,15 +132,18 @@ export function EdgeInspector({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* The same curve the node panel draws for this message: one value
|
{/* The same curve the node panel draws for this message: one value
|
||||||
says little, how it has been moving says the rest. */}
|
says little, how it has been moving says the rest. Only for a
|
||||||
{live === undefined ? null : (
|
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">
|
<div className="mt-2">
|
||||||
<MessageSparkline
|
<MessageSparkline
|
||||||
flow={flow}
|
flow={flow}
|
||||||
name={displayName(flow, edge.message)}
|
name={displayName(flow, edge.message)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
) : null}
|
||||||
|
|
||||||
{/* Several nodes can publish one message, and so can a dashboard or
|
{/* Several nodes can publish one message, and so can a dashboard or
|
||||||
another flow — so the value alone does not say what caused it. */}
|
another flow — so the value alone does not say what caused it. */}
|
||||||
|
|||||||
Reference in New Issue
Block a user