@workflow/web 5.2.0 → 5.3.1

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.
Files changed (27) hide show
  1. package/build/client/assets/app-BE8uqS_d.css +1 -0
  2. package/build/client/assets/{arrow-up-right-Cpa3Pdwo.js → arrow-up-right-CNHh1bh2.js} +1 -1
  3. package/build/client/assets/{highlighted-body-JLMTFACH-B3GqULNn.js → highlighted-body-JLMTFACH-CWHg5f-6.js} +1 -1
  4. package/build/client/assets/{home-D79hgIWW.js → home-DZqYMSiD.js} +35 -47
  5. package/build/client/assets/manifest-f2e93220.js +1 -0
  6. package/build/client/assets/{mermaid-WFAXDIZX-CWiYj6ob.js → mermaid-WFAXDIZX-BLO7Z8RE.js} +3462 -3239
  7. package/build/client/assets/root-BBptRWmF.css +1 -0
  8. package/build/client/assets/{root-DgYJfBXO.js → root-wdKzRZGT.js} +8 -16
  9. package/build/client/assets/{run-detail-Befe_Bls.js → run-detail-DyXpnv9C.js} +288 -187
  10. package/build/client/assets/{url-state-DtiYSmtM.js → url-state-DhOv2zv0.js} +205 -179
  11. package/build/client/assets/{zstd-browser-decoder-feFoAFP-.js → zstd-browser-decoder-BNeg7hxG.js} +1 -1
  12. package/build/server/assets/{app-BXJVj0oU.js → app-CNGxG3wL.js} +34240 -33384
  13. package/build/server/assets/{highlighted-body-JLMTFACH-DBscEG8Y.js → highlighted-body-JLMTFACH-Bj8JsfUl.js} +1 -1
  14. package/build/server/assets/{index-DFAOTIzy.js → index-DGn_6xEN.js} +4 -4
  15. package/build/server/assets/{mermaid-WFAXDIZX-hv3921YS.js → mermaid-WFAXDIZX-C_v93dNU.js} +1 -1
  16. package/build/server/assets/{token-BPk8AzMN.js → token-5fcfNNDG.js} +2 -2
  17. package/build/server/assets/{token-CXneDSmI.js → token-b1ZjKN2Q.js} +1 -1
  18. package/build/server/assets/{token-util-lTSClVuJ.js → token-util-BJhEZw83.js} +2 -2
  19. package/build/server/assets/{token-util-C_CN233b.js → token-util-spPPOelu.js} +1 -1
  20. package/build/server/assets/{wrapper-CaZIHABu.js → wrapper-Cc-ChiPM.js} +2 -2
  21. package/build/server/assets/{zstd-browser-decoder-XCzFkM-Z.js → zstd-browser-decoder-y4X_FyMk.js} +1 -1
  22. package/build/server/index.js +1 -1
  23. package/package.json +7 -9
  24. package/build/client/assets/app-DSMA-d-h.css +0 -1
  25. package/build/client/assets/loader-circle-JR85kUd5.js +0 -12
  26. package/build/client/assets/manifest-59ebdf79.js +0 -1
  27. package/build/client/assets/root-Cv68eh5c.css +0 -1
@@ -1,39 +1,51 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports, A as useNavigate, z as Link, w as withComponentProps, D as useParams, B as useSearchParams } from "./index-BS6T0Zjc.js";
2
- import { V as parseStepName, w as parseWorkflowName, Y as findStartHookCreation, q as ChevronUp, X, C as CircleAlert, _ as Circle, y as CircleX, $ as ErrorCard, a0 as format, R as ResolveHookModal, U as ErrorBoundary, u as unwrapOrThrow, W as WorkflowWebAPIError, L as unwrapServerActionResult, a1 as useInfiniteList, A as Alert, c as AlertTitle, d as AlertDescription, J as DialogPortal, K as DialogOverlay, a2 as createDialogScope, B as Dialog, a3 as DialogTrigger, F as DialogContent, H as DialogTitle, I as DialogDescription, G as DialogClose, a4 as LAYOUT, N as useOptimisticSearchParams, a5 as wakeUpRun, r as resumeHook, g as getErrorTitle, e as getErrorMessage, a as Skeleton$1, a6 as RunActionsButtons, x as StatusBadge, h as CopyableText, b as RelativeTime, T as Tabs, O as TabsList, P as TabsTrigger, Q as TabsContent, a7 as cancelRun, a8 as recreateRun } from "./url-state-DtiYSmtM.js";
3
- import { c as createLucideIcon, U as isSlotEventId, X as classifyEntityEvent, Y as TERMINAL_EVENT_CLASSES, Z as isSealedNoopEvent$1, $ as formatDurationPrecise, a0 as isStepEventType, a1 as isWaitEventType, a2 as isHookLifecycleEventType, a3 as isEncryptedMarker, a4 as isTerminalStepEventType, a5 as isRunCreationEvent, a6 as cn, a7 as CopyButton, a8 as CopyableDataBlock, a9 as CollapsibleRoot, aa as CollapsibleTrigger, ab as CollapsibleContent, O as cva, ac as RESERVED_ATTRIBUTE_KEY_PREFIX, T as Tooltip, a as TooltipTrigger, ad as IconButton, b as TooltipContent, K as ChevronDown, ae as Spinner, af as getEventDataRefFields, ag as Collapsible, ah as Skeleton, ai as DecryptClickContext, aj as Lock, ak as DataInspector, al as serializeForClipboard, am as useRowWindow, an as isSpanDimmedBySearch, ao as ROW_HEIGHT_PX, ap as getSpanDurationMs, aq as isSpanErrored, ar as isSpanCancelled, as as TooltipProvider, at as TimestampTooltip, au as ContextCardProvider, av as es, aw as Ui, ax as RunClickContext, ay as StreamClickContext, az as isExpiredMarker, aA as isDoStreamStep, aB as extractConversation, aC as EncryptedDataBlock, aD as hasEncryptedFields, h as useToast, aE as useSidebarDataOptional, aF as isTerminalWorkflowRunStatus, B as Button, aG as useActiveSpan, aH as useSidebarData, aI as ActiveSpanProvider, aJ as useReducedMotion, aK as searchSpans, aL as computeRootBounds, aM as computeTimeMarkers, aN as clampViewportToRoot, aO as getHighResInMs, aP as scrollRowIntoView, aQ as TIMELINE_PADDING_PX, aR as Minimap, aS as Timeline, aT as TimelineHeader, aU as wheelZoomScaleFactor, aV as wheelDeltaToPixels, aW as SidebarDataProvider, aX as hydrateResourceIOAsync, aY as createStateResolver, aZ as deriveRunPayloadKeys, a_ as decodePayloadWithKey, a$ as stateSourceId, b0 as getWebRevivers, b1 as fetchHook, m as fetchEvents, N as fetchRun, b2 as fetchStep, b3 as hydrateResourceIO, b4 as fetchStreams, b5 as apiBase, b6 as fetchEvent, b7 as fetchEventsByCorrelationId, w as createContextScope, n as useComposedRefs, y as composeEventHandlers, e as cn$1, b8 as buttonVariants, b9 as Slot, l as ChevronRight, ba as isEncryptedData, bb as hydrateData, bc as decrypt, bd as getStreamImageType, be as SerializationFormat, bf as LIVE_UPDATE_INTERVAL_MS$1, u as useServerConfig, bg as getEncryptionKeyForRun, t as toast, bh as StreamViewerSkeleton, bi as StreamViewer } from "./mermaid-WFAXDIZX-CWiYj6ob.js";
4
- import { A as ArrowUpRight } from "./arrow-up-right-Cpa3Pdwo.js";
2
+ import { _ as parseStepName, y as parseWorkflowName, $ as findStartHookCreation, t as ChevronUp, X, C as CircleAlert, a0 as Circle, B as CircleX, a1 as Wrench, a2 as ErrorCard, a3 as format, R as ResolveHookModal, Y as ErrorBoundary, u as unwrapOrThrow, W as WorkflowWebAPIError, N as unwrapServerActionResult, a4 as useInfiniteList, h as getErrorMessage, A as Alert, c as AlertTitle, e as AlertDescription, L as DialogPortal, M as DialogOverlay, a5 as createDialogScope, G as Dialog, a6 as DialogTrigger, H as DialogContent, J as DialogTitle, K as DialogDescription, I as DialogClose, a7 as LIVE_UPDATE_INTERVAL_MS$1, a8 as LAYOUT, P as useOptimisticSearchParams, a9 as wakeUpRun, r as resumeHook, d as getErrorTitle, a as Skeleton$1, aa as RunActionsButtons, z as StatusBadge, i as CopyableText, b as RelativeTime, T as Tabs, Q as TabsList, U as TabsTrigger, V as TabsContent, ab as cancelRun, ac as recreateRun } from "./url-state-DhOv2zv0.js";
3
+ import { c as createLucideIcon, Q as isSlotEventId, U as classifyEntityEvent, X as TERMINAL_EVENT_CLASSES, Y as isSealedNoopEvent$1, Z as formatDurationPrecise, $ as isStepEventType, a0 as isWaitEventType, a1 as isHookLifecycleEventType, a2 as isEncryptedMarker, a3 as isTerminalStepEventType, a4 as isRunCreationEvent, e as cn, a5 as CopyButton, a6 as CopyableDataBlock, a7 as CollapsibleRoot, a8 as CollapsibleTrigger, a9 as CollapsibleContent, N as cva, aa as RESERVED_ATTRIBUTE_KEY_PREFIX, T as Tooltip, a as TooltipTrigger, ab as IconButton, b as TooltipContent, J as ChevronDown, B as Button, ac as Lock, ad as getEventDataRefFields, ae as Collapsible, af as Skeleton, ag as DecryptClickContext, ah as DataInspector, ai as serializeForClipboard, aj as useRowWindow, ak as isSpanDimmedBySearch, al as ROW_HEIGHT_PX, am as getSpanDurationMs, an as isSpanErrored, ao as isSpanCancelled, ap as TooltipProvider, aq as TimestampTooltip, ar as ContextCardProvider, as as es, at as Ui, C as Check, au as RunClickContext, av as StreamClickContext, aw as isExpiredMarker, ax as isDoStreamStep, ay as extractConversation, az as EncryptedDataBlock, j as Spinner, aA as hasEncryptedFields, h as useToast, aB as useSidebarDataOptional, aC as isTerminalWorkflowRunStatus, aD as useActiveSpan, aE as useSidebarData, aF as ActiveSpanProvider, aG as useReducedMotion, aH as searchSpans, aI as computeRootBounds, aJ as computeTimeMarkers, aK as clampViewportToRoot, aL as getHighResInMs, aM as scrollRowIntoView, aN as TIMELINE_PADDING_PX, aO as Minimap, aP as Timeline, aQ as TimelineHeader, aR as wheelZoomScaleFactor, aS as wheelDeltaToPixels, aT as SidebarDataProvider, aU as hydrateResourceIOAsync, aV as createStateResolver, aW as deriveRunPayloadKeys, aX as decodePayloadWithKey, aY as stateSourceId, aZ as getWebRevivers, a_ as fetchHook, m as fetchEvents, M as fetchRun, a$ as fetchStep, b0 as hydrateResourceIO, b1 as fetchStreams, b2 as apiBase, b3 as fetchEvent, b4 as fetchEventsByCorrelationId, w as createContextScope, n as useComposedRefs, y as composeEventHandlers, b5 as buttonVariants, b6 as Slot, l as ChevronRight, b7 as isEncryptedData, b8 as hydrateData, b9 as decrypt, ba as getStreamImageType, bb as SerializationFormat, u as useServerConfig, bc as getEncryptionKeyForRun, t as toast, bd as StreamViewerSkeleton, be as StreamViewer } from "./mermaid-WFAXDIZX-BLO7Z8RE.js";
4
+ import { A as ArrowUpRight } from "./arrow-up-right-CNHh1bh2.js";
5
5
  /**
6
6
  * @license lucide-react v0.575.0 - ISC
7
7
  *
8
8
  * This source code is licensed under the ISC license.
9
9
  * See the LICENSE file in the root directory of this source tree.
10
10
  */
11
- const __iconNode$7 = [
11
+ const __iconNode$9 = [
12
12
  ["path", { d: "M10 6h8", key: "zvc2xc" }],
13
13
  ["path", { d: "M12 16h6", key: "yi5mkt" }],
14
14
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
15
15
  ["path", { d: "M8 11h7", key: "wz2hg0" }]
16
16
  ];
17
- const ChartGantt = createLucideIcon("chart-gantt", __iconNode$7);
17
+ const ChartGantt = createLucideIcon("chart-gantt", __iconNode$9);
18
18
  /**
19
19
  * @license lucide-react v0.575.0 - ISC
20
20
  *
21
21
  * This source code is licensed under the ISC license.
22
22
  * See the LICENSE file in the root directory of this source tree.
23
23
  */
24
- const __iconNode$6 = [
24
+ const __iconNode$8 = [
25
25
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
26
26
  ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
27
27
  ["path", { d: "M12 17h.01", key: "p32p05" }]
28
28
  ];
29
- const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$6);
29
+ const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$8);
30
30
  /**
31
31
  * @license lucide-react v0.575.0 - ISC
32
32
  *
33
33
  * This source code is licensed under the ISC license.
34
34
  * See the LICENSE file in the root directory of this source tree.
35
35
  */
