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) <noreply@anthropic.com>
This commit is contained in:
master
2026-04-02 13:41:59 +03:00
parent 2c91241410
commit 6b027a7742

View File

@@ -1507,6 +1507,8 @@ public sealed class WorkflowRenderSvgRenderer
var groups = new Dictionary<string, EndSinkGroup>(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();