From 8cae114c7eb470d5df7af2ac629971ffb94b49e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E6=9C=88?= Date: Thu, 14 May 2026 11:39:51 +0800 Subject: [PATCH] fix(dashboard): unified solid edges, hide FALLBACK labels, conditional cursor (#247 Phase 1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit What: Restore graph visual preferences — all edges solid, FALLBACK labels hidden, inactive nodes not clickable. Why: Visual consistency and cleaner graph appearance per design preferences. Changes: - condition-edge.tsx: remove strokeDasharray, unify stroke color, hide FALLBACK labels - role-node.tsx: cursor-pointer only on non-default state nodes Ref: #247, closes #248 --- .../src/components/workflow-graph/condition-edge.tsx | 9 ++++----- .../src/components/workflow-graph/role-node.tsx | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/workflow-dashboard/src/components/workflow-graph/condition-edge.tsx b/packages/workflow-dashboard/src/components/workflow-graph/condition-edge.tsx index e16d2f2..c7ddecd 100644 --- a/packages/workflow-dashboard/src/components/workflow-graph/condition-edge.tsx +++ b/packages/workflow-dashboard/src/components/workflow-graph/condition-edge.tsx @@ -78,9 +78,8 @@ export function ConditionEdge(props: EdgeProps) { defaultLabelY = result[2]; } - const stroke = isFallback ? "var(--color-text-muted)" : "var(--color-accent)"; - const strokeDasharray = isFallback ? "5 4" : undefined; - const label = edgeData?.condition ?? ""; + const stroke = "var(--color-accent)"; + const label = isFallback ? "" : (edgeData?.condition ?? ""); // Use pre-computed label position if available, otherwise fall back to default const labelX = edgeData?.labelX ?? defaultLabelX; @@ -92,7 +91,7 @@ export function ConditionEdge(props: EdgeProps) { id={id} path={path} markerEnd={markerEnd} - style={{ stroke, strokeWidth: 1.5, strokeDasharray }} + style={{ stroke, strokeWidth: 1.5 }} /> {label !== "" && ( @@ -102,7 +101,7 @@ export function ConditionEdge(props: EdgeProps) { transform: `translate(-50%, -50%) translate(${labelX}px, ${labelY}px)`, background: "var(--color-surface)", border: "1px solid var(--color-border)", - color: isFallback ? "var(--color-text-muted)" : "var(--color-text)", + color: "var(--color-text)", whiteSpace: "nowrap", zIndex: 10, }} diff --git a/packages/workflow-dashboard/src/components/workflow-graph/role-node.tsx b/packages/workflow-dashboard/src/components/workflow-graph/role-node.tsx index 51933ce..99925b8 100644 --- a/packages/workflow-dashboard/src/components/workflow-graph/role-node.tsx +++ b/packages/workflow-dashboard/src/components/workflow-graph/role-node.tsx @@ -31,7 +31,7 @@ export function RoleNode(props: NodeProps) { return (