@workflow/web 4.0.1-beta.21 → 4.0.1-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/fallback-build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +2 -2
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page/server-reference-manifest.json +36 -21
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page/server-reference-manifest.json +37 -22
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/run/[runId]/page/server-reference-manifest.json +37 -22
- package/.next/server/app/run/[runId]/page.js.nft.json +1 -1
- package/.next/server/app/run/[runId]/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1365a866._.js +3 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1365a866._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__2168651f._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__2168651f._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__25c4ca9a._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__25c4ca9a._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__d416fa5e._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__d416fa5e._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__e576a2e1._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__e576a2e1._.js.map +1 -1
- package/.next/server/chunks/ssr/_af28dabd._.js +1 -1
- package/.next/server/chunks/ssr/_af28dabd._.js.map +1 -1
- package/.next/server/chunks/ssr/_bff7cae2._.js +1 -1
- package/.next/server/chunks/ssr/_bff7cae2._.js.map +1 -1
- package/.next/server/chunks/ssr/_c8bf1458._.js +1 -1
- package/.next/server/chunks/ssr/_c8bf1458._.js.map +1 -1
- package/.next/server/chunks/ssr/packages_web_src_19bb3951._.js +3 -0
- package/.next/server/chunks/ssr/packages_web_src_19bb3951._.js.map +1 -0
- package/.next/server/chunks/ssr/packages_web_src_app_page_tsx_cd282e82._.js +2 -2
- package/.next/server/chunks/ssr/packages_web_src_app_page_tsx_cd282e82._.js.map +1 -1
- package/.next/server/chunks/ssr/packages_web_src_app_run_[runId]_page_tsx_c7d0b139._.js +1 -1
- package/.next/server/chunks/ssr/packages_web_src_app_run_[runId]_page_tsx_c7d0b139._.js.map +1 -1
- package/.next/server/pages/500.html +2 -2
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +56 -27
- package/.next/static/chunks/{d3781b000675e89a.js → 36a636d76f662255.js} +1 -1
- package/.next/static/chunks/{1633a4677cb7eacd.js → 5cc4b7d8f173d21f.js} +1 -1
- package/.next/static/chunks/8d32c2bf0f991bbb.js +1 -0
- package/.next/static/chunks/8f6413f9323a44e5.js +14 -0
- package/.next/static/chunks/{a2fdd31ef7d1ed50.js → affb91574db5b135.js} +3 -3
- package/.next/static/chunks/c72c95cb5a7775b3.js +5 -0
- package/.next/static/chunks/f71c82ee950bb628.js +60 -0
- package/.next/trace +1 -1
- package/.next/trace-build +1 -1
- package/package.json +2 -1
- package/.next/server/chunks/ssr/packages_web_src_components_ui_select_tsx_7c5238ef._.js +0 -3
- package/.next/server/chunks/ssr/packages_web_src_components_ui_select_tsx_7c5238ef._.js.map +0 -1
- package/.next/static/chunks/7993564ea9cd3862.js +0 -60
- package/.next/static/chunks/915c48af605695f8.js +0 -5
- package/.next/static/chunks/ebaf4c277606b4fc.js +0 -14
- /package/.next/static/{1Gd0u_mHFXgTr2DR4OTNR → ieavtosUwWbQ98kcW2Cp7}/_buildManifest.js +0 -0
- /package/.next/static/{1Gd0u_mHFXgTr2DR4OTNR → ieavtosUwWbQ98kcW2Cp7}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{1Gd0u_mHFXgTr2DR4OTNR → ieavtosUwWbQ98kcW2Cp7}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-dismissable-layer%401.1.4_%40types%2Breact-dom%4019.1.9_%40types%2Breact%4019.1.13__%40_8ae1d61ac10a80ba9d8ed6f21c6516b3/node_modules/%40radix-ui/react-dismissable-layer/dist/index.mjs","../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-focus-scope%401.1.1_%40types%2Breact-dom%4019.1.9_%40types%2Breact%4019.1.13__%40types%2B_34e3df0d2ea684cd35e69acd9743ae93/node_modules/%40radix-ui/react-focus-scope/dist/index.mjs","../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-portal%401.1.3_%40types%2Breact-dom%4019.1.9_%40types%2Breact%4019.1.13__%40types%2Breact_5fb27bb40c3888aea737cfd7dec4f395/node_modules/%40radix-ui/react-portal/dist/index.mjs","../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-dialog%401.1.5_%40types%2Breact-dom%4019.1.9_%40types%2Breact%4019.1.13__%40types%2Breact_330d237330866b501ee374be87c8c3c2/node_modules/%40radix-ui/react-dialog/dist/index.mjs","../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-alert-dialog%401.1.5_%40types%2Breact-dom%4019.1.9_%40types%2Breact%4019.1.13__%40types_81534ce1c0ac43993aad69431dd7630a/node_modules/%40radix-ui/react-alert-dialog/dist/index.mjs","../../../../../../packages/web/src/components/ui/alert-dialog.tsx","../../../../../../packages/web/src/components/flow-graph/workflow-graph-execution-viewer.tsx","../../../../../../packages/web/src/components/run-detail-view.tsx","../../../../../../packages/web/src/app/run/%5BrunId%5D/page.tsx","../../../../../../packages/web/src/components/ui/breadcrumb.tsx","../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-primitive%402.0.1_%40types%2Breact-dom%4019.1.9_%40types%2Breact%4019.1.13__%40types%2Bre_5cfe77f395f2bc73c3bc3594ad29bd9b/node_modules/%40radix-ui/react-primitive/dist/index.mjs","../../../../../../packages/web/src/components/display-utils/live-status.tsx","../../../../../../node_modules/.pnpm/lucide-react%400.469.0_react%4019.1.0/node_modules/lucide-react/src/icons/circle-help.ts","../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-alert-dialog%401.1.5_%40types%2Breact-dom%4019.1.9_%40types%2Breact%4019.1.13__%40types_81534ce1c0ac43993aad69431dd7630a/node_modules/%40radix-ui/react-alert-dialog/src/AlertDialog.tsx","../../../../../../node_modules/.pnpm/lucide-react%400.469.0_react%4019.1.0/node_modules/lucide-react/src/icons/list.ts","../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-portal%401.1.3_%40types%2Breact-dom%4019.1.9_%40types%2Breact%4019.1.13__%40types%2Breact_5fb27bb40c3888aea737cfd7dec4f395/node_modules/%40radix-ui/react-portal/src/Portal.tsx","../../../../../../packages/web/src/lib/flow-graph/graph-execution-mapper.ts","../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-dialog%401.1.5_%40types%2Breact-dom%4019.1.9_%40types%2Breact%4019.1.13__%40types%2Breact_330d237330866b501ee374be87c8c3c2/node_modules/%40radix-ui/react-dialog/src/Dialog.tsx"],"sourcesContent":["\"use client\";\n\n// packages/react/dismissable-layer/src/DismissableLayer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/focus-scope/src/FocusScope.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AUTOFOCUS_ON_MOUNT = \"focusScope.autoFocusOnMount\";\nvar AUTOFOCUS_ON_UNMOUNT = \"focusScope.autoFocusOnUnmount\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar FOCUS_SCOPE_NAME = \"FocusScope\";\nvar FocusScope = React.forwardRef((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n }\n }).current;\n React.useEffect(() => {\n if (trapped) {\n let handleFocusIn2 = function(event) {\n if (focusScope.paused || !container) return;\n const target = event.target;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleFocusOut2 = function(event) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget;\n if (relatedTarget === null) return;\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleMutations2 = function(mutations) {\n const focusedElement = document.activeElement;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n };\n var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;\n document.addEventListener(\"focusin\", handleFocusIn2);\n document.addEventListener(\"focusout\", handleFocusOut2);\n const mutationObserver = new MutationObserver(handleMutations2);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n return () => {\n document.removeEventListener(\"focusin\", handleFocusIn2);\n document.removeEventListener(\"focusout\", handleFocusOut2);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n const handleKeyDown = React.useCallback(\n (event) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === \"Tab\" && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container2 = event.currentTarget;\n const [first, last] = getTabbableEdges(container2);\n const hasTabbableElementsInside = first && last;\n if (!hasTabbableElementsInside) {\n if (focusedElement === container2) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });\n});\nFocusScope.displayName = FOCUS_SCOPE_NAME;\nfunction focusFirst(candidates, { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\nfunction getTabbableEdges(container) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction findVisible(elements, container) {\n for (const element of elements) {\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\nfunction isHidden(node, { upTo }) {\n if (getComputedStyle(node).visibility === \"hidden\") return true;\n while (node) {\n if (upTo !== void 0 && node === upTo) return false;\n if (getComputedStyle(node).display === \"none\") return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction isSelectableInput(element) {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\nfunction focus(element, { select = false } = {}) {\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n element.focus({ preventScroll: true });\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\nvar focusScopesStack = createFocusScopesStack();\nfunction createFocusScopesStack() {\n let stack = [];\n return {\n add(focusScope) {\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove(focusScope) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n }\n };\n}\nfunction arrayRemove(array, item) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\nfunction removeLinks(items) {\n return items.filter((item) => item.tagName !== \"A\");\n}\nvar Root = FocusScope;\nexport {\n FocusScope,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/portal/src/Portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/dialog/src/Dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/alert-dialog/src/AlertDialog.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { createDialogScope } from \"@radix-ui/react-dialog\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Slottable } from \"@radix-ui/react-slot\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar ROOT_NAME = \"AlertDialog\";\nvar [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope\n]);\nvar useDialogScope = createDialogScope();\nvar AlertDialog = (props) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });\n};\nAlertDialog.displayName = ROOT_NAME;\nvar TRIGGER_NAME = \"AlertDialogTrigger\";\nvar AlertDialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });\n }\n);\nAlertDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"AlertDialogPortal\";\nvar AlertDialogPortal = (props) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });\n};\nAlertDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"AlertDialogOverlay\";\nvar AlertDialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });\n }\n);\nAlertDialogOverlay.displayName = OVERLAY_NAME;\nvar CONTENT_NAME = \"AlertDialogContent\";\nvar [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);\nvar AlertDialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, children, ...contentProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const cancelRef = React.useRef(null);\n return /* @__PURE__ */ jsx(\n DialogPrimitive.WarningProvider,\n {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"alert-dialog\",\n children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(\n DialogPrimitive.Content,\n {\n role: \"alertdialog\",\n ...dialogScope,\n ...contentProps,\n ref: composedRefs,\n onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {\n event.preventDefault();\n cancelRef.current?.focus({ preventScroll: true });\n }),\n onPointerDownOutside: (event) => event.preventDefault(),\n onInteractOutside: (event) => event.preventDefault(),\n children: [\n /* @__PURE__ */ jsx(Slottable, { children }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })\n ]\n }\n ) })\n }\n );\n }\n);\nAlertDialogContent.displayName = CONTENT_NAME;\nvar TITLE_NAME = \"AlertDialogTitle\";\nvar AlertDialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...titleProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });\n }\n);\nAlertDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"AlertDialogDescription\";\nvar AlertDialogDescription = React.forwardRef((props, forwardedRef) => {\n const { __scopeAlertDialog, ...descriptionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });\n});\nAlertDialogDescription.displayName = DESCRIPTION_NAME;\nvar ACTION_NAME = \"AlertDialogAction\";\nvar AlertDialogAction = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...actionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });\n }\n);\nAlertDialogAction.displayName = ACTION_NAME;\nvar CANCEL_NAME = \"AlertDialogCancel\";\nvar AlertDialogCancel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...cancelProps } = props;\n const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const ref = useComposedRefs(forwardedRef, cancelRef);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });\n }\n);\nAlertDialogCancel.displayName = CANCEL_NAME;\nvar DescriptionWarning = ({ contentRef }) => {\n const MESSAGE = `\\`${CONTENT_NAME}\\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \\`${CONTENT_NAME}\\` by passing a \\`${DESCRIPTION_NAME}\\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \\`id\\` and passing the same value to the \\`aria-describedby\\` prop in \\`${CONTENT_NAME}\\`. If the description is confusing or duplicative for sighted users, you can use the \\`@radix-ui/react-visually-hidden\\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;\n React.useEffect(() => {\n const hasDescription = document.getElementById(\n contentRef.current?.getAttribute(\"aria-describedby\")\n );\n if (!hasDescription) console.warn(MESSAGE);\n }, [MESSAGE, contentRef]);\n return null;\n};\nvar Root2 = AlertDialog;\nvar Trigger2 = AlertDialogTrigger;\nvar Portal2 = AlertDialogPortal;\nvar Overlay2 = AlertDialogOverlay;\nvar Content2 = AlertDialogContent;\nvar Action = AlertDialogAction;\nvar Cancel = AlertDialogCancel;\nvar Title2 = AlertDialogTitle;\nvar Description2 = AlertDialogDescription;\nexport {\n Action,\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n Cancel,\n Content2 as Content,\n Description2 as Description,\n Overlay2 as Overlay,\n Portal2 as Portal,\n Root2 as Root,\n Title2 as Title,\n Trigger2 as Trigger,\n createAlertDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';\nimport type * as React from 'react';\nimport { buttonVariants } from '@/components/ui/button';\nimport { cn } from '@/lib/utils';\n\nfunction AlertDialog({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return (\n <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n );\n}\n\nfunction AlertDialogPortal({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return (\n <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />\n );\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogContent({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n );\n}\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn('flex flex-col gap-2 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn('text-lg font-semibold', className)}\n {...props}\n />\n );\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction AlertDialogAction({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {\n return (\n <AlertDialogPrimitive.Action\n className={cn(buttonVariants(), className)}\n {...props}\n />\n );\n}\n\nfunction AlertDialogCancel({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n return (\n <AlertDialogPrimitive.Cancel\n className={cn(buttonVariants({ variant: 'outline' }), className)}\n {...props}\n />\n );\n}\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n","'use client';\n\nimport {\n Background,\n Controls,\n type Edge,\n Handle,\n MarkerType,\n type Node,\n type NodeProps,\n Panel,\n Position,\n ReactFlow,\n useEdgesState,\n useNodesState,\n} from '@xyflow/react';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport '@xyflow/react/dist/style.css';\nimport { GitBranch, Loader2, X } from 'lucide-react';\nimport './workflow-graph-viewer.css';\nimport {\n type EnvMap,\n formatDuration,\n useWorkflowResourceData,\n} from '@workflow/web-shared';\nimport { StatusBadge } from '@/components/display-utils/status-badge';\nimport { Badge } from '@/components/ui/badge';\nimport type {\n GraphNode,\n StepExecution,\n WorkflowGraph,\n WorkflowRunExecution,\n} from '@/lib/flow-graph/workflow-graph-types';\nimport {\n type ConsolidatedEdge,\n calculateEnhancedLayout,\n consolidateEdges,\n createEdgeTypes,\n type DiamondNodeData,\n type EnhancedLayoutResult,\n executionSelfLoopStyle,\n // Utilities\n getNodeBackgroundColor,\n getNodeIcon,\n // Constants\n LAYOUT,\n // Types\n type LoopNodeData,\n // Components\n ParallelGroupComponent,\n type ParallelGroupData,\n} from './workflow-graph-viewer';\n\ninterface WorkflowGraphExecutionViewerProps {\n workflow: WorkflowGraph;\n execution?: WorkflowRunExecution;\n env?: EnvMap;\n onNodeClick?: (nodeId: string, executions: StepExecution[]) => void;\n}\n\ninterface SelectedNodeInfo {\n nodeId: string;\n node: GraphNode;\n executions: StepExecution[];\n stepId?: string;\n runId?: string;\n}\n\n// Map execution status to StatusBadge-compatible status\ntype StatusBadgeStatus =\n | 'pending'\n | 'running'\n | 'completed'\n | 'failed'\n | 'cancelled'\n | 'paused';\nfunction mapToStatusBadgeStatus(\n status: StepExecution['status']\n): StatusBadgeStatus {\n if (status === 'retrying') return 'running';\n return status as StatusBadgeStatus;\n}\n\n// Custom Loop Node component for execution viewer (uses shared LoopNodeData type)\nfunction ExecutionLoopNodeComponent({ data, selected }: NodeProps) {\n const nodeData = data as LoopNodeData;\n\n return (\n <div\n className={`relative ${nodeData.className || ''}`}\n style={{\n borderWidth: nodeData.nodeStyle?.borderWidth ?? 2,\n borderRadius: 8,\n padding: 12,\n width: 220,\n borderStyle: 'solid',\n backgroundColor: nodeData.nodeStyle?.backgroundColor,\n borderColor: nodeData.nodeStyle?.borderColor ?? '#9ca3af',\n opacity: nodeData.nodeStyle?.opacity,\n boxShadow: selected ? '0 0 0 2px rgba(168, 85, 247, 0.5)' : undefined,\n }}\n >\n {/* Node content */}\n {nodeData.label}\n\n {/* Main flow handles (top/bottom) */}\n <Handle\n type=\"target\"\n position={Position.Top}\n className=\"!bg-purple-500\"\n />\n <Handle\n type=\"source\"\n position={Position.Bottom}\n className=\"!bg-purple-500\"\n />\n\n {/* Left-side handles for self-loop edge */}\n <Handle\n type=\"source\"\n position={Position.Left}\n id=\"loop-out\"\n className=\"!bg-purple-500 !-left-1 !w-[6px] !h-[6px] !min-w-0 !min-h-0\"\n style={{ top: '30%' }}\n />\n <Handle\n type=\"target\"\n position={Position.Left}\n id=\"loop-in\"\n className=\"!bg-purple-500 !-left-1 !w-[6px] !h-[6px] !min-w-0 !min-h-0\"\n style={{ top: '70%' }}\n />\n </div>\n );\n}\n\n// Custom node component for all non-loop execution nodes\nfunction ExecutionNodeComponent({ data, selected }: NodeProps) {\n const nodeData = data as LoopNodeData; // Reuse LoopNodeData type since it has the same shape\n\n const isStart = nodeData.nodeKind === 'workflow_start';\n const isEnd = nodeData.nodeKind === 'workflow_end';\n\n return (\n <div\n className={`relative ${nodeData.className || ''}`}\n style={{\n borderWidth: nodeData.nodeStyle?.borderWidth ?? 2,\n borderRadius: 8,\n padding: 12,\n width: 220,\n borderStyle: 'solid',\n backgroundColor: nodeData.nodeStyle?.backgroundColor,\n borderColor: nodeData.nodeStyle?.borderColor ?? '#9ca3af',\n opacity: nodeData.nodeStyle?.opacity,\n boxShadow: selected ? '0 0 0 2px rgba(59, 130, 246, 0.35)' : undefined,\n }}\n >\n {nodeData.label}\n\n {/* Handles */}\n {!isStart && (\n <Handle type=\"target\" position={Position.Top} className=\"!bg-muted\" />\n )}\n {!isEnd && (\n <Handle\n type=\"source\"\n position={Position.Bottom}\n className=\"!bg-muted\"\n />\n )}\n </div>\n );\n}\n\n// Custom Diamond Node component for execution viewer conditional nodes\nfunction ExecutionDiamondNodeComponent({ data, selected }: NodeProps) {\n const nodeData = data as DiamondNodeData;\n\n // Diamond size\n const size = 160;\n\n return (\n <div\n className={`relative flex items-center justify-center ${nodeData.className || ''}`}\n style={{\n width: size,\n height: size,\n }}\n >\n {/* Diamond shape */}\n <div\n style={{\n width: size * 0.7,\n height: size * 0.7,\n transform: 'rotate(45deg)',\n borderWidth: 2,\n borderStyle: 'solid',\n borderRadius: 4,\n backgroundColor: nodeData.nodeStyle?.backgroundColor,\n borderColor: nodeData.nodeStyle?.borderColor ?? '#ef4444',\n opacity: nodeData.nodeStyle?.opacity,\n boxShadow: selected ? '0 0 0 2px rgba(239, 68, 68, 0.5)' : undefined,\n }}\n />\n {/* Label overlay (not rotated) */}\n <div\n className=\"absolute inset-0 flex items-center justify-center pointer-events-auto\"\n style={{\n fontSize: 11,\n fontWeight: 600,\n padding: size * 0.25, // Keep text within the diamond's inscribed area\n }}\n title={typeof nodeData.label === 'string' ? nodeData.label : undefined}\n >\n <span className=\"text-center line-clamp-3 overflow-hidden\">\n {nodeData.label}\n </span>\n </div>\n\n {/* Main flow handles (top/bottom) */}\n <Handle type=\"target\" position={Position.Top} className=\"!bg-red-500\" />\n <Handle\n type=\"source\"\n position={Position.Bottom}\n id=\"bottom\"\n className=\"!bg-red-500\"\n />\n {/* Additional handles for true/false branches */}\n <Handle\n type=\"source\"\n position={Position.Left}\n id=\"left\"\n className=\"!bg-red-500\"\n />\n <Handle\n type=\"source\"\n position={Position.Right}\n id=\"right\"\n className=\"!bg-red-500\"\n />\n </div>\n );\n}\n\n// Custom node components for execution viewer\nconst nodeTypes = {\n loopNode: ExecutionLoopNodeComponent,\n parallelGroup: ParallelGroupComponent, // Imported from shared\n executionNode: ExecutionNodeComponent,\n diamondNode: ExecutionDiamondNodeComponent,\n};\n\n// Custom edge types using purple styling for execution view\nconst edgeTypes = createEdgeTypes(executionSelfLoopStyle);\n\n// Get node styling based on node kind and execution status (border color indicates status)\nfunction getExecutionNodeStyle(nodeKind: string, executions?: StepExecution[]) {\n const backgroundColor = getNodeBackgroundColor(nodeKind);\n\n // If no execution data, show faded state with gray border\n if (!executions || executions.length === 0) {\n return {\n color: 'hsl(var(--card-foreground))',\n backgroundColor,\n borderColor: '#9ca3af', // gray-400\n opacity: 0.4,\n };\n }\n\n const latestExecution = executions[executions.length - 1];\n\n // Border color based on execution status\n let borderColor = '#9ca3af'; // gray-400 (default)\n let borderWidth = 2;\n\n switch (latestExecution.status) {\n case 'completed':\n borderColor = '#22c55e'; // green-500\n break;\n case 'failed':\n borderColor = '#ef4444'; // red-500\n borderWidth = 3;\n break;\n case 'running':\n borderColor = '#3b82f6'; // blue-500\n borderWidth = 2;\n break;\n case 'retrying':\n borderColor = '#f97316'; // orange-500\n break;\n case 'cancelled':\n borderColor = '#eab308'; // yellow-500\n break;\n case 'pending':\n borderColor = '#9ca3af'; // gray-400\n break;\n }\n\n return {\n color: 'hsl(var(--card-foreground))',\n backgroundColor,\n borderColor,\n borderWidth,\n };\n}\n\n// getNodeIcon is imported from workflow-graph-viewer\n\n// Enhanced node label with execution info\nfunction renderNodeLabel(\n nodeData: { label: string; nodeKind: string },\n _metadata?: {\n loopId?: string;\n loopIsAwait?: boolean;\n conditionalId?: string;\n conditionalBranch?: string;\n parallelGroupId?: string;\n parallelMethod?: string;\n },\n executions?: StepExecution[]\n) {\n const baseLabel = (\n <div className=\"flex items-start gap-2 w-full overflow-hidden\">\n <div className=\"flex-shrink-0\">\n {getNodeIcon(nodeData.nodeKind, nodeData.label)}\n </div>\n <span className=\"text-sm font-medium break-words whitespace-normal leading-tight flex-1 min-w-0\">\n {nodeData.label}\n </span>\n </div>\n );\n\n if (!executions || executions.length === 0) {\n return baseLabel;\n }\n\n const latestExecution = executions[executions.length - 1];\n const totalAttempts = executions.length;\n const hasRetries = totalAttempts > 1;\n\n // Only show metadata if there's something to show\n const hasMetadata =\n hasRetries || (latestExecution.duration && latestExecution.duration > 0);\n\n if (!hasMetadata) return baseLabel;\n\n return (\n <div className=\"flex flex-col gap-1.5 w-full\">\n {baseLabel}\n\n {/* Execution metadata - only show duration and retries */}\n <div className=\"flex flex-wrap gap-1 text-xs\">\n {/* Retry indicator */}\n {hasRetries && (\n <Badge\n variant=\"outline\"\n className=\"text-xs px-1.5 py-0 border-orange-500 text-orange-700 dark:text-orange-300\"\n >\n ↻ {totalAttempts}x\n </Badge>\n )}\n\n {/* Duration */}\n {latestExecution.duration && latestExecution.duration > 0 && (\n <Badge\n variant=\"secondary\"\n className=\"text-xs px-1.5 py-0 bg-black/10 dark:bg-white/15 border-0\"\n >\n ⏱ {formatDuration(latestExecution.duration, true)}\n </Badge>\n )}\n </div>\n </div>\n );\n}\n\n// LAYOUT and calculateEnhancedLayout are imported from workflow-graph-viewer\n// Execution viewer uses VERTICAL_SPACING: 320 instead of default 220\nconst EXECUTION_LAYOUT = {\n ...LAYOUT,\n VERTICAL_SPACING: 320,\n};\n\nfunction convertToReactFlowNodes(\n workflow: WorkflowGraph,\n execution?: WorkflowRunExecution\n): Node[] {\n const { nodes, groupNodes } = calculateEnhancedLayout(\n workflow,\n EXECUTION_LAYOUT\n );\n\n // Build a map of node id -> parent group id for parallel groups only\n const nodeToParent = new Map<string, string>();\n const groupPositions = new Map<string, { x: number; y: number }>();\n\n // Store group positions for relative position calculation (parallel groups only)\n for (const group of groupNodes) {\n if (group.id.startsWith('group_')) {\n groupPositions.set(group.id, group.position);\n }\n }\n\n // Determine parent for each node (parallel groups only, no loop groups)\n for (const node of nodes) {\n const parallelGroupId = node.metadata?.parallelGroupId\n ? `group_${node.metadata.parallelGroupId}`\n : null;\n\n if (parallelGroupId && groupPositions.has(parallelGroupId)) {\n nodeToParent.set(node.id, parallelGroupId);\n }\n }\n\n const reactFlowNodes: Node[] = [];\n\n // Add parallel groups only (no loop groups)\n const parallelGroups = groupNodes.filter((g) => g.id.startsWith('group_'));\n\n for (const group of parallelGroups) {\n reactFlowNodes.push({\n id: group.id,\n type: 'parallelGroup',\n position: group.position,\n style: {\n ...group.style,\n cursor: 'grab',\n zIndex: -1,\n },\n data: group.data,\n selectable: true,\n draggable: true,\n });\n }\n\n // Add regular nodes\n for (const node of nodes) {\n const executions = execution?.nodeExecutions.get(node.id);\n const styles = getExecutionNodeStyle(node.data.nodeKind, executions);\n const isCurrentNode = execution?.currentNode === node.id;\n const isLoopNode = !!node.metadata?.loopId;\n const isAwaitLoop = !!node.metadata?.loopIsAwait;\n const isConditionalNode = node.data.nodeKind === 'conditional';\n\n // Determine node type - custom components for consistent styling/animation\n const nodeType: 'loopNode' | 'executionNode' | 'diamondNode' =\n isConditionalNode\n ? 'diamondNode'\n : isLoopNode\n ? 'loopNode'\n : 'executionNode';\n\n // Determine parent group and calculate relative position\n const parentId = nodeToParent.get(node.id);\n let position = node.position;\n\n if (parentId) {\n const parentPos = groupPositions.get(parentId);\n if (parentPos) {\n // Convert to relative position within parent\n position = {\n x: node.position.x - parentPos.x,\n y: node.position.y - parentPos.y,\n };\n }\n }\n\n // Build className for current node highlight\n const nodeClassName = isCurrentNode ? 'animate-pulse-subtle' : '';\n\n // For loop nodes, pass style through data for custom component\n if (isLoopNode) {\n reactFlowNodes.push({\n id: node.id,\n type: nodeType,\n position,\n parentId: parentId,\n extent: parentId ? 'parent' : undefined,\n expandParent: true,\n data: {\n ...node.data,\n label: renderNodeLabel(node.data, node.metadata, executions),\n executions,\n isLoopNode: true,\n isAwaitLoop,\n nodeStyle: styles,\n className: nodeClassName,\n },\n });\n } else if (isConditionalNode) {\n // For conditional nodes (diamond shape), pass style through data\n reactFlowNodes.push({\n id: node.id,\n type: nodeType,\n position,\n parentId: parentId,\n extent: parentId ? 'parent' : undefined,\n expandParent: true,\n data: {\n ...node.data,\n label: node.data.label, // Show the conditional expression\n executions,\n nodeStyle: styles,\n className: nodeClassName,\n },\n });\n } else {\n reactFlowNodes.push({\n id: node.id,\n type: nodeType,\n position,\n parentId: parentId,\n extent: parentId ? 'parent' : undefined,\n expandParent: true,\n data: {\n ...node.data,\n label: renderNodeLabel(node.data, node.metadata, executions),\n executions,\n nodeStyle: styles,\n className: nodeClassName,\n },\n // Styling is handled by ExecutionNodeComponent (keeps running animation behind background)\n style: { width: 220 },\n });\n }\n }\n\n return reactFlowNodes;\n}\n\n// ConsolidatedEdge type and consolidateEdges are imported from workflow-graph-viewer\n\n// Convert edges with execution overlay\nfunction convertToReactFlowEdges(\n workflow: WorkflowGraph,\n execution?: WorkflowRunExecution\n): Edge[] {\n const { additionalEdges } = calculateEnhancedLayout(\n workflow,\n EXECUTION_LAYOUT\n );\n\n // Transform original loop edges into loop_back_ edges (they go from exit nodes back to entry nodes)\n // and keep all other edges as-is\n const transformedOriginalEdges = workflow.edges.map((e) => {\n if (e.type === 'loop') {\n return {\n ...e,\n id: `loop_back_${e.source}_${e.target}`,\n isOriginal: true,\n };\n }\n return { ...e, isOriginal: true };\n });\n\n // Combine original edges with additional self-loop edges\n const rawEdges = [\n ...transformedOriginalEdges,\n ...additionalEdges.map((e) => ({ ...e, isOriginal: false })),\n ];\n\n // Consolidate N×M edges between parallel groups into single edges\n const allEdges = consolidateEdges(rawEdges, workflow.nodes);\n\n return allEdges.map((edge) => {\n // Handle self-loop edges specially (they use custom edge type and handles)\n if (edge.type === 'selfLoop') {\n return {\n id: edge.id,\n source: edge.source,\n target: edge.target,\n sourceHandle: edge.sourceHandle,\n targetHandle: edge.targetHandle,\n type: 'selfLoop',\n label: edge.label,\n markerEnd: {\n type: MarkerType.ArrowClosed,\n width: 12,\n height: 12,\n color: '#a855f7',\n },\n };\n }\n\n // For consolidated edges, check traversals of original edges\n let traversal = execution?.edgeTraversals.get(edge.id);\n if (!traversal && edge.isConsolidated && edge.originalEdgeIds) {\n // Check if any of the original edges were traversed\n for (const originalId of edge.originalEdgeIds) {\n const originalTraversal = execution?.edgeTraversals.get(originalId);\n if (originalTraversal && originalTraversal.traversalCount > 0) {\n // Use the first traversed original edge's data\n traversal = originalTraversal;\n break;\n }\n }\n }\n const isTraversed = traversal && traversal.traversalCount > 0;\n const hasExecution = !!execution;\n\n // Calculate average timing if available\n const avgTiming = traversal?.timings.length\n ? traversal.timings.reduce((a, b) => a + b, 0) / traversal.timings.length\n : undefined;\n\n // Determine edge type based on control flow\n // Use bezier for main flow (cleaner curves), step for loops (clear back-flow)\n let edgeType: 'bezier' | 'smoothstep' | 'step' = 'bezier';\n let strokeDasharray: string | undefined;\n let cfgLabel: string | undefined = edge.label;\n\n // Track if this is a conditional edge for special label styling\n let isConditional = false;\n\n switch (edge.type) {\n case 'parallel':\n edgeType = 'smoothstep';\n strokeDasharray = '4,4';\n cfgLabel = undefined;\n break;\n case 'loop':\n edgeType = 'step';\n strokeDasharray = '8,4';\n break;\n case 'conditional':\n edgeType = 'smoothstep';\n strokeDasharray = '8,4';\n isConditional = true;\n // Keep the edge label (e.g., \"true\" or \"false\") for conditional edges\n break;\n default:\n edgeType = 'bezier';\n }\n\n // Simple color scheme: gray for non-executed, dark green for executed\n const baseStrokeColor = '#6b7280'; // gray-500\n const finalStrokeColor = isTraversed ? '#22c55e' : baseStrokeColor;\n const finalDasharray = isTraversed ? undefined : strokeDasharray;\n\n // Make non-traversed edges subtle when there's execution data\n const opacity = hasExecution && !isTraversed ? 0.35 : 1;\n const strokeWidth = isTraversed ? 2.5 : 1;\n\n // Label styling - conditional edges get dark bg with white text\n const labelTextColor = isConditional ? '#ffffff' : '#6b7280';\n const labelBgColor = isConditional ? '#374151' : '#f3f4f6'; // gray-700 : gray-100\n const labelBorderColor = isConditional ? '#4b5563' : '#d1d5db'; // gray-600 : gray-300\n\n return {\n id: edge.id,\n source: edge.source,\n target: edge.target,\n type: edgeType,\n animated: isTraversed && execution?.status === 'running',\n label:\n traversal && traversal.traversalCount > 1 ? (\n <div className=\"flex flex-col items-center gap-0.5\">\n <Badge variant=\"secondary\" className=\"text-xs px-1.5 py-0\">\n {traversal.traversalCount}×\n </Badge>\n {avgTiming && avgTiming > 0 && (\n <span className=\"text-[10px] text-muted-foreground\">\n ~{formatDuration(avgTiming, true)}\n </span>\n )}\n </div>\n ) : (\n cfgLabel\n ),\n labelStyle: {\n fill: labelTextColor,\n fontWeight: 500,\n fontSize: '11px',\n },\n labelBgStyle: {\n fill: labelBgColor,\n fillOpacity: 0.95,\n stroke: labelBorderColor,\n strokeWidth: 1,\n },\n labelBgPadding: [4, 6] as [number, number],\n labelBgBorderRadius: 4,\n markerEnd: {\n type: MarkerType.ArrowClosed,\n width: isTraversed ? 14 : 10,\n height: isTraversed ? 14 : 10,\n color: finalStrokeColor,\n },\n style: {\n strokeWidth,\n stroke: finalStrokeColor,\n opacity,\n strokeDasharray: finalDasharray,\n },\n };\n });\n}\n\n// Node Detail Panel Component\nfunction GraphNodeDetailPanel({\n selectedNode,\n env,\n onClose,\n}: {\n selectedNode: SelectedNodeInfo;\n env?: EnvMap;\n onClose: () => void;\n}) {\n const { node, executions, stepId, runId } = selectedNode;\n const latestExecution = executions[executions.length - 1];\n const hasMultipleAttempts = executions.length > 1;\n\n // Fetch full step data with resolved input/output\n const { data: stepData, loading: stepLoading } = useWorkflowResourceData(\n env ?? {},\n 'step',\n stepId ?? '',\n { runId }\n );\n\n // Use fetched data for input/output if available, fallback to execution data\n const resolvedInput = (stepData as any)?.input ?? latestExecution?.input;\n const resolvedOutput = (stepData as any)?.output ?? latestExecution?.output;\n const resolvedError = (stepData as any)?.error ?? latestExecution?.error;\n\n return (\n <div className=\"h-full flex flex-col bg-background border-l\">\n {/* Header - similar to trace view */}\n <div className=\"flex items-center justify-between gap-2 px-3 py-2 border-b flex-none\">\n <span\n className=\"text-xs font-medium truncate flex-1\"\n title={node.data.label}\n >\n {node.data.label}\n </span>\n <div className=\"flex items-center gap-2 flex-none\">\n {latestExecution?.duration !== undefined &&\n latestExecution.duration > 0 && (\n <span className=\"text-[10px] font-mono text-muted-foreground bg-muted px-1.5 py-0.5 rounded\">\n {formatDuration(latestExecution.duration)}\n </span>\n )}\n <div className=\"w-px h-4 bg-border\" />\n <button\n type=\"button\"\n onClick={onClose}\n className=\"p-1 rounded hover:bg-muted transition-colors\"\n aria-label=\"Close panel\"\n >\n <X className=\"h-4 w-4 text-muted-foreground\" />\n </button>\n </div>\n </div>\n\n {/* Content - scrollable */}\n <div className=\"flex-1 overflow-y-auto p-3 min-h-0\">\n {/* Basic attributes in bordered container */}\n <div className=\"flex flex-col divide-y rounded-lg border overflow-hidden mb-3\">\n <div className=\"flex items-center justify-between px-2.5 py-1.5\">\n <span className=\"text-[11px] font-medium text-muted-foreground\">\n type\n </span>\n <span className=\"text-[11px] font-mono\">{node.data.nodeKind}</span>\n </div>\n {latestExecution && (\n <>\n <div className=\"flex items-center justify-between px-2.5 py-1.5\">\n <span className=\"text-[11px] font-medium text-muted-foreground\">\n status\n </span>\n <StatusBadge\n status={mapToStatusBadgeStatus(latestExecution.status)}\n />\n </div>\n {latestExecution.duration !== undefined &&\n latestExecution.duration > 0 && (\n <div className=\"flex items-center justify-between px-2.5 py-1.5\">\n <span className=\"text-[11px] font-medium text-muted-foreground\">\n duration\n </span>\n <span className=\"text-[11px] font-mono\">\n {formatDuration(latestExecution.duration)}\n </span>\n </div>\n )}\n {hasMultipleAttempts && (\n <div className=\"flex items-center justify-between px-2.5 py-1.5\">\n <span className=\"text-[11px] font-medium text-muted-foreground\">\n attempts\n </span>\n <span className=\"text-[11px] font-mono\">\n {executions.length}\n </span>\n </div>\n )}\n {latestExecution.startedAt && (\n <div className=\"flex items-center justify-between px-2.5 py-1.5\">\n <span className=\"text-[11px] font-medium text-muted-foreground\">\n startedAt\n </span>\n <span className=\"text-[11px] font-mono\">\n {new Date(latestExecution.startedAt).toLocaleString()}\n </span>\n </div>\n )}\n {latestExecution.completedAt && (\n <div className=\"flex items-center justify-between px-2.5 py-1.5\">\n <span className=\"text-[11px] font-medium text-muted-foreground\">\n completedAt\n </span>\n <span className=\"text-[11px] font-mono\">\n {new Date(latestExecution.completedAt).toLocaleString()}\n </span>\n </div>\n )}\n </>\n )}\n </div>\n\n {/* Loading indicator for resolved data */}\n {stepLoading && stepId && (\n <div className=\"flex items-center gap-2 text-xs text-muted-foreground mb-3\">\n <Loader2 className=\"h-3 w-3 animate-spin\" />\n <span>Loading step data...</span>\n </div>\n )}\n\n {/* Input section */}\n {resolvedInput !== undefined && (\n <details className=\"group mb-3\">\n <summary className=\"cursor-pointer rounded-md border px-2.5 py-1.5 text-xs hover:brightness-95 bg-muted/50\">\n <span className=\"font-medium\">Input</span>\n <span className=\"text-muted-foreground ml-1\">\n ({Array.isArray(resolvedInput) ? resolvedInput.length : 1} args)\n </span>\n </summary>\n <div className=\"relative pl-6 mt-3\">\n <div className=\"absolute left-3 -top-3 w-px h-3 bg-border\" />\n <div className=\"absolute left-3 top-0 w-3 h-3 border-l border-b rounded-bl-lg border-border\" />\n <pre className=\"text-[11px] overflow-x-auto rounded-md border p-2.5 bg-muted/30 max-h-64 overflow-y-auto\">\n <code>{JSON.stringify(resolvedInput, null, 2)}</code>\n </pre>\n </div>\n </details>\n )}\n\n {/* Output section */}\n {resolvedOutput !== undefined && (\n <details className=\"group mb-3\">\n <summary className=\"cursor-pointer rounded-md border px-2.5 py-1.5 text-xs hover:brightness-95 bg-muted/50\">\n <span className=\"font-medium\">Output</span>\n </summary>\n <div className=\"relative pl-6 mt-3\">\n <div className=\"absolute left-3 -top-3 w-px h-3 bg-border\" />\n <div className=\"absolute left-3 top-0 w-3 h-3 border-l border-b rounded-bl-lg border-border\" />\n <pre className=\"text-[11px] overflow-x-auto rounded-md border p-2.5 bg-muted/30 max-h-64 overflow-y-auto\">\n <code>{JSON.stringify(resolvedOutput, null, 2)}</code>\n </pre>\n </div>\n </details>\n )}\n\n {/* Error section */}\n {resolvedError && (\n <details className=\"group mb-3\" open>\n <summary className=\"cursor-pointer rounded-md border border-red-300 bg-red-50 dark:bg-red-950/20 px-2.5 py-1.5 text-xs hover:brightness-95\">\n <span className=\"font-medium text-red-600 dark:text-red-400\">\n Error\n </span>\n </summary>\n <div className=\"relative pl-6 mt-3\">\n <div className=\"absolute left-3 -top-3 w-px h-3 bg-red-300\" />\n <div className=\"absolute left-3 top-0 w-3 h-3 border-l border-b rounded-bl-lg border-red-300\" />\n <pre className=\"text-[11px] overflow-x-auto rounded-md border border-red-200 p-2.5 bg-red-50 dark:bg-red-950/20 text-red-700 dark:text-red-300 whitespace-pre-wrap max-h-64 overflow-y-auto\">\n <code>\n {typeof resolvedError === 'object'\n ? JSON.stringify(resolvedError, null, 2)\n : String(resolvedError)}\n </code>\n </pre>\n </div>\n </details>\n )}\n\n {/* Attempt history for retries */}\n {hasMultipleAttempts && (\n <details className=\"group\">\n <summary className=\"cursor-pointer rounded-md border px-2.5 py-1.5 text-xs hover:brightness-95 bg-muted/50\">\n <span className=\"font-medium\">Attempt History</span>\n <span className=\"text-muted-foreground ml-1\">\n ({executions.length} attempts)\n </span>\n </summary>\n <div className=\"relative pl-6 mt-3\">\n <div className=\"absolute left-3 -top-3 w-px h-3 bg-border\" />\n <div className=\"absolute left-3 top-0 w-3 h-3 border-l border-b rounded-bl-lg border-border\" />\n <div className=\"flex flex-col divide-y rounded-md border overflow-hidden\">\n {executions.map((exec) => (\n <div\n key={exec.attemptNumber}\n className=\"flex items-center justify-between px-2.5 py-1.5 text-[11px]\"\n >\n <span className=\"text-muted-foreground\">\n Attempt {exec.attemptNumber}\n </span>\n <div className=\"flex items-center gap-2\">\n <StatusBadge\n status={mapToStatusBadgeStatus(exec.status)}\n />\n {exec.duration !== undefined && exec.duration > 0 && (\n <span className=\"font-mono text-muted-foreground\">\n {formatDuration(exec.duration)}\n </span>\n )}\n </div>\n </div>\n ))}\n </div>\n </div>\n </details>\n )}\n </div>\n </div>\n );\n}\n\nexport function WorkflowGraphExecutionViewer({\n workflow,\n execution,\n env,\n onNodeClick,\n}: WorkflowGraphExecutionViewerProps) {\n const [selectedNode, setSelectedNode] = useState<SelectedNodeInfo | null>(\n null\n );\n const panelWidth = 320;\n\n const initialNodes = useMemo(\n () => convertToReactFlowNodes(workflow, execution),\n [workflow, execution]\n );\n const initialEdges = useMemo(\n () => convertToReactFlowEdges(workflow, execution),\n [workflow, execution]\n );\n\n const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes);\n const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges);\n\n // Update nodes and edges when workflow or execution changes\n // Preserve user-dragged positions by merging with current node positions\n useEffect(() => {\n setNodes((currentNodes) => {\n const newNodes = convertToReactFlowNodes(workflow, execution);\n // Create a map of current positions (user may have dragged nodes)\n const currentPositions = new Map(\n currentNodes.map((n) => [n.id, n.position])\n );\n // Merge new node data with existing positions\n return newNodes.map((node) => ({\n ...node,\n position: currentPositions.get(node.id) ?? node.position,\n }));\n });\n setEdges(convertToReactFlowEdges(workflow, execution));\n }, [workflow, execution, setNodes, setEdges]);\n\n const handleNodeClick = useCallback(\n (_event: React.MouseEvent, node: Node) => {\n const graphNode = workflow.nodes.find((n) => n.id === node.id);\n if (graphNode) {\n const executions = (node.data.executions as StepExecution[]) || [];\n const latestExecution = executions[executions.length - 1];\n setSelectedNode({\n nodeId: node.id,\n node: graphNode,\n executions,\n stepId: latestExecution?.stepId,\n runId: execution?.runId,\n });\n // Also call the external handler if provided\n if (onNodeClick && executions.length > 0) {\n onNodeClick(node.id, executions);\n }\n }\n },\n [workflow.nodes, execution?.runId, onNodeClick]\n );\n\n const handleClosePanel = useCallback(() => {\n setSelectedNode(null);\n }, []);\n\n return (\n <div className=\"h-full w-full border rounded-lg bg-background relative overflow-hidden flex\">\n {/* Graph canvas */}\n <div\n className=\"h-full flex-1 min-w-0\"\n style={{\n width: selectedNode ? `calc(100% - ${panelWidth}px)` : '100%',\n }}\n >\n <ReactFlow\n nodes={nodes}\n edges={edges}\n onNodesChange={onNodesChange}\n onEdgesChange={onEdgesChange}\n onNodeClick={handleNodeClick}\n nodeTypes={nodeTypes}\n edgeTypes={edgeTypes}\n fitView\n minZoom={0.1}\n maxZoom={2}\n defaultViewport={{ x: 0, y: 0, zoom: 1 }}\n proOptions={{ hideAttribution: true }}\n >\n <Background />\n <Controls />\n\n {/* Legend with border status colors */}\n <Panel\n position=\"top-left\"\n className=\"bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 border rounded-lg p-2 text-xs\"\n >\n <div className=\"space-y-1.5\">\n <div className=\"font-semibold text-[10px] text-muted-foreground mb-1\">\n Status\n </div>\n <div className=\"flex items-center gap-2\">\n <div className=\"w-6 h-4 rounded border-2 border-green-500 bg-background\" />\n <span>Completed</span>\n </div>\n <div className=\"flex items-center gap-2\">\n <div className=\"w-6 h-4 rounded border-2 border-red-500 bg-background\" />\n <span>Failed</span>\n </div>\n <div className=\"flex items-center gap-2\">\n <div className=\"w-6 h-4 rounded border-2 border-blue-500 bg-background\" />\n <span>Running</span>\n </div>\n <div className=\"flex items-center gap-2\">\n <div className=\"w-6 h-4 rounded border-2 border-yellow-500 bg-background\" />\n <span>Cancelled</span>\n </div>\n <div className=\"flex items-center gap-2 opacity-50\">\n <div className=\"w-6 h-4 rounded border-2 border-gray-400 bg-background\" />\n <span>Pending</span>\n </div>\n </div>\n </Panel>\n\n {/* Execution summary panel */}\n {execution && (\n <Panel\n position=\"top-right\"\n className=\"bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 border rounded-lg p-3 text-xs space-y-1.5\"\n >\n <div className=\"font-semibold text-sm\">Execution</div>\n <div className=\"flex items-center gap-2\">\n <span className=\"text-muted-foreground\">Status:</span>\n <Badge\n variant={\n execution.status === 'completed'\n ? 'default'\n : execution.status === 'failed'\n ? 'destructive'\n : execution.status === 'cancelled'\n ? 'outline'\n : 'secondary'\n }\n className=\"text-xs\"\n >\n {execution.status}\n </Badge>\n </div>\n <div className=\"flex items-center gap-2\">\n <span className=\"text-muted-foreground\">Progress:</span>\n <span className=\"font-mono\">\n {execution.executionPath.length} / {workflow.nodes.length}\n </span>\n </div>\n </Panel>\n )}\n </ReactFlow>\n </div>\n\n {/* Detail panel */}\n {selectedNode && (\n <div className=\"h-full flex-none\" style={{ width: panelWidth }}>\n <GraphNodeDetailPanel\n selectedNode={selectedNode}\n env={env}\n onClose={handleClosePanel}\n />\n </div>\n )}\n </div>\n );\n}\n","'use client';\n\nimport { parseWorkflowName } from '@workflow/core/parse-name';\nimport {\n cancelRun,\n type Event,\n recreateRun,\n type Step,\n StreamViewer,\n useWorkflowStreams,\n useWorkflowTraceViewerData,\n type WorkflowRun,\n WorkflowTraceViewer,\n} from '@workflow/web-shared';\nimport type { EnvMap } from '@workflow/web-shared/server';\nimport {\n AlertCircle,\n GitBranch,\n HelpCircle,\n List,\n Loader2,\n} from 'lucide-react';\nimport Link from 'next/link';\nimport { useRouter, useSearchParams } from 'next/navigation';\nimport { useCallback, useMemo, useState } from 'react';\nimport { toast } from 'sonner';\nimport { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from '@/components/ui/alert-dialog';\nimport {\n Breadcrumb,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbList,\n BreadcrumbPage,\n BreadcrumbSeparator,\n} from '@/components/ui/breadcrumb';\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from '@/components/ui/tooltip';\nimport { buildUrlWithConfig, worldConfigToEnvMap } from '@/lib/config';\nimport type { WorldConfig } from '@/lib/config-world';\nimport { mapRunToExecution } from '@/lib/flow-graph/graph-execution-mapper';\nimport { useWorkflowGraphManifest } from '@/lib/flow-graph/use-workflow-graph';\n\nimport { CopyableText } from './display-utils/copyable-text';\nimport { LiveStatus } from './display-utils/live-status';\nimport { RelativeTime } from './display-utils/relative-time';\nimport { StatusBadge } from './display-utils/status-badge';\nimport { WorkflowGraphExecutionViewer } from './flow-graph/workflow-graph-execution-viewer';\nimport { RunActionsButtons } from './run-actions';\nimport { Skeleton } from './ui/skeleton';\n\n/**\n * Graph tab content component that fetches the manifest internally\n * This ensures the manifest is only fetched when the Graph tab is mounted\n */\nfunction GraphTabContent({\n config,\n run,\n allSteps,\n allEvents,\n env,\n}: {\n config: WorldConfig;\n run: WorkflowRun;\n allSteps: Step[] | null;\n allEvents: Event[] | null;\n env: EnvMap;\n}) {\n // Fetch workflow graph manifest only when this tab is mounted\n const {\n manifest: graphManifest,\n loading: graphLoading,\n error: graphError,\n } = useWorkflowGraphManifest(config);\n\n // Find the workflow graph for this run\n const workflowGraph = useMemo(() => {\n if (!graphManifest || !run.workflowName) return null;\n return graphManifest.workflows[run.workflowName] ?? null;\n }, [graphManifest, run.workflowName]);\n\n // Map run data to execution overlay\n const execution = useMemo(() => {\n if (!workflowGraph || !run.runId) return null;\n\n return mapRunToExecution(\n run,\n allSteps || [],\n allEvents || [],\n workflowGraph\n );\n }, [workflowGraph, run, allSteps, allEvents]);\n\n if (graphLoading) {\n return (\n <div className=\"flex items-center justify-center w-full h-full\">\n <Loader2 className=\"h-8 w-8 animate-spin text-muted-foreground\" />\n <span className=\"ml-4 text-muted-foreground\">\n Loading workflow graph...\n </span>\n </div>\n );\n }\n\n if (graphError) {\n return (\n <div className=\"flex items-center justify-center w-full h-full p-4\">\n <Alert variant=\"destructive\" className=\"max-w-lg\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertTitle>Error Loading Workflow Graph</AlertTitle>\n <AlertDescription>{graphError.message}</AlertDescription>\n </Alert>\n </div>\n );\n }\n\n if (!workflowGraph) {\n return (\n <div className=\"flex items-center justify-center w-full h-full\">\n <Alert className=\"max-w-lg\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertTitle>Workflow Graph Not Found</AlertTitle>\n <AlertDescription>\n Could not find the workflow graph for this run. The workflow may\n have been deleted or the graph manifest may need to be regenerated.\n </AlertDescription>\n </Alert>\n </div>\n );\n }\n\n return (\n <WorkflowGraphExecutionViewer\n workflow={workflowGraph}\n execution={execution || undefined}\n env={env}\n />\n );\n}\n\ninterface RunDetailViewProps {\n config: WorldConfig;\n runId: string;\n selectedId?: string;\n}\n\nexport function RunDetailView({\n config,\n runId,\n // TODO: This should open the right sidebar within the trace viewer\n selectedId: _selectedId,\n}: RunDetailViewProps) {\n const router = useRouter();\n const searchParams = useSearchParams();\n const [cancelling, setCancelling] = useState(false);\n const [rerunning, setRerunning] = useState(false);\n const [showCancelDialog, setShowCancelDialog] = useState(false);\n const [showRerunDialog, setShowRerunDialog] = useState(false);\n const env = useMemo(() => worldConfigToEnvMap(config), [config]);\n\n // Read tab and streamId from URL search params\n const activeTab =\n (searchParams.get('tab') as 'trace' | 'graph' | 'streams') || 'trace';\n const selectedStreamId = searchParams.get('streamId');\n const showDebugActions = searchParams.get('debug') === '1';\n\n // Helper to update URL search params\n const updateSearchParams = useCallback(\n (updates: Record<string, string | null>) => {\n const params = new URLSearchParams(searchParams.toString());\n for (const [key, value] of Object.entries(updates)) {\n if (value === null) {\n params.delete(key);\n } else {\n params.set(key, value);\n }\n }\n router.push(`?${params.toString()}`, { scroll: false });\n },\n [router, searchParams]\n );\n\n const setActiveTab = useCallback(\n (tab: 'trace' | 'graph' | 'streams') => {\n // When switching to trace or graph tab, clear streamId\n if (tab === 'trace' || tab === 'graph') {\n updateSearchParams({ tab, streamId: null });\n } else {\n updateSearchParams({ tab });\n }\n },\n [updateSearchParams]\n );\n\n const setSelectedStreamId = useCallback(\n (streamId: string | null) => {\n updateSearchParams({ streamId });\n },\n [updateSearchParams]\n );\n\n // Handler for clicking on stream refs in the trace viewer\n const handleStreamClick = useCallback(\n (streamId: string) => {\n updateSearchParams({ tab: 'streams', streamId });\n },\n [updateSearchParams]\n );\n\n // Only show graph tab for local backend\n const isLocalBackend = config.backend === 'local';\n\n // Fetch all run data with live updates\n const {\n run: runData,\n steps: allSteps,\n hooks: allHooks,\n events: allEvents,\n loading,\n auxiliaryDataLoading,\n error,\n update,\n } = useWorkflowTraceViewerData(env, runId, { live: true });\n const run = runData ?? ({} as WorkflowRun);\n\n // Fetch streams for this run\n const {\n streams,\n loading: streamsLoading,\n error: streamsError,\n } = useWorkflowStreams(env, runId);\n\n const handleCancelClick = () => {\n setShowCancelDialog(true);\n };\n\n const handleConfirmCancel = async () => {\n if (cancelling) return;\n\n try {\n setCancelling(true);\n setShowCancelDialog(false);\n await cancelRun(env, runId);\n // Trigger a refresh of the data\n await update();\n toast.success('Run cancelled successfully');\n } catch (err) {\n console.error('Failed to cancel run:', err);\n toast.error('Failed to cancel run', {\n description:\n err instanceof Error ? err.message : 'An unknown error occurred',\n });\n } finally {\n setCancelling(false);\n }\n };\n\n const handleRerunClick = () => {\n setShowRerunDialog(true);\n };\n\n const handleConfirmRerun = async () => {\n if (rerunning) return;\n\n try {\n setRerunning(true);\n setShowRerunDialog(false);\n // Start a new run with the same workflow and input arguments\n const newRunId = await recreateRun(env, run.runId);\n toast.success('New run started successfully', {\n description: `Run ID: ${newRunId}`,\n });\n // Navigate to the new run\n router.push(buildUrlWithConfig(`/run/${newRunId}`, config));\n } catch (err) {\n console.error('Failed to re-run workflow:', err);\n toast.error('Failed to start new run', {\n description:\n err instanceof Error ? err.message : 'An unknown error occurred',\n });\n } finally {\n setRerunning(false);\n setShowRerunDialog(false);\n }\n };\n\n if (error && !runData) {\n return (\n <Alert variant=\"destructive\" className=\"m-4\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertTitle>Error loading workflow run</AlertTitle>\n <AlertDescription>{error.message}</AlertDescription>\n </Alert>\n );\n }\n\n const workflowName = parseWorkflowName(run.workflowName)?.shortName;\n\n // At this point, we've already returned if there was an error\n // So hasError is always false here\n const hasError = false;\n const errorMessage = '';\n\n return (\n <>\n {/* Cancel Confirmation Dialog */}\n <AlertDialog open={showCancelDialog} onOpenChange={setShowCancelDialog}>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Cancel Workflow Run?</AlertDialogTitle>\n <AlertDialogDescription>\n This will stop the workflow execution immediately, and no further\n steps will be executed. Partial workflow execution may occur. Are\n you sure you want to cancel the run?\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Keep Running</AlertDialogCancel>\n <AlertDialogAction\n onClick={handleConfirmCancel}\n className=\"bg-destructive text-destructive-foreground hover:bg-destructive/90\"\n >\n Cancel Run\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n\n {/* Replay Run Confirmation Dialog */}\n <AlertDialog open={showRerunDialog} onOpenChange={setShowRerunDialog}>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Replay Run?</AlertDialogTitle>\n <AlertDialogDescription>\n This can potentially re-run code that is meant to only execute\n once. Are you sure you want to replay the workflow run?\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Cancel</AlertDialogCancel>\n <AlertDialogAction onClick={handleConfirmRerun}>\n Replay Run\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n\n <div className=\"flex flex-col h-[calc(100vh-97px)]\">\n <div className=\"flex-none space-y-4\">\n <Breadcrumb>\n <BreadcrumbList>\n <BreadcrumbItem>\n <BreadcrumbLink asChild>\n <Link href={buildUrlWithConfig('/', config)}>Runs</Link>\n </BreadcrumbLink>\n </BreadcrumbItem>\n <BreadcrumbSeparator />\n <BreadcrumbItem>\n <BreadcrumbPage className=\"font-mono text-xs\">\n {runId}\n </BreadcrumbPage>\n </BreadcrumbItem>\n </BreadcrumbList>\n </Breadcrumb>\n\n {/* Run Overview Header */}\n <div className=\"space-y-4 p-6 border rounded-lg\">\n {/* Title Row */}\n <div className=\"flex items-start justify-between\">\n <div className=\"mb-4\">\n <h1 className=\"text-xl font-semibold\">\n {workflowName ? (\n workflowName\n ) : (\n <Skeleton className=\"w-[260px] h-[28px]\" />\n )}\n </h1>\n </div>\n\n <div className=\"flex items-center justify-between gap-2\">\n {/* Right side controls */}\n <LiveStatus hasError={hasError} errorMessage={errorMessage} />\n <RunActionsButtons\n env={env}\n runId={runId}\n runStatus={run.status}\n events={allEvents}\n eventsLoading={auxiliaryDataLoading}\n loading={loading}\n onRerunClick={handleRerunClick}\n onCancelClick={handleCancelClick}\n callbacks={{ onSuccess: update }}\n showDebugActions={showDebugActions}\n />\n </div>\n </div>\n\n {/* Status and Timeline Row */}\n <div className=\"flex items-start gap-8\">\n <div className=\"flex flex-col gap-1\">\n <div className=\"text-xs text-muted-foreground\">Status</div>\n {run.status ? (\n <StatusBadge status={run.status} context={run} />\n ) : (\n <Skeleton className=\"w-[55px] h-[24px]\" />\n )}\n </div>\n <div className=\"flex flex-col gap-1\">\n <div className=\"text-xs text-muted-foreground\">Duration</div>\n <div className=\"text-xs\">\n {run.runId ? (\n run.startedAt ? (\n (() => {\n const ms =\n (run.completedAt\n ? new Date(run.completedAt).getTime()\n : Date.now()) - new Date(run.startedAt).getTime();\n const seconds = Math.floor(ms / 1000);\n if (seconds < 60) return `${seconds}s`;\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = seconds % 60;\n if (minutes < 60) {\n return remainingSeconds > 0\n ? `${minutes}m ${remainingSeconds}s`\n : `${minutes}m`;\n }\n const hours = Math.floor(minutes / 60);\n const remainingMinutes = minutes % 60;\n return remainingMinutes > 0\n ? `${hours}h ${remainingMinutes}m`\n : `${hours}h`;\n })()\n ) : (\n '-'\n )\n ) : (\n <Skeleton className=\"w-[60px] h-[20px]\" />\n )}\n </div>\n </div>\n <div className=\"flex flex-col gap-1\">\n <div className=\"text-xs text-muted-foreground\">Run ID</div>\n {run.runId ? (\n <CopyableText text={run.runId}>\n <div className=\"text-xs mt-0.5 font-mono\">{run.runId}</div>\n </CopyableText>\n ) : (\n <Skeleton className=\"w-[280px] h-[20px]\" />\n )}\n </div>\n <div className=\"flex flex-col gap-1\">\n <div className=\"text-xs text-muted-foreground\">Queued</div>\n {run.createdAt ? (\n <div className=\"text-xs\">\n <RelativeTime date={run.createdAt} />\n </div>\n ) : (\n <Skeleton className=\"w-[110px] h-[20px]\" />\n )}\n </div>\n <div className=\"flex flex-col gap-1\">\n <div className=\"text-xs text-muted-foreground\">Started</div>\n <div className=\"text-xs\">\n {run.runId ? (\n run.startedAt ? (\n <RelativeTime date={run.startedAt} />\n ) : (\n '-'\n )\n ) : (\n <Skeleton className=\"w-[110px] h-[20px]\" />\n )}\n </div>\n </div>\n <div className=\"flex flex-col gap-1\">\n <div className=\"text-xs text-muted-foreground\">Completed</div>\n <div className=\"text-xs\">\n {run.runId ? (\n run.completedAt ? (\n <RelativeTime date={run.completedAt} />\n ) : (\n '-'\n )\n ) : (\n <Skeleton className=\"w-[110px] h-[20px]\" />\n )}\n </div>\n </div>\n {run.expiredAt != null && (\n <div className=\"flex flex-col gap-1\">\n <Tooltip>\n <TooltipTrigger asChild>\n <div className=\"text-xs text-muted-foreground cursor-help flex items-center gap-1\">\n Expired\n <HelpCircle className=\"w-3 h-3\" />\n </div>\n </TooltipTrigger>\n <TooltipContent>\n <p>\n The storage data for this run has expired and is no\n longer available.\n </p>\n </TooltipContent>\n </Tooltip>\n <div className=\"text-xs\">\n <RelativeTime date={run.expiredAt} />\n </div>\n </div>\n )}\n </div>\n </div>\n </div>\n\n <div className=\"mt-4 flex-1 flex flex-col min-h-0\">\n <Tabs\n value={activeTab}\n onValueChange={(v) =>\n setActiveTab(v as 'trace' | 'graph' | 'streams')\n }\n className=\"flex-1 flex flex-col min-h-0\"\n >\n <TabsList className=\"mb-4 flex-none\">\n <TabsTrigger value=\"trace\" className=\"gap-2\">\n <List className=\"h-4 w-4\" />\n Trace\n </TabsTrigger>\n {isLocalBackend && (\n <TabsTrigger value=\"graph\" className=\"gap-2\">\n <GitBranch className=\"h-4 w-4\" />\n Graph\n </TabsTrigger>\n )}\n <TabsTrigger value=\"streams\" className=\"gap-2\">\n <List className=\"h-4 w-4\" />\n Streams\n </TabsTrigger>\n </TabsList>\n\n <TabsContent value=\"trace\" className=\"mt-0 flex-1 min-h-0\">\n <div className=\"h-full\">\n <WorkflowTraceViewer\n error={error}\n steps={allSteps}\n events={allEvents}\n hooks={allHooks}\n env={env}\n run={run}\n isLoading={loading}\n onStreamClick={handleStreamClick}\n />\n </div>\n </TabsContent>\n\n <TabsContent value=\"streams\" className=\"mt-0 flex-1 min-h-0\">\n <div className=\"h-full flex gap-4\">\n {/* Stream list sidebar */}\n <div\n className=\"w-64 flex-shrink-0 border rounded-lg overflow-hidden\"\n style={{\n borderColor: 'var(--ds-gray-300)',\n backgroundColor: 'var(--ds-background-100)',\n }}\n >\n <div\n className=\"px-3 py-2 border-b text-xs font-medium\"\n style={{\n borderColor: 'var(--ds-gray-300)',\n color: 'var(--ds-gray-900)',\n }}\n >\n Streams ({streams.length})\n </div>\n <div className=\"overflow-auto max-h-[calc(100vh-400px)]\">\n {streamsLoading ? (\n <div className=\"p-4 flex items-center justify-center\">\n <Loader2 className=\"h-4 w-4 animate-spin text-muted-foreground\" />\n </div>\n ) : streamsError ? (\n <div className=\"p-4 text-xs text-destructive\">\n {streamsError.message}\n </div>\n ) : streams.length === 0 ? (\n <div\n className=\"p-4 text-xs\"\n style={{ color: 'var(--ds-gray-600)' }}\n >\n No streams found for this run\n </div>\n ) : (\n streams.map((streamId) => (\n <button\n key={streamId}\n type=\"button\"\n onClick={() => setSelectedStreamId(streamId)}\n className=\"w-full text-left px-3 py-2 text-xs font-mono truncate hover:bg-accent transition-colors\"\n style={{\n backgroundColor:\n selectedStreamId === streamId\n ? 'var(--ds-gray-200)'\n : 'transparent',\n color: 'var(--ds-gray-1000)',\n }}\n title={streamId}\n >\n {streamId}\n </button>\n ))\n )}\n </div>\n </div>\n\n {/* Stream viewer */}\n <div className=\"flex-1 min-w-0\">\n {selectedStreamId ? (\n <StreamViewer env={env} streamId={selectedStreamId} />\n ) : (\n <div\n className=\"h-full flex items-center justify-center rounded-lg border\"\n style={{\n borderColor: 'var(--ds-gray-300)',\n backgroundColor: 'var(--ds-gray-100)',\n }}\n >\n <div\n className=\"text-sm\"\n style={{ color: 'var(--ds-gray-600)' }}\n >\n {streams.length > 0\n ? 'Select a stream to view its data'\n : 'No streams available'}\n </div>\n </div>\n )}\n </div>\n </div>\n </TabsContent>\n\n {isLocalBackend && (\n <TabsContent value=\"graph\" className=\"mt-0 flex-1 min-h-0\">\n <div className=\"h-full min-h-[500px]\">\n <GraphTabContent\n config={config}\n run={run}\n allSteps={allSteps}\n allEvents={allEvents}\n env={env}\n />\n </div>\n </TabsContent>\n )}\n </Tabs>\n\n {auxiliaryDataLoading && (\n <div className=\"fixed flex items-center gap-2 left-8 bottom-8 bg-background border rounded-md px-4 py-2 shadow-lg\">\n <Loader2 className=\"size-4 animate-spin\" />\n <span className=\"text-sm\">Fetching data...</span>\n </div>\n )}\n </div>\n </div>\n </>\n );\n}\n","'use client';\n\nimport { ErrorBoundary } from '@workflow/web-shared';\nimport { useParams } from 'next/navigation';\nimport { RunDetailView } from '@/components/run-detail-view';\nimport { useQueryParamConfig } from '@/lib/config';\nimport {\n useEventIdState,\n useHookIdState,\n useStepIdState,\n} from '@/lib/url-state';\n\nexport default function RunDetailPage() {\n const params = useParams();\n const config = useQueryParamConfig();\n const [stepId] = useStepIdState();\n const [eventId] = useEventIdState();\n const [hookId] = useHookIdState();\n\n const runId = params.runId as string;\n const selectedId = stepId || eventId || hookId || undefined;\n\n return (\n <ErrorBoundary\n title=\"Run Detail Error\"\n description=\"Failed to load run details. Please try navigating back to the home page.\"\n >\n <RunDetailView config={config} runId={runId} selectedId={selectedId} />\n </ErrorBoundary>\n );\n}\n","import { Slot } from '@radix-ui/react-slot';\nimport { ChevronRight, MoreHorizontal } from 'lucide-react';\nimport type * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Breadcrumb({ ...props }: React.ComponentProps<'nav'>) {\n return <nav aria-label=\"breadcrumb\" data-slot=\"breadcrumb\" {...props} />;\n}\n\nfunction BreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>) {\n return (\n <ol\n data-slot=\"breadcrumb-list\"\n className={cn(\n 'text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction BreadcrumbItem({ className, ...props }: React.ComponentProps<'li'>) {\n return (\n <li\n data-slot=\"breadcrumb-item\"\n className={cn('inline-flex items-center gap-1.5', className)}\n {...props}\n />\n );\n}\n\nfunction BreadcrumbLink({\n asChild,\n className,\n ...props\n}: React.ComponentProps<'a'> & {\n asChild?: boolean;\n}) {\n const Comp = asChild ? Slot : 'a';\n\n return (\n <Comp\n data-slot=\"breadcrumb-link\"\n className={cn('hover:text-foreground transition-colors', className)}\n {...props}\n />\n );\n}\n\nfunction BreadcrumbPage({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n // biome-ignore lint/a11y/useFocusableInteractive: <explanation>\n // biome-ignore lint/a11y/useSemanticElements: <explanation>\n <span\n data-slot=\"breadcrumb-page\"\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn('text-foreground font-normal', className)}\n {...props}\n />\n );\n}\n\nfunction BreadcrumbSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<'li'>) {\n return (\n <li\n data-slot=\"breadcrumb-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn('[&>svg]:size-3.5', className)}\n {...props}\n >\n {children ?? <ChevronRight />}\n </li>\n );\n}\n\nfunction BreadcrumbEllipsis({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"breadcrumb-ellipsis\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn('flex size-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontal className=\"size-4\" />\n <span className=\"sr-only\">More</span>\n </span>\n );\n}\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n};\n","// packages/react/primitive/src/Primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","import { LIVE_UPDATE_INTERVAL_MS } from '@/lib/utils';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '../ui/tooltip';\n\ninterface LiveStatusProps {\n hasError: boolean;\n errorMessage: string;\n}\n\nexport function LiveStatus({ hasError, errorMessage }: LiveStatusProps) {\n return (\n <div className=\"flex items-center gap-2\">\n <Tooltip>\n <TooltipTrigger asChild>\n <div className=\"flex items-center gap-1.5\">\n <div\n className={`w-2 h-2 rounded-full ${\n hasError ? 'bg-red-500' : 'bg-green-500 animate-pulse'\n }`}\n />\n <span\n className={`text-xs $\n hasError\n ? 'text-red-600 dark:text-red-400'\n : 'text-muted-foreground'`}\n >\n {hasError ? 'Error' : 'Live'}\n </span>\n </div>\n </TooltipTrigger>\n <TooltipContent>\n <p>\n {hasError\n ? `Error updating data: ${errorMessage}`\n : `Content updates every ${LIVE_UPDATE_INTERVAL_MS / 1000} seconds`}\n </p>\n </TooltipContent>\n </Tooltip>\n </div>\n );\n}\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CircleHelp\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/circle-help\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CircleHelp = createLucideIcon('CircleHelp', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3', key: '1u773s' }],\n ['path', { d: 'M12 17h.01', key: 'p32p05' }],\n]);\n\nexport default CircleHelp;\n","import * as React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { createDialogScope } from '@radix-ui/react-dialog';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { Slottable } from '@radix-ui/react-slot';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst ROOT_NAME = 'AlertDialog';\n\ntype ScopedProps<P> = P & { __scopeAlertDialog?: Scope };\nconst [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope,\n]);\nconst useDialogScope = createDialogScope();\n\ntype DialogProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;\ninterface AlertDialogProps extends Omit<DialogProps, 'modal'> {}\n\nconst AlertDialog: React.FC<AlertDialogProps> = (props: ScopedProps<AlertDialogProps>) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Root {...dialogScope} {...alertDialogProps} modal={true} />;\n};\n\nAlertDialog.displayName = ROOT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogTrigger\n * -----------------------------------------------------------------------------------------------*/\nconst TRIGGER_NAME = 'AlertDialogTrigger';\n\ntype AlertDialogTriggerElement = React.ElementRef<typeof DialogPrimitive.Trigger>;\ntype DialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;\ninterface AlertDialogTriggerProps extends DialogTriggerProps {}\n\nconst AlertDialogTrigger = React.forwardRef<AlertDialogTriggerElement, AlertDialogTriggerProps>(\n (props: ScopedProps<AlertDialogTriggerProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Trigger {...dialogScope} {...triggerProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'AlertDialogPortal';\n\ntype DialogPortalProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>;\ninterface AlertDialogPortalProps extends DialogPortalProps {}\n\nconst AlertDialogPortal: React.FC<AlertDialogPortalProps> = (\n props: ScopedProps<AlertDialogPortalProps>\n) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Portal {...dialogScope} {...portalProps} />;\n};\n\nAlertDialogPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogOverlay\n * -----------------------------------------------------------------------------------------------*/\n\nconst OVERLAY_NAME = 'AlertDialogOverlay';\n\ntype AlertDialogOverlayElement = React.ElementRef<typeof DialogPrimitive.Overlay>;\ntype DialogOverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;\ninterface AlertDialogOverlayProps extends DialogOverlayProps {}\n\nconst AlertDialogOverlay = React.forwardRef<AlertDialogOverlayElement, AlertDialogOverlayProps>(\n (props: ScopedProps<AlertDialogOverlayProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Overlay {...dialogScope} {...overlayProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogOverlay.displayName = OVERLAY_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'AlertDialogContent';\n\ntype AlertDialogContentContextValue = {\n cancelRef: React.MutableRefObject<AlertDialogCancelElement | null>;\n};\n\nconst [AlertDialogContentProvider, useAlertDialogContentContext] =\n createAlertDialogContext<AlertDialogContentContextValue>(CONTENT_NAME);\n\ntype AlertDialogContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ntype DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;\ninterface AlertDialogContentProps\n extends Omit<DialogContentProps, 'onPointerDownOutside' | 'onInteractOutside'> {}\n\nconst AlertDialogContent = React.forwardRef<AlertDialogContentElement, AlertDialogContentProps>(\n (props: ScopedProps<AlertDialogContentProps>, forwardedRef) => {\n const { __scopeAlertDialog, children, ...contentProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const contentRef = React.useRef<AlertDialogContentElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const cancelRef = React.useRef<AlertDialogCancelElement | null>(null);\n\n return (\n <DialogPrimitive.WarningProvider\n contentName={CONTENT_NAME}\n titleName={TITLE_NAME}\n docsSlug=\"alert-dialog\"\n >\n <AlertDialogContentProvider scope={__scopeAlertDialog} cancelRef={cancelRef}>\n <DialogPrimitive.Content\n role=\"alertdialog\"\n {...dialogScope}\n {...contentProps}\n ref={composedRefs}\n onOpenAutoFocus={composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {\n event.preventDefault();\n cancelRef.current?.focus({ preventScroll: true });\n })}\n onPointerDownOutside={(event) => event.preventDefault()}\n onInteractOutside={(event) => event.preventDefault()}\n >\n {/**\n * We have to use `Slottable` here as we cannot wrap the `AlertDialogContentProvider`\n * around everything, otherwise the `DescriptionWarning` would be rendered straight away.\n * This is because we want the accessibility checks to run only once the content is actually\n * open and that behaviour is already encapsulated in `DialogContent`.\n */}\n <Slottable>{children}</Slottable>\n {process.env.NODE_ENV === 'development' && (\n <DescriptionWarning contentRef={contentRef} />\n )}\n </DialogPrimitive.Content>\n </AlertDialogContentProvider>\n </DialogPrimitive.WarningProvider>\n );\n }\n);\n\nAlertDialogContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'AlertDialogTitle';\n\ntype AlertDialogTitleElement = React.ElementRef<typeof DialogPrimitive.Title>;\ntype DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;\ninterface AlertDialogTitleProps extends DialogTitleProps {}\n\nconst AlertDialogTitle = React.forwardRef<AlertDialogTitleElement, AlertDialogTitleProps>(\n (props: ScopedProps<AlertDialogTitleProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...titleProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Title {...dialogScope} {...titleProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogTitle.displayName = TITLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DESCRIPTION_NAME = 'AlertDialogDescription';\n\ntype AlertDialogDescriptionElement = React.ElementRef<typeof DialogPrimitive.Description>;\ntype DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;\ninterface AlertDialogDescriptionProps extends DialogDescriptionProps {}\n\nconst AlertDialogDescription = React.forwardRef<\n AlertDialogDescriptionElement,\n AlertDialogDescriptionProps\n>((props: ScopedProps<AlertDialogDescriptionProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...descriptionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Description {...dialogScope} {...descriptionProps} ref={forwardedRef} />;\n});\n\nAlertDialogDescription.displayName = DESCRIPTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogAction\n * -----------------------------------------------------------------------------------------------*/\n\nconst ACTION_NAME = 'AlertDialogAction';\n\ntype AlertDialogActionElement = React.ElementRef<typeof DialogPrimitive.Close>;\ntype DialogCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;\ninterface AlertDialogActionProps extends DialogCloseProps {}\n\nconst AlertDialogAction = React.forwardRef<AlertDialogActionElement, AlertDialogActionProps>(\n (props: ScopedProps<AlertDialogActionProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...actionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Close {...dialogScope} {...actionProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogAction.displayName = ACTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogCancel\n * -----------------------------------------------------------------------------------------------*/\n\nconst CANCEL_NAME = 'AlertDialogCancel';\n\ntype AlertDialogCancelElement = React.ElementRef<typeof DialogPrimitive.Close>;\ninterface AlertDialogCancelProps extends DialogCloseProps {}\n\nconst AlertDialogCancel = React.forwardRef<AlertDialogCancelElement, AlertDialogCancelProps>(\n (props: ScopedProps<AlertDialogCancelProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...cancelProps } = props;\n const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const ref = useComposedRefs(forwardedRef, cancelRef);\n return <DialogPrimitive.Close {...dialogScope} {...cancelProps} ref={ref} />;\n }\n);\n\nAlertDialogCancel.displayName = CANCEL_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype DescriptionWarningProps = {\n contentRef: React.RefObject<AlertDialogContentElement | null>;\n};\n\nconst DescriptionWarning: React.FC<DescriptionWarningProps> = ({ contentRef }) => {\n const MESSAGE = `\\`${CONTENT_NAME}\\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \\`${CONTENT_NAME}\\` by passing a \\`${DESCRIPTION_NAME}\\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \\`id\\` and passing the same value to the \\`aria-describedby\\` prop in \\`${CONTENT_NAME}\\`. If the description is confusing or duplicative for sighted users, you can use the \\`@radix-ui/react-visually-hidden\\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;\n\n React.useEffect(() => {\n const hasDescription = document.getElementById(\n contentRef.current?.getAttribute('aria-describedby')!\n );\n if (!hasDescription) console.warn(MESSAGE);\n }, [MESSAGE, contentRef]);\n\n return null;\n};\n\nconst Root = AlertDialog;\nconst Trigger = AlertDialogTrigger;\nconst Portal = AlertDialogPortal;\nconst Overlay = AlertDialogOverlay;\nconst Content = AlertDialogContent;\nconst Action = AlertDialogAction;\nconst Cancel = AlertDialogCancel;\nconst Title = AlertDialogTitle;\nconst Description = AlertDialogDescription;\n\nexport {\n createAlertDialogScope,\n //\n AlertDialog,\n AlertDialogTrigger,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogContent,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogTitle,\n AlertDialogDescription,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Action,\n Cancel,\n Title,\n Description,\n};\nexport type {\n AlertDialogProps,\n AlertDialogTriggerProps,\n AlertDialogPortalProps,\n AlertDialogOverlayProps,\n AlertDialogContentProps,\n AlertDialogActionProps,\n AlertDialogCancelProps,\n AlertDialogTitleProps,\n AlertDialogDescriptionProps,\n};\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name List\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/list\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst List = createLucideIcon('List', [\n ['path', { d: 'M3 12h.01', key: 'nlz23k' }],\n ['path', { d: 'M3 18h.01', key: '1tta3j' }],\n ['path', { d: 'M3 6h.01', key: '1rqtza' }],\n ['path', { d: 'M8 12h13', key: '1za7za' }],\n ['path', { d: 'M8 18h13', key: '1lx6n3' }],\n ['path', { d: 'M8 6h13', key: 'ik3vkj' }],\n]);\n\nexport default List;\n","import * as React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\n\n/* -------------------------------------------------------------------------------------------------\n * Portal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'Portal';\n\ntype PortalElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface PortalProps extends PrimitiveDivProps {\n /**\n * An optional container where the portaled content should be appended.\n */\n container?: Element | DocumentFragment | null;\n}\n\nconst Portal = React.forwardRef<PortalElement, PortalProps>((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || (mounted && globalThis?.document?.body);\n return container\n ? ReactDOM.createPortal(<Primitive.div {...portalProps} ref={forwardedRef} />, container)\n : null;\n});\n\nPortal.displayName = PORTAL_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Portal;\n\nexport {\n Portal,\n //\n Root,\n};\nexport type { PortalProps };\n","/**\n * Utilities to map workflow run data to graph execution overlays\n */\n\nimport type { Event, Step, WorkflowRun } from '@workflow/web-shared';\nimport type {\n EdgeTraversal,\n GraphNode,\n StepExecution,\n WorkflowGraph,\n WorkflowRunExecution,\n} from './workflow-graph-types';\n\n/**\n * Primitive node labels that correspond to event types\n */\nconst PRIMITIVE_LABELS = {\n sleep: 'sleep',\n createHook: 'createHook',\n createWebhook: 'createWebhook',\n awaitWebhook: 'awaitWebhook',\n} as const;\n\n/**\n * Normalize step/workflow names by removing path traversal patterns\n * Graph has: \"step//../example/workflows/1_simple.ts//add\"\n * Runtime has: \"step//example/workflows/1_simple.ts//add\"\n */\nfunction normalizeStepName(name: string): string {\n // Remove //../ patterns (path traversal)\n return name.replace(/\\/\\/\\.\\.\\//g, '//');\n}\n\n/**\n * Create execution data for a single step attempt\n * Handles all step statuses: pending, running, completed, failed, cancelled\n */\nfunction createStepExecution(\n attemptStep: Step,\n graphNodeId: string,\n idx: number,\n totalAttempts: number\n): StepExecution {\n // Map step status to execution status\n let status: StepExecution['status'];\n switch (attemptStep.status) {\n case 'completed':\n status = 'completed';\n break;\n case 'failed':\n // If this is not the last attempt, it's a retry\n status = idx < totalAttempts - 1 ? 'retrying' : 'failed';\n break;\n case 'running':\n status = 'running';\n break;\n case 'cancelled':\n status = 'cancelled';\n break;\n case 'pending':\n default:\n status = 'pending';\n break;\n }\n\n const duration =\n attemptStep.completedAt && attemptStep.startedAt\n ? new Date(attemptStep.completedAt).getTime() -\n new Date(attemptStep.startedAt).getTime()\n : undefined;\n\n return {\n nodeId: graphNodeId,\n stepId: attemptStep.stepId,\n attemptNumber: attemptStep.attempt,\n status,\n startedAt: attemptStep.startedAt\n ? new Date(attemptStep.startedAt).toISOString()\n : undefined,\n completedAt: attemptStep.completedAt\n ? new Date(attemptStep.completedAt).toISOString()\n : undefined,\n duration,\n input: attemptStep.input,\n output: attemptStep.output,\n error: attemptStep.error\n ? {\n message: attemptStep.error.message,\n stack: attemptStep.error.stack || '',\n }\n : undefined,\n };\n}\n\n/**\n * Extract function name from a step ID\n * \"step//workflows/steps/post-slack-message.ts//postSlackMessage\" -> \"postSlackMessage\"\n */\nfunction extractFunctionName(stepId: string): string | null {\n const parts = stepId.split('//');\n return parts.length >= 3 ? parts[parts.length - 1] : null;\n}\n\n/**\n * Build index of graph nodes by normalized stepId and by function name\n */\nfunction buildNodeIndex(nodes: GraphNode[]): {\n byStepId: Map<string, GraphNode[]>;\n byFunctionName: Map<string, GraphNode[]>;\n primitivesByLabel: Map<string, GraphNode[]>;\n agentNodes: GraphNode[];\n toolNodes: Map<string, GraphNode[]>;\n} {\n const byStepId = new Map<string, GraphNode[]>();\n const byFunctionName = new Map<string, GraphNode[]>();\n const primitivesByLabel = new Map<string, GraphNode[]>();\n const agentNodes: GraphNode[] = [];\n const toolNodes = new Map<string, GraphNode[]>();\n\n for (const node of nodes) {\n if (node.data.stepId) {\n // Index by full step ID\n const normalizedStepId = normalizeStepName(node.data.stepId);\n const existing = byStepId.get(normalizedStepId) || [];\n existing.push(node);\n byStepId.set(normalizedStepId, existing);\n\n // Also index by function name for fallback matching\n const functionName = extractFunctionName(normalizedStepId);\n if (functionName) {\n const existingByName = byFunctionName.get(functionName) || [];\n existingByName.push(node);\n byFunctionName.set(functionName, existingByName);\n }\n }\n\n // Index primitive nodes by their label\n if (node.data.nodeKind === 'primitive') {\n const label = node.data.label;\n const existing = primitivesByLabel.get(label) || [];\n existing.push(node);\n primitivesByLabel.set(label, existing);\n }\n\n // Index agent nodes (DurableAgent)\n if (node.data.nodeKind === 'agent') {\n agentNodes.push(node);\n }\n\n // Index tool nodes by their label (tool name)\n if (node.data.nodeKind === 'tool') {\n const label = node.data.label;\n // Extract base tool name (remove \" (tool)\" suffix if present)\n const toolName = label.replace(/ \\(tool\\)$/, '');\n const existing = toolNodes.get(toolName) || [];\n existing.push(node);\n toolNodes.set(toolName, existing);\n\n // Also index by function name from stepId for fallback matching\n if (node.data.stepId) {\n const functionName = extractFunctionName(\n normalizeStepName(node.data.stepId)\n );\n if (functionName) {\n const existingByName = toolNodes.get(functionName) || [];\n if (!existingByName.includes(node)) {\n existingByName.push(node);\n toolNodes.set(functionName, existingByName);\n }\n }\n }\n }\n }\n return { byStepId, byFunctionName, primitivesByLabel, agentNodes, toolNodes };\n}\n\n/**\n * Calculate edge traversals based on execution path and graph structure\n * Handles parallel operations (Promise.all, Promise.race, etc.) correctly\n */\nfunction calculateEdgeTraversals(\n executionPath: string[],\n graph: WorkflowGraph,\n nodeExecutions: Map<string, StepExecution[]>\n): Map<string, EdgeTraversal> {\n const edgeTraversals = new Map<string, EdgeTraversal>();\n\n // Build a set for quick lookup\n const executedNodes = new Set(executionPath);\n\n // Group nodes by parallelGroupId to understand parallel structure\n const parallelGroups = new Map<\n string,\n { nodes: typeof graph.nodes; method?: string }\n >();\n for (const node of graph.nodes) {\n const groupId = node.metadata?.parallelGroupId;\n if (groupId) {\n const existing = parallelGroups.get(groupId) || { nodes: [] };\n existing.nodes.push(node);\n existing.method = node.metadata?.parallelMethod;\n parallelGroups.set(groupId, existing);\n }\n }\n\n // Find the winner for each Promise.race group\n const raceWinners = new Map<string, string>(); // parallelGroupId -> winning nodeId\n for (const [groupId, group] of parallelGroups) {\n if (group.method === 'race') {\n let winnerNodeId: string | undefined;\n let earliestCompletion: Date | undefined;\n\n for (const node of group.nodes) {\n const executions = nodeExecutions.get(node.id);\n if (executions) {\n for (const exec of executions) {\n if (exec.status === 'completed' && exec.completedAt) {\n const completedAt = new Date(exec.completedAt);\n if (!earliestCompletion || completedAt < earliestCompletion) {\n earliestCompletion = completedAt;\n winnerNodeId = node.id;\n }\n }\n }\n }\n }\n\n if (winnerNodeId) {\n raceWinners.set(groupId, winnerNodeId);\n }\n }\n }\n\n // Mark edge as traversed helper\n const markEdgeTraversed = (edge: (typeof graph.edges)[0]) => {\n const existing = edgeTraversals.get(edge.id);\n if (existing) {\n existing.traversalCount++;\n } else {\n edgeTraversals.set(edge.id, {\n edgeId: edge.id,\n traversalCount: 1,\n timings: [],\n });\n }\n };\n\n // Process all edges\n for (const edge of graph.edges) {\n const sourceNode = graph.nodes.find((n) => n.id === edge.source);\n const targetNode = graph.nodes.find((n) => n.id === edge.target);\n\n if (!sourceNode || !targetNode) continue;\n\n const sourceExecuted = executedNodes.has(edge.source);\n const targetExecuted = executedNodes.has(edge.target);\n\n // If neither node was executed, skip\n if (!sourceExecuted && !targetExecuted) continue;\n\n // Handle conditional edges specially\n if (edge.type === 'conditional') {\n // Conditional edges should be marked as traversed if:\n // - The source (conditional node) was executed AND\n // - The target (branch node) was executed\n // The label (\"true\" or \"false\") indicates which branch\n if (sourceExecuted && targetExecuted) {\n markEdgeTraversed(edge);\n }\n continue;\n }\n\n // Check if source is part of a Promise.race group\n const sourceGroupId = sourceNode.metadata?.parallelGroupId;\n const sourceMethod = sourceNode.metadata?.parallelMethod;\n\n if (sourceGroupId && sourceMethod === 'race') {\n // For Promise.race: only mark edge from the winner as traversed\n const winner = raceWinners.get(sourceGroupId);\n if (winner === edge.source && targetExecuted) {\n markEdgeTraversed(edge);\n }\n // Don't mark edges from non-winners even if both nodes executed\n } else if (sourceExecuted && targetExecuted) {\n // For Promise.all/allSettled or regular edges: mark as traversed\n markEdgeTraversed(edge);\n } else if (sourceExecuted && edge.type === 'parallel') {\n // For edges going INTO parallel nodes, mark if source executed\n // and target is in the execution path\n if (targetExecuted) {\n markEdgeTraversed(edge);\n }\n }\n }\n\n return edgeTraversals;\n}\n\n/**\n * Initialize start node execution\n */\nfunction initializeStartNode(\n run: WorkflowRun,\n graph: WorkflowGraph,\n executionPath: string[],\n nodeExecutions: Map<string, StepExecution[]>\n): void {\n const startNode = graph.nodes.find(\n (n) => n.data.nodeKind === 'workflow_start'\n );\n if (startNode) {\n executionPath.push(startNode.id);\n nodeExecutions.set(startNode.id, [\n {\n nodeId: startNode.id,\n attemptNumber: 1,\n status: 'completed',\n startedAt: run.startedAt\n ? new Date(run.startedAt).toISOString()\n : undefined,\n completedAt: run.startedAt\n ? new Date(run.startedAt).toISOString()\n : undefined,\n // No duration for control flow nodes (start/end/conditional)\n },\n ]);\n }\n}\n\n/**\n * Add end node execution based on workflow run status\n * Handles all run statuses: pending, running, completed, failed, paused, cancelled\n */\nfunction addEndNodeExecution(\n run: WorkflowRun,\n graph: WorkflowGraph,\n executionPath: string[],\n nodeExecutions: Map<string, StepExecution[]>\n): void {\n const endNode = graph.nodes.find((n) => n.data.nodeKind === 'workflow_end');\n if (!endNode || executionPath.includes(endNode.id)) {\n return;\n }\n\n // Map run status to end node execution status\n let endNodeStatus: StepExecution['status'];\n switch (run.status) {\n case 'completed':\n endNodeStatus = 'completed';\n break;\n case 'failed':\n endNodeStatus = 'failed';\n break;\n case 'cancelled':\n endNodeStatus = 'cancelled';\n break;\n case 'running':\n endNodeStatus = 'running';\n break;\n case 'paused':\n // Paused is like running but waiting\n endNodeStatus = 'pending';\n break;\n case 'pending':\n default:\n // Don't add end node for pending runs\n return;\n }\n\n executionPath.push(endNode.id);\n nodeExecutions.set(endNode.id, [\n {\n nodeId: endNode.id,\n attemptNumber: 1,\n status: endNodeStatus,\n startedAt: run.completedAt\n ? new Date(run.completedAt).toISOString()\n : undefined,\n completedAt: run.completedAt\n ? new Date(run.completedAt).toISOString()\n : undefined,\n // No duration for control flow nodes (start/end/conditional)\n },\n ]);\n}\n\n/**\n * Process a group of step attempts and map to graph node\n */\nfunction processStepGroup(\n stepGroup: Step[],\n stepName: string,\n nodesByStepId: Map<string, GraphNode[]>,\n nodesByFunctionName: Map<string, GraphNode[]>,\n occurrenceCount: Map<string, number>,\n nodeExecutions: Map<string, StepExecution[]>,\n executionPath: string[]\n): string | undefined {\n const normalizedStepName = normalizeStepName(stepName);\n const occurrenceIndex = occurrenceCount.get(normalizedStepName) || 0;\n occurrenceCount.set(normalizedStepName, occurrenceIndex + 1);\n\n let nodesWithStepId = nodesByStepId.get(normalizedStepName) || [];\n let matchStrategy = 'step-id';\n\n // Fallback: If no exact stepId match, try matching by function name\n // This handles cases where step functions are in separate files\n if (nodesWithStepId.length === 0) {\n const functionName = extractFunctionName(normalizedStepName);\n if (functionName) {\n nodesWithStepId = nodesByFunctionName.get(functionName) || [];\n matchStrategy = 'function-name';\n }\n }\n\n // If there's only one node for this step but multiple invocations,\n // map all invocations to that single node\n const graphNode =\n nodesWithStepId.length === 1\n ? nodesWithStepId[0]\n : nodesWithStepId[occurrenceIndex];\n\n console.log('[Graph Mapper] Processing step group:', {\n stepName,\n normalizedStepName,\n attempts: stepGroup.length,\n occurrenceIndex,\n totalNodesWithStepId: nodesWithStepId.length,\n selectedNode: graphNode?.id,\n allNodesWithStepId: nodesWithStepId.map((n) => n.id),\n matchStrategy,\n strategy:\n nodesWithStepId.length === 1\n ? 'single-node-multiple-invocations'\n : 'occurrence-based',\n });\n\n if (!graphNode) {\n return undefined;\n }\n\n const executions: StepExecution[] = stepGroup.map((attemptStep, idx) =>\n createStepExecution(attemptStep, graphNode.id, idx, stepGroup.length)\n );\n\n // If there's only one node, append executions instead of replacing\n if (nodesWithStepId.length === 1) {\n const existing = nodeExecutions.get(graphNode.id) || [];\n nodeExecutions.set(graphNode.id, [...existing, ...executions]);\n } else {\n nodeExecutions.set(graphNode.id, executions);\n }\n\n if (!executionPath.includes(graphNode.id)) {\n executionPath.push(graphNode.id);\n }\n\n const latestExecution = executions[executions.length - 1];\n return latestExecution.status === 'running' ? graphNode.id : undefined;\n}\n\n/**\n * Process primitive events (sleep, hooks) and map them to graph nodes\n */\nfunction processPrimitiveEvents(\n events: Event[],\n primitivesByLabel: Map<string, GraphNode[]>,\n nodeExecutions: Map<string, StepExecution[]>,\n executionPath: string[]\n): string | undefined {\n // Track occurrence counts for each primitive type\n const occurrenceCount = new Map<string, number>();\n\n // Group events by correlationId to pair created/completed events\n const eventsByCorrelation = new Map<string, Event[]>();\n for (const event of events) {\n if (!event.correlationId) continue;\n const existing = eventsByCorrelation.get(event.correlationId) || [];\n existing.push(event);\n eventsByCorrelation.set(event.correlationId, existing);\n }\n\n let currentNode: string | undefined;\n\n // Process sleep events (wait_created/wait_completed)\n const sleepNodes = primitivesByLabel.get(PRIMITIVE_LABELS.sleep) || [];\n const sleepCorrelations = new Set<string>();\n\n for (const event of events) {\n if (event.eventType === 'wait_created' && event.correlationId) {\n sleepCorrelations.add(event.correlationId);\n }\n }\n\n // Sort correlations by event creation time\n const sortedSleepCorrelations = Array.from(sleepCorrelations).sort((a, b) => {\n const eventsA = eventsByCorrelation.get(a) || [];\n const eventsB = eventsByCorrelation.get(b) || [];\n const timeA = eventsA.find(\n (e) => e.eventType === 'wait_created'\n )?.createdAt;\n const timeB = eventsB.find(\n (e) => e.eventType === 'wait_created'\n )?.createdAt;\n if (!timeA || !timeB) return 0;\n return new Date(timeA).getTime() - new Date(timeB).getTime();\n });\n\n for (const correlationId of sortedSleepCorrelations) {\n const correlationEvents = eventsByCorrelation.get(correlationId) || [];\n const createdEvent = correlationEvents.find(\n (e) => e.eventType === 'wait_created'\n );\n const completedEvent = correlationEvents.find(\n (e) => e.eventType === 'wait_completed'\n );\n\n if (!createdEvent) continue;\n\n // Find the corresponding node\n const occurrenceIndex = occurrenceCount.get(PRIMITIVE_LABELS.sleep) || 0;\n occurrenceCount.set(PRIMITIVE_LABELS.sleep, occurrenceIndex + 1);\n\n const graphNode =\n sleepNodes.length === 1 ? sleepNodes[0] : sleepNodes[occurrenceIndex];\n\n if (!graphNode) continue;\n\n // Determine status\n let status: StepExecution['status'] = 'running';\n if (completedEvent) {\n status = 'completed';\n }\n\n const startedAt = new Date(createdEvent.createdAt).toISOString();\n const completedAt = completedEvent\n ? new Date(completedEvent.createdAt).toISOString()\n : undefined;\n const duration = completedEvent\n ? new Date(completedEvent.createdAt).getTime() -\n new Date(createdEvent.createdAt).getTime()\n : undefined;\n\n const execution: StepExecution = {\n nodeId: graphNode.id,\n attemptNumber: 1,\n status,\n startedAt,\n completedAt,\n duration,\n };\n\n // Append or set executions\n const existing = nodeExecutions.get(graphNode.id) || [];\n nodeExecutions.set(graphNode.id, [...existing, execution]);\n\n if (!executionPath.includes(graphNode.id)) {\n executionPath.push(graphNode.id);\n }\n\n if (status === 'running') {\n currentNode = graphNode.id;\n }\n }\n\n // Process hook events (hook_created/hook_received)\n // createHook and createWebhook both use hook_created/hook_received events\n const hookNodes = [\n ...(primitivesByLabel.get(PRIMITIVE_LABELS.createHook) || []),\n ...(primitivesByLabel.get(PRIMITIVE_LABELS.createWebhook) || []),\n ];\n const hookCorrelations = new Set<string>();\n\n for (const event of events) {\n if (event.eventType === 'hook_created' && event.correlationId) {\n hookCorrelations.add(event.correlationId);\n }\n }\n\n // Sort correlations by event creation time\n const sortedHookCorrelations = Array.from(hookCorrelations).sort((a, b) => {\n const eventsA = eventsByCorrelation.get(a) || [];\n const eventsB = eventsByCorrelation.get(b) || [];\n const timeA = eventsA.find(\n (e) => e.eventType === 'hook_created'\n )?.createdAt;\n const timeB = eventsB.find(\n (e) => e.eventType === 'hook_created'\n )?.createdAt;\n if (!timeA || !timeB) return 0;\n return new Date(timeA).getTime() - new Date(timeB).getTime();\n });\n\n // Track hook occurrence separately from sleep\n let hookOccurrenceIndex = 0;\n\n for (const correlationId of sortedHookCorrelations) {\n const correlationEvents = eventsByCorrelation.get(correlationId) || [];\n const createdEvent = correlationEvents.find(\n (e) => e.eventType === 'hook_created'\n );\n\n if (!createdEvent) continue;\n\n // Find the corresponding node\n const graphNode =\n hookNodes.length === 1 ? hookNodes[0] : hookNodes[hookOccurrenceIndex];\n hookOccurrenceIndex++;\n\n if (!graphNode) continue;\n\n // Determine status - hooks are \"completed\" once created (the await is for received)\n // For the node visualization, we show it as completed when created\n const status: StepExecution['status'] = 'completed';\n\n const startedAt = new Date(createdEvent.createdAt).toISOString();\n const completedAt = new Date(createdEvent.createdAt).toISOString();\n\n const execution: StepExecution = {\n nodeId: graphNode.id,\n attemptNumber: 1,\n status,\n startedAt,\n completedAt,\n duration: 0,\n };\n\n // Append or set executions\n const existing = nodeExecutions.get(graphNode.id) || [];\n nodeExecutions.set(graphNode.id, [...existing, execution]);\n\n if (!executionPath.includes(graphNode.id)) {\n executionPath.push(graphNode.id);\n }\n }\n\n // Process awaitWebhook nodes - they wait for hook_received events\n const awaitWebhookNodes =\n primitivesByLabel.get(PRIMITIVE_LABELS.awaitWebhook) || [];\n\n // Track which hook correlations have been received\n const receivedHookCorrelations = new Set<string>();\n for (const event of events) {\n if (event.eventType === 'hook_received' && event.correlationId) {\n receivedHookCorrelations.add(event.correlationId);\n }\n }\n\n // Match awaitWebhook nodes with their corresponding hook events\n let awaitWebhookIndex = 0;\n for (const correlationId of sortedHookCorrelations) {\n const graphNode =\n awaitWebhookNodes.length === 1\n ? awaitWebhookNodes[0]\n : awaitWebhookNodes[awaitWebhookIndex];\n awaitWebhookIndex++;\n\n if (!graphNode) continue;\n\n const correlationEvents = eventsByCorrelation.get(correlationId) || [];\n const createdEvent = correlationEvents.find(\n (e) => e.eventType === 'hook_created'\n );\n const receivedEvent = correlationEvents.find(\n (e) => e.eventType === 'hook_received'\n );\n\n // Determine status based on whether hook was received\n let status: StepExecution['status'];\n let startedAt: string | undefined;\n let completedAt: string | undefined;\n let duration = 0;\n\n if (receivedEvent) {\n status = 'completed';\n startedAt = createdEvent\n ? new Date(createdEvent.createdAt).toISOString()\n : new Date(receivedEvent.createdAt).toISOString();\n completedAt = new Date(receivedEvent.createdAt).toISOString();\n duration =\n new Date(completedAt).getTime() - new Date(startedAt).getTime();\n } else if (createdEvent) {\n // Hook created but not yet received - running/waiting\n status = 'running';\n startedAt = new Date(createdEvent.createdAt).toISOString();\n } else {\n // No events yet - pending\n status = 'pending';\n }\n\n const execution: StepExecution = {\n nodeId: graphNode.id,\n attemptNumber: 1,\n status,\n startedAt,\n completedAt,\n duration,\n };\n\n const existing = nodeExecutions.get(graphNode.id) || [];\n nodeExecutions.set(graphNode.id, [...existing, execution]);\n\n if (!executionPath.includes(graphNode.id)) {\n executionPath.push(graphNode.id);\n }\n }\n\n return currentNode;\n}\n\n/**\n * Process agent and tool nodes - mark them as executed based on step executions\n * DurableAgent is marked as running/completed based on workflow status\n * Tool nodes are marked as executed when their corresponding step executes\n * Tools collection placeholders are marked based on agent status (since tools are dynamic)\n */\nfunction processAgentAndToolNodes(\n run: WorkflowRun,\n steps: Step[],\n agentNodes: GraphNode[],\n toolNodes: Map<string, GraphNode[]>,\n nodeExecutions: Map<string, StepExecution[]>,\n executionPath: string[],\n allNodes: GraphNode[]\n): void {\n // Determine agent status based on workflow status\n let agentStatus: StepExecution['status'] = 'pending';\n if (run.status === 'completed') {\n agentStatus = 'completed';\n } else if (run.status === 'failed') {\n agentStatus = 'failed';\n } else if (run.status === 'running') {\n agentStatus = 'running';\n }\n\n // Mark agent nodes as completed/running based on workflow status\n for (const agentNode of agentNodes) {\n const execution: StepExecution = {\n nodeId: agentNode.id,\n attemptNumber: 1,\n status: agentStatus,\n startedAt: run.startedAt\n ? new Date(run.startedAt).toISOString()\n : undefined,\n completedAt:\n run.completedAt &&\n (agentStatus === 'completed' || agentStatus === 'failed')\n ? new Date(run.completedAt).toISOString()\n : undefined,\n };\n\n nodeExecutions.set(agentNode.id, [execution]);\n\n if (!executionPath.includes(agentNode.id)) {\n executionPath.push(agentNode.id);\n }\n }\n\n // Map tool executions FIRST based on matching step names\n // Extract step function names and match to tool nodes\n for (const step of steps) {\n // Extract the function name from stepName (e.g., \"step//...//searchFlights\" -> \"searchFlights\")\n const functionName = extractFunctionName(step.stepName);\n if (!functionName) continue;\n\n // Check if this step matches any tool node\n const matchingToolNodes = toolNodes.get(functionName);\n if (!matchingToolNodes || matchingToolNodes.length === 0) continue;\n\n // Use the first matching tool node\n const toolNode = matchingToolNodes[0];\n\n // Map step status to execution status\n let status: StepExecution['status'];\n switch (step.status) {\n case 'completed':\n status = 'completed';\n break;\n case 'failed':\n status = 'failed';\n break;\n case 'running':\n status = 'running';\n break;\n case 'cancelled':\n status = 'cancelled';\n break;\n case 'pending':\n default:\n status = 'pending';\n break;\n }\n\n const duration =\n step.completedAt && step.startedAt\n ? new Date(step.completedAt).getTime() -\n new Date(step.startedAt).getTime()\n : undefined;\n\n const execution: StepExecution = {\n nodeId: toolNode.id,\n stepId: step.stepId,\n attemptNumber: step.attempt,\n status,\n startedAt: step.startedAt\n ? new Date(step.startedAt).toISOString()\n : undefined,\n completedAt: step.completedAt\n ? new Date(step.completedAt).toISOString()\n : undefined,\n duration,\n input: step.input,\n output: step.output,\n error: step.error,\n };\n\n // Append execution to existing or create new\n const existing = nodeExecutions.get(toolNode.id) || [];\n nodeExecutions.set(toolNode.id, [...existing, execution]);\n\n if (!executionPath.includes(toolNode.id)) {\n executionPath.push(toolNode.id);\n }\n }\n\n // After processing individual tool executions, mark any \"tools collection\" placeholder nodes\n // These are nodes representing unresolved imported tools objects (when we couldn't extract individual tools)\n // Individual tool nodes should only be marked if they were actually executed above\n for (const node of allNodes) {\n // Only mark tools collection placeholders, not individual tool nodes\n const isToolsCollection =\n (node.metadata as any)?.isToolsCollection === true;\n if (\n node.data.nodeKind === 'tool' &&\n isToolsCollection &&\n !nodeExecutions.has(node.id)\n ) {\n // This is a tools collection placeholder - mark based on agent status\n const execution: StepExecution = {\n nodeId: node.id,\n attemptNumber: 1,\n status: agentStatus,\n startedAt: run.startedAt\n ? new Date(run.startedAt).toISOString()\n : undefined,\n completedAt:\n run.completedAt &&\n (agentStatus === 'completed' || agentStatus === 'failed')\n ? new Date(run.completedAt).toISOString()\n : undefined,\n };\n\n nodeExecutions.set(node.id, [execution]);\n\n if (!executionPath.includes(node.id)) {\n executionPath.push(node.id);\n }\n }\n }\n}\n\n/**\n * Process conditional nodes - mark them as executed based on branch execution\n * If any node in a conditional branch was executed, the conditional node must have been evaluated\n */\nfunction processConditionalNodes(\n graph: WorkflowGraph,\n nodeExecutions: Map<string, StepExecution[]>,\n executionPath: string[],\n run: WorkflowRun\n): void {\n // Find all conditional nodes (decision points)\n const conditionalNodes = graph.nodes.filter(\n (n) => n.data.nodeKind === 'conditional'\n );\n\n // Group nodes by their conditionalId to find which branches were executed\n const nodesByConditionalId = new Map<\n string,\n { thenNodes: GraphNode[]; elseNodes: GraphNode[] }\n >();\n\n for (const node of graph.nodes) {\n const condId = node.metadata?.conditionalId;\n if (condId) {\n const group = nodesByConditionalId.get(condId) || {\n thenNodes: [],\n elseNodes: [],\n };\n if (node.metadata?.conditionalBranch === 'Then') {\n group.thenNodes.push(node);\n } else if (node.metadata?.conditionalBranch === 'Else') {\n group.elseNodes.push(node);\n }\n nodesByConditionalId.set(condId, group);\n }\n }\n\n // For each conditional node, check if any of its branch nodes were executed\n for (const condNode of conditionalNodes) {\n // Extract the conditionalId from the node id (e.g., \"cond_0_node\" -> \"cond_0\")\n const condIdMatch = condNode.id.match(/^(cond_\\d+)_node$/);\n if (!condIdMatch) continue;\n\n const condId = condIdMatch[1];\n const branches = nodesByConditionalId.get(condId);\n if (!branches) continue;\n\n // Check if any node in either branch was executed\n const thenExecuted = branches.thenNodes.some((n) =>\n nodeExecutions.has(n.id)\n );\n const elseExecuted = branches.elseNodes.some((n) =>\n nodeExecutions.has(n.id)\n );\n\n // If either branch was executed, mark the conditional node as executed\n if (thenExecuted || elseExecuted) {\n const allBranchNodes = [...branches.thenNodes, ...branches.elseNodes];\n\n if (!nodeExecutions.has(condNode.id)) {\n // Find the earliest execution time from the branch nodes\n let earliestTime: string | undefined;\n for (const branchNode of allBranchNodes) {\n const execs = nodeExecutions.get(branchNode.id);\n if (execs && execs.length > 0) {\n const firstExec = execs[0];\n if (\n firstExec.startedAt &&\n (!earliestTime || firstExec.startedAt < earliestTime)\n ) {\n earliestTime = firstExec.startedAt;\n }\n }\n }\n\n const fallbackTime = run.startedAt\n ? new Date(run.startedAt).toISOString()\n : undefined;\n const execution: StepExecution = {\n nodeId: condNode.id,\n attemptNumber: 1,\n status: 'completed',\n startedAt: earliestTime || fallbackTime,\n completedAt: earliestTime || fallbackTime,\n // No duration for control flow nodes (start/end/conditional)\n };\n\n nodeExecutions.set(condNode.id, [execution]);\n }\n\n if (!executionPath.includes(condNode.id)) {\n // Insert conditional node before its branch nodes in the execution path\n const branchIndices = allBranchNodes\n .map((n) => executionPath.indexOf(n.id))\n .filter((i) => i >= 0);\n if (branchIndices.length > 0) {\n const firstBranchIndex = Math.min(...branchIndices);\n if (\n firstBranchIndex >= 0 &&\n firstBranchIndex < executionPath.length\n ) {\n executionPath.splice(firstBranchIndex, 0, condNode.id);\n } else {\n executionPath.push(condNode.id);\n }\n } else {\n executionPath.push(condNode.id);\n }\n }\n }\n }\n}\n\n/**\n * Maps a workflow run and its steps/events to an execution overlay for the graph\n */\nexport function mapRunToExecution(\n run: WorkflowRun,\n steps: Step[],\n events: Event[],\n graph: WorkflowGraph\n): WorkflowRunExecution {\n const nodeExecutions = new Map<string, StepExecution[]>();\n const executionPath: string[] = [];\n let currentNode: string | undefined;\n\n console.log('[Graph Mapper] Mapping run to execution:', {\n runId: run.runId,\n workflowName: run.workflowName,\n graphNodes: graph.nodes.length,\n stepsCount: steps.length,\n });\n\n // Start node is always executed first\n initializeStartNode(run, graph, executionPath, nodeExecutions);\n\n // Map steps to graph nodes\n // Sort steps by createdAt to process in execution order\n const sortedSteps = [...steps].sort(\n (a, b) => new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime()\n );\n\n console.log(\n '[Graph Mapper] Sorted steps:',\n sortedSteps.map((s) => ({\n stepId: s.stepId,\n stepName: s.stepName,\n attempt: s.attempt,\n status: s.status,\n createdAt: s.createdAt,\n }))\n );\n\n // Build an index of graph nodes by normalized stepId, function name, and primitive label for quick lookup\n const {\n byStepId: nodesByStepId,\n byFunctionName: nodesByFunctionName,\n primitivesByLabel,\n agentNodes,\n toolNodes,\n } = buildNodeIndex(graph.nodes);\n\n console.log('[Graph Mapper] Graph nodes by stepId:', {\n allGraphNodes: graph.nodes.map((n) => ({\n id: n.id,\n stepId: n.data.stepId,\n normalizedStepId: n.data.stepId\n ? normalizeStepName(n.data.stepId)\n : undefined,\n nodeKind: n.data.nodeKind,\n })),\n nodesByStepId: Array.from(nodesByStepId.entries()).map(\n ([stepId, nodes]) => ({\n stepId,\n nodeIds: nodes.map((n) => n.id),\n })\n ),\n });\n\n // Track how many times we've seen each stepName to map to the correct occurrence\n const stepNameOccurrenceCount = new Map<string, number>();\n\n // Group consecutive retries: steps with the same stepId (unique per invocation) are retries\n let currentStepGroup: Step[] = [];\n let currentStepId: string | null = null;\n let currentStepName: string | null = null;\n\n for (let i = 0; i <= sortedSteps.length; i++) {\n const step = sortedSteps[i];\n\n // Start a new group if:\n // 1. Different stepId (each invocation has a unique stepId, retries share the same stepId)\n // 2. End of array\n const isNewInvocation = !step || step.stepId !== currentStepId;\n\n if (isNewInvocation) {\n // Process the previous group if it exists\n if (currentStepGroup.length > 0 && currentStepName) {\n const runningNode = processStepGroup(\n currentStepGroup,\n currentStepName,\n nodesByStepId,\n nodesByFunctionName,\n stepNameOccurrenceCount,\n nodeExecutions,\n executionPath\n );\n if (runningNode) {\n currentNode = runningNode;\n }\n }\n\n // Start a new group with current step (if not at end)\n if (step) {\n currentStepGroup = [step];\n currentStepId = step.stepId;\n currentStepName = step.stepName;\n }\n } else {\n // Add to current group (this is a retry: same stepId)\n currentStepGroup.push(step);\n }\n }\n\n // Process primitive events (sleep, createHook, createWebhook)\n const primitiveCurrentNode = processPrimitiveEvents(\n events,\n primitivesByLabel,\n nodeExecutions,\n executionPath\n );\n if (primitiveCurrentNode) {\n currentNode = primitiveCurrentNode;\n }\n\n // Process agent and tool nodes (DurableAgent and its tools)\n processAgentAndToolNodes(\n run,\n sortedSteps,\n agentNodes,\n toolNodes,\n nodeExecutions,\n executionPath,\n graph.nodes\n );\n\n // Process conditional nodes - mark them as executed if their branch nodes were executed\n processConditionalNodes(graph, nodeExecutions, executionPath, run);\n\n // Add end node based on workflow status\n addEndNodeExecution(run, graph, executionPath, nodeExecutions);\n\n // Calculate edge traversals based on execution path and node executions\n const edgeTraversals = calculateEdgeTraversals(\n executionPath,\n graph,\n nodeExecutions\n );\n\n const result: WorkflowRunExecution = {\n runId: run.runId,\n status: run.status,\n nodeExecutions,\n edgeTraversals,\n currentNode,\n executionPath,\n };\n\n console.log('[Graph Mapper] Mapping complete:', {\n executionPath,\n nodeExecutionsCount: nodeExecutions.size,\n nodeExecutions: Array.from(nodeExecutions.entries()).map(\n ([nodeId, execs]) => ({\n nodeId,\n executionCount: execs.length,\n latestStatus: execs[execs.length - 1]?.status,\n })\n ),\n });\n\n return result;\n}\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContext, createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { RemoveScroll } from 'react-remove-scroll';\nimport { hideOthers } from 'aria-hidden';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Dialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst DIALOG_NAME = 'Dialog';\n\ntype ScopedProps<P> = P & { __scopeDialog?: Scope };\nconst [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\n\ntype DialogContextValue = {\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n contentRef: React.RefObject<DialogContentElement | null>;\n contentId: string;\n titleId: string;\n descriptionId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal: boolean;\n};\n\nconst [DialogProvider, useDialogContext] = createDialogContext<DialogContextValue>(DIALOG_NAME);\n\ninterface DialogProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\n}\n\nconst Dialog: React.FC<DialogProps> = (props: ScopedProps<DialogProps>) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true,\n } = props;\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const contentRef = React.useRef<DialogContentElement>(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n return (\n <DialogProvider\n scope={__scopeDialog}\n triggerRef={triggerRef}\n contentRef={contentRef}\n contentId={useId()}\n titleId={useId()}\n descriptionId={useId()}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n modal={modal}\n >\n {children}\n </DialogProvider>\n );\n};\n\nDialog.displayName = DIALOG_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'DialogTrigger';\n\ntype DialogTriggerElement = React.ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface DialogTriggerProps extends PrimitiveButtonProps {}\n\nconst DialogTrigger = React.forwardRef<DialogTriggerElement, DialogTriggerProps>(\n (props: ScopedProps<DialogTriggerProps>, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return (\n <Primitive.button\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n }\n);\n\nDialogTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'DialogPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createDialogContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef<typeof PortalPrimitive>;\ninterface DialogPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogPortal: React.FC<DialogPortalProps> = (props: ScopedProps<DialogPortalProps>) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return (\n <PortalProvider scope={__scopeDialog} forceMount={forceMount}>\n {React.Children.map(children, (child) => (\n <Presence present={forceMount || context.open}>\n <PortalPrimitive asChild container={container}>\n {child}\n </PortalPrimitive>\n </Presence>\n ))}\n </PortalProvider>\n );\n};\n\nDialogPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogOverlay\n * -----------------------------------------------------------------------------------------------*/\n\nconst OVERLAY_NAME = 'DialogOverlay';\n\ntype DialogOverlayElement = DialogOverlayImplElement;\ninterface DialogOverlayProps extends DialogOverlayImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogOverlay = React.forwardRef<DialogOverlayElement, DialogOverlayProps>(\n (props: ScopedProps<DialogOverlayProps>, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? (\n <Presence present={forceMount || context.open}>\n <DialogOverlayImpl {...overlayProps} ref={forwardedRef} />\n </Presence>\n ) : null;\n }\n);\n\nDialogOverlay.displayName = OVERLAY_NAME;\n\ntype DialogOverlayImplElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface DialogOverlayImplProps extends PrimitiveDivProps {}\n\nconst DialogOverlayImpl = React.forwardRef<DialogOverlayImplElement, DialogOverlayImplProps>(\n (props: ScopedProps<DialogOverlayImplProps>, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n <RemoveScroll as={Slot} allowPinchZoom shards={[context.contentRef]}>\n <Primitive.div\n data-state={getState(context.open)}\n {...overlayProps}\n ref={forwardedRef}\n // We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.\n style={{ pointerEvents: 'auto', ...overlayProps.style }}\n />\n </RemoveScroll>\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * DialogContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'DialogContent';\n\ntype DialogContentElement = DialogContentTypeElement;\ninterface DialogContentProps extends DialogContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(\n (props: ScopedProps<DialogContentProps>, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return (\n <Presence present={forceMount || context.open}>\n {context.modal ? (\n <DialogContentModal {...contentProps} ref={forwardedRef} />\n ) : (\n <DialogContentNonModal {...contentProps} ref={forwardedRef} />\n )}\n </Presence>\n );\n }\n);\n\nDialogContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype DialogContentTypeElement = DialogContentImplElement;\ninterface DialogContentTypeProps\n extends Omit<DialogContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {}\n\nconst DialogContentModal = React.forwardRef<DialogContentTypeElement, DialogContentTypeProps>(\n (props: ScopedProps<DialogContentTypeProps>, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n <DialogContentImpl\n {...props}\n ref={composedRefs}\n // we make sure focus isn't trapped once `DialogContent` has been closed\n // (closed !== unmounted when animating out)\n trapFocus={context.open}\n disableOutsidePointerEvents\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n })}\n onPointerDownOutside={composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n // If the event is a right-click, we shouldn't close because\n // it is effectively as if we right-clicked the `Overlay`.\n if (isRightClick) event.preventDefault();\n })}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) =>\n event.preventDefault()\n )}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst DialogContentNonModal = React.forwardRef<DialogContentTypeElement, DialogContentTypeProps>(\n (props: ScopedProps<DialogContentTypeProps>, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n\n return (\n <DialogContentImpl\n {...props}\n ref={forwardedRef}\n trapFocus={false}\n disableOutsidePointerEvents={false}\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === 'pointerdown') {\n hasPointerDownOutsideRef.current = true;\n }\n }\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n const target = event.target as HTMLElement;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n\n // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n // we will get the pointer down outside event on the trigger, but then a subsequent\n // focus outside event on the container, we ignore any focus outside event when we've\n // already had a pointer down outside event.\n if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype DialogContentImplElement = React.ElementRef<typeof DismissableLayer>;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype FocusScopeProps = React.ComponentPropsWithoutRef<typeof FocusScope>;\ninterface DialogContentImplProps extends Omit<DismissableLayerProps, 'onDismiss'> {\n /**\n * When `true`, focus cannot escape the `Content` via keyboard,\n * pointer, or a programmatic focus.\n * @defaultValue false\n */\n trapFocus?: FocusScopeProps['trapped'];\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n}\n\nconst DialogContentImpl = React.forwardRef<DialogContentImplElement, DialogContentImplProps>(\n (props: ScopedProps<DialogContentImplProps>, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n\n // Make sure the whole tree has focus guards as our `Dialog` will be\n // the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n return (\n <>\n <FocusScope\n asChild\n loop\n trapped={trapFocus}\n onMountAutoFocus={onOpenAutoFocus}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n <DismissableLayer\n role=\"dialog\"\n id={context.contentId}\n aria-describedby={context.descriptionId}\n aria-labelledby={context.titleId}\n data-state={getState(context.open)}\n {...contentProps}\n ref={composedRefs}\n onDismiss={() => context.onOpenChange(false)}\n />\n </FocusScope>\n {process.env.NODE_ENV !== 'production' && (\n <>\n <TitleWarning titleId={context.titleId} />\n <DescriptionWarning contentRef={contentRef} descriptionId={context.descriptionId} />\n </>\n )}\n </>\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'DialogTitle';\n\ntype DialogTitleElement = React.ElementRef<typeof Primitive.h2>;\ntype PrimitiveHeading2Props = React.ComponentPropsWithoutRef<typeof Primitive.h2>;\ninterface DialogTitleProps extends PrimitiveHeading2Props {}\n\nconst DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>(\n (props: ScopedProps<DialogTitleProps>, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return <Primitive.h2 id={context.titleId} {...titleProps} ref={forwardedRef} />;\n }\n);\n\nDialogTitle.displayName = TITLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DESCRIPTION_NAME = 'DialogDescription';\n\ntype DialogDescriptionElement = React.ElementRef<typeof Primitive.p>;\ntype PrimitiveParagraphProps = React.ComponentPropsWithoutRef<typeof Primitive.p>;\ninterface DialogDescriptionProps extends PrimitiveParagraphProps {}\n\nconst DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>(\n (props: ScopedProps<DialogDescriptionProps>, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return <Primitive.p id={context.descriptionId} {...descriptionProps} ref={forwardedRef} />;\n }\n);\n\nDialogDescription.displayName = DESCRIPTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'DialogClose';\n\ntype DialogCloseElement = React.ElementRef<typeof Primitive.button>;\ninterface DialogCloseProps extends PrimitiveButtonProps {}\n\nconst DialogClose = React.forwardRef<DialogCloseElement, DialogCloseProps>(\n (props: ScopedProps<DialogCloseProps>, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return (\n <Primitive.button\n type=\"button\"\n {...closeProps}\n ref={forwardedRef}\n onClick={composeEventHandlers(props.onClick, () => context.onOpenChange(false))}\n />\n );\n }\n);\n\nDialogClose.displayName = CLOSE_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst TITLE_WARNING_NAME = 'DialogTitleWarning';\n\nconst [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: 'dialog',\n});\n\ntype TitleWarningProps = { titleId?: string };\n\nconst TitleWarning: React.FC<TitleWarningProps> = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n\n return null;\n};\n\nconst DESCRIPTION_WARNING_NAME = 'DialogDescriptionWarning';\n\ntype DescriptionWarningProps = {\n contentRef: React.RefObject<DialogContentElement | null>;\n descriptionId?: string;\n};\n\nconst DescriptionWarning: React.FC<DescriptionWarningProps> = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute('aria-describedby');\n // if we have an id and the user hasn't set aria-describedby={undefined}\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n\n return null;\n};\n\nconst Root = Dialog;\nconst Trigger = DialogTrigger;\nconst Portal = DialogPortal;\nconst Overlay = DialogOverlay;\nconst Content = DialogContent;\nconst Title = DialogTitle;\nconst Description = DialogDescription;\nconst Close = DialogClose;\n\nexport {\n createDialogScope,\n //\n Dialog,\n DialogTrigger,\n DialogPortal,\n DialogOverlay,\n DialogContent,\n DialogTitle,\n DialogDescription,\n DialogClose,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Title,\n Description,\n Close,\n //\n WarningProvider,\n};\nexport type {\n DialogProps,\n DialogTriggerProps,\n DialogPortalProps,\n DialogOverlayProps,\n DialogContentProps,\n DialogTitleProps,\n DialogDescriptionProps,\n DialogCloseProps,\n};\n"],"names":[],"mappings":"4CCqLM,MDvKF,gBQZJ,EAAA,CAAA,CAAA,QAAA,IAAA,EAAA,EAAA,CAAA,CAAA,QACA,EAAA,EAAA,CAAA,CAAA,QDDA,EAAA,EAAA,CAAA,CAAA,QACA,EAAA,EAAA,CAAA,CAAA,QAAA,EAAA,EAAA,CAAA,CAAA,QAAA,EAAA,EAAA,CAAA,CAAA,QAYA,EAAA,EAAA,CAAA,CAAA,QAAA,EAAA,EAAA,CAAA,CAAA,8BKFmB,ECPO,KAAA,EAAA,EDOU,CEAE,YFAY,CAAA,IGOmC,OHNtE,GAAA,aAAoB,EAAG,SAAW,QAAA,CAAU,CAAA,CAAA,SAC9C,EAAA,uCAA2C,CAAA,CAAA,CAAA,CAAK,AAAL,QAAK,CAAU,CAAA,CAAA,CACpE,OAAQ,CAAE,AAAF,AEAA,EFAK,aAAc,IAAA,UAAe,CAC5C,MCAsD,4BCH5C,CFAE,AEAF,EAAK,CAAa,AFAV,CAAA,AEAU,wBAAe,SACjC,CAAA,AFAA,4BEAiC,uCAEzC,QAAU,EAAA,eAAoB,UAAU,CAAA,CACxC,qBAAyB,IAAK,QAAA,EAAU,CAAA,CACxC,OAAQ,CAAA,AAAE,EAAA,UAAc,CAAA,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AAQ,CAAG,CAAA,EAAA,GAAA,eAAA,AAAe,IAC3B,CAAC,EAAO,CAAG,CAAA,EAAA,GAAA,cAAA,AAAc,IAEzB,EAAQ,EAAO,KAAK,CAG1B,MACE,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,aAAa,CAAA,CACZ,MAAM,mBACN,YAAY,oFAEZ,CAAA,EAAA,EAAA,GAAA,EAAC,GAAA,CAAc,OAAQ,EAAQ,MAAO,EAAO,WAP9B,CAO0C,EAPhC,GAAW,QAAU,KAUpD","ignoreList":[0,1,2,3,4,10,12,13,14,15,17]}
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/web/src/app/run/%5BrunId%5D/page.tsx","../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-dismissable-layer%401.1.4_%40types%2Breact-dom%4019.1.9_%40types%2Breact%4019.1.13__%40_8ae1d61ac10a80ba9d8ed6f21c6516b3/node_modules/%40radix-ui/react-dismissable-layer/dist/index.mjs","../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-focus-scope%401.1.1_%40types%2Breact-dom%4019.1.9_%40types%2Breact%4019.1.13__%40types%2B_34e3df0d2ea684cd35e69acd9743ae93/node_modules/%40radix-ui/react-focus-scope/dist/index.mjs","../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-portal%401.1.3_%40types%2Breact-dom%4019.1.9_%40types%2Breact%4019.1.13__%40types%2Breact_5fb27bb40c3888aea737cfd7dec4f395/node_modules/%40radix-ui/react-portal/dist/index.mjs","../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-dialog%401.1.5_%40types%2Breact-dom%4019.1.9_%40types%2Breact%4019.1.13__%40types%2Breact_330d237330866b501ee374be87c8c3c2/node_modules/%40radix-ui/react-dialog/dist/index.mjs","../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-alert-dialog%401.1.5_%40types%2Breact-dom%4019.1.9_%40types%2Breact%4019.1.13__%40types_81534ce1c0ac43993aad69431dd7630a/node_modules/%40radix-ui/react-alert-dialog/dist/index.mjs","../../../../../../packages/web/src/components/ui/alert-dialog.tsx","../../../../../../packages/web/src/components/flow-graph/workflow-graph-execution-viewer.tsx","../../../../../../packages/web/src/components/run-detail-view.tsx","../../../../../../packages/web/src/components/ui/breadcrumb.tsx","../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-primitive%402.0.1_%40types%2Breact-dom%4019.1.9_%40types%2Breact%4019.1.13__%40types%2Bre_5cfe77f395f2bc73c3bc3594ad29bd9b/node_modules/%40radix-ui/react-primitive/dist/index.mjs","../../../../../../packages/web/src/components/display-utils/live-status.tsx","../../../../../../node_modules/.pnpm/lucide-react%400.469.0_react%4019.1.0/node_modules/lucide-react/src/icons/circle-help.ts","../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-alert-dialog%401.1.5_%40types%2Breact-dom%4019.1.9_%40types%2Breact%4019.1.13__%40types_81534ce1c0ac43993aad69431dd7630a/node_modules/%40radix-ui/react-alert-dialog/src/AlertDialog.tsx","../../../../../../node_modules/.pnpm/lucide-react%400.469.0_react%4019.1.0/node_modules/lucide-react/src/icons/list.ts","../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-portal%401.1.3_%40types%2Breact-dom%4019.1.9_%40types%2Breact%4019.1.13__%40types%2Breact_5fb27bb40c3888aea737cfd7dec4f395/node_modules/%40radix-ui/react-portal/src/Portal.tsx","../../../../../../packages/web/src/lib/flow-graph/graph-execution-mapper.ts","../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-dialog%401.1.5_%40types%2Breact-dom%4019.1.9_%40types%2Breact%4019.1.13__%40types%2Breact_330d237330866b501ee374be87c8c3c2/node_modules/%40radix-ui/react-dialog/src/Dialog.tsx"],"sourcesContent":["'use client';\n\nimport { ErrorBoundary } from '@workflow/web-shared';\nimport { useParams } from 'next/navigation';\nimport { RunDetailView } from '@/components/run-detail-view';\nimport { useQueryParamConfig } from '@/lib/config';\nimport {\n useEventIdState,\n useHookIdState,\n useStepIdState,\n} from '@/lib/url-state';\n\nexport default function RunDetailPage() {\n const params = useParams();\n const config = useQueryParamConfig();\n const [stepId] = useStepIdState();\n const [eventId] = useEventIdState();\n const [hookId] = useHookIdState();\n\n const runId = params.runId as string;\n const selectedId = stepId || eventId || hookId || undefined;\n\n return (\n <ErrorBoundary\n title=\"Run Detail Error\"\n description=\"Failed to load run details. Please try navigating back to the home page.\"\n >\n <RunDetailView config={config} runId={runId} selectedId={selectedId} />\n </ErrorBoundary>\n );\n}\n","\"use client\";\n\n// packages/react/dismissable-layer/src/DismissableLayer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/focus-scope/src/FocusScope.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AUTOFOCUS_ON_MOUNT = \"focusScope.autoFocusOnMount\";\nvar AUTOFOCUS_ON_UNMOUNT = \"focusScope.autoFocusOnUnmount\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar FOCUS_SCOPE_NAME = \"FocusScope\";\nvar FocusScope = React.forwardRef((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n }\n }).current;\n React.useEffect(() => {\n if (trapped) {\n let handleFocusIn2 = function(event) {\n if (focusScope.paused || !container) return;\n const target = event.target;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleFocusOut2 = function(event) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget;\n if (relatedTarget === null) return;\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleMutations2 = function(mutations) {\n const focusedElement = document.activeElement;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n };\n var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;\n document.addEventListener(\"focusin\", handleFocusIn2);\n document.addEventListener(\"focusout\", handleFocusOut2);\n const mutationObserver = new MutationObserver(handleMutations2);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n return () => {\n document.removeEventListener(\"focusin\", handleFocusIn2);\n document.removeEventListener(\"focusout\", handleFocusOut2);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n const handleKeyDown = React.useCallback(\n (event) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === \"Tab\" && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container2 = event.currentTarget;\n const [first, last] = getTabbableEdges(container2);\n const hasTabbableElementsInside = first && last;\n if (!hasTabbableElementsInside) {\n if (focusedElement === container2) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });\n});\nFocusScope.displayName = FOCUS_SCOPE_NAME;\nfunction focusFirst(candidates, { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\nfunction getTabbableEdges(container) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction findVisible(elements, container) {\n for (const element of elements) {\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\nfunction isHidden(node, { upTo }) {\n if (getComputedStyle(node).visibility === \"hidden\") return true;\n while (node) {\n if (upTo !== void 0 && node === upTo) return false;\n if (getComputedStyle(node).display === \"none\") return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction isSelectableInput(element) {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\nfunction focus(element, { select = false } = {}) {\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n element.focus({ preventScroll: true });\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\nvar focusScopesStack = createFocusScopesStack();\nfunction createFocusScopesStack() {\n let stack = [];\n return {\n add(focusScope) {\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove(focusScope) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n }\n };\n}\nfunction arrayRemove(array, item) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\nfunction removeLinks(items) {\n return items.filter((item) => item.tagName !== \"A\");\n}\nvar Root = FocusScope;\nexport {\n FocusScope,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/portal/src/Portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/dialog/src/Dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/alert-dialog/src/AlertDialog.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { createDialogScope } from \"@radix-ui/react-dialog\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Slottable } from \"@radix-ui/react-slot\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar ROOT_NAME = \"AlertDialog\";\nvar [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope\n]);\nvar useDialogScope = createDialogScope();\nvar AlertDialog = (props) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });\n};\nAlertDialog.displayName = ROOT_NAME;\nvar TRIGGER_NAME = \"AlertDialogTrigger\";\nvar AlertDialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });\n }\n);\nAlertDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"AlertDialogPortal\";\nvar AlertDialogPortal = (props) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });\n};\nAlertDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"AlertDialogOverlay\";\nvar AlertDialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });\n }\n);\nAlertDialogOverlay.displayName = OVERLAY_NAME;\nvar CONTENT_NAME = \"AlertDialogContent\";\nvar [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);\nvar AlertDialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, children, ...contentProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const cancelRef = React.useRef(null);\n return /* @__PURE__ */ jsx(\n DialogPrimitive.WarningProvider,\n {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"alert-dialog\",\n children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(\n DialogPrimitive.Content,\n {\n role: \"alertdialog\",\n ...dialogScope,\n ...contentProps,\n ref: composedRefs,\n onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {\n event.preventDefault();\n cancelRef.current?.focus({ preventScroll: true });\n }),\n onPointerDownOutside: (event) => event.preventDefault(),\n onInteractOutside: (event) => event.preventDefault(),\n children: [\n /* @__PURE__ */ jsx(Slottable, { children }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })\n ]\n }\n ) })\n }\n );\n }\n);\nAlertDialogContent.displayName = CONTENT_NAME;\nvar TITLE_NAME = \"AlertDialogTitle\";\nvar AlertDialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...titleProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });\n }\n);\nAlertDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"AlertDialogDescription\";\nvar AlertDialogDescription = React.forwardRef((props, forwardedRef) => {\n const { __scopeAlertDialog, ...descriptionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });\n});\nAlertDialogDescription.displayName = DESCRIPTION_NAME;\nvar ACTION_NAME = \"AlertDialogAction\";\nvar AlertDialogAction = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...actionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });\n }\n);\nAlertDialogAction.displayName = ACTION_NAME;\nvar CANCEL_NAME = \"AlertDialogCancel\";\nvar AlertDialogCancel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...cancelProps } = props;\n const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const ref = useComposedRefs(forwardedRef, cancelRef);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });\n }\n);\nAlertDialogCancel.displayName = CANCEL_NAME;\nvar DescriptionWarning = ({ contentRef }) => {\n const MESSAGE = `\\`${CONTENT_NAME}\\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \\`${CONTENT_NAME}\\` by passing a \\`${DESCRIPTION_NAME}\\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \\`id\\` and passing the same value to the \\`aria-describedby\\` prop in \\`${CONTENT_NAME}\\`. If the description is confusing or duplicative for sighted users, you can use the \\`@radix-ui/react-visually-hidden\\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;\n React.useEffect(() => {\n const hasDescription = document.getElementById(\n contentRef.current?.getAttribute(\"aria-describedby\")\n );\n if (!hasDescription) console.warn(MESSAGE);\n }, [MESSAGE, contentRef]);\n return null;\n};\nvar Root2 = AlertDialog;\nvar Trigger2 = AlertDialogTrigger;\nvar Portal2 = AlertDialogPortal;\nvar Overlay2 = AlertDialogOverlay;\nvar Content2 = AlertDialogContent;\nvar Action = AlertDialogAction;\nvar Cancel = AlertDialogCancel;\nvar Title2 = AlertDialogTitle;\nvar Description2 = AlertDialogDescription;\nexport {\n Action,\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n Cancel,\n Content2 as Content,\n Description2 as Description,\n Overlay2 as Overlay,\n Portal2 as Portal,\n Root2 as Root,\n Title2 as Title,\n Trigger2 as Trigger,\n createAlertDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';\nimport type * as React from 'react';\nimport { buttonVariants } from '@/components/ui/button';\nimport { cn } from '@/lib/utils';\n\nfunction AlertDialog({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return (\n <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n );\n}\n\nfunction AlertDialogPortal({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return (\n <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />\n );\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogContent({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n );\n}\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn('flex flex-col gap-2 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn('text-lg font-semibold', className)}\n {...props}\n />\n );\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction AlertDialogAction({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {\n return (\n <AlertDialogPrimitive.Action\n className={cn(buttonVariants(), className)}\n {...props}\n />\n );\n}\n\nfunction AlertDialogCancel({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n return (\n <AlertDialogPrimitive.Cancel\n className={cn(buttonVariants({ variant: 'outline' }), className)}\n {...props}\n />\n );\n}\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n","'use client';\n\nimport {\n Background,\n Controls,\n type Edge,\n Handle,\n MarkerType,\n type Node,\n type NodeProps,\n Panel,\n Position,\n ReactFlow,\n useEdgesState,\n useNodesState,\n} from '@xyflow/react';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport '@xyflow/react/dist/style.css';\nimport { GitBranch, Loader2, X } from 'lucide-react';\nimport './workflow-graph-viewer.css';\nimport {\n type EnvMap,\n formatDuration,\n useWorkflowResourceData,\n} from '@workflow/web-shared';\nimport { StatusBadge } from '@/components/display-utils/status-badge';\nimport { Badge } from '@/components/ui/badge';\nimport type {\n GraphNode,\n StepExecution,\n WorkflowGraph,\n WorkflowRunExecution,\n} from '@/lib/flow-graph/workflow-graph-types';\nimport {\n type ConsolidatedEdge,\n calculateEnhancedLayout,\n consolidateEdges,\n createEdgeTypes,\n type DiamondNodeData,\n type EnhancedLayoutResult,\n executionSelfLoopStyle,\n // Utilities\n getNodeBackgroundColor,\n getNodeIcon,\n // Constants\n LAYOUT,\n // Types\n type LoopNodeData,\n // Components\n ParallelGroupComponent,\n type ParallelGroupData,\n} from './workflow-graph-viewer';\n\ninterface WorkflowGraphExecutionViewerProps {\n workflow: WorkflowGraph;\n execution?: WorkflowRunExecution;\n env?: EnvMap;\n onNodeClick?: (nodeId: string, executions: StepExecution[]) => void;\n}\n\ninterface SelectedNodeInfo {\n nodeId: string;\n node: GraphNode;\n executions: StepExecution[];\n stepId?: string;\n runId?: string;\n}\n\n// Map execution status to StatusBadge-compatible status\ntype StatusBadgeStatus =\n | 'pending'\n | 'running'\n | 'completed'\n | 'failed'\n | 'cancelled'\n | 'paused';\nfunction mapToStatusBadgeStatus(\n status: StepExecution['status']\n): StatusBadgeStatus {\n if (status === 'retrying') return 'running';\n return status as StatusBadgeStatus;\n}\n\n// Custom Loop Node component for execution viewer (uses shared LoopNodeData type)\nfunction ExecutionLoopNodeComponent({ data, selected }: NodeProps) {\n const nodeData = data as LoopNodeData;\n\n return (\n <div\n className={`relative ${nodeData.className || ''}`}\n style={{\n borderWidth: nodeData.nodeStyle?.borderWidth ?? 2,\n borderRadius: 8,\n padding: 12,\n width: 220,\n borderStyle: 'solid',\n backgroundColor: nodeData.nodeStyle?.backgroundColor,\n borderColor: nodeData.nodeStyle?.borderColor ?? '#9ca3af',\n opacity: nodeData.nodeStyle?.opacity,\n boxShadow: selected ? '0 0 0 2px rgba(168, 85, 247, 0.5)' : undefined,\n }}\n >\n {/* Node content */}\n {nodeData.label}\n\n {/* Main flow handles (top/bottom) */}\n <Handle\n type=\"target\"\n position={Position.Top}\n className=\"!bg-purple-500\"\n />\n <Handle\n type=\"source\"\n position={Position.Bottom}\n className=\"!bg-purple-500\"\n />\n\n {/* Left-side handles for self-loop edge */}\n <Handle\n type=\"source\"\n position={Position.Left}\n id=\"loop-out\"\n className=\"!bg-purple-500 !-left-1 !w-[6px] !h-[6px] !min-w-0 !min-h-0\"\n style={{ top: '30%' }}\n />\n <Handle\n type=\"target\"\n position={Position.Left}\n id=\"loop-in\"\n className=\"!bg-purple-500 !-left-1 !w-[6px] !h-[6px] !min-w-0 !min-h-0\"\n style={{ top: '70%' }}\n />\n </div>\n );\n}\n\n// Custom node component for all non-loop execution nodes\nfunction ExecutionNodeComponent({ data, selected }: NodeProps) {\n const nodeData = data as LoopNodeData; // Reuse LoopNodeData type since it has the same shape\n\n const isStart = nodeData.nodeKind === 'workflow_start';\n const isEnd = nodeData.nodeKind === 'workflow_end';\n\n return (\n <div\n className={`relative ${nodeData.className || ''}`}\n style={{\n borderWidth: nodeData.nodeStyle?.borderWidth ?? 2,\n borderRadius: 8,\n padding: 12,\n width: 220,\n borderStyle: 'solid',\n backgroundColor: nodeData.nodeStyle?.backgroundColor,\n borderColor: nodeData.nodeStyle?.borderColor ?? '#9ca3af',\n opacity: nodeData.nodeStyle?.opacity,\n boxShadow: selected ? '0 0 0 2px rgba(59, 130, 246, 0.35)' : undefined,\n }}\n >\n {nodeData.label}\n\n {/* Handles */}\n {!isStart && (\n <Handle type=\"target\" position={Position.Top} className=\"!bg-muted\" />\n )}\n {!isEnd && (\n <Handle\n type=\"source\"\n position={Position.Bottom}\n className=\"!bg-muted\"\n />\n )}\n </div>\n );\n}\n\n// Custom Diamond Node component for execution viewer conditional nodes\nfunction ExecutionDiamondNodeComponent({ data, selected }: NodeProps) {\n const nodeData = data as DiamondNodeData;\n\n // Diamond size\n const size = 160;\n\n return (\n <div\n className={`relative flex items-center justify-center ${nodeData.className || ''}`}\n style={{\n width: size,\n height: size,\n }}\n >\n {/* Diamond shape */}\n <div\n style={{\n width: size * 0.7,\n height: size * 0.7,\n transform: 'rotate(45deg)',\n borderWidth: 2,\n borderStyle: 'solid',\n borderRadius: 4,\n backgroundColor: nodeData.nodeStyle?.backgroundColor,\n borderColor: nodeData.nodeStyle?.borderColor ?? '#ef4444',\n opacity: nodeData.nodeStyle?.opacity,\n boxShadow: selected ? '0 0 0 2px rgba(239, 68, 68, 0.5)' : undefined,\n }}\n />\n {/* Label overlay (not rotated) */}\n <div\n className=\"absolute inset-0 flex items-center justify-center pointer-events-auto\"\n style={{\n fontSize: 11,\n fontWeight: 600,\n padding: size * 0.25, // Keep text within the diamond's inscribed area\n }}\n title={typeof nodeData.label === 'string' ? nodeData.label : undefined}\n >\n <span className=\"text-center line-clamp-3 overflow-hidden\">\n {nodeData.label}\n </span>\n </div>\n\n {/* Main flow handles (top/bottom) */}\n <Handle type=\"target\" position={Position.Top} className=\"!bg-red-500\" />\n <Handle\n type=\"source\"\n position={Position.Bottom}\n id=\"bottom\"\n className=\"!bg-red-500\"\n />\n {/* Additional handles for true/false branches */}\n <Handle\n type=\"source\"\n position={Position.Left}\n id=\"left\"\n className=\"!bg-red-500\"\n />\n <Handle\n type=\"source\"\n position={Position.Right}\n id=\"right\"\n className=\"!bg-red-500\"\n />\n </div>\n );\n}\n\n// Custom node components for execution viewer\nconst nodeTypes = {\n loopNode: ExecutionLoopNodeComponent,\n parallelGroup: ParallelGroupComponent, // Imported from shared\n executionNode: ExecutionNodeComponent,\n diamondNode: ExecutionDiamondNodeComponent,\n};\n\n// Custom edge types using purple styling for execution view\nconst edgeTypes = createEdgeTypes(executionSelfLoopStyle);\n\n// Get node styling based on node kind and execution status (border color indicates status)\nfunction getExecutionNodeStyle(nodeKind: string, executions?: StepExecution[]) {\n const backgroundColor = getNodeBackgroundColor(nodeKind);\n\n // If no execution data, show faded state with gray border\n if (!executions || executions.length === 0) {\n return {\n color: 'hsl(var(--card-foreground))',\n backgroundColor,\n borderColor: '#9ca3af', // gray-400\n opacity: 0.4,\n };\n }\n\n const latestExecution = executions[executions.length - 1];\n\n // Border color based on execution status\n let borderColor = '#9ca3af'; // gray-400 (default)\n let borderWidth = 2;\n\n switch (latestExecution.status) {\n case 'completed':\n borderColor = '#22c55e'; // green-500\n break;\n case 'failed':\n borderColor = '#ef4444'; // red-500\n borderWidth = 3;\n break;\n case 'running':\n borderColor = '#3b82f6'; // blue-500\n borderWidth = 2;\n break;\n case 'retrying':\n borderColor = '#f97316'; // orange-500\n break;\n case 'cancelled':\n borderColor = '#eab308'; // yellow-500\n break;\n case 'pending':\n borderColor = '#9ca3af'; // gray-400\n break;\n }\n\n return {\n color: 'hsl(var(--card-foreground))',\n backgroundColor,\n borderColor,\n borderWidth,\n };\n}\n\n// getNodeIcon is imported from workflow-graph-viewer\n\n// Enhanced node label with execution info\nfunction renderNodeLabel(\n nodeData: { label: string; nodeKind: string },\n _metadata?: {\n loopId?: string;\n loopIsAwait?: boolean;\n conditionalId?: string;\n conditionalBranch?: string;\n parallelGroupId?: string;\n parallelMethod?: string;\n },\n executions?: StepExecution[]\n) {\n const baseLabel = (\n <div className=\"flex items-start gap-2 w-full overflow-hidden\">\n <div className=\"flex-shrink-0\">\n {getNodeIcon(nodeData.nodeKind, nodeData.label)}\n </div>\n <span className=\"text-sm font-medium break-words whitespace-normal leading-tight flex-1 min-w-0\">\n {nodeData.label}\n </span>\n </div>\n );\n\n if (!executions || executions.length === 0) {\n return baseLabel;\n }\n\n const latestExecution = executions[executions.length - 1];\n const totalAttempts = executions.length;\n const hasRetries = totalAttempts > 1;\n\n // Only show metadata if there's something to show\n const hasMetadata =\n hasRetries || (latestExecution.duration && latestExecution.duration > 0);\n\n if (!hasMetadata) return baseLabel;\n\n return (\n <div className=\"flex flex-col gap-1.5 w-full\">\n {baseLabel}\n\n {/* Execution metadata - only show duration and retries */}\n <div className=\"flex flex-wrap gap-1 text-xs\">\n {/* Retry indicator */}\n {hasRetries && (\n <Badge\n variant=\"outline\"\n className=\"text-xs px-1.5 py-0 border-orange-500 text-orange-700 dark:text-orange-300\"\n >\n ↻ {totalAttempts}x\n </Badge>\n )}\n\n {/* Duration */}\n {latestExecution.duration && latestExecution.duration > 0 && (\n <Badge\n variant=\"secondary\"\n className=\"text-xs px-1.5 py-0 bg-black/10 dark:bg-white/15 border-0\"\n >\n ⏱ {formatDuration(latestExecution.duration, true)}\n </Badge>\n )}\n </div>\n </div>\n );\n}\n\n// LAYOUT and calculateEnhancedLayout are imported from workflow-graph-viewer\n// Execution viewer uses VERTICAL_SPACING: 320 instead of default 220\nconst EXECUTION_LAYOUT = {\n ...LAYOUT,\n VERTICAL_SPACING: 320,\n};\n\nfunction convertToReactFlowNodes(\n workflow: WorkflowGraph,\n execution?: WorkflowRunExecution\n): Node[] {\n const { nodes, groupNodes } = calculateEnhancedLayout(\n workflow,\n EXECUTION_LAYOUT\n );\n\n // Build a map of node id -> parent group id for parallel groups only\n const nodeToParent = new Map<string, string>();\n const groupPositions = new Map<string, { x: number; y: number }>();\n\n // Store group positions for relative position calculation (parallel groups only)\n for (const group of groupNodes) {\n if (group.id.startsWith('group_')) {\n groupPositions.set(group.id, group.position);\n }\n }\n\n // Determine parent for each node (parallel groups only, no loop groups)\n for (const node of nodes) {\n const parallelGroupId = node.metadata?.parallelGroupId\n ? `group_${node.metadata.parallelGroupId}`\n : null;\n\n if (parallelGroupId && groupPositions.has(parallelGroupId)) {\n nodeToParent.set(node.id, parallelGroupId);\n }\n }\n\n const reactFlowNodes: Node[] = [];\n\n // Add parallel groups only (no loop groups)\n const parallelGroups = groupNodes.filter((g) => g.id.startsWith('group_'));\n\n for (const group of parallelGroups) {\n reactFlowNodes.push({\n id: group.id,\n type: 'parallelGroup',\n position: group.position,\n style: {\n ...group.style,\n cursor: 'grab',\n zIndex: -1,\n },\n data: group.data,\n selectable: true,\n draggable: true,\n });\n }\n\n // Add regular nodes\n for (const node of nodes) {\n const executions = execution?.nodeExecutions.get(node.id);\n const styles = getExecutionNodeStyle(node.data.nodeKind, executions);\n const isCurrentNode = execution?.currentNode === node.id;\n const isLoopNode = !!node.metadata?.loopId;\n const isAwaitLoop = !!node.metadata?.loopIsAwait;\n const isConditionalNode = node.data.nodeKind === 'conditional';\n\n // Determine node type - custom components for consistent styling/animation\n const nodeType: 'loopNode' | 'executionNode' | 'diamondNode' =\n isConditionalNode\n ? 'diamondNode'\n : isLoopNode\n ? 'loopNode'\n : 'executionNode';\n\n // Determine parent group and calculate relative position\n const parentId = nodeToParent.get(node.id);\n let position = node.position;\n\n if (parentId) {\n const parentPos = groupPositions.get(parentId);\n if (parentPos) {\n // Convert to relative position within parent\n position = {\n x: node.position.x - parentPos.x,\n y: node.position.y - parentPos.y,\n };\n }\n }\n\n // Build className for current node highlight\n const nodeClassName = isCurrentNode ? 'animate-pulse-subtle' : '';\n\n // For loop nodes, pass style through data for custom component\n if (isLoopNode) {\n reactFlowNodes.push({\n id: node.id,\n type: nodeType,\n position,\n parentId: parentId,\n extent: parentId ? 'parent' : undefined,\n expandParent: true,\n data: {\n ...node.data,\n label: renderNodeLabel(node.data, node.metadata, executions),\n executions,\n isLoopNode: true,\n isAwaitLoop,\n nodeStyle: styles,\n className: nodeClassName,\n },\n });\n } else if (isConditionalNode) {\n // For conditional nodes (diamond shape), pass style through data\n reactFlowNodes.push({\n id: node.id,\n type: nodeType,\n position,\n parentId: parentId,\n extent: parentId ? 'parent' : undefined,\n expandParent: true,\n data: {\n ...node.data,\n label: node.data.label, // Show the conditional expression\n executions,\n nodeStyle: styles,\n className: nodeClassName,\n },\n });\n } else {\n reactFlowNodes.push({\n id: node.id,\n type: nodeType,\n position,\n parentId: parentId,\n extent: parentId ? 'parent' : undefined,\n expandParent: true,\n data: {\n ...node.data,\n label: renderNodeLabel(node.data, node.metadata, executions),\n executions,\n nodeStyle: styles,\n className: nodeClassName,\n },\n // Styling is handled by ExecutionNodeComponent (keeps running animation behind background)\n style: { width: 220 },\n });\n }\n }\n\n return reactFlowNodes;\n}\n\n// ConsolidatedEdge type and consolidateEdges are imported from workflow-graph-viewer\n\n// Convert edges with execution overlay\nfunction convertToReactFlowEdges(\n workflow: WorkflowGraph,\n execution?: WorkflowRunExecution\n): Edge[] {\n const { additionalEdges } = calculateEnhancedLayout(\n workflow,\n EXECUTION_LAYOUT\n );\n\n // Transform original loop edges into loop_back_ edges (they go from exit nodes back to entry nodes)\n // and keep all other edges as-is\n const transformedOriginalEdges = workflow.edges.map((e) => {\n if (e.type === 'loop') {\n return {\n ...e,\n id: `loop_back_${e.source}_${e.target}`,\n isOriginal: true,\n };\n }\n return { ...e, isOriginal: true };\n });\n\n // Combine original edges with additional self-loop edges\n const rawEdges = [\n ...transformedOriginalEdges,\n ...additionalEdges.map((e) => ({ ...e, isOriginal: false })),\n ];\n\n // Consolidate N×M edges between parallel groups into single edges\n const allEdges = consolidateEdges(rawEdges, workflow.nodes);\n\n return allEdges.map((edge) => {\n // Handle self-loop edges specially (they use custom edge type and handles)\n if (edge.type === 'selfLoop') {\n return {\n id: edge.id,\n source: edge.source,\n target: edge.target,\n sourceHandle: edge.sourceHandle,\n targetHandle: edge.targetHandle,\n type: 'selfLoop',\n label: edge.label,\n markerEnd: {\n type: MarkerType.ArrowClosed,\n width: 12,\n height: 12,\n color: '#a855f7',\n },\n };\n }\n\n // For consolidated edges, check traversals of original edges\n let traversal = execution?.edgeTraversals.get(edge.id);\n if (!traversal && edge.isConsolidated && edge.originalEdgeIds) {\n // Check if any of the original edges were traversed\n for (const originalId of edge.originalEdgeIds) {\n const originalTraversal = execution?.edgeTraversals.get(originalId);\n if (originalTraversal && originalTraversal.traversalCount > 0) {\n // Use the first traversed original edge's data\n traversal = originalTraversal;\n break;\n }\n }\n }\n const isTraversed = traversal && traversal.traversalCount > 0;\n const hasExecution = !!execution;\n\n // Calculate average timing if available\n const avgTiming = traversal?.timings.length\n ? traversal.timings.reduce((a, b) => a + b, 0) / traversal.timings.length\n : undefined;\n\n // Determine edge type based on control flow\n // Use bezier for main flow (cleaner curves), step for loops (clear back-flow)\n let edgeType: 'bezier' | 'smoothstep' | 'step' = 'bezier';\n let strokeDasharray: string | undefined;\n let cfgLabel: string | undefined = edge.label;\n\n // Track if this is a conditional edge for special label styling\n let isConditional = false;\n\n switch (edge.type) {\n case 'parallel':\n edgeType = 'smoothstep';\n strokeDasharray = '4,4';\n cfgLabel = undefined;\n break;\n case 'loop':\n edgeType = 'step';\n strokeDasharray = '8,4';\n break;\n case 'conditional':\n edgeType = 'smoothstep';\n strokeDasharray = '8,4';\n isConditional = true;\n // Keep the edge label (e.g., \"true\" or \"false\") for conditional edges\n break;\n default:\n edgeType = 'bezier';\n }\n\n // Simple color scheme: gray for non-executed, dark green for executed\n const baseStrokeColor = '#6b7280'; // gray-500\n const finalStrokeColor = isTraversed ? '#22c55e' : baseStrokeColor;\n const finalDasharray = isTraversed ? undefined : strokeDasharray;\n\n // Make non-traversed edges subtle when there's execution data\n const opacity = hasExecution && !isTraversed ? 0.35 : 1;\n const strokeWidth = isTraversed ? 2.5 : 1;\n\n // Label styling - conditional edges get dark bg with white text\n const labelTextColor = isConditional ? '#ffffff' : '#6b7280';\n const labelBgColor = isConditional ? '#374151' : '#f3f4f6'; // gray-700 : gray-100\n const labelBorderColor = isConditional ? '#4b5563' : '#d1d5db'; // gray-600 : gray-300\n\n return {\n id: edge.id,\n source: edge.source,\n target: edge.target,\n type: edgeType,\n animated: isTraversed && execution?.status === 'running',\n label:\n traversal && traversal.traversalCount > 1 ? (\n <div className=\"flex flex-col items-center gap-0.5\">\n <Badge variant=\"secondary\" className=\"text-xs px-1.5 py-0\">\n {traversal.traversalCount}×\n </Badge>\n {avgTiming && avgTiming > 0 && (\n <span className=\"text-[10px] text-muted-foreground\">\n ~{formatDuration(avgTiming, true)}\n </span>\n )}\n </div>\n ) : (\n cfgLabel\n ),\n labelStyle: {\n fill: labelTextColor,\n fontWeight: 500,\n fontSize: '11px',\n },\n labelBgStyle: {\n fill: labelBgColor,\n fillOpacity: 0.95,\n stroke: labelBorderColor,\n strokeWidth: 1,\n },\n labelBgPadding: [4, 6] as [number, number],\n labelBgBorderRadius: 4,\n markerEnd: {\n type: MarkerType.ArrowClosed,\n width: isTraversed ? 14 : 10,\n height: isTraversed ? 14 : 10,\n color: finalStrokeColor,\n },\n style: {\n strokeWidth,\n stroke: finalStrokeColor,\n opacity,\n strokeDasharray: finalDasharray,\n },\n };\n });\n}\n\n// Node Detail Panel Component\nfunction GraphNodeDetailPanel({\n selectedNode,\n env,\n onClose,\n}: {\n selectedNode: SelectedNodeInfo;\n env?: EnvMap;\n onClose: () => void;\n}) {\n const { node, executions, stepId, runId } = selectedNode;\n const latestExecution = executions[executions.length - 1];\n const hasMultipleAttempts = executions.length > 1;\n\n // Fetch full step data with resolved input/output\n const { data: stepData, loading: stepLoading } = useWorkflowResourceData(\n env ?? {},\n 'step',\n stepId ?? '',\n { runId }\n );\n\n // Use fetched data for input/output if available, fallback to execution data\n const resolvedInput = (stepData as any)?.input ?? latestExecution?.input;\n const resolvedOutput = (stepData as any)?.output ?? latestExecution?.output;\n const resolvedError = (stepData as any)?.error ?? latestExecution?.error;\n\n return (\n <div className=\"h-full flex flex-col bg-background border-l\">\n {/* Header - similar to trace view */}\n <div className=\"flex items-center justify-between gap-2 px-3 py-2 border-b flex-none\">\n <span\n className=\"text-xs font-medium truncate flex-1\"\n title={node.data.label}\n >\n {node.data.label}\n </span>\n <div className=\"flex items-center gap-2 flex-none\">\n {latestExecution?.duration !== undefined &&\n latestExecution.duration > 0 && (\n <span className=\"text-[10px] font-mono text-muted-foreground bg-muted px-1.5 py-0.5 rounded\">\n {formatDuration(latestExecution.duration)}\n </span>\n )}\n <div className=\"w-px h-4 bg-border\" />\n <button\n type=\"button\"\n onClick={onClose}\n className=\"p-1 rounded hover:bg-muted transition-colors\"\n aria-label=\"Close panel\"\n >\n <X className=\"h-4 w-4 text-muted-foreground\" />\n </button>\n </div>\n </div>\n\n {/* Content - scrollable */}\n <div className=\"flex-1 overflow-y-auto p-3 min-h-0\">\n {/* Basic attributes in bordered container */}\n <div className=\"flex flex-col divide-y rounded-lg border overflow-hidden mb-3\">\n <div className=\"flex items-center justify-between px-2.5 py-1.5\">\n <span className=\"text-[11px] font-medium text-muted-foreground\">\n type\n </span>\n <span className=\"text-[11px] font-mono\">{node.data.nodeKind}</span>\n </div>\n {latestExecution && (\n <>\n <div className=\"flex items-center justify-between px-2.5 py-1.5\">\n <span className=\"text-[11px] font-medium text-muted-foreground\">\n status\n </span>\n <StatusBadge\n status={mapToStatusBadgeStatus(latestExecution.status)}\n />\n </div>\n {latestExecution.duration !== undefined &&\n latestExecution.duration > 0 && (\n <div className=\"flex items-center justify-between px-2.5 py-1.5\">\n <span className=\"text-[11px] font-medium text-muted-foreground\">\n duration\n </span>\n <span className=\"text-[11px] font-mono\">\n {formatDuration(latestExecution.duration)}\n </span>\n </div>\n )}\n {hasMultipleAttempts && (\n <div className=\"flex items-center justify-between px-2.5 py-1.5\">\n <span className=\"text-[11px] font-medium text-muted-foreground\">\n attempts\n </span>\n <span className=\"text-[11px] font-mono\">\n {executions.length}\n </span>\n </div>\n )}\n {latestExecution.startedAt && (\n <div className=\"flex items-center justify-between px-2.5 py-1.5\">\n <span className=\"text-[11px] font-medium text-muted-foreground\">\n startedAt\n </span>\n <span className=\"text-[11px] font-mono\">\n {new Date(latestExecution.startedAt).toLocaleString()}\n </span>\n </div>\n )}\n {latestExecution.completedAt && (\n <div className=\"flex items-center justify-between px-2.5 py-1.5\">\n <span className=\"text-[11px] font-medium text-muted-foreground\">\n completedAt\n </span>\n <span className=\"text-[11px] font-mono\">\n {new Date(latestExecution.completedAt).toLocaleString()}\n </span>\n </div>\n )}\n </>\n )}\n </div>\n\n {/* Loading indicator for resolved data */}\n {stepLoading && stepId && (\n <div className=\"flex items-center gap-2 text-xs text-muted-foreground mb-3\">\n <Loader2 className=\"h-3 w-3 animate-spin\" />\n <span>Loading step data...</span>\n </div>\n )}\n\n {/* Input section */}\n {resolvedInput !== undefined && (\n <details className=\"group mb-3\">\n <summary className=\"cursor-pointer rounded-md border px-2.5 py-1.5 text-xs hover:brightness-95 bg-muted/50\">\n <span className=\"font-medium\">Input</span>\n <span className=\"text-muted-foreground ml-1\">\n ({Array.isArray(resolvedInput) ? resolvedInput.length : 1} args)\n </span>\n </summary>\n <div className=\"relative pl-6 mt-3\">\n <div className=\"absolute left-3 -top-3 w-px h-3 bg-border\" />\n <div className=\"absolute left-3 top-0 w-3 h-3 border-l border-b rounded-bl-lg border-border\" />\n <pre className=\"text-[11px] overflow-x-auto rounded-md border p-2.5 bg-muted/30 max-h-64 overflow-y-auto\">\n <code>{JSON.stringify(resolvedInput, null, 2)}</code>\n </pre>\n </div>\n </details>\n )}\n\n {/* Output section */}\n {resolvedOutput !== undefined && (\n <details className=\"group mb-3\">\n <summary className=\"cursor-pointer rounded-md border px-2.5 py-1.5 text-xs hover:brightness-95 bg-muted/50\">\n <span className=\"font-medium\">Output</span>\n </summary>\n <div className=\"relative pl-6 mt-3\">\n <div className=\"absolute left-3 -top-3 w-px h-3 bg-border\" />\n <div className=\"absolute left-3 top-0 w-3 h-3 border-l border-b rounded-bl-lg border-border\" />\n <pre className=\"text-[11px] overflow-x-auto rounded-md border p-2.5 bg-muted/30 max-h-64 overflow-y-auto\">\n <code>{JSON.stringify(resolvedOutput, null, 2)}</code>\n </pre>\n </div>\n </details>\n )}\n\n {/* Error section */}\n {resolvedError && (\n <details className=\"group mb-3\" open>\n <summary className=\"cursor-pointer rounded-md border border-red-300 bg-red-50 dark:bg-red-950/20 px-2.5 py-1.5 text-xs hover:brightness-95\">\n <span className=\"font-medium text-red-600 dark:text-red-400\">\n Error\n </span>\n </summary>\n <div className=\"relative pl-6 mt-3\">\n <div className=\"absolute left-3 -top-3 w-px h-3 bg-red-300\" />\n <div className=\"absolute left-3 top-0 w-3 h-3 border-l border-b rounded-bl-lg border-red-300\" />\n <pre className=\"text-[11px] overflow-x-auto rounded-md border border-red-200 p-2.5 bg-red-50 dark:bg-red-950/20 text-red-700 dark:text-red-300 whitespace-pre-wrap max-h-64 overflow-y-auto\">\n <code>\n {typeof resolvedError === 'object'\n ? JSON.stringify(resolvedError, null, 2)\n : String(resolvedError)}\n </code>\n </pre>\n </div>\n </details>\n )}\n\n {/* Attempt history for retries */}\n {hasMultipleAttempts && (\n <details className=\"group\">\n <summary className=\"cursor-pointer rounded-md border px-2.5 py-1.5 text-xs hover:brightness-95 bg-muted/50\">\n <span className=\"font-medium\">Attempt History</span>\n <span className=\"text-muted-foreground ml-1\">\n ({executions.length} attempts)\n </span>\n </summary>\n <div className=\"relative pl-6 mt-3\">\n <div className=\"absolute left-3 -top-3 w-px h-3 bg-border\" />\n <div className=\"absolute left-3 top-0 w-3 h-3 border-l border-b rounded-bl-lg border-border\" />\n <div className=\"flex flex-col divide-y rounded-md border overflow-hidden\">\n {executions.map((exec) => (\n <div\n key={exec.attemptNumber}\n className=\"flex items-center justify-between px-2.5 py-1.5 text-[11px]\"\n >\n <span className=\"text-muted-foreground\">\n Attempt {exec.attemptNumber}\n </span>\n <div className=\"flex items-center gap-2\">\n <StatusBadge\n status={mapToStatusBadgeStatus(exec.status)}\n />\n {exec.duration !== undefined && exec.duration > 0 && (\n <span className=\"font-mono text-muted-foreground\">\n {formatDuration(exec.duration)}\n </span>\n )}\n </div>\n </div>\n ))}\n </div>\n </div>\n </details>\n )}\n </div>\n </div>\n );\n}\n\nexport function WorkflowGraphExecutionViewer({\n workflow,\n execution,\n env,\n onNodeClick,\n}: WorkflowGraphExecutionViewerProps) {\n const [selectedNode, setSelectedNode] = useState<SelectedNodeInfo | null>(\n null\n );\n const panelWidth = 320;\n\n const initialNodes = useMemo(\n () => convertToReactFlowNodes(workflow, execution),\n [workflow, execution]\n );\n const initialEdges = useMemo(\n () => convertToReactFlowEdges(workflow, execution),\n [workflow, execution]\n );\n\n const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes);\n const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges);\n\n // Update nodes and edges when workflow or execution changes\n // Preserve user-dragged positions by merging with current node positions\n useEffect(() => {\n setNodes((currentNodes) => {\n const newNodes = convertToReactFlowNodes(workflow, execution);\n // Create a map of current positions (user may have dragged nodes)\n const currentPositions = new Map(\n currentNodes.map((n) => [n.id, n.position])\n );\n // Merge new node data with existing positions\n return newNodes.map((node) => ({\n ...node,\n position: currentPositions.get(node.id) ?? node.position,\n }));\n });\n setEdges(convertToReactFlowEdges(workflow, execution));\n }, [workflow, execution, setNodes, setEdges]);\n\n const handleNodeClick = useCallback(\n (_event: React.MouseEvent, node: Node) => {\n const graphNode = workflow.nodes.find((n) => n.id === node.id);\n if (graphNode) {\n const executions = (node.data.executions as StepExecution[]) || [];\n const latestExecution = executions[executions.length - 1];\n setSelectedNode({\n nodeId: node.id,\n node: graphNode,\n executions,\n stepId: latestExecution?.stepId,\n runId: execution?.runId,\n });\n // Also call the external handler if provided\n if (onNodeClick && executions.length > 0) {\n onNodeClick(node.id, executions);\n }\n }\n },\n [workflow.nodes, execution?.runId, onNodeClick]\n );\n\n const handleClosePanel = useCallback(() => {\n setSelectedNode(null);\n }, []);\n\n return (\n <div className=\"h-full w-full border rounded-lg bg-background relative overflow-hidden flex\">\n {/* Graph canvas */}\n <div\n className=\"h-full flex-1 min-w-0\"\n style={{\n width: selectedNode ? `calc(100% - ${panelWidth}px)` : '100%',\n }}\n >\n <ReactFlow\n nodes={nodes}\n edges={edges}\n onNodesChange={onNodesChange}\n onEdgesChange={onEdgesChange}\n onNodeClick={handleNodeClick}\n nodeTypes={nodeTypes}\n edgeTypes={edgeTypes}\n fitView\n minZoom={0.1}\n maxZoom={2}\n defaultViewport={{ x: 0, y: 0, zoom: 1 }}\n proOptions={{ hideAttribution: true }}\n >\n <Background />\n <Controls />\n\n {/* Legend with border status colors */}\n <Panel\n position=\"top-left\"\n className=\"bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 border rounded-lg p-2 text-xs\"\n >\n <div className=\"space-y-1.5\">\n <div className=\"font-semibold text-[10px] text-muted-foreground mb-1\">\n Status\n </div>\n <div className=\"flex items-center gap-2\">\n <div className=\"w-6 h-4 rounded border-2 border-green-500 bg-background\" />\n <span>Completed</span>\n </div>\n <div className=\"flex items-center gap-2\">\n <div className=\"w-6 h-4 rounded border-2 border-red-500 bg-background\" />\n <span>Failed</span>\n </div>\n <div className=\"flex items-center gap-2\">\n <div className=\"w-6 h-4 rounded border-2 border-blue-500 bg-background\" />\n <span>Running</span>\n </div>\n <div className=\"flex items-center gap-2\">\n <div className=\"w-6 h-4 rounded border-2 border-yellow-500 bg-background\" />\n <span>Cancelled</span>\n </div>\n <div className=\"flex items-center gap-2 opacity-50\">\n <div className=\"w-6 h-4 rounded border-2 border-gray-400 bg-background\" />\n <span>Pending</span>\n </div>\n </div>\n </Panel>\n\n {/* Execution summary panel */}\n {execution && (\n <Panel\n position=\"top-right\"\n className=\"bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 border rounded-lg p-3 text-xs space-y-1.5\"\n >\n <div className=\"font-semibold text-sm\">Execution</div>\n <div className=\"flex items-center gap-2\">\n <span className=\"text-muted-foreground\">Status:</span>\n <Badge\n variant={\n execution.status === 'completed'\n ? 'default'\n : execution.status === 'failed'\n ? 'destructive'\n : execution.status === 'cancelled'\n ? 'outline'\n : 'secondary'\n }\n className=\"text-xs\"\n >\n {execution.status}\n </Badge>\n </div>\n <div className=\"flex items-center gap-2\">\n <span className=\"text-muted-foreground\">Progress:</span>\n <span className=\"font-mono\">\n {execution.executionPath.length} / {workflow.nodes.length}\n </span>\n </div>\n </Panel>\n )}\n </ReactFlow>\n </div>\n\n {/* Detail panel */}\n {selectedNode && (\n <div className=\"h-full flex-none\" style={{ width: panelWidth }}>\n <GraphNodeDetailPanel\n selectedNode={selectedNode}\n env={env}\n onClose={handleClosePanel}\n />\n </div>\n )}\n </div>\n );\n}\n","'use client';\n\nimport { parseWorkflowName } from '@workflow/core/parse-name';\nimport {\n cancelRun,\n ErrorBoundary,\n type Event,\n recreateRun,\n type Step,\n StreamViewer,\n useWorkflowStreams,\n useWorkflowTraceViewerData,\n type WorkflowRun,\n WorkflowTraceViewer,\n} from '@workflow/web-shared';\nimport type { EnvMap } from '@workflow/web-shared/server';\nimport {\n AlertCircle,\n GitBranch,\n HelpCircle,\n List,\n Loader2,\n} from 'lucide-react';\nimport Link from 'next/link';\nimport { useRouter, useSearchParams } from 'next/navigation';\nimport { useCallback, useMemo, useState } from 'react';\nimport { toast } from 'sonner';\nimport { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from '@/components/ui/alert-dialog';\nimport {\n Breadcrumb,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbList,\n BreadcrumbPage,\n BreadcrumbSeparator,\n} from '@/components/ui/breadcrumb';\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from '@/components/ui/tooltip';\nimport { buildUrlWithConfig, worldConfigToEnvMap } from '@/lib/config';\nimport type { WorldConfig } from '@/lib/config-world';\nimport { mapRunToExecution } from '@/lib/flow-graph/graph-execution-mapper';\nimport { useWorkflowGraphManifest } from '@/lib/flow-graph/use-workflow-graph';\n\nimport { CopyableText } from './display-utils/copyable-text';\nimport { LiveStatus } from './display-utils/live-status';\nimport { RelativeTime } from './display-utils/relative-time';\nimport { StatusBadge } from './display-utils/status-badge';\nimport { WorkflowGraphExecutionViewer } from './flow-graph/workflow-graph-execution-viewer';\nimport { RunActionsButtons } from './run-actions';\nimport { Skeleton } from './ui/skeleton';\n\n/**\n * Graph tab content component that fetches the manifest internally\n * This ensures the manifest is only fetched when the Graph tab is mounted\n */\nfunction GraphTabContent({\n config,\n run,\n allSteps,\n allEvents,\n env,\n}: {\n config: WorldConfig;\n run: WorkflowRun;\n allSteps: Step[] | null;\n allEvents: Event[] | null;\n env: EnvMap;\n}) {\n // Fetch workflow graph manifest only when this tab is mounted\n const {\n manifest: graphManifest,\n loading: graphLoading,\n error: graphError,\n } = useWorkflowGraphManifest(config);\n\n // Find the workflow graph for this run\n const workflowGraph = useMemo(() => {\n if (!graphManifest || !run.workflowName) return null;\n return graphManifest.workflows[run.workflowName] ?? null;\n }, [graphManifest, run.workflowName]);\n\n // Map run data to execution overlay\n const execution = useMemo(() => {\n if (!workflowGraph || !run.runId) return null;\n\n return mapRunToExecution(\n run,\n allSteps || [],\n allEvents || [],\n workflowGraph\n );\n }, [workflowGraph, run, allSteps, allEvents]);\n\n if (graphLoading) {\n return (\n <div className=\"flex items-center justify-center w-full h-full\">\n <Loader2 className=\"h-8 w-8 animate-spin text-muted-foreground\" />\n <span className=\"ml-4 text-muted-foreground\">\n Loading workflow graph...\n </span>\n </div>\n );\n }\n\n if (graphError) {\n return (\n <div className=\"flex items-center justify-center w-full h-full p-4\">\n <Alert variant=\"destructive\" className=\"max-w-lg\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertTitle>Error Loading Workflow Graph</AlertTitle>\n <AlertDescription>{graphError.message}</AlertDescription>\n </Alert>\n </div>\n );\n }\n\n if (!workflowGraph) {\n return (\n <div className=\"flex items-center justify-center w-full h-full\">\n <Alert className=\"max-w-lg\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertTitle>Workflow Graph Not Found</AlertTitle>\n <AlertDescription>\n Could not find the workflow graph for this run. The workflow may\n have been deleted or the graph manifest may need to be regenerated.\n </AlertDescription>\n </Alert>\n </div>\n );\n }\n\n return (\n <WorkflowGraphExecutionViewer\n workflow={workflowGraph}\n execution={execution || undefined}\n env={env}\n />\n );\n}\n\ninterface RunDetailViewProps {\n config: WorldConfig;\n runId: string;\n selectedId?: string;\n}\n\nexport function RunDetailView({\n config,\n runId,\n // TODO: This should open the right sidebar within the trace viewer\n selectedId: _selectedId,\n}: RunDetailViewProps) {\n const router = useRouter();\n const searchParams = useSearchParams();\n const [cancelling, setCancelling] = useState(false);\n const [rerunning, setRerunning] = useState(false);\n const [showCancelDialog, setShowCancelDialog] = useState(false);\n const [showRerunDialog, setShowRerunDialog] = useState(false);\n const env = useMemo(() => worldConfigToEnvMap(config), [config]);\n\n // Read tab and streamId from URL search params\n const activeTab =\n (searchParams.get('tab') as 'trace' | 'graph' | 'streams') || 'trace';\n const selectedStreamId = searchParams.get('streamId');\n const showDebugActions = searchParams.get('debug') === '1';\n\n // Helper to update URL search params\n const updateSearchParams = useCallback(\n (updates: Record<string, string | null>) => {\n const params = new URLSearchParams(searchParams.toString());\n for (const [key, value] of Object.entries(updates)) {\n if (value === null) {\n params.delete(key);\n } else {\n params.set(key, value);\n }\n }\n router.push(`?${params.toString()}`, { scroll: false });\n },\n [router, searchParams]\n );\n\n const setActiveTab = useCallback(\n (tab: 'trace' | 'graph' | 'streams') => {\n // When switching to trace or graph tab, clear streamId\n if (tab === 'trace' || tab === 'graph') {\n updateSearchParams({ tab, streamId: null });\n } else {\n updateSearchParams({ tab });\n }\n },\n [updateSearchParams]\n );\n\n const setSelectedStreamId = useCallback(\n (streamId: string | null) => {\n updateSearchParams({ streamId });\n },\n [updateSearchParams]\n );\n\n // Handler for clicking on stream refs in the trace viewer\n const handleStreamClick = useCallback(\n (streamId: string) => {\n updateSearchParams({ tab: 'streams', streamId });\n },\n [updateSearchParams]\n );\n\n // Only show graph tab for local backend\n const isLocalBackend = config.backend === 'local';\n\n // Fetch all run data with live updates\n const {\n run: runData,\n steps: allSteps,\n hooks: allHooks,\n events: allEvents,\n loading,\n auxiliaryDataLoading,\n error,\n update,\n } = useWorkflowTraceViewerData(env, runId, { live: true });\n const run = runData ?? ({} as WorkflowRun);\n\n // Fetch streams for this run\n const {\n streams,\n loading: streamsLoading,\n error: streamsError,\n } = useWorkflowStreams(env, runId);\n\n const handleCancelClick = () => {\n setShowCancelDialog(true);\n };\n\n const handleConfirmCancel = async () => {\n if (cancelling) return;\n\n try {\n setCancelling(true);\n setShowCancelDialog(false);\n await cancelRun(env, runId);\n // Trigger a refresh of the data\n await update();\n toast.success('Run cancelled successfully');\n } catch (err) {\n console.error('Failed to cancel run:', err);\n toast.error('Failed to cancel run', {\n description:\n err instanceof Error ? err.message : 'An unknown error occurred',\n });\n } finally {\n setCancelling(false);\n }\n };\n\n const handleRerunClick = () => {\n setShowRerunDialog(true);\n };\n\n const handleConfirmRerun = async () => {\n if (rerunning) return;\n\n try {\n setRerunning(true);\n setShowRerunDialog(false);\n // Start a new run with the same workflow and input arguments\n const newRunId = await recreateRun(env, run.runId);\n toast.success('New run started successfully', {\n description: `Run ID: ${newRunId}`,\n });\n // Navigate to the new run\n router.push(buildUrlWithConfig(`/run/${newRunId}`, config));\n } catch (err) {\n console.error('Failed to re-run workflow:', err);\n toast.error('Failed to start new run', {\n description:\n err instanceof Error ? err.message : 'An unknown error occurred',\n });\n } finally {\n setRerunning(false);\n setShowRerunDialog(false);\n }\n };\n\n if (error && !runData) {\n return (\n <Alert variant=\"destructive\" className=\"m-4\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertTitle>Error loading workflow run</AlertTitle>\n <AlertDescription>{error.message}</AlertDescription>\n </Alert>\n );\n }\n\n const workflowName = parseWorkflowName(run.workflowName)?.shortName;\n\n // At this point, we've already returned if there was an error\n // So hasError is always false here\n const hasError = false;\n const errorMessage = '';\n\n return (\n <>\n {/* Cancel Confirmation Dialog */}\n <AlertDialog open={showCancelDialog} onOpenChange={setShowCancelDialog}>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Cancel Workflow Run?</AlertDialogTitle>\n <AlertDialogDescription>\n This will stop the workflow execution immediately, and no further\n steps will be executed. Partial workflow execution may occur. Are\n you sure you want to cancel the run?\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Keep Running</AlertDialogCancel>\n <AlertDialogAction\n onClick={handleConfirmCancel}\n className=\"bg-destructive text-destructive-foreground hover:bg-destructive/90\"\n >\n Cancel Run\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n\n {/* Replay Run Confirmation Dialog */}\n <AlertDialog open={showRerunDialog} onOpenChange={setShowRerunDialog}>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Replay Run?</AlertDialogTitle>\n <AlertDialogDescription>\n This can potentially re-run code that is meant to only execute\n once. Are you sure you want to replay the workflow run?\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Cancel</AlertDialogCancel>\n <AlertDialogAction onClick={handleConfirmRerun}>\n Replay Run\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n\n <div className=\"flex flex-col h-[calc(100vh-97px)]\">\n <div className=\"flex-none space-y-4\">\n <Breadcrumb>\n <BreadcrumbList>\n <BreadcrumbItem>\n <BreadcrumbLink asChild>\n <Link href={buildUrlWithConfig('/', config)}>Runs</Link>\n </BreadcrumbLink>\n </BreadcrumbItem>\n <BreadcrumbSeparator />\n <BreadcrumbItem>\n <BreadcrumbPage className=\"font-mono text-xs\">\n {runId}\n </BreadcrumbPage>\n </BreadcrumbItem>\n </BreadcrumbList>\n </Breadcrumb>\n\n {/* Run Overview Header */}\n <div className=\"space-y-4 p-6 border rounded-lg\">\n {/* Title Row */}\n <div className=\"flex items-start justify-between\">\n <div className=\"mb-4\">\n <h1 className=\"text-xl font-semibold\">\n {workflowName ? (\n workflowName\n ) : (\n <Skeleton className=\"w-[260px] h-[28px]\" />\n )}\n </h1>\n </div>\n\n <div className=\"flex items-center justify-between gap-2\">\n {/* Right side controls */}\n <LiveStatus hasError={hasError} errorMessage={errorMessage} />\n <RunActionsButtons\n env={env}\n runId={runId}\n runStatus={run.status}\n events={allEvents}\n eventsLoading={auxiliaryDataLoading}\n loading={loading}\n onRerunClick={handleRerunClick}\n onCancelClick={handleCancelClick}\n callbacks={{ onSuccess: update }}\n showDebugActions={showDebugActions}\n />\n </div>\n </div>\n\n {/* Status and Timeline Row */}\n <div className=\"flex items-start gap-8\">\n <div className=\"flex flex-col gap-1\">\n <div className=\"text-xs text-muted-foreground\">Status</div>\n {run.status ? (\n <StatusBadge status={run.status} context={run} />\n ) : (\n <Skeleton className=\"w-[55px] h-[24px]\" />\n )}\n </div>\n <div className=\"flex flex-col gap-1\">\n <div className=\"text-xs text-muted-foreground\">Duration</div>\n <div className=\"text-xs\">\n {run.runId ? (\n run.startedAt ? (\n (() => {\n const ms =\n (run.completedAt\n ? new Date(run.completedAt).getTime()\n : Date.now()) - new Date(run.startedAt).getTime();\n const seconds = Math.floor(ms / 1000);\n if (seconds < 60) return `${seconds}s`;\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = seconds % 60;\n if (minutes < 60) {\n return remainingSeconds > 0\n ? `${minutes}m ${remainingSeconds}s`\n : `${minutes}m`;\n }\n const hours = Math.floor(minutes / 60);\n const remainingMinutes = minutes % 60;\n return remainingMinutes > 0\n ? `${hours}h ${remainingMinutes}m`\n : `${hours}h`;\n })()\n ) : (\n '-'\n )\n ) : (\n <Skeleton className=\"w-[60px] h-[20px]\" />\n )}\n </div>\n </div>\n <div className=\"flex flex-col gap-1\">\n <div className=\"text-xs text-muted-foreground\">Run ID</div>\n {run.runId ? (\n <CopyableText text={run.runId}>\n <div className=\"text-xs mt-0.5 font-mono\">{run.runId}</div>\n </CopyableText>\n ) : (\n <Skeleton className=\"w-[280px] h-[20px]\" />\n )}\n </div>\n <div className=\"flex flex-col gap-1\">\n <div className=\"text-xs text-muted-foreground\">Queued</div>\n {run.createdAt ? (\n <div className=\"text-xs\">\n <RelativeTime date={run.createdAt} />\n </div>\n ) : (\n <Skeleton className=\"w-[110px] h-[20px]\" />\n )}\n </div>\n <div className=\"flex flex-col gap-1\">\n <div className=\"text-xs text-muted-foreground\">Started</div>\n <div className=\"text-xs\">\n {run.runId ? (\n run.startedAt ? (\n <RelativeTime date={run.startedAt} />\n ) : (\n '-'\n )\n ) : (\n <Skeleton className=\"w-[110px] h-[20px]\" />\n )}\n </div>\n </div>\n <div className=\"flex flex-col gap-1\">\n <div className=\"text-xs text-muted-foreground\">Completed</div>\n <div className=\"text-xs\">\n {run.runId ? (\n run.completedAt ? (\n <RelativeTime date={run.completedAt} />\n ) : (\n '-'\n )\n ) : (\n <Skeleton className=\"w-[110px] h-[20px]\" />\n )}\n </div>\n </div>\n {run.expiredAt != null && (\n <div className=\"flex flex-col gap-1\">\n <Tooltip>\n <TooltipTrigger asChild>\n <div className=\"text-xs text-muted-foreground cursor-help flex items-center gap-1\">\n Expired\n <HelpCircle className=\"w-3 h-3\" />\n </div>\n </TooltipTrigger>\n <TooltipContent>\n <p>\n The storage data for this run has expired and is no\n longer available.\n </p>\n </TooltipContent>\n </Tooltip>\n <div className=\"text-xs\">\n <RelativeTime date={run.expiredAt} />\n </div>\n </div>\n )}\n </div>\n </div>\n </div>\n\n <div className=\"mt-4 flex-1 flex flex-col min-h-0\">\n <Tabs\n value={activeTab}\n onValueChange={(v) =>\n setActiveTab(v as 'trace' | 'graph' | 'streams')\n }\n className=\"flex-1 flex flex-col min-h-0\"\n >\n <TabsList className=\"mb-4 flex-none\">\n <TabsTrigger value=\"trace\" className=\"gap-2\">\n <List className=\"h-4 w-4\" />\n Trace\n </TabsTrigger>\n {isLocalBackend && (\n <TabsTrigger value=\"graph\" className=\"gap-2\">\n <GitBranch className=\"h-4 w-4\" />\n Graph\n </TabsTrigger>\n )}\n <TabsTrigger value=\"streams\" className=\"gap-2\">\n <List className=\"h-4 w-4\" />\n Streams\n </TabsTrigger>\n </TabsList>\n\n <TabsContent value=\"trace\" className=\"mt-0 flex-1 min-h-0\">\n <ErrorBoundary\n title=\"Trace Viewer Error\"\n description=\"Failed to load trace viewer. Please try refreshing the page.\"\n >\n <div className=\"h-full\">\n <WorkflowTraceViewer\n error={error}\n steps={allSteps}\n events={allEvents}\n hooks={allHooks}\n env={env}\n run={run}\n isLoading={loading}\n onStreamClick={handleStreamClick}\n />\n </div>\n </ErrorBoundary>\n </TabsContent>\n\n <TabsContent value=\"streams\" className=\"mt-0 flex-1 min-h-0\">\n <ErrorBoundary\n title=\"Streams Error\"\n description=\"Failed to load streams. Please try refreshing the page.\"\n >\n <div className=\"h-full flex gap-4\">\n {/* Stream list sidebar */}\n <div\n className=\"w-64 flex-shrink-0 border rounded-lg overflow-hidden\"\n style={{\n borderColor: 'var(--ds-gray-300)',\n backgroundColor: 'var(--ds-background-100)',\n }}\n >\n <div\n className=\"px-3 py-2 border-b text-xs font-medium\"\n style={{\n borderColor: 'var(--ds-gray-300)',\n color: 'var(--ds-gray-900)',\n }}\n >\n Streams ({streams.length})\n </div>\n <div className=\"overflow-auto max-h-[calc(100vh-400px)]\">\n {streamsLoading ? (\n <div className=\"p-4 flex items-center justify-center\">\n <Loader2 className=\"h-4 w-4 animate-spin text-muted-foreground\" />\n </div>\n ) : streamsError ? (\n <div className=\"p-4 text-xs text-destructive\">\n {streamsError.message}\n </div>\n ) : streams.length === 0 ? (\n <div\n className=\"p-4 text-xs\"\n style={{ color: 'var(--ds-gray-600)' }}\n >\n No streams found for this run\n </div>\n ) : (\n streams.map((streamId) => (\n <button\n key={streamId}\n type=\"button\"\n onClick={() => setSelectedStreamId(streamId)}\n className=\"w-full text-left px-3 py-2 text-xs font-mono truncate hover:bg-accent transition-colors\"\n style={{\n backgroundColor:\n selectedStreamId === streamId\n ? 'var(--ds-gray-200)'\n : 'transparent',\n color: 'var(--ds-gray-1000)',\n }}\n title={streamId}\n >\n {streamId}\n </button>\n ))\n )}\n </div>\n </div>\n\n {/* Stream viewer */}\n <div className=\"flex-1 min-w-0\">\n {selectedStreamId ? (\n <StreamViewer env={env} streamId={selectedStreamId} />\n ) : (\n <div\n className=\"h-full flex items-center justify-center rounded-lg border\"\n style={{\n borderColor: 'var(--ds-gray-300)',\n backgroundColor: 'var(--ds-gray-100)',\n }}\n >\n <div\n className=\"text-sm\"\n style={{ color: 'var(--ds-gray-600)' }}\n >\n {streams.length > 0\n ? 'Select a stream to view its data'\n : 'No streams available'}\n </div>\n </div>\n )}\n </div>\n </div>\n </ErrorBoundary>\n </TabsContent>\n\n {isLocalBackend && (\n <TabsContent value=\"graph\" className=\"mt-0 flex-1 min-h-0\">\n <ErrorBoundary\n title=\"Graph Viewer Error\"\n description=\"Failed to load execution graph. Please try refreshing the page.\"\n >\n <div className=\"h-full min-h-[500px]\">\n <GraphTabContent\n config={config}\n run={run}\n allSteps={allSteps}\n allEvents={allEvents}\n env={env}\n />\n </div>\n </ErrorBoundary>\n </TabsContent>\n )}\n </Tabs>\n\n {auxiliaryDataLoading && (\n <div className=\"fixed flex items-center gap-2 left-8 bottom-8 bg-background border rounded-md px-4 py-2 shadow-lg\">\n <Loader2 className=\"size-4 animate-spin\" />\n <span className=\"text-sm\">Fetching data...</span>\n </div>\n )}\n </div>\n </div>\n </>\n );\n}\n","import { Slot } from '@radix-ui/react-slot';\nimport { ChevronRight, MoreHorizontal } from 'lucide-react';\nimport type * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Breadcrumb({ ...props }: React.ComponentProps<'nav'>) {\n return <nav aria-label=\"breadcrumb\" data-slot=\"breadcrumb\" {...props} />;\n}\n\nfunction BreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>) {\n return (\n <ol\n data-slot=\"breadcrumb-list\"\n className={cn(\n 'text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction BreadcrumbItem({ className, ...props }: React.ComponentProps<'li'>) {\n return (\n <li\n data-slot=\"breadcrumb-item\"\n className={cn('inline-flex items-center gap-1.5', className)}\n {...props}\n />\n );\n}\n\nfunction BreadcrumbLink({\n asChild,\n className,\n ...props\n}: React.ComponentProps<'a'> & {\n asChild?: boolean;\n}) {\n const Comp = asChild ? Slot : 'a';\n\n return (\n <Comp\n data-slot=\"breadcrumb-link\"\n className={cn('hover:text-foreground transition-colors', className)}\n {...props}\n />\n );\n}\n\nfunction BreadcrumbPage({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n // biome-ignore lint/a11y/useFocusableInteractive: <explanation>\n // biome-ignore lint/a11y/useSemanticElements: <explanation>\n <span\n data-slot=\"breadcrumb-page\"\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn('text-foreground font-normal', className)}\n {...props}\n />\n );\n}\n\nfunction BreadcrumbSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<'li'>) {\n return (\n <li\n data-slot=\"breadcrumb-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn('[&>svg]:size-3.5', className)}\n {...props}\n >\n {children ?? <ChevronRight />}\n </li>\n );\n}\n\nfunction BreadcrumbEllipsis({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"breadcrumb-ellipsis\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn('flex size-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontal className=\"size-4\" />\n <span className=\"sr-only\">More</span>\n </span>\n );\n}\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n};\n","// packages/react/primitive/src/Primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","import { LIVE_UPDATE_INTERVAL_MS } from '@/lib/utils';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '../ui/tooltip';\n\ninterface LiveStatusProps {\n hasError: boolean;\n errorMessage: string;\n}\n\nexport function LiveStatus({ hasError, errorMessage }: LiveStatusProps) {\n return (\n <div className=\"flex items-center gap-2\">\n <Tooltip>\n <TooltipTrigger asChild>\n <div className=\"flex items-center gap-1.5\">\n <div\n className={`w-2 h-2 rounded-full ${\n hasError ? 'bg-red-500' : 'bg-green-500 animate-pulse'\n }`}\n />\n <span\n className={`text-xs $\n hasError\n ? 'text-red-600 dark:text-red-400'\n : 'text-muted-foreground'`}\n >\n {hasError ? 'Error' : 'Live'}\n </span>\n </div>\n </TooltipTrigger>\n <TooltipContent>\n <p>\n {hasError\n ? `Error updating data: ${errorMessage}`\n : `Content updates every ${LIVE_UPDATE_INTERVAL_MS / 1000} seconds`}\n </p>\n </TooltipContent>\n </Tooltip>\n </div>\n );\n}\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CircleHelp\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/circle-help\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CircleHelp = createLucideIcon('CircleHelp', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3', key: '1u773s' }],\n ['path', { d: 'M12 17h.01', key: 'p32p05' }],\n]);\n\nexport default CircleHelp;\n","import * as React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { createDialogScope } from '@radix-ui/react-dialog';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { Slottable } from '@radix-ui/react-slot';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst ROOT_NAME = 'AlertDialog';\n\ntype ScopedProps<P> = P & { __scopeAlertDialog?: Scope };\nconst [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope,\n]);\nconst useDialogScope = createDialogScope();\n\ntype DialogProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;\ninterface AlertDialogProps extends Omit<DialogProps, 'modal'> {}\n\nconst AlertDialog: React.FC<AlertDialogProps> = (props: ScopedProps<AlertDialogProps>) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Root {...dialogScope} {...alertDialogProps} modal={true} />;\n};\n\nAlertDialog.displayName = ROOT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogTrigger\n * -----------------------------------------------------------------------------------------------*/\nconst TRIGGER_NAME = 'AlertDialogTrigger';\n\ntype AlertDialogTriggerElement = React.ElementRef<typeof DialogPrimitive.Trigger>;\ntype DialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;\ninterface AlertDialogTriggerProps extends DialogTriggerProps {}\n\nconst AlertDialogTrigger = React.forwardRef<AlertDialogTriggerElement, AlertDialogTriggerProps>(\n (props: ScopedProps<AlertDialogTriggerProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Trigger {...dialogScope} {...triggerProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'AlertDialogPortal';\n\ntype DialogPortalProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>;\ninterface AlertDialogPortalProps extends DialogPortalProps {}\n\nconst AlertDialogPortal: React.FC<AlertDialogPortalProps> = (\n props: ScopedProps<AlertDialogPortalProps>\n) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Portal {...dialogScope} {...portalProps} />;\n};\n\nAlertDialogPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogOverlay\n * -----------------------------------------------------------------------------------------------*/\n\nconst OVERLAY_NAME = 'AlertDialogOverlay';\n\ntype AlertDialogOverlayElement = React.ElementRef<typeof DialogPrimitive.Overlay>;\ntype DialogOverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;\ninterface AlertDialogOverlayProps extends DialogOverlayProps {}\n\nconst AlertDialogOverlay = React.forwardRef<AlertDialogOverlayElement, AlertDialogOverlayProps>(\n (props: ScopedProps<AlertDialogOverlayProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Overlay {...dialogScope} {...overlayProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogOverlay.displayName = OVERLAY_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'AlertDialogContent';\n\ntype AlertDialogContentContextValue = {\n cancelRef: React.MutableRefObject<AlertDialogCancelElement | null>;\n};\n\nconst [AlertDialogContentProvider, useAlertDialogContentContext] =\n createAlertDialogContext<AlertDialogContentContextValue>(CONTENT_NAME);\n\ntype AlertDialogContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ntype DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;\ninterface AlertDialogContentProps\n extends Omit<DialogContentProps, 'onPointerDownOutside' | 'onInteractOutside'> {}\n\nconst AlertDialogContent = React.forwardRef<AlertDialogContentElement, AlertDialogContentProps>(\n (props: ScopedProps<AlertDialogContentProps>, forwardedRef) => {\n const { __scopeAlertDialog, children, ...contentProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const contentRef = React.useRef<AlertDialogContentElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const cancelRef = React.useRef<AlertDialogCancelElement | null>(null);\n\n return (\n <DialogPrimitive.WarningProvider\n contentName={CONTENT_NAME}\n titleName={TITLE_NAME}\n docsSlug=\"alert-dialog\"\n >\n <AlertDialogContentProvider scope={__scopeAlertDialog} cancelRef={cancelRef}>\n <DialogPrimitive.Content\n role=\"alertdialog\"\n {...dialogScope}\n {...contentProps}\n ref={composedRefs}\n onOpenAutoFocus={composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {\n event.preventDefault();\n cancelRef.current?.focus({ preventScroll: true });\n })}\n onPointerDownOutside={(event) => event.preventDefault()}\n onInteractOutside={(event) => event.preventDefault()}\n >\n {/**\n * We have to use `Slottable` here as we cannot wrap the `AlertDialogContentProvider`\n * around everything, otherwise the `DescriptionWarning` would be rendered straight away.\n * This is because we want the accessibility checks to run only once the content is actually\n * open and that behaviour is already encapsulated in `DialogContent`.\n */}\n <Slottable>{children}</Slottable>\n {process.env.NODE_ENV === 'development' && (\n <DescriptionWarning contentRef={contentRef} />\n )}\n </DialogPrimitive.Content>\n </AlertDialogContentProvider>\n </DialogPrimitive.WarningProvider>\n );\n }\n);\n\nAlertDialogContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'AlertDialogTitle';\n\ntype AlertDialogTitleElement = React.ElementRef<typeof DialogPrimitive.Title>;\ntype DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;\ninterface AlertDialogTitleProps extends DialogTitleProps {}\n\nconst AlertDialogTitle = React.forwardRef<AlertDialogTitleElement, AlertDialogTitleProps>(\n (props: ScopedProps<AlertDialogTitleProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...titleProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Title {...dialogScope} {...titleProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogTitle.displayName = TITLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DESCRIPTION_NAME = 'AlertDialogDescription';\n\ntype AlertDialogDescriptionElement = React.ElementRef<typeof DialogPrimitive.Description>;\ntype DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;\ninterface AlertDialogDescriptionProps extends DialogDescriptionProps {}\n\nconst AlertDialogDescription = React.forwardRef<\n AlertDialogDescriptionElement,\n AlertDialogDescriptionProps\n>((props: ScopedProps<AlertDialogDescriptionProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...descriptionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Description {...dialogScope} {...descriptionProps} ref={forwardedRef} />;\n});\n\nAlertDialogDescription.displayName = DESCRIPTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogAction\n * -----------------------------------------------------------------------------------------------*/\n\nconst ACTION_NAME = 'AlertDialogAction';\n\ntype AlertDialogActionElement = React.ElementRef<typeof DialogPrimitive.Close>;\ntype DialogCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;\ninterface AlertDialogActionProps extends DialogCloseProps {}\n\nconst AlertDialogAction = React.forwardRef<AlertDialogActionElement, AlertDialogActionProps>(\n (props: ScopedProps<AlertDialogActionProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...actionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Close {...dialogScope} {...actionProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogAction.displayName = ACTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogCancel\n * -----------------------------------------------------------------------------------------------*/\n\nconst CANCEL_NAME = 'AlertDialogCancel';\n\ntype AlertDialogCancelElement = React.ElementRef<typeof DialogPrimitive.Close>;\ninterface AlertDialogCancelProps extends DialogCloseProps {}\n\nconst AlertDialogCancel = React.forwardRef<AlertDialogCancelElement, AlertDialogCancelProps>(\n (props: ScopedProps<AlertDialogCancelProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...cancelProps } = props;\n const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const ref = useComposedRefs(forwardedRef, cancelRef);\n return <DialogPrimitive.Close {...dialogScope} {...cancelProps} ref={ref} />;\n }\n);\n\nAlertDialogCancel.displayName = CANCEL_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype DescriptionWarningProps = {\n contentRef: React.RefObject<AlertDialogContentElement | null>;\n};\n\nconst DescriptionWarning: React.FC<DescriptionWarningProps> = ({ contentRef }) => {\n const MESSAGE = `\\`${CONTENT_NAME}\\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \\`${CONTENT_NAME}\\` by passing a \\`${DESCRIPTION_NAME}\\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \\`id\\` and passing the same value to the \\`aria-describedby\\` prop in \\`${CONTENT_NAME}\\`. If the description is confusing or duplicative for sighted users, you can use the \\`@radix-ui/react-visually-hidden\\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;\n\n React.useEffect(() => {\n const hasDescription = document.getElementById(\n contentRef.current?.getAttribute('aria-describedby')!\n );\n if (!hasDescription) console.warn(MESSAGE);\n }, [MESSAGE, contentRef]);\n\n return null;\n};\n\nconst Root = AlertDialog;\nconst Trigger = AlertDialogTrigger;\nconst Portal = AlertDialogPortal;\nconst Overlay = AlertDialogOverlay;\nconst Content = AlertDialogContent;\nconst Action = AlertDialogAction;\nconst Cancel = AlertDialogCancel;\nconst Title = AlertDialogTitle;\nconst Description = AlertDialogDescription;\n\nexport {\n createAlertDialogScope,\n //\n AlertDialog,\n AlertDialogTrigger,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogContent,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogTitle,\n AlertDialogDescription,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Action,\n Cancel,\n Title,\n Description,\n};\nexport type {\n AlertDialogProps,\n AlertDialogTriggerProps,\n AlertDialogPortalProps,\n AlertDialogOverlayProps,\n AlertDialogContentProps,\n AlertDialogActionProps,\n AlertDialogCancelProps,\n AlertDialogTitleProps,\n AlertDialogDescriptionProps,\n};\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name List\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/list\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst List = createLucideIcon('List', [\n ['path', { d: 'M3 12h.01', key: 'nlz23k' }],\n ['path', { d: 'M3 18h.01', key: '1tta3j' }],\n ['path', { d: 'M3 6h.01', key: '1rqtza' }],\n ['path', { d: 'M8 12h13', key: '1za7za' }],\n ['path', { d: 'M8 18h13', key: '1lx6n3' }],\n ['path', { d: 'M8 6h13', key: 'ik3vkj' }],\n]);\n\nexport default List;\n","import * as React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\n\n/* -------------------------------------------------------------------------------------------------\n * Portal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'Portal';\n\ntype PortalElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface PortalProps extends PrimitiveDivProps {\n /**\n * An optional container where the portaled content should be appended.\n */\n container?: Element | DocumentFragment | null;\n}\n\nconst Portal = React.forwardRef<PortalElement, PortalProps>((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || (mounted && globalThis?.document?.body);\n return container\n ? ReactDOM.createPortal(<Primitive.div {...portalProps} ref={forwardedRef} />, container)\n : null;\n});\n\nPortal.displayName = PORTAL_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Portal;\n\nexport {\n Portal,\n //\n Root,\n};\nexport type { PortalProps };\n","/**\n * Utilities to map workflow run data to graph execution overlays\n */\n\nimport type { Event, Step, WorkflowRun } from '@workflow/web-shared';\nimport type {\n EdgeTraversal,\n GraphNode,\n StepExecution,\n WorkflowGraph,\n WorkflowRunExecution,\n} from './workflow-graph-types';\n\n/**\n * Primitive node labels that correspond to event types\n */\nconst PRIMITIVE_LABELS = {\n sleep: 'sleep',\n createHook: 'createHook',\n createWebhook: 'createWebhook',\n awaitWebhook: 'awaitWebhook',\n} as const;\n\n/**\n * Normalize step/workflow names by removing path traversal patterns\n * Graph has: \"step//../example/workflows/1_simple.ts//add\"\n * Runtime has: \"step//example/workflows/1_simple.ts//add\"\n */\nfunction normalizeStepName(name: string): string {\n // Remove //../ patterns (path traversal)\n return name.replace(/\\/\\/\\.\\.\\//g, '//');\n}\n\n/**\n * Create execution data for a single step attempt\n * Handles all step statuses: pending, running, completed, failed, cancelled\n */\nfunction createStepExecution(\n attemptStep: Step,\n graphNodeId: string,\n idx: number,\n totalAttempts: number\n): StepExecution {\n // Map step status to execution status\n let status: StepExecution['status'];\n switch (attemptStep.status) {\n case 'completed':\n status = 'completed';\n break;\n case 'failed':\n // If this is not the last attempt, it's a retry\n status = idx < totalAttempts - 1 ? 'retrying' : 'failed';\n break;\n case 'running':\n status = 'running';\n break;\n case 'cancelled':\n status = 'cancelled';\n break;\n case 'pending':\n default:\n status = 'pending';\n break;\n }\n\n const duration =\n attemptStep.completedAt && attemptStep.startedAt\n ? new Date(attemptStep.completedAt).getTime() -\n new Date(attemptStep.startedAt).getTime()\n : undefined;\n\n return {\n nodeId: graphNodeId,\n stepId: attemptStep.stepId,\n attemptNumber: attemptStep.attempt,\n status,\n startedAt: attemptStep.startedAt\n ? new Date(attemptStep.startedAt).toISOString()\n : undefined,\n completedAt: attemptStep.completedAt\n ? new Date(attemptStep.completedAt).toISOString()\n : undefined,\n duration,\n input: attemptStep.input,\n output: attemptStep.output,\n error: attemptStep.error\n ? {\n message: attemptStep.error.message,\n stack: attemptStep.error.stack || '',\n }\n : undefined,\n };\n}\n\n/**\n * Extract function name from a step ID\n * \"step//workflows/steps/post-slack-message.ts//postSlackMessage\" -> \"postSlackMessage\"\n */\nfunction extractFunctionName(stepId: string): string | null {\n const parts = stepId.split('//');\n return parts.length >= 3 ? parts[parts.length - 1] : null;\n}\n\n/**\n * Build index of graph nodes by normalized stepId and by function name\n */\nfunction buildNodeIndex(nodes: GraphNode[]): {\n byStepId: Map<string, GraphNode[]>;\n byFunctionName: Map<string, GraphNode[]>;\n primitivesByLabel: Map<string, GraphNode[]>;\n agentNodes: GraphNode[];\n toolNodes: Map<string, GraphNode[]>;\n} {\n const byStepId = new Map<string, GraphNode[]>();\n const byFunctionName = new Map<string, GraphNode[]>();\n const primitivesByLabel = new Map<string, GraphNode[]>();\n const agentNodes: GraphNode[] = [];\n const toolNodes = new Map<string, GraphNode[]>();\n\n for (const node of nodes) {\n if (node.data.stepId) {\n // Index by full step ID\n const normalizedStepId = normalizeStepName(node.data.stepId);\n const existing = byStepId.get(normalizedStepId) || [];\n existing.push(node);\n byStepId.set(normalizedStepId, existing);\n\n // Also index by function name for fallback matching\n const functionName = extractFunctionName(normalizedStepId);\n if (functionName) {\n const existingByName = byFunctionName.get(functionName) || [];\n existingByName.push(node);\n byFunctionName.set(functionName, existingByName);\n }\n }\n\n // Index primitive nodes by their label\n if (node.data.nodeKind === 'primitive') {\n const label = node.data.label;\n const existing = primitivesByLabel.get(label) || [];\n existing.push(node);\n primitivesByLabel.set(label, existing);\n }\n\n // Index agent nodes (DurableAgent)\n if (node.data.nodeKind === 'agent') {\n agentNodes.push(node);\n }\n\n // Index tool nodes by their label (tool name)\n if (node.data.nodeKind === 'tool') {\n const label = node.data.label;\n // Extract base tool name (remove \" (tool)\" suffix if present)\n const toolName = label.replace(/ \\(tool\\)$/, '');\n const existing = toolNodes.get(toolName) || [];\n existing.push(node);\n toolNodes.set(toolName, existing);\n\n // Also index by function name from stepId for fallback matching\n if (node.data.stepId) {\n const functionName = extractFunctionName(\n normalizeStepName(node.data.stepId)\n );\n if (functionName) {\n const existingByName = toolNodes.get(functionName) || [];\n if (!existingByName.includes(node)) {\n existingByName.push(node);\n toolNodes.set(functionName, existingByName);\n }\n }\n }\n }\n }\n return { byStepId, byFunctionName, primitivesByLabel, agentNodes, toolNodes };\n}\n\n/**\n * Calculate edge traversals based on execution path and graph structure\n * Handles parallel operations (Promise.all, Promise.race, etc.) correctly\n */\nfunction calculateEdgeTraversals(\n executionPath: string[],\n graph: WorkflowGraph,\n nodeExecutions: Map<string, StepExecution[]>\n): Map<string, EdgeTraversal> {\n const edgeTraversals = new Map<string, EdgeTraversal>();\n\n // Build a set for quick lookup\n const executedNodes = new Set(executionPath);\n\n // Group nodes by parallelGroupId to understand parallel structure\n const parallelGroups = new Map<\n string,\n { nodes: typeof graph.nodes; method?: string }\n >();\n for (const node of graph.nodes) {\n const groupId = node.metadata?.parallelGroupId;\n if (groupId) {\n const existing = parallelGroups.get(groupId) || { nodes: [] };\n existing.nodes.push(node);\n existing.method = node.metadata?.parallelMethod;\n parallelGroups.set(groupId, existing);\n }\n }\n\n // Find the winner for each Promise.race group\n const raceWinners = new Map<string, string>(); // parallelGroupId -> winning nodeId\n for (const [groupId, group] of parallelGroups) {\n if (group.method === 'race') {\n let winnerNodeId: string | undefined;\n let earliestCompletion: Date | undefined;\n\n for (const node of group.nodes) {\n const executions = nodeExecutions.get(node.id);\n if (executions) {\n for (const exec of executions) {\n if (exec.status === 'completed' && exec.completedAt) {\n const completedAt = new Date(exec.completedAt);\n if (!earliestCompletion || completedAt < earliestCompletion) {\n earliestCompletion = completedAt;\n winnerNodeId = node.id;\n }\n }\n }\n }\n }\n\n if (winnerNodeId) {\n raceWinners.set(groupId, winnerNodeId);\n }\n }\n }\n\n // Mark edge as traversed helper\n const markEdgeTraversed = (edge: (typeof graph.edges)[0]) => {\n const existing = edgeTraversals.get(edge.id);\n if (existing) {\n existing.traversalCount++;\n } else {\n edgeTraversals.set(edge.id, {\n edgeId: edge.id,\n traversalCount: 1,\n timings: [],\n });\n }\n };\n\n // Process all edges\n for (const edge of graph.edges) {\n const sourceNode = graph.nodes.find((n) => n.id === edge.source);\n const targetNode = graph.nodes.find((n) => n.id === edge.target);\n\n if (!sourceNode || !targetNode) continue;\n\n const sourceExecuted = executedNodes.has(edge.source);\n const targetExecuted = executedNodes.has(edge.target);\n\n // If neither node was executed, skip\n if (!sourceExecuted && !targetExecuted) continue;\n\n // Handle conditional edges specially\n if (edge.type === 'conditional') {\n // Conditional edges should be marked as traversed if:\n // - The source (conditional node) was executed AND\n // - The target (branch node) was executed\n // The label (\"true\" or \"false\") indicates which branch\n if (sourceExecuted && targetExecuted) {\n markEdgeTraversed(edge);\n }\n continue;\n }\n\n // Check if source is part of a Promise.race group\n const sourceGroupId = sourceNode.metadata?.parallelGroupId;\n const sourceMethod = sourceNode.metadata?.parallelMethod;\n\n if (sourceGroupId && sourceMethod === 'race') {\n // For Promise.race: only mark edge from the winner as traversed\n const winner = raceWinners.get(sourceGroupId);\n if (winner === edge.source && targetExecuted) {\n markEdgeTraversed(edge);\n }\n // Don't mark edges from non-winners even if both nodes executed\n } else if (sourceExecuted && targetExecuted) {\n // For Promise.all/allSettled or regular edges: mark as traversed\n markEdgeTraversed(edge);\n } else if (sourceExecuted && edge.type === 'parallel') {\n // For edges going INTO parallel nodes, mark if source executed\n // and target is in the execution path\n if (targetExecuted) {\n markEdgeTraversed(edge);\n }\n }\n }\n\n return edgeTraversals;\n}\n\n/**\n * Initialize start node execution\n */\nfunction initializeStartNode(\n run: WorkflowRun,\n graph: WorkflowGraph,\n executionPath: string[],\n nodeExecutions: Map<string, StepExecution[]>\n): void {\n const startNode = graph.nodes.find(\n (n) => n.data.nodeKind === 'workflow_start'\n );\n if (startNode) {\n executionPath.push(startNode.id);\n nodeExecutions.set(startNode.id, [\n {\n nodeId: startNode.id,\n attemptNumber: 1,\n status: 'completed',\n startedAt: run.startedAt\n ? new Date(run.startedAt).toISOString()\n : undefined,\n completedAt: run.startedAt\n ? new Date(run.startedAt).toISOString()\n : undefined,\n // No duration for control flow nodes (start/end/conditional)\n },\n ]);\n }\n}\n\n/**\n * Add end node execution based on workflow run status\n * Handles all run statuses: pending, running, completed, failed, paused, cancelled\n */\nfunction addEndNodeExecution(\n run: WorkflowRun,\n graph: WorkflowGraph,\n executionPath: string[],\n nodeExecutions: Map<string, StepExecution[]>\n): void {\n const endNode = graph.nodes.find((n) => n.data.nodeKind === 'workflow_end');\n if (!endNode || executionPath.includes(endNode.id)) {\n return;\n }\n\n // Map run status to end node execution status\n let endNodeStatus: StepExecution['status'];\n switch (run.status) {\n case 'completed':\n endNodeStatus = 'completed';\n break;\n case 'failed':\n endNodeStatus = 'failed';\n break;\n case 'cancelled':\n endNodeStatus = 'cancelled';\n break;\n case 'running':\n endNodeStatus = 'running';\n break;\n case 'paused':\n // Paused is like running but waiting\n endNodeStatus = 'pending';\n break;\n case 'pending':\n default:\n // Don't add end node for pending runs\n return;\n }\n\n executionPath.push(endNode.id);\n nodeExecutions.set(endNode.id, [\n {\n nodeId: endNode.id,\n attemptNumber: 1,\n status: endNodeStatus,\n startedAt: run.completedAt\n ? new Date(run.completedAt).toISOString()\n : undefined,\n completedAt: run.completedAt\n ? new Date(run.completedAt).toISOString()\n : undefined,\n // No duration for control flow nodes (start/end/conditional)\n },\n ]);\n}\n\n/**\n * Process a group of step attempts and map to graph node\n */\nfunction processStepGroup(\n stepGroup: Step[],\n stepName: string,\n nodesByStepId: Map<string, GraphNode[]>,\n nodesByFunctionName: Map<string, GraphNode[]>,\n occurrenceCount: Map<string, number>,\n nodeExecutions: Map<string, StepExecution[]>,\n executionPath: string[]\n): string | undefined {\n const normalizedStepName = normalizeStepName(stepName);\n const occurrenceIndex = occurrenceCount.get(normalizedStepName) || 0;\n occurrenceCount.set(normalizedStepName, occurrenceIndex + 1);\n\n let nodesWithStepId = nodesByStepId.get(normalizedStepName) || [];\n let matchStrategy = 'step-id';\n\n // Fallback: If no exact stepId match, try matching by function name\n // This handles cases where step functions are in separate files\n if (nodesWithStepId.length === 0) {\n const functionName = extractFunctionName(normalizedStepName);\n if (functionName) {\n nodesWithStepId = nodesByFunctionName.get(functionName) || [];\n matchStrategy = 'function-name';\n }\n }\n\n // If there's only one node for this step but multiple invocations,\n // map all invocations to that single node\n const graphNode =\n nodesWithStepId.length === 1\n ? nodesWithStepId[0]\n : nodesWithStepId[occurrenceIndex];\n\n console.log('[Graph Mapper] Processing step group:', {\n stepName,\n normalizedStepName,\n attempts: stepGroup.length,\n occurrenceIndex,\n totalNodesWithStepId: nodesWithStepId.length,\n selectedNode: graphNode?.id,\n allNodesWithStepId: nodesWithStepId.map((n) => n.id),\n matchStrategy,\n strategy:\n nodesWithStepId.length === 1\n ? 'single-node-multiple-invocations'\n : 'occurrence-based',\n });\n\n if (!graphNode) {\n return undefined;\n }\n\n const executions: StepExecution[] = stepGroup.map((attemptStep, idx) =>\n createStepExecution(attemptStep, graphNode.id, idx, stepGroup.length)\n );\n\n // If there's only one node, append executions instead of replacing\n if (nodesWithStepId.length === 1) {\n const existing = nodeExecutions.get(graphNode.id) || [];\n nodeExecutions.set(graphNode.id, [...existing, ...executions]);\n } else {\n nodeExecutions.set(graphNode.id, executions);\n }\n\n if (!executionPath.includes(graphNode.id)) {\n executionPath.push(graphNode.id);\n }\n\n const latestExecution = executions[executions.length - 1];\n return latestExecution.status === 'running' ? graphNode.id : undefined;\n}\n\n/**\n * Process primitive events (sleep, hooks) and map them to graph nodes\n */\nfunction processPrimitiveEvents(\n events: Event[],\n primitivesByLabel: Map<string, GraphNode[]>,\n nodeExecutions: Map<string, StepExecution[]>,\n executionPath: string[]\n): string | undefined {\n // Track occurrence counts for each primitive type\n const occurrenceCount = new Map<string, number>();\n\n // Group events by correlationId to pair created/completed events\n const eventsByCorrelation = new Map<string, Event[]>();\n for (const event of events) {\n if (!event.correlationId) continue;\n const existing = eventsByCorrelation.get(event.correlationId) || [];\n existing.push(event);\n eventsByCorrelation.set(event.correlationId, existing);\n }\n\n let currentNode: string | undefined;\n\n // Process sleep events (wait_created/wait_completed)\n const sleepNodes = primitivesByLabel.get(PRIMITIVE_LABELS.sleep) || [];\n const sleepCorrelations = new Set<string>();\n\n for (const event of events) {\n if (event.eventType === 'wait_created' && event.correlationId) {\n sleepCorrelations.add(event.correlationId);\n }\n }\n\n // Sort correlations by event creation time\n const sortedSleepCorrelations = Array.from(sleepCorrelations).sort((a, b) => {\n const eventsA = eventsByCorrelation.get(a) || [];\n const eventsB = eventsByCorrelation.get(b) || [];\n const timeA = eventsA.find(\n (e) => e.eventType === 'wait_created'\n )?.createdAt;\n const timeB = eventsB.find(\n (e) => e.eventType === 'wait_created'\n )?.createdAt;\n if (!timeA || !timeB) return 0;\n return new Date(timeA).getTime() - new Date(timeB).getTime();\n });\n\n for (const correlationId of sortedSleepCorrelations) {\n const correlationEvents = eventsByCorrelation.get(correlationId) || [];\n const createdEvent = correlationEvents.find(\n (e) => e.eventType === 'wait_created'\n );\n const completedEvent = correlationEvents.find(\n (e) => e.eventType === 'wait_completed'\n );\n\n if (!createdEvent) continue;\n\n // Find the corresponding node\n const occurrenceIndex = occurrenceCount.get(PRIMITIVE_LABELS.sleep) || 0;\n occurrenceCount.set(PRIMITIVE_LABELS.sleep, occurrenceIndex + 1);\n\n const graphNode =\n sleepNodes.length === 1 ? sleepNodes[0] : sleepNodes[occurrenceIndex];\n\n if (!graphNode) continue;\n\n // Determine status\n let status: StepExecution['status'] = 'running';\n if (completedEvent) {\n status = 'completed';\n }\n\n const startedAt = new Date(createdEvent.createdAt).toISOString();\n const completedAt = completedEvent\n ? new Date(completedEvent.createdAt).toISOString()\n : undefined;\n const duration = completedEvent\n ? new Date(completedEvent.createdAt).getTime() -\n new Date(createdEvent.createdAt).getTime()\n : undefined;\n\n const execution: StepExecution = {\n nodeId: graphNode.id,\n attemptNumber: 1,\n status,\n startedAt,\n completedAt,\n duration,\n };\n\n // Append or set executions\n const existing = nodeExecutions.get(graphNode.id) || [];\n nodeExecutions.set(graphNode.id, [...existing, execution]);\n\n if (!executionPath.includes(graphNode.id)) {\n executionPath.push(graphNode.id);\n }\n\n if (status === 'running') {\n currentNode = graphNode.id;\n }\n }\n\n // Process hook events (hook_created/hook_received)\n // createHook and createWebhook both use hook_created/hook_received events\n const hookNodes = [\n ...(primitivesByLabel.get(PRIMITIVE_LABELS.createHook) || []),\n ...(primitivesByLabel.get(PRIMITIVE_LABELS.createWebhook) || []),\n ];\n const hookCorrelations = new Set<string>();\n\n for (const event of events) {\n if (event.eventType === 'hook_created' && event.correlationId) {\n hookCorrelations.add(event.correlationId);\n }\n }\n\n // Sort correlations by event creation time\n const sortedHookCorrelations = Array.from(hookCorrelations).sort((a, b) => {\n const eventsA = eventsByCorrelation.get(a) || [];\n const eventsB = eventsByCorrelation.get(b) || [];\n const timeA = eventsA.find(\n (e) => e.eventType === 'hook_created'\n )?.createdAt;\n const timeB = eventsB.find(\n (e) => e.eventType === 'hook_created'\n )?.createdAt;\n if (!timeA || !timeB) return 0;\n return new Date(timeA).getTime() - new Date(timeB).getTime();\n });\n\n // Track hook occurrence separately from sleep\n let hookOccurrenceIndex = 0;\n\n for (const correlationId of sortedHookCorrelations) {\n const correlationEvents = eventsByCorrelation.get(correlationId) || [];\n const createdEvent = correlationEvents.find(\n (e) => e.eventType === 'hook_created'\n );\n\n if (!createdEvent) continue;\n\n // Find the corresponding node\n const graphNode =\n hookNodes.length === 1 ? hookNodes[0] : hookNodes[hookOccurrenceIndex];\n hookOccurrenceIndex++;\n\n if (!graphNode) continue;\n\n // Determine status - hooks are \"completed\" once created (the await is for received)\n // For the node visualization, we show it as completed when created\n const status: StepExecution['status'] = 'completed';\n\n const startedAt = new Date(createdEvent.createdAt).toISOString();\n const completedAt = new Date(createdEvent.createdAt).toISOString();\n\n const execution: StepExecution = {\n nodeId: graphNode.id,\n attemptNumber: 1,\n status,\n startedAt,\n completedAt,\n duration: 0,\n };\n\n // Append or set executions\n const existing = nodeExecutions.get(graphNode.id) || [];\n nodeExecutions.set(graphNode.id, [...existing, execution]);\n\n if (!executionPath.includes(graphNode.id)) {\n executionPath.push(graphNode.id);\n }\n }\n\n // Process awaitWebhook nodes - they wait for hook_received events\n const awaitWebhookNodes =\n primitivesByLabel.get(PRIMITIVE_LABELS.awaitWebhook) || [];\n\n // Track which hook correlations have been received\n const receivedHookCorrelations = new Set<string>();\n for (const event of events) {\n if (event.eventType === 'hook_received' && event.correlationId) {\n receivedHookCorrelations.add(event.correlationId);\n }\n }\n\n // Match awaitWebhook nodes with their corresponding hook events\n let awaitWebhookIndex = 0;\n for (const correlationId of sortedHookCorrelations) {\n const graphNode =\n awaitWebhookNodes.length === 1\n ? awaitWebhookNodes[0]\n : awaitWebhookNodes[awaitWebhookIndex];\n awaitWebhookIndex++;\n\n if (!graphNode) continue;\n\n const correlationEvents = eventsByCorrelation.get(correlationId) || [];\n const createdEvent = correlationEvents.find(\n (e) => e.eventType === 'hook_created'\n );\n const receivedEvent = correlationEvents.find(\n (e) => e.eventType === 'hook_received'\n );\n\n // Determine status based on whether hook was received\n let status: StepExecution['status'];\n let startedAt: string | undefined;\n let completedAt: string | undefined;\n let duration = 0;\n\n if (receivedEvent) {\n status = 'completed';\n startedAt = createdEvent\n ? new Date(createdEvent.createdAt).toISOString()\n : new Date(receivedEvent.createdAt).toISOString();\n completedAt = new Date(receivedEvent.createdAt).toISOString();\n duration =\n new Date(completedAt).getTime() - new Date(startedAt).getTime();\n } else if (createdEvent) {\n // Hook created but not yet received - running/waiting\n status = 'running';\n startedAt = new Date(createdEvent.createdAt).toISOString();\n } else {\n // No events yet - pending\n status = 'pending';\n }\n\n const execution: StepExecution = {\n nodeId: graphNode.id,\n attemptNumber: 1,\n status,\n startedAt,\n completedAt,\n duration,\n };\n\n const existing = nodeExecutions.get(graphNode.id) || [];\n nodeExecutions.set(graphNode.id, [...existing, execution]);\n\n if (!executionPath.includes(graphNode.id)) {\n executionPath.push(graphNode.id);\n }\n }\n\n return currentNode;\n}\n\n/**\n * Process agent and tool nodes - mark them as executed based on step executions\n * DurableAgent is marked as running/completed based on workflow status\n * Tool nodes are marked as executed when their corresponding step executes\n * Tools collection placeholders are marked based on agent status (since tools are dynamic)\n */\nfunction processAgentAndToolNodes(\n run: WorkflowRun,\n steps: Step[],\n agentNodes: GraphNode[],\n toolNodes: Map<string, GraphNode[]>,\n nodeExecutions: Map<string, StepExecution[]>,\n executionPath: string[],\n allNodes: GraphNode[]\n): void {\n // Determine agent status based on workflow status\n let agentStatus: StepExecution['status'] = 'pending';\n if (run.status === 'completed') {\n agentStatus = 'completed';\n } else if (run.status === 'failed') {\n agentStatus = 'failed';\n } else if (run.status === 'running') {\n agentStatus = 'running';\n }\n\n // Mark agent nodes as completed/running based on workflow status\n for (const agentNode of agentNodes) {\n const execution: StepExecution = {\n nodeId: agentNode.id,\n attemptNumber: 1,\n status: agentStatus,\n startedAt: run.startedAt\n ? new Date(run.startedAt).toISOString()\n : undefined,\n completedAt:\n run.completedAt &&\n (agentStatus === 'completed' || agentStatus === 'failed')\n ? new Date(run.completedAt).toISOString()\n : undefined,\n };\n\n nodeExecutions.set(agentNode.id, [execution]);\n\n if (!executionPath.includes(agentNode.id)) {\n executionPath.push(agentNode.id);\n }\n }\n\n // Map tool executions FIRST based on matching step names\n // Extract step function names and match to tool nodes\n for (const step of steps) {\n // Extract the function name from stepName (e.g., \"step//...//searchFlights\" -> \"searchFlights\")\n const functionName = extractFunctionName(step.stepName);\n if (!functionName) continue;\n\n // Check if this step matches any tool node\n const matchingToolNodes = toolNodes.get(functionName);\n if (!matchingToolNodes || matchingToolNodes.length === 0) continue;\n\n // Use the first matching tool node\n const toolNode = matchingToolNodes[0];\n\n // Map step status to execution status\n let status: StepExecution['status'];\n switch (step.status) {\n case 'completed':\n status = 'completed';\n break;\n case 'failed':\n status = 'failed';\n break;\n case 'running':\n status = 'running';\n break;\n case 'cancelled':\n status = 'cancelled';\n break;\n case 'pending':\n default:\n status = 'pending';\n break;\n }\n\n const duration =\n step.completedAt && step.startedAt\n ? new Date(step.completedAt).getTime() -\n new Date(step.startedAt).getTime()\n : undefined;\n\n const execution: StepExecution = {\n nodeId: toolNode.id,\n stepId: step.stepId,\n attemptNumber: step.attempt,\n status,\n startedAt: step.startedAt\n ? new Date(step.startedAt).toISOString()\n : undefined,\n completedAt: step.completedAt\n ? new Date(step.completedAt).toISOString()\n : undefined,\n duration,\n input: step.input,\n output: step.output,\n error: step.error,\n };\n\n // Append execution to existing or create new\n const existing = nodeExecutions.get(toolNode.id) || [];\n nodeExecutions.set(toolNode.id, [...existing, execution]);\n\n if (!executionPath.includes(toolNode.id)) {\n executionPath.push(toolNode.id);\n }\n }\n\n // After processing individual tool executions, mark any \"tools collection\" placeholder nodes\n // These are nodes representing unresolved imported tools objects (when we couldn't extract individual tools)\n // Individual tool nodes should only be marked if they were actually executed above\n for (const node of allNodes) {\n // Only mark tools collection placeholders, not individual tool nodes\n const isToolsCollection =\n (node.metadata as any)?.isToolsCollection === true;\n if (\n node.data.nodeKind === 'tool' &&\n isToolsCollection &&\n !nodeExecutions.has(node.id)\n ) {\n // This is a tools collection placeholder - mark based on agent status\n const execution: StepExecution = {\n nodeId: node.id,\n attemptNumber: 1,\n status: agentStatus,\n startedAt: run.startedAt\n ? new Date(run.startedAt).toISOString()\n : undefined,\n completedAt:\n run.completedAt &&\n (agentStatus === 'completed' || agentStatus === 'failed')\n ? new Date(run.completedAt).toISOString()\n : undefined,\n };\n\n nodeExecutions.set(node.id, [execution]);\n\n if (!executionPath.includes(node.id)) {\n executionPath.push(node.id);\n }\n }\n }\n}\n\n/**\n * Process conditional nodes - mark them as executed based on branch execution\n * If any node in a conditional branch was executed, the conditional node must have been evaluated\n */\nfunction processConditionalNodes(\n graph: WorkflowGraph,\n nodeExecutions: Map<string, StepExecution[]>,\n executionPath: string[],\n run: WorkflowRun\n): void {\n // Find all conditional nodes (decision points)\n const conditionalNodes = graph.nodes.filter(\n (n) => n.data.nodeKind === 'conditional'\n );\n\n // Group nodes by their conditionalId to find which branches were executed\n const nodesByConditionalId = new Map<\n string,\n { thenNodes: GraphNode[]; elseNodes: GraphNode[] }\n >();\n\n for (const node of graph.nodes) {\n const condId = node.metadata?.conditionalId;\n if (condId) {\n const group = nodesByConditionalId.get(condId) || {\n thenNodes: [],\n elseNodes: [],\n };\n if (node.metadata?.conditionalBranch === 'Then') {\n group.thenNodes.push(node);\n } else if (node.metadata?.conditionalBranch === 'Else') {\n group.elseNodes.push(node);\n }\n nodesByConditionalId.set(condId, group);\n }\n }\n\n // For each conditional node, check if any of its branch nodes were executed\n for (const condNode of conditionalNodes) {\n // Extract the conditionalId from the node id (e.g., \"cond_0_node\" -> \"cond_0\")\n const condIdMatch = condNode.id.match(/^(cond_\\d+)_node$/);\n if (!condIdMatch) continue;\n\n const condId = condIdMatch[1];\n const branches = nodesByConditionalId.get(condId);\n if (!branches) continue;\n\n // Check if any node in either branch was executed\n const thenExecuted = branches.thenNodes.some((n) =>\n nodeExecutions.has(n.id)\n );\n const elseExecuted = branches.elseNodes.some((n) =>\n nodeExecutions.has(n.id)\n );\n\n // If either branch was executed, mark the conditional node as executed\n if (thenExecuted || elseExecuted) {\n const allBranchNodes = [...branches.thenNodes, ...branches.elseNodes];\n\n if (!nodeExecutions.has(condNode.id)) {\n // Find the earliest execution time from the branch nodes\n let earliestTime: string | undefined;\n for (const branchNode of allBranchNodes) {\n const execs = nodeExecutions.get(branchNode.id);\n if (execs && execs.length > 0) {\n const firstExec = execs[0];\n if (\n firstExec.startedAt &&\n (!earliestTime || firstExec.startedAt < earliestTime)\n ) {\n earliestTime = firstExec.startedAt;\n }\n }\n }\n\n const fallbackTime = run.startedAt\n ? new Date(run.startedAt).toISOString()\n : undefined;\n const execution: StepExecution = {\n nodeId: condNode.id,\n attemptNumber: 1,\n status: 'completed',\n startedAt: earliestTime || fallbackTime,\n completedAt: earliestTime || fallbackTime,\n // No duration for control flow nodes (start/end/conditional)\n };\n\n nodeExecutions.set(condNode.id, [execution]);\n }\n\n if (!executionPath.includes(condNode.id)) {\n // Insert conditional node before its branch nodes in the execution path\n const branchIndices = allBranchNodes\n .map((n) => executionPath.indexOf(n.id))\n .filter((i) => i >= 0);\n if (branchIndices.length > 0) {\n const firstBranchIndex = Math.min(...branchIndices);\n if (\n firstBranchIndex >= 0 &&\n firstBranchIndex < executionPath.length\n ) {\n executionPath.splice(firstBranchIndex, 0, condNode.id);\n } else {\n executionPath.push(condNode.id);\n }\n } else {\n executionPath.push(condNode.id);\n }\n }\n }\n }\n}\n\n/**\n * Maps a workflow run and its steps/events to an execution overlay for the graph\n */\nexport function mapRunToExecution(\n run: WorkflowRun,\n steps: Step[],\n events: Event[],\n graph: WorkflowGraph\n): WorkflowRunExecution {\n const nodeExecutions = new Map<string, StepExecution[]>();\n const executionPath: string[] = [];\n let currentNode: string | undefined;\n\n console.log('[Graph Mapper] Mapping run to execution:', {\n runId: run.runId,\n workflowName: run.workflowName,\n graphNodes: graph.nodes.length,\n stepsCount: steps.length,\n });\n\n // Start node is always executed first\n initializeStartNode(run, graph, executionPath, nodeExecutions);\n\n // Map steps to graph nodes\n // Sort steps by createdAt to process in execution order\n const sortedSteps = [...steps].sort(\n (a, b) => new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime()\n );\n\n console.log(\n '[Graph Mapper] Sorted steps:',\n sortedSteps.map((s) => ({\n stepId: s.stepId,\n stepName: s.stepName,\n attempt: s.attempt,\n status: s.status,\n createdAt: s.createdAt,\n }))\n );\n\n // Build an index of graph nodes by normalized stepId, function name, and primitive label for quick lookup\n const {\n byStepId: nodesByStepId,\n byFunctionName: nodesByFunctionName,\n primitivesByLabel,\n agentNodes,\n toolNodes,\n } = buildNodeIndex(graph.nodes);\n\n console.log('[Graph Mapper] Graph nodes by stepId:', {\n allGraphNodes: graph.nodes.map((n) => ({\n id: n.id,\n stepId: n.data.stepId,\n normalizedStepId: n.data.stepId\n ? normalizeStepName(n.data.stepId)\n : undefined,\n nodeKind: n.data.nodeKind,\n })),\n nodesByStepId: Array.from(nodesByStepId.entries()).map(\n ([stepId, nodes]) => ({\n stepId,\n nodeIds: nodes.map((n) => n.id),\n })\n ),\n });\n\n // Track how many times we've seen each stepName to map to the correct occurrence\n const stepNameOccurrenceCount = new Map<string, number>();\n\n // Group consecutive retries: steps with the same stepId (unique per invocation) are retries\n let currentStepGroup: Step[] = [];\n let currentStepId: string | null = null;\n let currentStepName: string | null = null;\n\n for (let i = 0; i <= sortedSteps.length; i++) {\n const step = sortedSteps[i];\n\n // Start a new group if:\n // 1. Different stepId (each invocation has a unique stepId, retries share the same stepId)\n // 2. End of array\n const isNewInvocation = !step || step.stepId !== currentStepId;\n\n if (isNewInvocation) {\n // Process the previous group if it exists\n if (currentStepGroup.length > 0 && currentStepName) {\n const runningNode = processStepGroup(\n currentStepGroup,\n currentStepName,\n nodesByStepId,\n nodesByFunctionName,\n stepNameOccurrenceCount,\n nodeExecutions,\n executionPath\n );\n if (runningNode) {\n currentNode = runningNode;\n }\n }\n\n // Start a new group with current step (if not at end)\n if (step) {\n currentStepGroup = [step];\n currentStepId = step.stepId;\n currentStepName = step.stepName;\n }\n } else {\n // Add to current group (this is a retry: same stepId)\n currentStepGroup.push(step);\n }\n }\n\n // Process primitive events (sleep, createHook, createWebhook)\n const primitiveCurrentNode = processPrimitiveEvents(\n events,\n primitivesByLabel,\n nodeExecutions,\n executionPath\n );\n if (primitiveCurrentNode) {\n currentNode = primitiveCurrentNode;\n }\n\n // Process agent and tool nodes (DurableAgent and its tools)\n processAgentAndToolNodes(\n run,\n sortedSteps,\n agentNodes,\n toolNodes,\n nodeExecutions,\n executionPath,\n graph.nodes\n );\n\n // Process conditional nodes - mark them as executed if their branch nodes were executed\n processConditionalNodes(graph, nodeExecutions, executionPath, run);\n\n // Add end node based on workflow status\n addEndNodeExecution(run, graph, executionPath, nodeExecutions);\n\n // Calculate edge traversals based on execution path and node executions\n const edgeTraversals = calculateEdgeTraversals(\n executionPath,\n graph,\n nodeExecutions\n );\n\n const result: WorkflowRunExecution = {\n runId: run.runId,\n status: run.status,\n nodeExecutions,\n edgeTraversals,\n currentNode,\n executionPath,\n };\n\n console.log('[Graph Mapper] Mapping complete:', {\n executionPath,\n nodeExecutionsCount: nodeExecutions.size,\n nodeExecutions: Array.from(nodeExecutions.entries()).map(\n ([nodeId, execs]) => ({\n nodeId,\n executionCount: execs.length,\n latestStatus: execs[execs.length - 1]?.status,\n })\n ),\n });\n\n return result;\n}\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContext, createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { RemoveScroll } from 'react-remove-scroll';\nimport { hideOthers } from 'aria-hidden';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Dialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst DIALOG_NAME = 'Dialog';\n\ntype ScopedProps<P> = P & { __scopeDialog?: Scope };\nconst [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\n\ntype DialogContextValue = {\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n contentRef: React.RefObject<DialogContentElement | null>;\n contentId: string;\n titleId: string;\n descriptionId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal: boolean;\n};\n\nconst [DialogProvider, useDialogContext] = createDialogContext<DialogContextValue>(DIALOG_NAME);\n\ninterface DialogProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\n}\n\nconst Dialog: React.FC<DialogProps> = (props: ScopedProps<DialogProps>) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true,\n } = props;\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const contentRef = React.useRef<DialogContentElement>(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n return (\n <DialogProvider\n scope={__scopeDialog}\n triggerRef={triggerRef}\n contentRef={contentRef}\n contentId={useId()}\n titleId={useId()}\n descriptionId={useId()}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n modal={modal}\n >\n {children}\n </DialogProvider>\n );\n};\n\nDialog.displayName = DIALOG_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'DialogTrigger';\n\ntype DialogTriggerElement = React.ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface DialogTriggerProps extends PrimitiveButtonProps {}\n\nconst DialogTrigger = React.forwardRef<DialogTriggerElement, DialogTriggerProps>(\n (props: ScopedProps<DialogTriggerProps>, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return (\n <Primitive.button\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n }\n);\n\nDialogTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'DialogPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createDialogContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef<typeof PortalPrimitive>;\ninterface DialogPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogPortal: React.FC<DialogPortalProps> = (props: ScopedProps<DialogPortalProps>) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return (\n <PortalProvider scope={__scopeDialog} forceMount={forceMount}>\n {React.Children.map(children, (child) => (\n <Presence present={forceMount || context.open}>\n <PortalPrimitive asChild container={container}>\n {child}\n </PortalPrimitive>\n </Presence>\n ))}\n </PortalProvider>\n );\n};\n\nDialogPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogOverlay\n * -----------------------------------------------------------------------------------------------*/\n\nconst OVERLAY_NAME = 'DialogOverlay';\n\ntype DialogOverlayElement = DialogOverlayImplElement;\ninterface DialogOverlayProps extends DialogOverlayImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogOverlay = React.forwardRef<DialogOverlayElement, DialogOverlayProps>(\n (props: ScopedProps<DialogOverlayProps>, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? (\n <Presence present={forceMount || context.open}>\n <DialogOverlayImpl {...overlayProps} ref={forwardedRef} />\n </Presence>\n ) : null;\n }\n);\n\nDialogOverlay.displayName = OVERLAY_NAME;\n\ntype DialogOverlayImplElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface DialogOverlayImplProps extends PrimitiveDivProps {}\n\nconst DialogOverlayImpl = React.forwardRef<DialogOverlayImplElement, DialogOverlayImplProps>(\n (props: ScopedProps<DialogOverlayImplProps>, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n <RemoveScroll as={Slot} allowPinchZoom shards={[context.contentRef]}>\n <Primitive.div\n data-state={getState(context.open)}\n {...overlayProps}\n ref={forwardedRef}\n // We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.\n style={{ pointerEvents: 'auto', ...overlayProps.style }}\n />\n </RemoveScroll>\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * DialogContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'DialogContent';\n\ntype DialogContentElement = DialogContentTypeElement;\ninterface DialogContentProps extends DialogContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(\n (props: ScopedProps<DialogContentProps>, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return (\n <Presence present={forceMount || context.open}>\n {context.modal ? (\n <DialogContentModal {...contentProps} ref={forwardedRef} />\n ) : (\n <DialogContentNonModal {...contentProps} ref={forwardedRef} />\n )}\n </Presence>\n );\n }\n);\n\nDialogContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype DialogContentTypeElement = DialogContentImplElement;\ninterface DialogContentTypeProps\n extends Omit<DialogContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {}\n\nconst DialogContentModal = React.forwardRef<DialogContentTypeElement, DialogContentTypeProps>(\n (props: ScopedProps<DialogContentTypeProps>, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n <DialogContentImpl\n {...props}\n ref={composedRefs}\n // we make sure focus isn't trapped once `DialogContent` has been closed\n // (closed !== unmounted when animating out)\n trapFocus={context.open}\n disableOutsidePointerEvents\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n })}\n onPointerDownOutside={composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n // If the event is a right-click, we shouldn't close because\n // it is effectively as if we right-clicked the `Overlay`.\n if (isRightClick) event.preventDefault();\n })}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) =>\n event.preventDefault()\n )}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst DialogContentNonModal = React.forwardRef<DialogContentTypeElement, DialogContentTypeProps>(\n (props: ScopedProps<DialogContentTypeProps>, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n\n return (\n <DialogContentImpl\n {...props}\n ref={forwardedRef}\n trapFocus={false}\n disableOutsidePointerEvents={false}\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === 'pointerdown') {\n hasPointerDownOutsideRef.current = true;\n }\n }\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n const target = event.target as HTMLElement;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n\n // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n // we will get the pointer down outside event on the trigger, but then a subsequent\n // focus outside event on the container, we ignore any focus outside event when we've\n // already had a pointer down outside event.\n if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype DialogContentImplElement = React.ElementRef<typeof DismissableLayer>;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype FocusScopeProps = React.ComponentPropsWithoutRef<typeof FocusScope>;\ninterface DialogContentImplProps extends Omit<DismissableLayerProps, 'onDismiss'> {\n /**\n * When `true`, focus cannot escape the `Content` via keyboard,\n * pointer, or a programmatic focus.\n * @defaultValue false\n */\n trapFocus?: FocusScopeProps['trapped'];\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n}\n\nconst DialogContentImpl = React.forwardRef<DialogContentImplElement, DialogContentImplProps>(\n (props: ScopedProps<DialogContentImplProps>, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n\n // Make sure the whole tree has focus guards as our `Dialog` will be\n // the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n return (\n <>\n <FocusScope\n asChild\n loop\n trapped={trapFocus}\n onMountAutoFocus={onOpenAutoFocus}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n <DismissableLayer\n role=\"dialog\"\n id={context.contentId}\n aria-describedby={context.descriptionId}\n aria-labelledby={context.titleId}\n data-state={getState(context.open)}\n {...contentProps}\n ref={composedRefs}\n onDismiss={() => context.onOpenChange(false)}\n />\n </FocusScope>\n {process.env.NODE_ENV !== 'production' && (\n <>\n <TitleWarning titleId={context.titleId} />\n <DescriptionWarning contentRef={contentRef} descriptionId={context.descriptionId} />\n </>\n )}\n </>\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'DialogTitle';\n\ntype DialogTitleElement = React.ElementRef<typeof Primitive.h2>;\ntype PrimitiveHeading2Props = React.ComponentPropsWithoutRef<typeof Primitive.h2>;\ninterface DialogTitleProps extends PrimitiveHeading2Props {}\n\nconst DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>(\n (props: ScopedProps<DialogTitleProps>, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return <Primitive.h2 id={context.titleId} {...titleProps} ref={forwardedRef} />;\n }\n);\n\nDialogTitle.displayName = TITLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DESCRIPTION_NAME = 'DialogDescription';\n\ntype DialogDescriptionElement = React.ElementRef<typeof Primitive.p>;\ntype PrimitiveParagraphProps = React.ComponentPropsWithoutRef<typeof Primitive.p>;\ninterface DialogDescriptionProps extends PrimitiveParagraphProps {}\n\nconst DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>(\n (props: ScopedProps<DialogDescriptionProps>, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return <Primitive.p id={context.descriptionId} {...descriptionProps} ref={forwardedRef} />;\n }\n);\n\nDialogDescription.displayName = DESCRIPTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'DialogClose';\n\ntype DialogCloseElement = React.ElementRef<typeof Primitive.button>;\ninterface DialogCloseProps extends PrimitiveButtonProps {}\n\nconst DialogClose = React.forwardRef<DialogCloseElement, DialogCloseProps>(\n (props: ScopedProps<DialogCloseProps>, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return (\n <Primitive.button\n type=\"button\"\n {...closeProps}\n ref={forwardedRef}\n onClick={composeEventHandlers(props.onClick, () => context.onOpenChange(false))}\n />\n );\n }\n);\n\nDialogClose.displayName = CLOSE_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst TITLE_WARNING_NAME = 'DialogTitleWarning';\n\nconst [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: 'dialog',\n});\n\ntype TitleWarningProps = { titleId?: string };\n\nconst TitleWarning: React.FC<TitleWarningProps> = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n\n return null;\n};\n\nconst DESCRIPTION_WARNING_NAME = 'DialogDescriptionWarning';\n\ntype DescriptionWarningProps = {\n contentRef: React.RefObject<DialogContentElement | null>;\n descriptionId?: string;\n};\n\nconst DescriptionWarning: React.FC<DescriptionWarningProps> = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute('aria-describedby');\n // if we have an id and the user hasn't set aria-describedby={undefined}\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n\n return null;\n};\n\nconst Root = Dialog;\nconst Trigger = DialogTrigger;\nconst Portal = DialogPortal;\nconst Overlay = DialogOverlay;\nconst Content = DialogContent;\nconst Title = DialogTitle;\nconst Description = DialogDescription;\nconst Close = DialogClose;\n\nexport {\n createDialogScope,\n //\n Dialog,\n DialogTrigger,\n DialogPortal,\n DialogOverlay,\n DialogContent,\n DialogTitle,\n DialogDescription,\n DialogClose,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Title,\n Description,\n Close,\n //\n WarningProvider,\n};\nexport type {\n DialogProps,\n DialogTriggerProps,\n DialogPortalProps,\n DialogOverlayProps,\n DialogContentProps,\n DialogTitleProps,\n DialogDescriptionProps,\n DialogCloseProps,\n};\n"],"names":[],"mappings":"kDCcI,gBDZJ,EAAA,CAAA,CAAA,QAAA,IAAA,EAAA,EAAA,CAAA,CAAA,QACA,EAAA,EAAA,CAAA,CAAA,QQDA,EAAA,EAAA,CAAA,CAAA,QACA,EAAA,EAAA,CAAA,CAAA,QAAA,EAAA,EAAA,CAAA,CAAA,QAAA,EAAA,EAAA,CAAA,CAAA,QAaA,EAAA,EAAA,CAAA,CAAA,QAAA,EAAA,EAAA,CAAA,CAAA,8BIHmB,ECPO,KAAA,EAAA,EDOU,CEAE,YFAY,CAAA,IGOmC,OHNtE,GAAA,aAAoB,EAAG,SAAW,QAAA,CAAU,CAAA,CAAA,SAC9C,EAAA,uCAA2C,CAAA,CAAA,CAAA,CAAK,AAAL,QAAK,CAAU,CAAA,CAAA,CACpE,OAAQ,CAAE,AAAF,AE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