From 0b8efa1998191b3068b0b69f05853d517a5421fc Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Fri, 27 Mar 2026 19:40:20 +0100 Subject: [PATCH] fix: drill-down uses route-based fetch instead of pre-loaded layout When drilled into a sub-route, the pre-fetched diagramLayout (loaded by content hash for the root execution) doesn't contain the sub-route's diagram. Only use the pre-loaded layout for the root route; fall back to useDiagramByRoute for drilled-down sub-routes. Co-Authored-By: Claude Opus 4.6 (1M context) --- ui/src/components/ProcessDiagram/ProcessDiagram.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/src/components/ProcessDiagram/ProcessDiagram.tsx b/ui/src/components/ProcessDiagram/ProcessDiagram.tsx index 30fa88f1..05b47e94 100644 --- a/ui/src/components/ProcessDiagram/ProcessDiagram.tsx +++ b/ui/src/components/ProcessDiagram/ProcessDiagram.tsx @@ -69,8 +69,12 @@ export function ProcessDiagram({ const currentRouteId = routeStack[routeStack.length - 1]; + // Only use the pre-fetched diagramLayout for the root route. + // When drilled down into a sub-route, fetch the sub-route's diagram by route ID. + const effectiveLayout = currentRouteId === routeId ? diagramLayout : undefined; + const { sections, totalWidth, totalHeight, isLoading, error } = useDiagramData( - application, currentRouteId, direction, diagramLayout, + application, currentRouteId, direction, effectiveLayout, ); // Collect ENDPOINT node IDs — these are always "traversed" when overlay is active