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) <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user