36
- const __iconNode$5 = [
36
+ const __iconNode$7 = [
37
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
38
+ ["path", { d: "M12 16v-4", key: "1dtifu" }],
39
+ ["path", { d: "M12 8h.01", key: "e9boi3" }]
40
+ ];
41
+ const Info = createLucideIcon("info", __iconNode$7);
42
+ /**
43
+ * @license lucide-react v0.575.0 - ISC
44
+ *
45
+ * This source code is licensed under the ISC license.
46
+ * See the LICENSE file in the root directory of this source tree.
47
+ */
48
+ const __iconNode$6 = [
37
49
  ["path", { d: "M3 5h.01", key: "18ugdj" }],
38
50
  ["path", { d: "M3 12h.01", key: "nlz23k" }],
39
51
  ["path", { d: "M3 19h.01", key: "noohij" }],
@@ -41,7 +53,18 @@ const __iconNode$5 = [
41
53
  ["path", { d: "M8 12h13", key: "1za7za" }],
42
54
  ["path", { d: "M8 19h13", key: "m83p4d" }]
43
55
  ];
44
- const List = createLucideIcon("list", __iconNode$5);
56
+ const List = createLucideIcon("list", __iconNode$6);
57
+ /**
58
+ * @license lucide-react v0.575.0 - ISC
59
+ *
60
+ * This source code is licensed under the ISC license.
61
+ * See the LICENSE file in the root directory of this source tree.
62
+ */
63
+ const __iconNode$5 = [
64
+ ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
65
+ ["path", { d: "M7 11V7a5 5 0 0 1 9.9-1", key: "1mm8w8" }]
66
+ ];
67
+ const LockOpen = createLucideIcon("lock-open", __iconNode$5);
45
68
  /**
46
69
  * @license lucide-react v0.575.0 - ISC
47
70
  *
@@ -513,15 +536,16 @@ function countEvents(n) {
513
536
  return `${n} event${n !== 1 ? "s" : ""}`;
514
537
  }
515
538
  function getEmptyMessage(search) {
539
+ return search.status === "not_found" ? `No events found for ${search.query}` : "No events found";
540
+ }
541
+ function getSearchHint(search) {
516
542
  switch (search.status) {
517
- case "not_found":
518
- return `No events found for ${search.query}`;
519
- case "error":
520
- return search.message;
543
+ case "incomplete":
544
+ return "Enter a full step, wait, hook, or event ID to search";
521
545
  case "unavailable":
522
- return "Exact ID search is unavailable in this view.";
546
+ return "Search isn’t available in this view";
523
547
  default:
524
- return "No events found";
548
+ return null;
525
549
  }
526
550
  }
527
551
  function getFooterLabel(search, counts) {
@@ -529,12 +553,10 @@ function getFooterLabel(search, counts) {
529
553
  switch (search.status) {
530
554
  case "ok":
531
555
  return `${countEvents(total)} for ${search.query}${search.truncated ? " (results may be truncated)" : ""}`;
556
+ case "loading":
532
557
  case "not_found":
533
- return `No events found for ${search.query}`;
534
558
  case "error":
535
- return search.message;
536
- case "incomplete":
537
- return "Enter a full step ID, wait ID, hook ID, or event ID";
559
+ return null;
538
560
  default:
539
561
  return `${countEvents(total)}${hasMoreEvents ? " loaded" : ""}`;
540
562
  }
@@ -1379,7 +1401,7 @@ const rowCopyValueVariants = cva("flex min-w-0 flex-1 items-center justify-end g
1379
1401
  });
1380
1402
  function DetailKeyValueRowBase({ label, value, copyText, href, removed = false, variant }) {
1381
1403
  const stringValue = typeof value === "string" ? value : void 0;
1382
- return jsxRuntimeExports.jsxs("div", { className: "px-1.5 hover:bg-gray-100 flex justify-between gap-3 -mx-1.5 py-0.5 rounded items-center", children: [jsxRuntimeExports.jsx("span", { className: "flex min-w-0 items-center gap-1.5 truncate text-label-13 text-gray-900", children: label }), removed ? jsxRuntimeExports.jsx("span", { className: "shrink-0 text-copy-13 italic text-gray-700", children: "removed" }) : copyText ? jsxRuntimeExports.jsxs("div", { className: cn(rowCopyValueVariants({ variant })), title: copyText, children: [href ? jsxRuntimeExports.jsxs("a", { href, target: "_blank", rel: "noreferrer", className: cn(rowValueVariants({ variant }), "flex min-w-0 items-center gap-0.5 hover:underline"), children: [jsxRuntimeExports.jsx(MiddleTruncate, { value: copyText, className: "min-w-0 grid-cols-[minmax(0,1fr)] text-right" }), jsxRuntimeExports.jsx(ArrowUpRight, { "aria-hidden": true, className: "h-3 w-3 shrink-0" })] }) : jsxRuntimeExports.jsx(MiddleTruncate, { value: copyText, className: cn(rowValueVariants({ variant, className: "text-right" }), "grid-cols-[minmax(0,1fr)]") }), jsxRuntimeExports.jsx(CopyButton, { copyText, ariaLabel: `Copy ${label}`, className: "shrink-0 -mr-1" })] }) : jsxRuntimeExports.jsx("span", { className: cn(rowValueVariants({ variant })), title: stringValue, children: href ? jsxRuntimeExports.jsx("a", { href, target: "_blank", rel: "noreferrer", className: "hover:underline", children: value }) : value })] });
1404
+ return jsxRuntimeExports.jsxs("div", { className: "px-1.5 hover:bg-gray-100 flex justify-between gap-3 -mx-1.5 py-0.5 rounded items-center", children: [jsxRuntimeExports.jsx("span", { className: "flex min-w-0 items-center gap-1.5 truncate text-label-13 text-gray-900", children: label }), removed ? jsxRuntimeExports.jsx("span", { className: "shrink-0 text-copy-13 italic text-gray-700", children: "removed" }) : copyText ? jsxRuntimeExports.jsxs("div", { className: cn(rowCopyValueVariants({ variant })), title: copyText, children: [href ? jsxRuntimeExports.jsxs("a", { href, target: "_blank", rel: "noreferrer", className: cn(rowValueVariants({ variant }), "flex min-w-0 items-center gap-0.5 hover:underline"), children: [jsxRuntimeExports.jsx(MiddleTruncate, { value: copyText, className: "min-w-0 grid-cols-[minmax(0,1fr)] text-right" }), jsxRuntimeExports.jsx(ArrowUpRight, { "aria-hidden": true, className: "h-3 w-3 shrink-0" })] }) : jsxRuntimeExports.jsx(MiddleTruncate, { value: copyText, className: cn(rowValueVariants({ variant, className: "text-right" }), "grid-cols-[minmax(0,1fr)]") }), jsxRuntimeExports.jsx(CopyButton, { textToCopy: copyText, "aria-label": `Copy ${label}`, size: "small", className: "-my-0.5 -mr-1" })] }) : jsxRuntimeExports.jsx("span", { className: cn(rowValueVariants({ variant })), title: stringValue, children: href ? jsxRuntimeExports.jsx("a", { href, target: "_blank", rel: "noreferrer", className: "hover:underline", children: value }) : value })] });
1383
1405
  }
1384
1406
  function DetailKeyValueRow(props) {
1385
1407
  return jsxRuntimeExports.jsx(DetailKeyValueRowBase, { ...props });
@@ -1683,9 +1705,20 @@ function DetailPanelShell({ id, width, title, itemLabel, actions, onPrev, onNext
1683
1705
  }, []);
1684
1706
  return jsxRuntimeExports.jsxs("aside", { ref: asideRef, id, className: "relative flex flex-col h-full max-h-full shrink-0 bg-background-100 border-l border-gray-alpha-400", style: { width: width.width }, children: [jsxRuntimeExports.jsx(DraggableBorder, { element: asideRef, position: "left", onWidthChange: width.resize, onReset: () => width.resize(PANEL_DEFAULT_WIDTH), "aria-label": `Resize ${itemLabel} details panel`, "aria-controls": id, "aria-valuemin": PANEL_MIN_WIDTH, "aria-valuemax": width.maxWidth, "aria-valuenow": Math.min(Math.max(Math.round(width.width), PANEL_MIN_WIDTH), width.maxWidth) }), jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2 shrink-0 px-4 py-[7.5px]", children: [jsxRuntimeExports.jsx("div", { className: "flex min-w-0 items-center gap-2 text-label-14 font-medium text-gray-1000", children: title }), jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-0.5 shrink-0", children: [actions, jsxRuntimeExports.jsxs(Tooltip, { children: [jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "Navigate up", "aria-keyshortcuts": "K", onClick: onPrev, disabled: !onPrev, children: jsxRuntimeExports.jsx(ChevronUp, { className: "w-4 h-4" }) }) }), onPrev ? jsxRuntimeExports.jsxs(TooltipContent, { children: ["Navigate up", jsxRuntimeExports.jsx(Kbd, { children: "K" })] }) : null] }), jsxRuntimeExports.jsxs(Tooltip, { children: [jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "Navigate down", "aria-keyshortcuts": "J", onClick: onNext, disabled: !onNext, children: jsxRuntimeExports.jsx(ChevronDown, { className: "w-4 h-4" }) }) }), onNext ? jsxRuntimeExports.jsxs(TooltipContent, { children: ["Navigate down", jsxRuntimeExports.jsx(Kbd, { children: "J" })] }) : null] }), jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "w-px h-4 bg-gray-alpha-400 mx-1" }), jsxRuntimeExports.jsx(IconButton, { "aria-label": `Close ${itemLabel} details`, "aria-keyshortcuts": "Escape", onClick: onClose, children: jsxRuntimeExports.jsx(X, { className: "w-4 h-4" }) })] })] }), jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto", children })] });
1685
1707
  }
1686
- const STYLES$1 = `.wf-decrypt-btn{appearance:none;-webkit-appearance:none;border:none;display:inline-flex;align-items:center;justify-content:center;height:28px;padding:0 10px;border-radius:6px;font-size:14px;font-weight:500;line-height:20px;cursor:pointer;white-space:nowrap;gap:6px;transition:background 150ms}.wf-decrypt-idle{color:var(--ds-gray-1000);background:var(--ds-background-100);box-shadow:0 0 0 1px var(--ds-gray-400)}.wf-decrypt-idle:hover{background:var(--ds-gray-alpha-200)}.wf-decrypt-btn:disabled{cursor:not-allowed;opacity:.5}.wf-decrypt-done{color:var(--ds-green-900);background:var(--ds-green-100);box-shadow:0 0 0 1px var(--ds-green-400);cursor:default}`;
1687
1708
  function DecryptButton({ decrypted = false, loading = false, disabled = false, disabledReason, onClick }) {
1688
- return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: STYLES$1 } }), jsxRuntimeExports.jsxs("button", { type: "button", onClick: decrypted ? void 0 : onClick, disabled: decrypted || loading || disabled, title: disabled ? disabledReason : void 0, className: `wf-decrypt-btn ${decrypted ? "wf-decrypt-done" : "wf-decrypt-idle"}`, children: [loading ? jsxRuntimeExports.jsx(Spinner, { size: 14 }) : decrypted ? jsxRuntimeExports.jsxs("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [jsxRuntimeExports.jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }), jsxRuntimeExports.jsx("path", { d: "M7 11V7a5 5 0 0 1 9.9-1" })] }) : jsxRuntimeExports.jsxs("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [jsxRuntimeExports.jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }), jsxRuntimeExports.jsx("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })] }), loading ? "Decrypting…" : decrypted ? "Decrypted" : "Decrypt"] })] });
1709
+ return jsxRuntimeExports.jsx(Button, {
1710
+ variant: "secondary",
1711
+ size: "small",
1712
+ onClick: decrypted ? void 0 : onClick,
1713
+ loading,
1714
+ disabled: decrypted || disabled,
1715
+ title: disabled ? disabledReason : void 0,
1716
+ prefix: decrypted ? jsxRuntimeExports.jsx(LockOpen, {}) : jsxRuntimeExports.jsx(Lock, {}),
1717
+ // Decrypted is a success state rather than an unavailable one, so it
1718
+ // keeps the green fill instead of the disabled gray.
1719
+ className: decrypted ? "disabled:cursor-default disabled:bg-green-100 disabled:text-green-900 disabled:[--themed-border:_var(--ds-green-400)] disabled:hover:bg-green-100" : void 0,
1720
+ children: decrypted ? "Decrypted" : "Decrypt"
1721
+ });
1689
1722
  }
1690
1723
  function isStructuredError(value) {
1691
1724
  return value != null && typeof value === "object" && (typeof value.message === "string" || typeof value.stack === "string");
@@ -1705,7 +1738,7 @@ ${stack}` : body;
1705
1738
  return jsxRuntimeExports.jsxs("div", { className: "relative overflow-hidden rounded-md border", style: {
1706
1739
  borderColor: "var(--ds-red-400)",
1707
1740
  background: "var(--ds-red-100)"
1708
- }, children: [jsxRuntimeExports.jsx(CopyButton, { copyText, ariaLabel: "Copy error", className: "absolute right-2 top-2 flex h-6 w-6 items-center justify-center rounded-md border border-red-400 bg-red-100 p-0 text-red-900 transition-transform transition-colors duration-100 hover:bg-red-200 active:scale-95" }), title && jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 px-3 py-2.5 pr-10", style: {
1741
+ }, children: [jsxRuntimeExports.jsx(CopyButton, { textToCopy: copyText, "aria-label": "Copy error", className: "absolute right-2 top-2 border border-red-400 text-red-900 enabled:hover:bg-red-200 enabled:hover:text-red-900 focus-visible:text-red-900" }), title && jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 px-3 py-2.5 pr-10", style: {
1709
1742
  color: "var(--ds-red-900)",
1710
1743
  borderBottom: "1px solid var(--ds-red-400)"
1711
1744
  }, children: [jsxRuntimeExports.jsx(CircleAlert, { className: "h-4 w-4 shrink-0" }), jsxRuntimeExports.jsx("p", {
@@ -1777,7 +1810,7 @@ function PayloadView({ data, eventType, encrypted }) {
1777
1810
  if (encrypted && decrypt2) {
1778
1811
  return jsxRuntimeExports.jsx(Collapsible, { defaultOpen: true, label: "Payload", children: jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 rounded-md border border-gray-alpha-400 bg-gray-100 py-1.5 pl-3 pr-1.5", children: [jsxRuntimeExports.jsx(Lock, { className: "h-4 w-4 shrink-0 text-gray-900" }), jsxRuntimeExports.jsx("span", { className: "min-w-0 flex-1 text-copy-13 text-gray-900", children: "Encrypted with this run’s key." }), jsxRuntimeExports.jsx(DecryptButton, { loading: decrypt2.isDecrypting, disabled: decrypt2.isDecryptDisabled, disabledReason: decrypt2.decryptDisabledReason, onClick: decrypt2.onDecrypt })] }) });
1779
1812
  }
1780
- return jsxRuntimeExports.jsx(Collapsible, { defaultOpen: true, label: "Payload", actions: jsxRuntimeExports.jsx(CopyButton, { copyText: serializeForClipboard(cleaned), ariaLabel: "Copy payload", className: "flex h-6 w-6 items-center justify-center rounded-md p-0 hover:bg-gray-alpha-200" }), children: eventType === "attr_set" ? jsxRuntimeExports.jsx(AttrSetEventBlock, { data: cleaned }) : jsxRuntimeExports.jsx("div", { className: "overflow-x-auto", children: jsxRuntimeExports.jsx(DataInspector, { data: cleaned }) }) });
1813
+ return jsxRuntimeExports.jsx(Collapsible, { defaultOpen: true, label: "Payload", actions: jsxRuntimeExports.jsx(CopyButton, { textToCopy: serializeForClipboard(cleaned), "aria-label": "Copy payload" }), children: eventType === "attr_set" ? jsxRuntimeExports.jsx(AttrSetEventBlock, { data: cleaned }) : jsxRuntimeExports.jsx("div", { className: "overflow-x-auto", children: jsxRuntimeExports.jsx(DataInspector, { data: cleaned }) }) });
1781
1814
  }
1782
1815
  function TimingBreakdown({ segments }) {
1783
1816
  return jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "flex h-2 gap-0.5 overflow-hidden rounded-full", children: segments.map((segment, i) => jsxRuntimeExports.jsx("span", { className: cn("h-full min-w-1 basis-0", SEGMENT_COLOR[segment.kind]), style: { flexGrow: segment.ms } }, i)) }), jsxRuntimeExports.jsx("ul", { className: "flex flex-wrap items-center gap-x-4 gap-y-1", children: segments.map((segment, i) => jsxRuntimeExports.jsxs("li", { className: "flex items-center gap-1.5 text-label-14", children: [jsxRuntimeExports.jsx("span", { className: "flex size-4 shrink-0 items-center justify-center", children: jsxRuntimeExports.jsx("span", { "aria-hidden": true, className: cn("block size-2.5 rounded-full", SEGMENT_COLOR[segment.kind]) }) }), jsxRuntimeExports.jsx("span", { className: "text-gray-900", children: segment.label }), jsxRuntimeExports.jsx("span", { className: "tabular-nums text-gray-1000", children: formatDurationPrecise(segment.ms) })] }, i)) })] });
@@ -1826,14 +1859,64 @@ function EventDetailsPanel({ width, onPrev, onNext, onClose, onViewInTrace, ...b
1826
1859
  const { event } = row;
1827
1860
  return jsxRuntimeExports.jsx(DetailPanelShell, { id: EVENT_DETAIL_PANEL_ID, width, itemLabel: "event", title: jsxRuntimeExports.jsx("span", { className: "truncate block", children: row.name || event.eventType }), actions: onViewInTrace ? jsxRuntimeExports.jsxs(Tooltip, { children: [jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "View in Trace", onClick: () => onViewInTrace(getEventSpanId(event)), children: jsxRuntimeExports.jsx(ChartGantt, { className: "w-4 h-4" }) }) }), jsxRuntimeExports.jsx(TooltipContent, { children: "View in Trace" })] }) : null, onPrev, onNext, onClose, children: jsxRuntimeExports.jsx(EventDetailsBody, { ...body }, event.eventId) });
1828
1861
  }
1829
- function EventListToolbar({ query, onQueryChange }) {
1830
- return jsxRuntimeExports.jsxs("div", { className: "flex h-10 min-h-10 shrink-0 items-center gap-1.5 border-b border-gray-alpha-400 bg-background-100 pl-[34px] pr-2", children: [jsxRuntimeExports.jsx(Search, { className: "h-3.5 w-3.5 shrink-0 text-gray-800" }), jsxRuntimeExports.jsx("input", { type: "text", name: "event-list-search", "aria-label": "Search events", placeholder: "Search by step ID, wait ID, hook ID, or event ID…", value: query, onChange: (e) => onQueryChange(e.target.value), onKeyDown: (e) => {
1831
- if (e.key === "Escape" && query) {
1862
+ function SearchInput({ value, onValueChange, label, className, id, onKeyDown, onFocus, onBlur, ...props }) {
1863
+ const generatedId = reactExports.useId();
1864
+ const inputId = id ?? generatedId;
1865
+ const inputRef = reactExports.useRef(null);
1866
+ const lastInputRef = reactExports.useRef("keyboard");
1867
+ const [focusVisible, setFocusVisible] = reactExports.useState(false);
1868
+ reactExports.useEffect(() => {
1869
+ const onPointerDown = () => {
1870
+ lastInputRef.current = "pointer";
1871
+ };
1872
+ const onDocumentKeyDown = (e) => {
1873
+ if (e.metaKey || e.altKey || e.ctrlKey)
1874
+ return;
1875
+ lastInputRef.current = "keyboard";
1876
+ };
1877
+ document.addEventListener("pointerdown", onPointerDown, true);
1878
+ document.addEventListener("keydown", onDocumentKeyDown, true);
1879
+ return () => {
1880
+ document.removeEventListener("pointerdown", onPointerDown, true);
1881
+ document.removeEventListener("keydown", onDocumentKeyDown, true);
1882
+ };
1883
+ }, []);
1884
+ const clear = () => {
1885
+ var _a;
1886
+ onValueChange("");
1887
+ (_a = inputRef.current) == null ? void 0 : _a.focus();
1888
+ };
1889
+ return jsxRuntimeExports.jsxs("div", { className: cn("@container flex h-10 min-h-10 shrink-0 items-center gap-1.5 border-b border-gray-alpha-400 bg-background-100 pr-2", focusVisible && "[outline:var(--ds-focus-ring-outline,2px_solid_var(--ds-focus-color))] -outline-offset-2", className), children: [jsxRuntimeExports.jsx("label", { htmlFor: inputId, className: "sr-only", children: label }), jsxRuntimeExports.jsx(Search, { "aria-hidden": true, className: "size-3.5 shrink-0 text-gray-800" }), jsxRuntimeExports.jsx("input", { ...props, ref: inputRef, id: inputId, type: "search", autoComplete: "off", spellCheck: false, value, onChange: (e) => onValueChange(e.target.value), onFocus: (e) => {
1890
+ onFocus == null ? void 0 : onFocus(e);
1891
+ setFocusVisible(lastInputRef.current === "keyboard");
1892
+ }, onBlur: (e) => {
1893
+ onBlur == null ? void 0 : onBlur(e);
1894
+ setFocusVisible(false);
1895
+ }, onKeyDown: (e) => {
1896
+ onKeyDown == null ? void 0 : onKeyDown(e);
1897
+ if (e.defaultPrevented)
1898
+ return;
1899
+ if (e.key === "Escape" && value) {
1832
1900
  e.preventDefault();
1833
1901
  e.stopPropagation();
1834
- onQueryChange("");
1835
- }
1836
- }, className: "min-w-0 flex-1 bg-transparent text-label-14 text-gray-1000 outline-none placeholder:text-gray-800" }), query ? jsxRuntimeExports.jsx("button", { type: "button", "aria-label": "Clear search", onClick: () => onQueryChange(""), className: "flex h-full shrink-0 cursor-pointer items-center border-0 bg-transparent px-1 text-gray-900 hover:text-gray-1000", children: jsxRuntimeExports.jsx(Kbd, { variant: "outline", size: "search", children: "Esc" }) }) : null] });
1902
+ onValueChange("");
1903
+ }
1904
+ }, className: "min-w-0 flex-1 appearance-none bg-transparent text-label-14 text-gray-1000 outline-none placeholder:text-gray-800 [&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none" }), value ? jsxRuntimeExports.jsxs("button", { type: "button", "aria-label": "Clear search", onClick: clear, className: cn("-mr-2 flex h-full shrink-0 cursor-pointer items-center rounded-r-md border-0 bg-transparent px-2.5 text-gray-900 transition-colors duration-150 ease-in hover:text-gray-1000", "focus-visible:[outline:var(--ds-focus-ring-outline,2px_solid_var(--ds-focus-color))] focus-visible:-outline-offset-2"), children: [jsxRuntimeExports.jsx(X, { "aria-hidden": true, className: "size-3.5 @min-[320px]:hidden" }), jsxRuntimeExports.jsx(Kbd, { "aria-hidden": true, variant: "outline", size: "search", className: "hidden @min-[320px]:inline-flex", children: "Esc" })] }) : null] });
1905
+ }
1906
+ const HINT_DELAY_MS = 500;
1907
+ function EventListToolbar({ query, hint: hint2, onQueryChange }) {
1908
+ const hintId = reactExports.useId();
1909
+ const [paused, setPaused] = reactExports.useState(false);
1910
+ const pauseTimer = reactExports.useRef(void 0);
1911
+ const handleQueryChange = (next) => {
1912
+ if (!hint2)
1913
+ setPaused(false);
1914
+ clearTimeout(pauseTimer.current);
1915
+ pauseTimer.current = setTimeout(() => setPaused(true), HINT_DELAY_MS);
1916
+ onQueryChange(next);
1917
+ };
1918
+ const shownHint = paused ? hint2 : null;
1919
+ return jsxRuntimeExports.jsxs("div", { className: "shrink-0", children: [jsxRuntimeExports.jsx(SearchInput, { name: "event-list-search", label: "Search events", placeholder: "Search by step ID, wait ID, hook ID, or event ID…", "aria-describedby": hintId, value: query, onValueChange: handleQueryChange, className: "pl-[34px]" }), jsxRuntimeExports.jsx("div", { id: hintId, "aria-live": "polite", children: shownHint ? jsxRuntimeExports.jsxs("div", { className: "flex h-8 items-center gap-1.5 bg-gray-100 pl-[34px] pr-2 text-label-13 text-gray-1000", children: [jsxRuntimeExports.jsx(Info, { className: "h-3.5 w-3.5 shrink-0 text-gray-900" }), jsxRuntimeExports.jsx("span", { className: "min-w-0 truncate", children: shownHint })] }) : null })] });
1837
1920
  }
1838
1921
  const WorkflowIcon = () => {
1839
1922
  return jsxRuntimeExports.jsx("svg", { "aria-hidden": "true", "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", viewBox: "0 0 16 16", width: "16", children: jsxRuntimeExports.jsx("path", { d: "M5.75 7L6.4209 7.33594L4.85254 10.4717C5.38789 10.771 5.75 11.3431 5.75 12V14C5.75 14.9665 4.96648 15.75 4 15.75H2C1.03352 15.75 0.25 14.9665 0.25 14V12C0.25 11.0335 1.03352 10.25 2 10.25H3.28711L5.0791 6.66504L5.75 7ZM14 10.25C14.9665 10.25 15.75 11.0335 15.75 12V14C15.75 14.9665 14.9665 15.75 14 15.75H12C11.1185 15.75 10.3909 15.098 10.2695 14.25H7V12.75H10.25V12C10.25 11.0335 11.0335 10.25 12 10.25H14ZM2 11.75C1.86192 11.75 1.75 11.8619 1.75 12V14C1.75 14.1381 1.86192 14.25 2 14.25H4C4.13808 14.25 4.25 14.1381 4.25 14V12C4.25 11.8619 4.13808 11.75 4 11.75H2ZM12 11.75C11.8619 11.75 11.75 11.8619 11.75 12V14C11.75 14.1381 11.8619 14.25 12 14.25H14C14.1381 14.25 14.25 14.1381 14.25 14V12C14.25 11.8619 14.1381 11.75 14 11.75H12ZM9 0.25C9.96649 0.25 10.75 1.03351 10.75 2V4C10.75 4.44642 10.5808 4.85197 10.3057 5.16113L12.2041 8.6416L10.8877 9.36035L8.91895 5.75H7C6.03351 5.75 5.25 4.96649 5.25 4V2C5.25 1.03351 6.03351 0.25 7 0.25H9ZM7 1.75C6.86193 1.75 6.75 1.86193 6.75 2V4C6.75 4.13807 6.86193 4.25 7 4.25H9C9.13807 4.25 9.25 4.13807 9.25 4V2C9.25 1.86193 9.13807 1.75 9 1.75H7Z", fill: "currentColor" }) });
@@ -1895,13 +1978,13 @@ const COL = {
1895
1978
  time: "w-[172px]",
1896
1979
  since: "w-[100px]",
1897
1980
  event: "w-[136px]",
1898
- name: "w-[200px]",
1981
+ name: "w-[280px]",
1899
1982
  duration: "w-[96px] justify-end"
1900
1983
  };
1901
1984
  const CELL = "flex h-full shrink-0 items-center overflow-hidden px-1.5";
1902
1985
  const LEVEL_ROW_CLASS = {
1903
- default: "text-gray-1000 hover:bg-gray-alpha-200",
1904
- muted: "text-gray-700 hover:bg-gray-alpha-200",
1986
+ default: "text-gray-1000 hover:bg-gray-100",
1987
+ muted: "text-gray-700 hover:bg-gray-100",
1905
1988
  warning: "bg-amber-100 text-amber-900 hover:bg-amber-200",
1906
1989
  error: "bg-red-100 text-red-900 hover:bg-red-200"
1907
1990
  };
@@ -1912,8 +1995,8 @@ const LEVEL_SEPARATOR_CLASS = {
1912
1995
  error: "border-red-400"
1913
1996
  };
1914
1997
  const LEVEL_SELECTED_CLASS = {
1915
- default: "bg-gray-200 hover:bg-gray-200",
1916
- muted: "bg-gray-200 hover:bg-gray-200",
1998
+ default: "bg-blue-300 hover:bg-blue-300",
1999
+ muted: "bg-blue-300 hover:bg-blue-300",
1917
2000
  warning: "bg-amber-300 hover:bg-amber-300",
1918
2001
  error: "bg-red-300 hover:bg-red-300"
1919
2002
  };
@@ -1935,27 +2018,29 @@ function SortIndicator({ order }) {
1935
2018
  }
1936
2019
  function EventListHeader({ showOccurred, sortOrder, onSortOrderChange }) {
1937
2020
  const sortButton = (label) => jsxRuntimeExports.jsxs("button", { type: "button", "aria-label": `${label}, ${sortOrder === "asc" ? "oldest" : "newest"} first`, onClick: () => onSortOrderChange(sortOrder === "asc" ? "desc" : "asc"), className: cn(CELL, COL.time, "cursor-pointer gap-1.5 border-0 bg-transparent text-left font-sans text-label-14 text-gray-900 hover:text-gray-1000"), children: [label, jsxRuntimeExports.jsx(SortIndicator, { order: sortOrder })] });
1938
- return jsxRuntimeExports.jsxs("div", { role: "row", className: "mx-1 flex h-10 shrink-0 items-center border-b border-gray-alpha-200 font-sans text-label-14 text-gray-900", children: [jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.level) }), showOccurred ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [sortButton("Occurred"), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.time), children: "Created" })] }) : sortButton("Time"), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.since) }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.event), children: "Event" }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.name), children: "Name" }), jsxRuntimeExports.jsx("div", { className: cn(CELL, "min-w-0 flex-1 h-3.5 border-l border-gray-400"), children: "Message" }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.duration), children: "Duration" })] });
2021
+ return jsxRuntimeExports.jsxs("div", { role: "row", className: "flex h-10 shrink-0 items-center border-b border-gray-alpha-400 px-1 font-sans text-label-14 text-gray-900", children: [jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.level) }), showOccurred ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [sortButton("Occurred"), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.time), children: "Created" })] }) : sortButton("Time"), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.since) }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.name), children: "Name" }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.event), children: "Event" }), jsxRuntimeExports.jsx("div", { className: cn(CELL, "min-w-0 flex-1 h-3.5 border-l border-gray-400"), children: "Message" }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.duration), children: "Duration" })] });
1939
2022
  }
1940
2023
  function IdleGapRow({ ms, reason }) {
1941
2024
  return jsxRuntimeExports.jsxs("div", { className: "mx-1 mt-px flex h-6 items-center gap-2.5 pl-[30px] pr-2 font-mono text-label-12-mono text-gray-700", children: [jsxRuntimeExports.jsx("span", { className: "h-px w-3 shrink-0 bg-gray-400" }), jsxRuntimeExports.jsxs("span", { className: "shrink-0", children: [formatDurationPrecise(ms), " idle", reason ? ` · ${reason}` : ""] }), jsxRuntimeExports.jsx("span", { className: "h-px flex-1 bg-gray-400" })] });
1942
2025
  }
1943
- function EventRow({ row, index, isSelected, isTabStop, isRelated, onSelect, showSeparateEventOccurrenceTimestamps = false }) {
2026
+ function EventRow({ row, index, isSelected, isTabStop, relation, onSelect, showSeparateEventOccurrenceTimestamps = false }) {
1944
2027
  const { event, level, name, message, notice } = row;
1945
2028
  const occurredAt = parseEventDate(event.occurredAt);
1946
2029
  const displayedAt = showSeparateEventOccurrenceTimestamps ? new Date(event.createdAt) : getEffectiveEventDate$1(event);
1947
- const zebra = (level === "default" || level === "muted") && index % 2 === 1;
1948
- const secondaryClass = level === "warning" || level === "error" ? void 0 : "text-gray-900";
2030
+ const isTinted = level === "warning" || level === "error";
2031
+ const isRelated = relation === "related";
2032
+ const isMuted = relation === "unrelated" && !isTinted;
2033
+ const secondaryClass = isTinted || isMuted ? void 0 : "text-gray-900";
1949
2034
  return jsxRuntimeExports.jsxs("div", { "data-event-id": event.eventId, role: "button", tabIndex: isTabStop ? 0 : -1, "aria-pressed": isSelected, onClick: () => onSelect(event), onKeyDown: (e) => {
1950
2035
  if (e.key === "Enter" || e.key === " ") {
1951
2036
  e.preventDefault();
1952
2037
  onSelect(event);
1953
2038
  }
1954
- }, className: cn("mx-1 mt-px flex h-6 cursor-pointer items-center rounded-md font-mono text-[13px] leading-5 outline-none focus-visible:relative focus-visible:z-10 focus-visible:shadow-[0_0_0_2px_var(--ds-focus-color)]", LEVEL_ROW_CLASS[level], zebra && "bg-gray-alpha-100", isSelected && LEVEL_SELECTED_CLASS[level]), children: [jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.level), children: jsxRuntimeExports.jsx(LevelIcon, { level }) }), showSeparateEventOccurrenceTimestamps && (occurredAt ? jsxRuntimeExports.jsx(TimestampCell, { date: occurredAt, secondaryClass }) : jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.time, secondaryClass), children: "—" })), jsxRuntimeExports.jsx(TimestampCell, { date: displayedAt, secondaryClass }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.since, "tabular-nums", secondaryClass), children: row.sinceStartMs !== void 0 ? formatSinceStart(row.sinceStartMs) : "" }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.event), children: jsxRuntimeExports.jsx(EventNoticeTooltip, { notice, children: jsxRuntimeExports.jsx("span", { className: cn("truncate", notice && "line-through"), title: event.eventType, children: event.eventType }) }) }), jsxRuntimeExports.jsxs("div", { className: cn(CELL, COL.name, "gap-2"), title: name || void 0, children: [jsxRuntimeExports.jsx(ResourceIcon, { resource: row.resource, isErrored: level === "error", isCancelled: event.eventType === "run_cancelled" }), name ? jsxRuntimeExports.jsx("span", { className: cn("-mx-1 truncate rounded px-1", isRelated && "bg-blue-100 text-blue-900"), children: name }) : null] }), jsxRuntimeExports.jsx("div", { className: cn(CELL, "min-w-0 flex-1 h-3.5 border-l", LEVEL_SEPARATOR_CLASS[level]), title: message || void 0, children: jsxRuntimeExports.jsx("span", { className: "truncate", children: message }) }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.duration, "tabular-nums"), children: row.durationMs !== void 0 ? formatDurationPrecise(row.durationMs) : "" })] });
2039
+ }, className: cn("mx-1 mt-px flex h-6 cursor-pointer items-center rounded-md font-mono text-[13px] leading-5 outline-none focus-visible:relative focus-visible:z-10 focus-visible:shadow-[0_0_0_2px_var(--ds-focus-color)]", LEVEL_ROW_CLASS[level], !isTinted && !relation && index % 2 === 1 && "bg-background-200", isRelated && !isTinted && "bg-blue-300/50 hover:bg-blue-300/75", isMuted && "text-gray-700 [&_svg]:text-gray-700", isSelected && LEVEL_SELECTED_CLASS[level]), children: [jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.level), children: jsxRuntimeExports.jsx(LevelIcon, { level }) }), showSeparateEventOccurrenceTimestamps && (occurredAt ? jsxRuntimeExports.jsx(TimestampCell, { date: occurredAt, secondaryClass }) : jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.time, secondaryClass), children: "—" })), jsxRuntimeExports.jsx(TimestampCell, { date: displayedAt, secondaryClass }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.since, "tabular-nums", secondaryClass), children: row.sinceStartMs !== void 0 ? formatSinceStart(row.sinceStartMs) : "" }), jsxRuntimeExports.jsxs("div", { className: cn(CELL, COL.name, "gap-2"), title: name || void 0, children: [jsxRuntimeExports.jsx(ResourceIcon, { resource: row.resource, isErrored: level === "error", isCancelled: event.eventType === "run_cancelled" }), name ? jsxRuntimeExports.jsx("span", { className: cn("-mx-1 truncate rounded px-1", isRelated && "text-blue-900", isRelated && isTinted && "bg-blue-100"), children: name }) : null] }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.event), children: jsxRuntimeExports.jsx(EventNoticeTooltip, { notice, children: jsxRuntimeExports.jsx("span", { className: cn("truncate", notice && "line-through"), title: event.eventType, children: event.eventType }) }) }), jsxRuntimeExports.jsx("div", { className: cn(CELL, "min-w-0 flex-1 h-3.5 border-l", LEVEL_SEPARATOR_CLASS[level]), title: message || void 0, children: jsxRuntimeExports.jsx("span", { className: "truncate", children: message }) }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.duration, "tabular-nums"), children: row.durationMs !== void 0 ? formatDurationPrecise(row.durationMs) : "" })] });
1955
2040
  }
1956
2041
  const SKELETON_MESSAGE_WIDTHS = ["40%", "0%", "25%", "55%", "0%", "30%"];
1957
2042
  function EventRowsSkeleton() {
1958
- return jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-hidden pt-px", children: Array.from({ length: 18 }, (_, i) => jsxRuntimeExports.jsxs("div", { className: cn("mx-1 mt-px flex h-6 items-center rounded-md", i % 2 === 1 && "bg-gray-alpha-100"), children: [jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.level) }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.time), children: jsxRuntimeExports.jsx(Skeleton, { className: "h-3 w-[136px]" }) }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.since), children: jsxRuntimeExports.jsx(Skeleton, { className: "h-3 w-12" }) }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.event), children: jsxRuntimeExports.jsx(Skeleton, { className: "h-3 w-[104px]" }) }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.name), children: jsxRuntimeExports.jsx(Skeleton, { className: "h-3 w-24" }) }), jsxRuntimeExports.jsx("div", { className: cn(CELL, "min-w-0 flex-1"), children: jsxRuntimeExports.jsx(Skeleton, { className: "h-3", style: {
2043
+ return jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-hidden pt-px", children: Array.from({ length: 18 }, (_, i) => jsxRuntimeExports.jsxs("div", { className: cn("mx-1 mt-px flex h-6 items-center rounded-md", i % 2 === 1 && "bg-background-200"), children: [jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.level) }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.time), children: jsxRuntimeExports.jsx(Skeleton, { className: "h-3 w-[136px]" }) }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.since), children: jsxRuntimeExports.jsx(Skeleton, { className: "h-3 w-12" }) }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.name), children: jsxRuntimeExports.jsx(Skeleton, { className: "h-3 w-24" }) }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.event), children: jsxRuntimeExports.jsx(Skeleton, { className: "h-3 w-[104px]" }) }), jsxRuntimeExports.jsx("div", { className: cn(CELL, "min-w-0 flex-1"), children: jsxRuntimeExports.jsx(Skeleton, { className: "h-3", style: {
1959
2044
  width: SKELETON_MESSAGE_WIDTHS[i % SKELETON_MESSAGE_WIDTHS.length]
1960
2045
  } }) }), jsxRuntimeExports.jsx("div", { className: cn(CELL, COL.duration) })] }, i)) });
1961
2046
  }
@@ -1982,6 +2067,7 @@ const EXACT_SEARCH_DEBOUNCE_MS = 300;
1982
2067
  function useEventSearch(onExactIdSearch) {
1983
2068
  const [query, setQuery] = reactExports.useState("");
1984
2069
  const [outcome, setOutcome] = reactExports.useState(null);
2070
+ const [attempt, setAttempt] = reactExports.useState(0);
1985
2071
  const trimmed = query.trim();
1986
2072
  const parsed = reactExports.useMemo(() => parseExactWorkflowSearchId(trimmed), [trimmed]);
1987
2073
  reactExports.useEffect(() => {
@@ -1989,37 +2075,34 @@ function useEventSearch(onExactIdSearch) {
1989
2075
  return;
1990
2076
  const abortController = new AbortController();
1991
2077
  const timer = setTimeout(async () => {
1992
- let next;
2078
+ let answer;
1993
2079
  try {
1994
2080
  const result = await onExactIdSearch(parsed.id, parsed.kind, abortController.signal);
1995
2081
  if (result.status === "error") {
1996
- next = { query: trimmed, status: "error", message: result.message };
2082
+ answer = result;
1997
2083
  } else if (result.status === "not_found" || result.events.length === 0) {
1998
- next = { query: trimmed, status: "not_found" };
2084
+ answer = { status: "not_found" };
1999
2085
  } else {
2000
- next = {
2001
- query: trimmed,
2086
+ answer = {
2002
2087
  status: "ok",
2003
2088
  events: result.events,
2004
2089
  truncated: Boolean(result.truncated)
2005
2090
  };
2006
2091
  }
2007
2092
  } catch {
2008
- next = {
2009
- query: trimmed,
2010
- status: "error",
2011
- message: "Failed to search events. Try again."
2012
- };
2093
+ answer = { status: "error" };
2094
+ }
2095
+ if (!abortController.signal.aborted) {
2096
+ setOutcome({ query: trimmed, attempt, answer });
2013
2097
  }
2014
- if (!abortController.signal.aborted)
2015
- setOutcome(next);
2016
2098
  }, EXACT_SEARCH_DEBOUNCE_MS);
2017
2099
  return () => {
2018
2100
  clearTimeout(timer);
2019
2101
  abortController.abort();
2020
2102
  setOutcome(null);
2021
2103
  };
2022
- }, [trimmed, parsed, onExactIdSearch]);
2104
+ }, [trimmed, parsed, onExactIdSearch, attempt]);
2105
+ const retry = reactExports.useCallback(() => setAttempt((n) => n + 1), []);
2023
2106
  const search = reactExports.useMemo(() => {
2024
2107
  if (!trimmed)
2025
2108
  return { status: "idle" };
@@ -2028,12 +2111,12 @@ function useEventSearch(onExactIdSearch) {
2028
2111
  }
2029
2112
  if (!onExactIdSearch)
2030
2113
  return { status: "unavailable", query: trimmed };
2031
- if ((outcome == null ? void 0 : outcome.query) !== trimmed) {
2114
+ if ((outcome == null ? void 0 : outcome.query) !== trimmed || outcome.attempt !== attempt) {
2032
2115
  return { status: "loading", query: trimmed, id: parsed };
2033
2116
  }
2034
- return { ...outcome, id: parsed };
2035
- }, [trimmed, parsed, onExactIdSearch, outcome]);
2036
- return { query, setQuery, search };
2117
+ return { ...outcome.answer, query: trimmed, id: parsed };
2118
+ }, [trimmed, parsed, onExactIdSearch, outcome, attempt]);
2119
+ return { query, setQuery, search, retry };
2037
2120
  }
2038
2121
  function useElementWidth(ref, enabled = true) {
2039
2122
  const [width, setWidth] = reactExports.useState(0);
@@ -2066,9 +2149,11 @@ function useDetailPanelWidth(containerRef, open) {
2066
2149
  resize
2067
2150
  };
2068
2151
  }
2069
- const STYLES = `.wf-load-more{appearance:none;-webkit-appearance:none;border:none;display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;border-radius:6px;font-size:13px;font-weight:500;line-height:20px;color:var(--ds-gray-1000);background:var(--ds-background-100);box-shadow:0 0 0 1px var(--ds-gray-400);cursor:pointer;white-space:nowrap;gap:6px;transition:background 150ms}.wf-load-more:hover{background:var(--ds-gray-alpha-200)}.wf-load-more:disabled{opacity:.6;cursor:default}.wf-load-more:disabled:hover{background:var(--ds-background-100)}`;
2070
- function LoadMoreButton({ loading = false, onClick, label = "Load more", loadingLabel = "Loading..." }) {
2071
- return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: STYLES } }), jsxRuntimeExports.jsxs("button", { type: "button", onClick, disabled: loading, className: "wf-load-more", children: [loading && jsxRuntimeExports.jsx(Spinner, { size: 14 }), loading ? loadingLabel : label] })] });
2152
+ function EmptyState({ search, onRetry }) {
2153
+ if (search.status === "error") {
2154
+ return jsxRuntimeExports.jsxs("div", { className: "flex flex-1 flex-col items-center justify-center gap-3 px-6 text-center", children: [jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center gap-1", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-label-14 font-medium text-gray-1000", children: [jsxRuntimeExports.jsx(CircleAlert, { className: "h-4 w-4 shrink-0 text-red-800" }), "Failed to search events"] }), search.message ? jsxRuntimeExports.jsx("p", { className: "m-0 text-copy-13 text-gray-900", children: search.message }) : null] }), jsxRuntimeExports.jsx(Button, { variant: "secondary", size: "small", onClick: onRetry, children: "Try again" })] });
2155
+ }
2156
+ return jsxRuntimeExports.jsx("div", { className: "flex flex-1 items-center justify-center px-6 text-center text-copy-14 text-gray-900", children: getEmptyMessage(search) });
2072
2157
  }
2073
2158
  function EventListViewInner({ events, run, onLoadEventData, hasMoreEvents = false, isLoadingMoreEvents = false, onLoadMoreEvents, encryptionKey, isLoading = false, sortOrder: sortOrderProp, onSortOrderChange, onDecrypt, isDecrypting = false, isDecryptDisabled = false, decryptDisabledReason, onExactIdSearch, showSeparateEventOccurrenceTimestamps = false, onViewInTrace }) {
2074
2159
  const [internalSortOrder, setInternalSortOrder] = reactExports.useState("asc");
@@ -2077,7 +2162,7 @@ function EventListViewInner({ events, run, onLoadEventData, hasMoreEvents = fals
2077
2162
  const virtuosoRef = reactExports.useRef(null);
2078
2163
  const bodyRef = reactExports.useRef(null);
2079
2164
  const [selectedEventId, setSelectedEventId] = reactExports.useState();
2080
- const { query, setQuery, search } = useEventSearch(onExactIdSearch);
2165
+ const { query, setQuery, search, retry } = useEventSearch(onExactIdSearch);
2081
2166
  const list = getListSource(search, { events, hasMore: hasMoreEvents });
2082
2167
  const sortedEvents = reactExports.useMemo(() => sortEventsByTime(list.events, sortOrder), [list.events, sortOrder]);
2083
2168
  const knownEvents = reactExports.useMemo(() => mergeEventsById(events ?? [], list.events), [events, list.events]);
@@ -2099,6 +2184,21 @@ function EventListViewInner({ events, run, onLoadEventData, hasMoreEvents = fals
2099
2184
  return event ? buildEventRow(event, lookups) : void 0;
2100
2185
  }, [selectedEventId, knownEvents, lookups]);
2101
2186
  const relatedKey = search.status === "ok" ? search.id.kind === "event" ? getEventEntity(search.events[0]).key : search.id.id : (selectedRow == null ? void 0 : selectedRow.entity.key) ?? null;
2187
+ const [visibleRange, setVisibleRange] = reactExports.useState({
2188
+ startIndex: 0,
2189
+ endIndex: 0
2190
+ });
2191
+ const relatedIndexes = reactExports.useMemo(() => listItems.flatMap((item, i) => item.kind === "event" && item.row.entity.key === relatedKey ? [i] : []), [listItems, relatedKey]);
2192
+ const relatedAbove = relatedIndexes.filter((i) => i < visibleRange.startIndex);
2193
+ const relatedBelow = relatedIndexes.filter((i) => i > visibleRange.endIndex);
2194
+ const scrollToItem = (index) => {
2195
+ var _a;
2196
+ return (_a = virtuosoRef.current) == null ? void 0 : _a.scrollToIndex({
2197
+ index,
2198
+ align: "center",
2199
+ behavior: "smooth"
2200
+ });
2201
+ };
2102
2202
  const eventDataCacheRef = reactExports.useRef(/* @__PURE__ */ new Map());
2103
2203
  const cacheEventData = reactExports.useCallback((eventId, data) => {
2104
2204
  eventDataCacheRef.current.set(eventId, data);
@@ -2135,7 +2235,7 @@ function EventListViewInner({ events, run, onLoadEventData, hasMoreEvents = fals
2135
2235
  }
2136
2236
  }, [selectedIndex, moveSelection]);
2137
2237
  const panelWidth = useDetailPanelWidth(bodyRef, selectedRow !== void 0);
2138
- const toolbar = jsxRuntimeExports.jsx(EventListToolbar, { query, onQueryChange: setQuery });
2238
+ const toolbar = jsxRuntimeExports.jsx(EventListToolbar, { query, hint: getSearchHint(search), onQueryChange: setQuery });
2139
2239
  if (isInitialLoad) {
2140
2240
  return jsxRuntimeExports.jsxs("div", { className: "flex h-full flex-col overflow-hidden bg-background-100", children: [toolbar, jsxRuntimeExports.jsx(EventListHeader, { showOccurred: showSeparateEventOccurrenceTimestamps, sortOrder, onSortOrderChange: handleSortOrderChange }), jsxRuntimeExports.jsx(EventRowsSkeleton, {})] });
2141
2241
  }
@@ -2144,7 +2244,7 @@ function EventListViewInner({ events, run, onLoadEventData, hasMoreEvents = fals
2144
2244
  isDecrypting,
2145
2245
  isDecryptDisabled,
2146
2246
  decryptDisabledReason
2147
- } : void 0, children: jsxRuntimeExports.jsxs("div", { className: "flex h-full flex-col overflow-hidden bg-background-100", children: [toolbar, jsxRuntimeExports.jsxs("div", { ref: bodyRef, className: "flex min-h-0 flex-1", children: [jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-1 flex-col", onKeyDown: handleListKeyDown, children: [jsxRuntimeExports.jsx(EventListHeader, { showOccurred: showSeparateEventOccurrenceTimestamps, sortOrder, onSortOrderChange: handleSortOrderChange }), isRefetching || search.status === "loading" ? jsxRuntimeExports.jsx(EventRowsSkeleton, {}) : rows.length === 0 ? jsxRuntimeExports.jsx("div", { className: "flex flex-1 items-center justify-center px-6 text-center text-copy-14 text-gray-900", children: getEmptyMessage(search) }) : jsxRuntimeExports.jsx(es, { ref: virtuosoRef, totalCount: listItems.length, overscan: 20, defaultItemHeight: 25, computeItemKey: (i) => {
2247
+ } : void 0, children: jsxRuntimeExports.jsxs("div", { className: "flex h-full flex-col overflow-hidden bg-background-100", children: [toolbar, jsxRuntimeExports.jsxs("div", { ref: bodyRef, className: "flex min-h-0 flex-1", children: [jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-1 flex-col", onKeyDown: handleListKeyDown, children: [jsxRuntimeExports.jsx(EventListHeader, { showOccurred: showSeparateEventOccurrenceTimestamps, sortOrder, onSortOrderChange: handleSortOrderChange }), isRefetching || search.status === "loading" ? jsxRuntimeExports.jsx(EventRowsSkeleton, {}) : rows.length === 0 ? jsxRuntimeExports.jsx(EmptyState, { search, onRetry: retry }) : jsxRuntimeExports.jsxs("div", { className: "relative flex min-h-0 flex-1 flex-col", children: [jsxRuntimeExports.jsx(es, { ref: virtuosoRef, rangeChanged: setVisibleRange, totalCount: listItems.length, overscan: 20, defaultItemHeight: 25, computeItemKey: (i) => {
2148
2248
  const item = listItems[i];
2149
2249
  return item.kind === "gap" ? item.key : item.row.event.eventId;
2150
2250
  }, endReached: () => {
@@ -2158,104 +2258,20 @@ function EventListViewInner({ events, run, onLoadEventData, hasMoreEvents = fals
2158
2258
  }
2159
2259
  const { row } = item;
2160
2260
  const isSelected = selectedEventId === row.event.eventId;
2161
- return jsxRuntimeExports.jsx(EventRow, { row, index: item.index, isSelected, isTabStop: selectedIndex === -1 ? item.index === 0 : isSelected, isRelated: relatedKey !== null && row.entity.key === relatedKey, onSelect: toggleSelectedEvent, showSeparateEventOccurrenceTimestamps });
2162
- }, style: { flex: 1, minHeight: 0 } }), jsxRuntimeExports.jsxs("div", { className: "relative flex h-10 shrink-0 items-center border-t border-gray-alpha-400 px-4 text-label-13 text-gray-900", children: [jsxRuntimeExports.jsx("span", { children: getFooterLabel(search, {
2261
+ return jsxRuntimeExports.jsx(EventRow, { row, index: item.index, isSelected, isTabStop: selectedIndex === -1 ? item.index === 0 : isSelected, relation: relatedKey === null ? void 0 : row.entity.key === relatedKey ? "related" : "unrelated", onSelect: toggleSelectedEvent, showSeparateEventOccurrenceTimestamps });
2262
+ }, style: { flex: 1, minHeight: 0 } }), relatedAbove.length > 0 && jsxRuntimeExports.jsx(RelatedHint, { direction: "above", count: relatedAbove.length, onClick: () => scrollToItem(relatedAbove.at(-1) ?? 0) }), relatedBelow.length > 0 && jsxRuntimeExports.jsx(RelatedHint, { direction: "below", count: relatedBelow.length, onClick: () => scrollToItem(relatedBelow[0]) })] }), jsxRuntimeExports.jsxs("div", { className: "relative flex h-10 shrink-0 items-center border-t border-gray-alpha-400 px-4 text-label-13 text-gray-900", children: [jsxRuntimeExports.jsx("span", { children: getFooterLabel(search, {
2163
2263
  total: sortedEvents.length,
2164
2264
  hasMoreEvents
2165
- }) }), list.hasMore && jsxRuntimeExports.jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: jsxRuntimeExports.jsx("div", { className: "pointer-events-auto", children: jsxRuntimeExports.jsx(LoadMoreButton, { loading: isLoadingMoreEvents, onClick: () => void (onLoadMoreEvents == null ? void 0 : onLoadMoreEvents()) }) }) })] })] }), selectedRow ? jsxRuntimeExports.jsx(EventDetailsPanel, { row: selectedRow, onLoadEventData, cachedEventData: eventDataCacheRef.current.get(selectedRow.event.eventId) ?? null, onCacheEventData: cacheEventData, encryptionKey, width: panelWidth, onPrev: selectedIndex > 0 ? () => moveSelection(-1) : void 0, onNext: selectedIndex >= 0 && selectedIndex < rows.length - 1 ? () => moveSelection(1) : void 0, onClose: () => setSelectedEventId(void 0), onViewInTrace }) : null] })] }) });
2265
+ }) }), list.hasMore && jsxRuntimeExports.jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: jsxRuntimeExports.jsx("div", { className: "pointer-events-auto", children: jsxRuntimeExports.jsx(Button, { variant: "secondary", loading: isLoadingMoreEvents, onClick: () => void (onLoadMoreEvents == null ? void 0 : onLoadMoreEvents()), children: "Load more" }) }) })] })] }), selectedRow ? jsxRuntimeExports.jsx(EventDetailsPanel, { row: selectedRow, onLoadEventData, cachedEventData: eventDataCacheRef.current.get(selectedRow.event.eventId) ?? null, onCacheEventData: cacheEventData, encryptionKey, width: panelWidth, onPrev: selectedIndex > 0 ? () => moveSelection(-1) : void 0, onNext: selectedIndex >= 0 && selectedIndex < rows.length - 1 ? () => moveSelection(1) : void 0, onClose: () => setSelectedEventId(void 0), onViewInTrace }) : null] })] }) });
2266
+ }
2267
+ function RelatedHint({ direction, count, onClick }) {
2268
+ const label = `${count} related ${count === 1 ? "event" : "events"}`;
2269
+ const layer = cn("absolute inset-0", direction === "above" && "-scale-y-100");
2270
+ return jsxRuntimeExports.jsxs("button", { type: "button", "aria-label": `${label} ${direction}`, onClick, className: cn("group absolute inset-x-0 z-10 flex h-10 cursor-pointer justify-end px-3 py-2 outline-none transition-opacity duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] focus-visible:shadow-[inset_0_0_0_2px_var(--ds-focus-color)] starting:opacity-0", direction === "above" ? "top-0 items-start" : "bottom-0 items-end"), children: [jsxRuntimeExports.jsx("span", { "aria-hidden": true, className: cn(layer, "bg-[linear-gradient(to_top,color-mix(in_oklab,var(--ds-background-100)_70%,transparent),30%,transparent)]") }), jsxRuntimeExports.jsx("span", { "aria-hidden": true, className: cn(layer, "bg-[linear-gradient(to_top,color-mix(in_oklab,var(--ds-blue-500)_60%,transparent),30%,transparent)] opacity-45 transition-opacity duration-300 ease-[ease] group-hover:opacity-100 group-hover:duration-150 group-focus-visible:opacity-100 group-active:opacity-75 group-active:duration-75") }), jsxRuntimeExports.jsx("span", { className: "relative font-medium text-label-12 text-blue-900", children: label })] });
2166
2271
  }
