diff --git a/src/Router/__Libraries/StellaOps.Router.Transport.Messaging/Options/MessagingTransportOptions.cs b/src/Router/__Libraries/StellaOps.Router.Transport.Messaging/Options/MessagingTransportOptions.cs index c2638b70a..b3c2bb00a 100644 --- a/src/Router/__Libraries/StellaOps.Router.Transport.Messaging/Options/MessagingTransportOptions.cs +++ b/src/Router/__Libraries/StellaOps.Router.Transport.Messaging/Options/MessagingTransportOptions.cs @@ -41,7 +41,7 @@ public class MessagingTransportOptions /// /// Gets or sets the timeout for RPC requests. /// - public TimeSpan RequestTimeout { get; set; } = TimeSpan.FromSeconds(30); + public TimeSpan RequestTimeout { get; set; } = TimeSpan.FromSeconds(55); /// /// Gets or sets the lease duration for message processing. diff --git a/src/Workflow/__Libraries/StellaOps.Workflow.Renderer.Svg/WorkflowRenderSvgRenderer.cs b/src/Workflow/__Libraries/StellaOps.Workflow.Renderer.Svg/WorkflowRenderSvgRenderer.cs index 571dbc50d..0706675d7 100644 --- a/src/Workflow/__Libraries/StellaOps.Workflow.Renderer.Svg/WorkflowRenderSvgRenderer.cs +++ b/src/Workflow/__Libraries/StellaOps.Workflow.Renderer.Svg/WorkflowRenderSvgRenderer.cs @@ -2044,7 +2044,9 @@ public sealed class WorkflowRenderSvgRenderer // Remove backtracks: when three consecutive points are on the same // axis (same X or same Y) and the middle one overshoots then returns, - // remove the overshoot point. + // remove the overshoot AND the return point (keep the pre-overshoot + // as the new endpoint). This prevents the path from bending inside + // the target node after the backtrack removal. for (var i = 1; i < mutablePoints.Count - 1; i++) { var prev = mutablePoints[i - 1]; @@ -2054,13 +2056,21 @@ public sealed class WorkflowRenderSvgRenderer var sameY = Math.Abs(prev.Y - curr.Y) < 2d && Math.Abs(curr.Y - next.Y) < 2d; if (sameX) { - // All three on same X. Check if curr overshoots: prev→curr goes - // one direction, curr→next goes the opposite. var d1 = curr.Y - prev.Y; var d2 = next.Y - curr.Y; - if (d1 * d2 < 0d) // opposite directions = backtrack + if (d1 * d2 < 0d) { - mutablePoints.RemoveAt(i); + // Remove overshoot. If next is the last point (endpoint), + // also remove it — prev becomes the new endpoint. + if (i + 1 == mutablePoints.Count - 1) + { + mutablePoints.RemoveRange(i, 2); + } + else + { + mutablePoints.RemoveAt(i); + } + i--; continue; } @@ -2072,7 +2082,15 @@ public sealed class WorkflowRenderSvgRenderer var d2 = next.X - curr.X; if (d1 * d2 < 0d) { - mutablePoints.RemoveAt(i); + if (i + 1 == mutablePoints.Count - 1) + { + mutablePoints.RemoveRange(i, 2); + } + else + { + mutablePoints.RemoveAt(i); + } + i--; continue; }