From a4fcb8810f552704a279d1673c22e81224575890 Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Sun, 29 Mar 2026 13:49:36 +0200 Subject: [PATCH] fix: use actual lucide Footprints icon for trace badges Replace hand-drawn teardrop paths (looked like plants) with the real lucide Footprints SVG paths. Configured = bare teal icon, data captured = white icon in solid teal circle with staggered pulse rings. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../components/ProcessDiagram/ConfigBadge.tsx | 114 ++++++++++++------ 1 file changed, 74 insertions(+), 40 deletions(-) diff --git a/ui/src/components/ProcessDiagram/ConfigBadge.tsx b/ui/src/components/ProcessDiagram/ConfigBadge.tsx index 67d96e20..f3e7ea4b 100644 --- a/ui/src/components/ProcessDiagram/ConfigBadge.tsx +++ b/ui/src/components/ProcessDiagram/ConfigBadge.tsx @@ -1,9 +1,10 @@ +import React from 'react'; import type { NodeConfig } from './types'; const BADGE_SIZE = 18; const BADGE_GAP = 4; -const TRACE_ENABLED_COLOR = '#1A7F8E'; // teal — tracing configured -const TRACE_DATA_COLOR = '#3D7C47'; // green — data captured +const TRACE_COLOR = '#1A7F8E'; // teal +const TAP_COLOR = '#7C3AED'; // purple interface ConfigBadgeProps { nodeWidth: number; @@ -12,45 +13,78 @@ interface ConfigBadgeProps { hasTraceData?: boolean; } -export function ConfigBadge({ nodeWidth, config, hasTraceData }: ConfigBadgeProps) { - const badges: { icon: 'tap' | 'trace'; color: string }[] = []; - if (config.tapExpression) badges.push({ icon: 'tap', color: '#7C3AED' }); - // Show trace badge if tracing is enabled OR data was captured - if (config.traceEnabled || hasTraceData) { - badges.push({ icon: 'trace', color: hasTraceData ? TRACE_DATA_COLOR : TRACE_ENABLED_COLOR }); - } - if (badges.length === 0) return null; - - let xOffset = nodeWidth; +/** Lucide Footprints icon (24x24 viewBox) scaled to fit badge */ +function FootprintsIcon({ color, size }: { color: string; size: number }) { + const scale = size / 24; return ( - - {badges.map((badge, i) => { - xOffset -= BADGE_SIZE + (i > 0 ? BADGE_GAP : 0); - return ( - - - {badge.icon === 'tap' ? ( - /* Droplets icon (simplified) */ - - - - ) : ( - /* Footprints icon (simplified) */ - - - - - - - )} - - ); - })} + + + + + ); } + +export function ConfigBadge({ nodeWidth, config, hasTraceData }: ConfigBadgeProps) { + const showTap = !!config.tapExpression; + const showTrace = config.traceEnabled || hasTraceData; + if (!showTap && !showTrace) return null; + + const badges: React.ReactNode[] = []; + let xOffset = nodeWidth; + + // Tap badge: always solid purple circle with white droplet icon + if (showTap) { + xOffset -= BADGE_SIZE; + const cx = BADGE_SIZE / 2; + const cy = BADGE_SIZE / 2; + badges.push( + + + + + + , + ); + } + + // Trace badge + if (showTrace) { + xOffset -= BADGE_SIZE + (showTap ? BADGE_GAP : 0); + const cx = BADGE_SIZE / 2; + const cy = BADGE_SIZE / 2; + const r = BADGE_SIZE / 2; + + if (hasTraceData) { + // Data captured: solid teal circle, white icon, pulsing rings + badges.push( + + + + + + + + + + + + + + , + ); + } else { + // Configured only: bare teal icon, no circle background + badges.push( + + + + + , + ); + } + } + + return {badges}; +}