From 6b027a77424ed11914d7d0888bcb725d978e3016 Mon Sep 17 00:00:00 2001 From: master <> Date: Thu, 2 Apr 2026 13:41:59 +0300 Subject: [PATCH] Exclude corridor-rerouted edges from EndSink highway grouping Edges with bend points above the graph (Y < graphMinY - 10) are corridor-rerouted and should render independently, not merge into a shared End-targeting highway. The highway truncation was destroying the corridor route paths, making edges appear to end before the node. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../WorkflowRenderSvgRenderer.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Workflow/__Libraries/StellaOps.Workflow.Renderer.Svg/WorkflowRenderSvgRenderer.cs b/src/Workflow/__Libraries/StellaOps.Workflow.Renderer.Svg/WorkflowRenderSvgRenderer.cs index d64ac457b..a160b7b41 100644 --- a/src/Workflow/__Libraries/StellaOps.Workflow.Renderer.Svg/WorkflowRenderSvgRenderer.cs +++ b/src/Workflow/__Libraries/StellaOps.Workflow.Renderer.Svg/WorkflowRenderSvgRenderer.cs @@ -1507,6 +1507,8 @@ public sealed class WorkflowRenderSvgRenderer var groups = new Dictionary(StringComparer.Ordinal); var nodesById = layout.Nodes.ToDictionary(node => node.Id, StringComparer.Ordinal); + var graphMinY = layout.Nodes.Min(node => node.Y); + foreach (var group in layout.Edges .Where(edge => edge.Sections.Count > 0 && nodesById.ContainsKey(edge.TargetNodeId)) .Select(edge => new @@ -1517,6 +1519,9 @@ public sealed class WorkflowRenderSvgRenderer Points = SectionToPoints(edge.Sections.First()), }) .Where(entry => string.Equals(entry.TargetNode.Kind, "End", StringComparison.OrdinalIgnoreCase)) + // Exclude corridor-rerouted edges (they route above the graph + // and should render independently, not merge into a highway). + .Where(entry => !entry.Points.Any(p => p.Y < graphMinY - 10d)) .GroupBy(entry => $"{entry.Edge.TargetNodeId}|{entry.FamilyKey}", StringComparer.Ordinal)) { var entries = group.ToArray();