Keep the node ring lapping while the node is running
The arc was one-shot feedback for an emit, so a node that works for minutes showed nothing after the first half second. A run now holds the ring on the node and laps it until the node stops. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SKL7sUgNWhukDEz95vSMQv
This commit is contained in:
@@ -152,6 +152,7 @@ function FlowNodeComponent({ data, selected }: NodeProps) {
|
||||
.split("\n")
|
||||
const problem = [...new Set(lines)].join("\n")
|
||||
const status = problem ? "error" : live?.status
|
||||
const running = status === "running"
|
||||
const style = STATUS_STYLES[status as keyof typeof STATUS_STYLES]
|
||||
|
||||
return (
|
||||
@@ -160,8 +161,15 @@ function FlowNodeComponent({ data, selected }: NodeProps) {
|
||||
<div className="relative rounded-lg">
|
||||
{/* Remounting on each emit is what restarts the animation, so this is
|
||||
gated on the pulse rather than on the count: a node mounting with a
|
||||
count already in the store would otherwise play it once for free. */}
|
||||
{firing ? <span key={emits} className="node-pulse" /> : null}
|
||||
count already in the store would otherwise play it once for free.
|
||||
A run is not one shot and has no length known in advance, so while one
|
||||
is on the ring laps under a key of its own until the node stops. */}
|
||||
{running || firing ? (
|
||||
<span
|
||||
key={running ? "run" : emits}
|
||||
className={cn("node-pulse", running && "node-pulse-run")}
|
||||
/>
|
||||
) : null}
|
||||
<div
|
||||
className={cn(
|
||||
"relative min-w-[168px] max-w-[220px] rounded-lg border border-border bg-card px-3 py-2.5 shadow-e1 transition-shadow",
|
||||
@@ -186,7 +194,7 @@ function FlowNodeComponent({ data, selected }: NodeProps) {
|
||||
{typeLabel}
|
||||
</span>
|
||||
</span>
|
||||
{status === "running" ? (
|
||||
{running ? (
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user