2167
2272
  function EventListView(props) {
2168
2273
  return jsxRuntimeExports.jsx(TooltipProvider, { delayDuration: 300, children: jsxRuntimeExports.jsx(ContextCardProvider, { children: jsxRuntimeExports.jsx(EventListViewInner, { ...props }) }) });
2169
2274
  }
2170
- function ConversationView({ messages }) {
2171
- if (messages.length === 0) {
2172
- return jsxRuntimeExports.jsx("div", { className: "py-8 text-center text-[11px] text-gray-600", children: "No messages" });
2173
- }
2174
- return jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-3 p-3", children: messages.map((message, index) => jsxRuntimeExports.jsx(MessageBubble, { message }, index)) });
2175
- }
2176
- function MessageBubble({ message }) {
2177
- const role = message.role;
2178
- const parts = parseContent(message.content);
2179
- const roleClasses = getRoleClasses(role);
2180
- return jsxRuntimeExports.jsxs("div", { className: `rounded-md border text-[11px] ${roleClasses.bubble}`, children: [jsxRuntimeExports.jsx("div", { className: `border-b px-2.5 py-1 font-medium text-[10px] uppercase tracking-wide ${roleClasses.label}`, children: role }), jsxRuntimeExports.jsx("div", { className: "px-2.5 py-2 space-y-2", children: parts.map((part, i) => jsxRuntimeExports.jsx(ContentPart, { part, role }, i)) })] });
2181
- }
2182
- function ContentPart({ part, role }) {
2183
- if (part.type === "text") {
2184
- if (!part.text)
2185
- return null;
2186
- if (role === "assistant") {
2187
- return jsxRuntimeExports.jsx("div", { className: "prose prose-sm max-w-none text-[11px] text-gray-1000 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0", children: jsxRuntimeExports.jsx(Ui, { children: part.text }) });
2188
- }
2189
- return jsxRuntimeExports.jsx("div", { className: "whitespace-pre-wrap break-words text-gray-1000", children: part.text });
2190
- }
2191
- if (part.type === "tool-call") {
2192
- return jsxRuntimeExports.jsxs("div", { className: "rounded border border-purple-300 bg-purple-100 px-2 py-1.5", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 text-[10px] font-medium", children: [jsxRuntimeExports.jsx("span", { children: "🔧" }), jsxRuntimeExports.jsx("span", { className: "text-purple-900", children: part.toolName })] }), part.input != null && jsxRuntimeExports.jsx("div", { className: "mt-1.5 overflow-x-auto rounded bg-gray-100 p-1.5", children: typeof part.input === "string" ? jsxRuntimeExports.jsx("pre", { className: "text-[10px] text-gray-800", children: part.input }) : jsxRuntimeExports.jsx(DataInspector, { data: part.input }) })] });
2193
- }
2194
- if (part.type === "tool-result") {
2195
- return jsxRuntimeExports.jsxs("div", { className: "rounded border border-green-300 bg-green-100 px-2 py-1.5", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 text-[10px] font-medium", children: [jsxRuntimeExports.jsx("span", { children: "✓" }), jsxRuntimeExports.jsxs("span", { className: "text-green-900", children: [part.toolName, " result"] })] }), part.output != null && jsxRuntimeExports.jsx("div", { className: "mt-1.5 max-h-[200px] overflow-x-auto overflow-y-auto rounded bg-gray-100 p-1.5", children: typeof part.output === "string" ? jsxRuntimeExports.jsx("pre", { className: "text-[10px] text-gray-800", children: part.output }) : jsxRuntimeExports.jsx(DataInspector, { data: part.output, expandLevel: 1 }) })] });
2196
- }
2197
- return null;
2198
- }
2199
- function getRoleClasses(role) {
2200
- switch (role) {
2201
- case "user":
2202
- return {
2203
- bubble: "border-blue-300 bg-blue-100",
2204
- label: "border-blue-300 text-blue-700"
2205
- };
2206
- case "assistant":
2207
- return {
2208
- bubble: "border-gray-300 bg-gray-100",
2209
- label: "border-gray-300 text-gray-700"
2210
- };
2211
- case "system":
2212
- return {
2213
- bubble: "border-amber-300 bg-amber-100",
2214
- label: "border-amber-300 text-amber-700"
2215
- };
2216
- case "tool":
2217
- return {
2218
- bubble: "border-green-300 bg-green-100",
2219
- label: "border-green-300 text-green-700"
2220
- };
2221
- default:
2222
- return {
2223
- bubble: "border-gray-300 bg-gray-100",
2224
- label: "border-gray-300 text-gray-700"
2225
- };
2226
- }
2227
- }
2228
- function parseContent(content) {
2229
- if (typeof content === "string") {
2230
- return [{ type: "text", text: content }];
2231
- }
2232
- if (Array.isArray(content)) {
2233
- return content.map((part) => {
2234
- if (typeof part === "string") {
2235
- return { type: "text", text: part };
2236
- }
2237
- if ((part == null ? void 0 : part.type) === "text") {
2238
- return { type: "text", text: String(part.text ?? "") };
2239
- }
2240
- if ((part == null ? void 0 : part.type) === "tool-call") {
2241
- return {
2242
- type: "tool-call",
2243
- toolName: part.toolName,
2244
- input: part.input
2245
- };
2246
- }
2247
- if ((part == null ? void 0 : part.type) === "tool-result") {
2248
- return {
2249
- type: "tool-result",
2250
- toolName: part.toolName,
2251
- output: part.output
2252
- };
2253
- }
2254
- return { type: "text", text: "" };
2255
- });
2256
- }
2257
- return [];
2258
- }
2259
2275
  const ROWS = [
2260
2276
  {
2261
2277
  id: "r0",
@@ -2354,6 +2370,95 @@ function useLoadMoreOnScroll(loadMore, { hasMore, isLoadingMore, rootRef, rootMa
2354
2370
  }, [entry == null ? void 0 : entry.isIntersecting, hasMore, isLoadingMore]);
2355
2371
  return sentinelRef;
2356
2372
  }
2373
+ function ConversationView({ messages }) {
2374
+ if (messages.length === 0) {
2375
+ return jsxRuntimeExports.jsx("div", { className: "py-8 text-center text-[11px] text-gray-600", children: "No messages" });
2376
+ }
2377
+ return jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-3 p-3", children: messages.map((message, index) => jsxRuntimeExports.jsx(MessageBubble, { message }, index)) });
2378
+ }
2379
+ function MessageBubble({ message }) {
2380
+ const role = message.role;
2381
+ const parts = parseContent(message.content);
2382
+ const roleClasses = getRoleClasses(role);
2383
+ return jsxRuntimeExports.jsxs("div", { className: `rounded-md border text-[11px] ${roleClasses.bubble}`, children: [jsxRuntimeExports.jsx("div", { className: `border-b px-2.5 py-1 font-medium text-[10px] uppercase tracking-wide ${roleClasses.label}`, children: role }), jsxRuntimeExports.jsx("div", { className: "px-2.5 py-2 space-y-2", children: parts.map((part, i) => jsxRuntimeExports.jsx(ContentPart, { part, role }, i)) })] });
2384
+ }
2385
+ function ContentPart({ part, role }) {
2386
+ if (part.type === "text") {
2387
+ if (!part.text)
2388
+ return null;
2389
+ if (role === "assistant") {
2390
+ return jsxRuntimeExports.jsx("div", { className: "prose prose-sm max-w-none text-[11px] text-gray-1000 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0", children: jsxRuntimeExports.jsx(Ui, { children: part.text }) });
2391
+ }
2392
+ return jsxRuntimeExports.jsx("div", { className: "whitespace-pre-wrap break-words text-gray-1000", children: part.text });
2393
+ }
2394
+ if (part.type === "tool-call") {
2395
+ return jsxRuntimeExports.jsxs("div", { className: "rounded border border-purple-300 bg-purple-100 px-2 py-1.5", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 text-[10px] font-medium", children: [jsxRuntimeExports.jsx(Wrench, { className: "size-3 shrink-0 text-purple-900", "aria-hidden": true }), jsxRuntimeExports.jsx("span", { className: "text-purple-900", children: part.toolName })] }), part.input != null && jsxRuntimeExports.jsx("div", { className: "mt-1.5 overflow-x-auto rounded bg-gray-100 p-1.5", children: typeof part.input === "string" ? jsxRuntimeExports.jsx("pre", { className: "text-[10px] text-gray-800", children: part.input }) : jsxRuntimeExports.jsx(DataInspector, { data: part.input }) })] });
2396
+ }
2397
+ if (part.type === "tool-result") {
2398
+ return jsxRuntimeExports.jsxs("div", { className: "rounded border border-green-300 bg-green-100 px-2 py-1.5", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 text-[10px] font-medium", children: [jsxRuntimeExports.jsx(Check, { className: "size-3 shrink-0 text-green-900", "aria-hidden": true }), jsxRuntimeExports.jsxs("span", { className: "text-green-900", children: [part.toolName, " result"] })] }), part.output != null && jsxRuntimeExports.jsx("div", { className: "mt-1.5 max-h-[200px] overflow-x-auto overflow-y-auto rounded bg-gray-100 p-1.5", children: typeof part.output === "string" ? jsxRuntimeExports.jsx("pre", { className: "text-[10px] text-gray-800", children: part.output }) : jsxRuntimeExports.jsx(DataInspector, { data: part.output, expandLevel: 1 }) })] });
2399
+ }
2400
+ return null;
2401
+ }
2402
+ function getRoleClasses(role) {
2403
+ switch (role) {
2404
+ case "user":
2405
+ return {
2406
+ bubble: "border-blue-300 bg-blue-100",
2407
+ label: "border-blue-300 text-blue-700"
2408
+ };
2409
+ case "assistant":
2410
+ return {
2411
+ bubble: "border-gray-300 bg-gray-100",
2412
+ label: "border-gray-300 text-gray-700"
2413
+ };
2414
+ case "system":
2415
+ return {
2416
+ bubble: "border-amber-300 bg-amber-100",
2417
+ label: "border-amber-300 text-amber-700"
2418
+ };
2419
+ case "tool":
2420
+ return {
2421
+ bubble: "border-green-300 bg-green-100",
2422
+ label: "border-green-300 text-green-700"
2423
+ };
2424
+ default:
2425
+ return {
2426
+ bubble: "border-gray-300 bg-gray-100",
2427
+ label: "border-gray-300 text-gray-700"
2428
+ };
2429
+ }
2430
+ }
2431
+ function parseContent(content) {
2432
+ if (typeof content === "string") {
2433
+ return [{ type: "text", text: content }];
2434
+ }
2435
+ if (Array.isArray(content)) {
2436
+ return content.map((part) => {
2437
+ if (typeof part === "string") {
2438
+ return { type: "text", text: part };
2439
+ }
2440
+ if ((part == null ? void 0 : part.type) === "text") {
2441
+ return { type: "text", text: String(part.text ?? "") };
2442
+ }
2443
+ if ((part == null ? void 0 : part.type) === "tool-call") {
2444
+ return {
2445
+ type: "tool-call",
2446
+ toolName: part.toolName,
2447
+ input: part.input
2448
+ };
2449
+ }
2450
+ if ((part == null ? void 0 : part.type) === "tool-result") {
2451
+ return {
2452
+ type: "tool-result",
2453
+ toolName: part.toolName,
2454
+ output: part.output
2455
+ };
2456
+ }
2457
+ return { type: "text", text: "" };
2458
+ });
2459
+ }
2460
+ return [];
2461
+ }
2357
2462
  function TabButton({ active, onClick, children }) {
2358
2463
  return jsxRuntimeExports.jsx("button", { type: "button", role: "tab", "aria-selected": active, tabIndex: active ? 0 : -1, onClick, className: "px-3 py-1.5 text-[11px] font-medium transition-colors -mb-px", style: {
2359
2464
  // Explicit styles to prevent app-level button overrides when web-shared
@@ -2788,7 +2893,7 @@ const AttributeBlock = ({ attribute, value, isLoading, inline = false, context }
2788
2893
  if (selfHeaderedAttributes.has(attribute)) {
2789
2894
  return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: displayValue });
2790
2895
  }
2791
- return jsxRuntimeExports.jsxs("div", { className: "relative", children: [typeof isLoading === "boolean" && isLoading && jsxRuntimeExports.jsx("div", { className: "absolute top-9 right-4", children: jsxRuntimeExports.jsx("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2", style: { borderColor: "var(--ds-gray-900)" } }) }), jsxRuntimeExports.jsxs("div", { className: "my-2 flex flex-col gap-0", children: [jsxRuntimeExports.jsx("span", { className: "text-label-14 text-gray-1000 font-medium first-letter:uppercase", children: attribute }), jsxRuntimeExports.jsx("span", { className: "text-label-12", style: { color: "var(--ds-gray-1000)" }, children: displayValue })] }, attribute)] });
2896
+ return jsxRuntimeExports.jsxs("div", { className: "relative", children: [typeof isLoading === "boolean" && isLoading && jsxRuntimeExports.jsx("div", { className: "absolute top-9 right-4", children: jsxRuntimeExports.jsx(Spinner, { size: "md" }) }), jsxRuntimeExports.jsxs("div", { className: "my-2 flex flex-col gap-0", children: [jsxRuntimeExports.jsx("span", { className: "text-label-14 text-gray-1000 font-medium first-letter:uppercase", children: attribute }), jsxRuntimeExports.jsx("span", { className: "text-label-12", style: { color: "var(--ds-gray-1000)" }, children: displayValue })] }, attribute)] });
2792
2897
  };
2793
2898
  const AttributePanel = ({ data, moduleSpecifier, moduleSourceUrl, isLoading, error, expiredAt, onStreamClick, onRunClick, onDecrypt, isDecrypting = false, isDecryptDisabled = false, decryptDisabledReason, resource }) => {
2794
2899
  const displayData = reactExports.useMemo(() => {
@@ -3299,7 +3404,7 @@ function EntityDetailPanel({ run, onStreamClick, onRunClick, fetchSpanDetail, on
3299
3404
  isDecryptDisabled,
3300
3405
  decryptDisabledReason,
3301
3406
  hasEncryptedData
3302
- } : void 0, children: jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-y-auto px-4 pb-8", children: [hasPendingActions && jsxRuntimeExports.jsxs("div", { className: "mb-4 flex flex-col gap-2", children: [resource === "sleep" && canWakeUp && jsxRuntimeExports.jsxs(Button, { variant: "secondary", size: "small", className: "w-full", onClick: handleWakeUp, disabled: stoppingSleep, "aria-busy": stoppingSleep, children: [stoppingSleep ? jsxRuntimeExports.jsx(Spinner, { size: 16 }) : null, "Wake Up Sleep"] }), resource === "hook" && canResolveHook && jsxRuntimeExports.jsxs(Button, { variant: "secondary", size: "small", className: "w-full", onClick: () => setShowResolveHookModal(true), disabled: resolvingHook, "aria-busy": resolvingHook, children: [resolvingHook ? jsxRuntimeExports.jsx(Spinner, { size: 16 }) : null, "Resolve Hook"] })] }), jsxRuntimeExports.jsx(AttributePanel, { data: displayData, moduleSpecifier, moduleSourceUrl, expiredAt: run.expiredAt, isLoading: loading, error: error ?? void 0, onStreamClick, onRunClick, onDecrypt, isDecrypting, isDecryptDisabled, decryptDisabledReason, resource }), rawEvents && jsxRuntimeExports.jsx(EventsList, { events: rawEvents, onLoadEventData, onStreamClick, onRunClick, encryptionKey, showSeparateEventOccurrenceTimestamps, duplicateEventIds: selectedSpan == null ? void 0 : selectedSpan.duplicateEventIds })] }) }), jsxRuntimeExports.jsx(ResolveHookModal, { isOpen: showResolveHookModal, onClose: () => setShowResolveHookModal(false), onSubmit: handleResolveHook, isSubmitting: resolvingHook })] });
3407
+ } : void 0, children: jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-y-auto px-4 pb-8", children: [hasPendingActions && jsxRuntimeExports.jsxs("div", { className: "mb-4 flex flex-col gap-2", children: [resource === "sleep" && canWakeUp && jsxRuntimeExports.jsx(Button, { variant: "secondary", size: "small", className: "w-full", onClick: handleWakeUp, loading: stoppingSleep, children: "Wake Up Sleep" }), resource === "hook" && canResolveHook && jsxRuntimeExports.jsx(Button, { variant: "secondary", size: "small", className: "w-full", onClick: () => setShowResolveHookModal(true), loading: resolvingHook, children: "Resolve Hook" })] }), jsxRuntimeExports.jsx(AttributePanel, { data: displayData, moduleSpecifier, moduleSourceUrl, expiredAt: run.expiredAt, isLoading: loading, error: error ?? void 0, onStreamClick, onRunClick, onDecrypt, isDecrypting, isDecryptDisabled, decryptDisabledReason, resource }), rawEvents && jsxRuntimeExports.jsx(EventsList, { events: rawEvents, onLoadEventData, onStreamClick, onRunClick, encryptionKey, showSeparateEventOccurrenceTimestamps, duplicateEventIds: selectedSpan == null ? void 0 : selectedSpan.duplicateEventIds })] }) }), jsxRuntimeExports.jsx(ResolveHookModal, { isOpen: showResolveHookModal, onClose: () => setShowResolveHookModal(false), onSubmit: handleResolveHook, isSubmitting: resolvingHook })] });
3303
3408
  }
3304
3409
  const DETAIL_PANEL_ID = "trace-detail-panel";
3305
3410
  function useSelectedSpanInfo() {
@@ -3720,13 +3825,7 @@ function TraceViewerContent({ trace, onLoadMore, hasMore, isLoadingMore }) {
3720
3825
  el.addEventListener("wheel", onWheel, { passive: false });
3721
3826
  return () => el.removeEventListener("wheel", onWheel);
3722
3827
  }, [root.duration, setViewport, clampToRoot]);
3723
- return jsxRuntimeExports.jsxs("div", { ref: paneRootRef, "data-pane": "pane-root", className: "relative flex w-full h-full max-h-full", children: [jsxRuntimeExports.jsxs("div", { id: "trace-parent", "data-span-landing": isLanding || void 0, className: "@container flex-1 min-w-0 grid grid-rows-[auto_1fr] h-full min-h-0 overflow-hidden relative bg-background-100", children: [jsxRuntimeExports.jsx(Minimap, { spans: trace.spans, root, viewport, minViewportMs: MIN_VIEWPORT_MS, onViewportChange: setViewport, onAnimateTo: animateTo }), jsxRuntimeExports.jsxs(SplitPane, { scrollContainerRef, startHeader: jsxRuntimeExports.jsxs("div", { className: "bg-background-100 border-b border-gray-alpha-400 h-10 min-h-10 flex items-center pl-4 pr-2 gap-1.5", children: [jsxRuntimeExports.jsx(Search, { className: "w-3.5 h-3.5 shrink-0 text-gray-800" }), jsxRuntimeExports.jsx("input", { id: "trace-viewer-search", name: "trace-viewer-search", type: "text", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), onKeyDown: (e) => {
3724
- if (e.key === "Escape" && searchQuery) {
3725
- e.preventDefault();
3726
- e.stopPropagation();
3727
- setSearchQuery("");
3728
- }
3729
- }, placeholder: "Search spans...", "aria-label": "Search spans", className: "flex-1 min-w-0 bg-transparent text-label-14 text-gray-1000 placeholder:text-gray-800 outline-none" }), searchQuery && jsxRuntimeExports.jsx("button", { type: "button", "aria-label": "Clear search", onClick: () => setSearchQuery(""), className: "-mr-2 hidden h-full max-w-full shrink-0 cursor-pointer items-center rounded-r-md border-0 bg-transparent px-2.5 font-inherit text-label-16 text-gray-900 no-underline transition-colors duration-150 ease-in hover:text-gray-1000 focus-visible:-outline-offset-1 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--ds-focus-color)] min-[961px]:flex", children: jsxRuntimeExports.jsx(Kbd, { variant: "outline", size: "search", children: "Esc" }) })] }), endHeader: jsxRuntimeExports.jsx(TimelineHeader, { markers: timeMarkers, hoverInfo }), children: [jsxRuntimeExports.jsxs("div", { className: "block overflow-visible", children: [jsxRuntimeExports.jsx(EventList, { spans: trace.spans, activeSpanId, searchResult, onSelectSpan: handleSelectSpan }), jsxRuntimeExports.jsx("div", { ref: loadMoreSentinelRef, className: "flex justify-center", children: isLoadingMore ? jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-center gap-2 py-3 text-label-14 text-gray-800", children: [jsxRuntimeExports.jsx(Spinner, { size: 14 }), jsxRuntimeExports.jsx("span", { children: "Loading spans…" })] }) : null })] }), jsxRuntimeExports.jsx("div", { ref: timelineRef, id: "trace-timeline", className: "@container block min-h-0 overflow-visible relative", onDoubleClick: resetZoom, onMouseMove: handleTimelineMouseMove, onMouseLeave: handleTimelineMouseLeave, children: jsxRuntimeExports.jsx(Timeline, { spans: trace.spans, viewStart: viewport.start, viewEnd: viewport.end, markers: timeMarkers, selectedId: activeSpanId, searchResult, onSelect: handleSelectSpan, onRevealTime: handleRevealTime, hover, altHeld }) }), jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(TraceShortcutHelper, { hasMultipleSpans: trace.spans.length > 1, reducedMotion }), jsxRuntimeExports.jsxs("div", { className: "pointer-events-auto flex items-center border border-gray-alpha-400 rounded-md bg-background-100 shadow-sm overflow-hidden divide-x divide-gray-alpha-400", children: [jsxRuntimeExports.jsx(IconButton, { variant: "muted", size: "small", onClick: zoomOut, disabled: isAtMinZoom, "aria-label": "Zoom out", children: jsxRuntimeExports.jsx(ZoomOut, { className: "w-4 h-4" }) }), jsxRuntimeExports.jsx(IconButton, { variant: "muted", size: "small", onClick: resetZoom, "aria-label": "Reset zoom", children: jsxRuntimeExports.jsx(RotateCcw, { className: "w-3.5 h-3.5" }) }), jsxRuntimeExports.jsx(IconButton, { variant: "muted", size: "small", onClick: zoomIn, disabled: isAtMaxZoom, "aria-label": "Zoom in", children: jsxRuntimeExports.jsx(ZoomIn, { className: "w-4 h-4" }) })] })] })] })] }), jsxRuntimeExports.jsx(TraceDetailPanel, { containerRef: paneRootRef, onNavigateToSpan: navigateToSpan, onClose: handleClearActiveSpan })] });
3828
+ return jsxRuntimeExports.jsxs("div", { ref: paneRootRef, "data-pane": "pane-root", className: "relative flex w-full h-full max-h-full", children: [jsxRuntimeExports.jsxs("div", { id: "trace-parent", "data-span-landing": isLanding || void 0, className: "@container flex-1 min-w-0 grid grid-rows-[auto_1fr] h-full min-h-0 overflow-hidden relative bg-background-100", children: [jsxRuntimeExports.jsx(Minimap, { spans: trace.spans, root, viewport, minViewportMs: MIN_VIEWPORT_MS, onViewportChange: setViewport, onAnimateTo: animateTo }), jsxRuntimeExports.jsxs(SplitPane, { scrollContainerRef, startHeader: jsxRuntimeExports.jsx(SearchInput, { id: "trace-viewer-search", name: "trace-viewer-search", label: "Search spans", placeholder: "Search spans…", value: searchQuery, onValueChange: setSearchQuery, className: "pl-4" }), endHeader: jsxRuntimeExports.jsx(TimelineHeader, { markers: timeMarkers, hoverInfo }), children: [jsxRuntimeExports.jsxs("div", { className: "block overflow-visible", children: [jsxRuntimeExports.jsx(EventList, { spans: trace.spans, activeSpanId, searchResult, onSelectSpan: handleSelectSpan }), jsxRuntimeExports.jsx("div", { ref: loadMoreSentinelRef, className: "flex justify-center", children: isLoadingMore ? jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-center gap-2 py-3 text-label-14 text-gray-800", children: [jsxRuntimeExports.jsx(Spinner, { size: "md" }), jsxRuntimeExports.jsx("span", { children: "Loading spans…" })] }) : null })] }), jsxRuntimeExports.jsx("div", { ref: timelineRef, id: "trace-timeline", className: "@container block min-h-0 overflow-visible relative", onDoubleClick: resetZoom, onMouseMove: handleTimelineMouseMove, onMouseLeave: handleTimelineMouseLeave, children: jsxRuntimeExports.jsx(Timeline, { spans: trace.spans, viewStart: viewport.start, viewEnd: viewport.end, markers: timeMarkers, selectedId: activeSpanId, searchResult, onSelect: handleSelectSpan, onRevealTime: handleRevealTime, hover, altHeld }) }), jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(TraceShortcutHelper, { hasMultipleSpans: trace.spans.length > 1, reducedMotion }), jsxRuntimeExports.jsxs("div", { className: "pointer-events-auto flex items-center border border-gray-alpha-400 rounded-md bg-background-100 shadow-sm overflow-hidden divide-x divide-gray-alpha-400", children: [jsxRuntimeExports.jsx(IconButton, { size: "small", onClick: zoomOut, disabled: isAtMinZoom, "aria-label": "Zoom out", children: jsxRuntimeExports.jsx(ZoomOut, { className: "w-4 h-4" }) }), jsxRuntimeExports.jsx(IconButton, { size: "small", onClick: resetZoom, "aria-label": "Reset zoom", children: jsxRuntimeExports.jsx(RotateCcw, { className: "w-3.5 h-3.5" }) }), jsxRuntimeExports.jsx(IconButton, { size: "small", onClick: zoomIn, disabled: isAtMaxZoom, "aria-label": "Zoom in", children: jsxRuntimeExports.jsx(ZoomIn, { className: "w-4 h-4" }) })] })] })] })] }), jsxRuntimeExports.jsx(TraceDetailPanel, { containerRef: paneRootRef, onNavigateToSpan: navigateToSpan, onClose: handleClearActiveSpan })] });
3730
3829
  }
3731
3830
  const TraceViewer = ({ run, events, sidebarData, onLoadMore, hasMore, isLoadingMore, loading = false, getStepAttributes, initialSelectedSpanId }) => {
3732
3831
  const trace = reactExports.useMemo(() => {
@@ -4295,6 +4394,10 @@ function useWorkflowStreams(env, runId, refreshInterval = STREAMS_REFRESH_INTERV
4295
4394
  const PAGE_SIZE = 100;
4296
4395
  const MAX_CORRELATION_SEARCH_PAGES = 5;
4297
4396
  const getEventId = (event) => event.eventId;
4397
+ function toSearchFailure(error) {
4398
+ var _a;
4399
+ return ((_a = error.request) == null ? void 0 : _a.status) === 404 ? { status: "not_found" } : { status: "error", message: getErrorMessage(error) };
4400
+ }
4298
4401
  function useEventsListData(env, runId, options = {}) {
4299
4402
  const { sortOrder = "asc", encryptionKey } = options;
4300
4403
  const encryptionKeyRef = reactExports.useRef(encryptionKey);
@@ -4329,10 +4432,11 @@ function useEventsListData(env, runId, options = {}) {
4329
4432
  const { error: fetchError, result } = await unwrapServerActionResult(
4330
4433
  fetchEvent(env, runId, id, "none")
4331
4434
  );
4332
- if (fetchError || (signal == null ? void 0 : signal.aborted)) {
4333
- return fetchError ? { status: "error", message: fetchError.message } : (() => {
4334
- throw new DOMException("Aborted", "AbortError");
4335
- })();
4435
+ if (fetchError) {
4436
+ return toSearchFailure(fetchError);
4437
+ }
4438
+ if (signal == null ? void 0 : signal.aborted) {
4439
+ throw new DOMException("Aborted", "AbortError");
4336
4440
  }
4337
4441
  const [event] = await hydrateEvents([result]);
4338
4442
  return (event == null ? void 0 : event.runId) === runId ? { status: "ok", events: [event] } : { status: "not_found" };
@@ -4355,7 +4459,7 @@ function useEventsListData(env, runId, options = {}) {
4355
4459
  })
4356
4460
  );
4357
4461
  if (fetchError) {
4358
- return { status: "error", message: fetchError.message };
4462
+ return toSearchFailure(fetchError);
4359
4463
  }
4360
4464
  if (signal == null ? void 0 : signal.aborted) {
4361
4465
  throw new DOMException("Aborted", "AbortError");
@@ -4541,7 +4645,7 @@ function AlertDialogOverlay({
4541
4645
  AlertDialogOverlay$1,
4542
4646
  {
4543
4647
  "data-slot": "alert-dialog-overlay",
4544
- className: cn$1(
4648
+ className: cn(
4545
4649
  "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",
4546
4650
  className
4547
4651
  ),
@@ -4560,7 +4664,7 @@ function AlertDialogContent({
4560
4664
  AlertDialogContent$1,
4561
4665
  {
4562
4666
  "data-slot": "alert-dialog-content",
4563
- className: cn$1(
4667
+ className: cn(
4564
4668
  "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",
4565
4669
  className
4566
4670
  ),
@@ -4581,7 +4685,7 @@ function AlertDialogHeader({
4581
4685
  "div",
4582
4686
  {
4583
4687
  "data-slot": "alert-dialog-header",
4584
- className: cn$1("flex flex-col gap-2 text-center sm:text-left", className),
4688
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
4585
4689
  ...props
4586
4690
  }
4587
4691
  );
@@ -4594,7 +4698,7 @@ function AlertDialogFooter({
4594
4698
  "div",
4595
4699
  {
4596
4700
  "data-slot": "alert-dialog-footer",
4597
- className: cn$1(
4701
+ className: cn(
4598
4702
  "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
4599
4703
  className
4600
4704
  ),
@@ -4610,7 +4714,7 @@ function AlertDialogTitle({
4610
4714
  AlertDialogTitle$1,
4611
4715
  {
4612
4716
  "data-slot": "alert-dialog-title",
4613
- className: cn$1("text-lg font-semibold", className),
4717
+ className: cn("text-lg font-semibold", className),
4614
4718
  ...props
4615
4719
  }
4616
4720
  );
@@ -4623,7 +4727,7 @@ function AlertDialogDescription({
4623
4727
  AlertDialogDescription$1,
4624
4728
  {
4625
4729
  "data-slot": "alert-dialog-description",
4626
- className: cn$1("text-muted-foreground text-sm", className),
4730
+ className: cn("text-muted-foreground text-sm", className),
4627
4731
  ...props
4628
4732
  }
4629
4733
  );
@@ -4635,7 +4739,7 @@ function AlertDialogAction({
4635
4739
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
4636
4740
  AlertDialogAction$1,
4637
4741
  {
4638
- className: cn$1(buttonVariants(), className),
4742
+ className: cn(buttonVariants(), className),
4639
4743
  ...props
4640
4744
  }
4641
4745
  );
@@ -4647,7 +4751,7 @@ function AlertDialogCancel({
4647
4751
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
4648
4752
  AlertDialogCancel$1,
4649
4753
  {
4650
- className: cn$1(buttonVariants({ variant: "secondary" }), className),
4754
+ className: cn(buttonVariants({ variant: "secondary" }), className),
4651
4755
  ...props
4652
4756
  }
4653
4757
  );
@@ -4660,7 +4764,7 @@ function BreadcrumbList({ className, ...props }) {
4660
4764
  "ol",
4661
4765
  {
4662
4766
  "data-slot": "breadcrumb-list",
4663
- className: cn$1(
4767
+ className: cn(
4664
4768
  "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
4665
4769
  className
4666
4770
  ),
@@ -4673,7 +4777,7 @@ function BreadcrumbItem({ className, ...props }) {
4673
4777
  "li",
4674
4778
  {
4675
4779
  "data-slot": "breadcrumb-item",
4676
- className: cn$1("inline-flex items-center gap-1.5", className),
4780
+ className: cn("inline-flex items-center gap-1.5", className),
4677
4781
  ...props
4678
4782
  }
4679
4783
  );
@@ -4688,7 +4792,7 @@ function BreadcrumbLink({
4688
4792
  Comp,
4689
4793
  {
4690
4794
  "data-slot": "breadcrumb-link",
4691
- className: cn$1("hover:text-foreground transition-colors", className),
4795
+ className: cn("hover:text-foreground transition-colors", className),
4692
4796
  ...props
4693
4797
  }
4694
4798
  );
@@ -4704,7 +4808,7 @@ function BreadcrumbPage({ className, ...props }) {
4704
4808
  role: "link",
4705
4809
  "aria-disabled": "true",
4706
4810
  "aria-current": "page",
4707
- className: cn$1("text-foreground font-normal", className),
4811
+ className: cn("text-foreground font-normal", className),
4708
4812
  ...props
4709
4813
  }
4710
4814
  )
@@ -4721,7 +4825,7 @@ function BreadcrumbSeparator({
4721
4825
  "data-slot": "breadcrumb-separator",
4722
4826
  role: "presentation",
4723
4827
  "aria-hidden": "true",
4724
- className: cn$1("[&>svg]:size-3.5", className),
4828
+ className: cn("[&>svg]:size-3.5", className),
4725
4829
  ...props,
4726
4830
  children: children ?? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, {})
4727
4831
  }
@@ -5121,10 +5225,7 @@ function LiveStatus({ hasError, errorMessage }) {
5121
5225
  /* @__PURE__ */ jsxRuntimeExports.jsx(
5122
5226
  "span",
5123
5227
  {
5124
- className: `text-xs $
5125
- hasError
5126
- ? 'text-red-600 dark:text-red-400'
5127
- : 'text-muted-foreground'`,
5228
+ className: `text-xs ${hasError ? "text-red-600" : "text-muted-foreground"}`,
5128
5229
  children: hasError ? "Error" : "Live"
5129
5230
  }
5130
5231
  )