feat: use endpointUri for cross-route drill-down instead of label parsing
Server: - Add endpointUri to PositionedNode (from RouteNode) - Add fromEndpointUri to RouteSummary (catalog API) - Catalog controller resolves endpoint URI from diagram store UI: - Build endpointRouteMap from catalog's fromEndpointUri field - Drill-down uses exact match on node.endpointUri against the map - Remove label parsing heuristics (extractTargetEndpoint, camelToKebab) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -136,6 +136,21 @@ function DiagramPanel({ appId, routeId, exchangeId, onCorrelatedSelect, onClearS
|
||||
return ids;
|
||||
}, [catalog]);
|
||||
|
||||
// Build endpoint URI → routeId map for cross-route drill-down
|
||||
const endpointRouteMap = useMemo(() => {
|
||||
const map = new Map<string, string>();
|
||||
if (catalog) {
|
||||
for (const app of catalog as any[]) {
|
||||
for (const r of app.routes || []) {
|
||||
if (r.fromEndpointUri) {
|
||||
map.set(r.fromEndpointUri, r.routeId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}, [catalog]);
|
||||
|
||||
// Build nodeConfigs from tracing store + app config (for TRACE/TAP badges)
|
||||
const { data: appConfig } = useApplicationConfig(appId);
|
||||
const tracedMap = useTracingStore((s) => s.tracedProcessors[appId]);
|
||||
@@ -172,6 +187,7 @@ function DiagramPanel({ appId, routeId, exchangeId, onCorrelatedSelect, onClearS
|
||||
executionId={exchangeId}
|
||||
executionDetail={detail}
|
||||
knownRouteIds={knownRouteIds}
|
||||
endpointRouteMap={endpointRouteMap}
|
||||
onNodeAction={handleNodeAction}
|
||||
nodeConfigs={nodeConfigs}
|
||||
/>
|
||||
@@ -187,6 +203,7 @@ function DiagramPanel({ appId, routeId, exchangeId, onCorrelatedSelect, onClearS
|
||||
routeId={routeId}
|
||||
diagramLayout={diagramQuery.data}
|
||||
knownRouteIds={knownRouteIds}
|
||||
endpointRouteMap={endpointRouteMap}
|
||||
onNodeAction={handleNodeAction}
|
||||
nodeConfigs={nodeConfigs}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user