@workflow/web 5.3.2 → 5.4.0

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 (37) hide show
  1. package/build/client/assets/app-Czi_mceE.css +1 -0
  2. package/build/client/assets/arrow-up-right-74VYxbbA.js +9 -0
  3. package/build/client/assets/{entry.client-xzxVCL3o.js → entry.client-BqbaswKw.js} +13 -35
  4. package/build/client/assets/{highlighted-body-JLMTFACH-1yzOVKg0.js → highlighted-body-JLMTFACH-D51eQJbG.js} +2 -2
  5. package/build/client/assets/{home--wf0CrF6.js → home-DLo3pUJ2.js} +104 -167
  6. package/build/client/assets/{index-wl5l5E8H.js → index-BUQuaV5X.js} +78 -149
  7. package/build/client/assets/{manifest-7b81d8d4.js → manifest-67b853ed.js} +1 -1
  8. package/build/client/assets/mermaid-WFAXDIZX-Bd_l_owX.css +1 -0
  9. package/build/client/assets/{mermaid-WFAXDIZX-CB__BxYb.js → mermaid-WFAXDIZX-CCgeQ0jh.js} +2044 -2169
  10. package/build/client/assets/{root-C1XwTNUK.js → root-D8difEo9.js} +8 -33
  11. package/build/client/assets/root-d42YLYYg.css +1 -0
  12. package/build/client/assets/{rpc-client-SbyXJdFV.js → rpc-client-DL_nSX36.js} +3 -4
  13. package/build/client/assets/{run-detail-2CnpdXm1.js → run-detail-DcpR_rST.js} +234 -445
  14. package/build/client/assets/run-detail-DmVxTs86.css +1 -0
  15. package/build/client/assets/{run-usage-C3aywyqa.js → run-usage-0JrO5fG2.js} +5 -5
  16. package/build/client/assets/{run-usage-DRV6lopZ.js → run-usage-CK_ia-7k.js} +36 -53
  17. package/build/client/assets/{skeleton-DMLgjvZZ.js → skeleton-B2Cf2UXN.js} +3 -21
  18. package/build/client/assets/{url-state-JAVaNZ_m.js → url-state-n9DuWtVx.js} +521 -779
  19. package/build/client/assets/{zstd-browser-decoder-Z5736ep5.js → zstd-browser-decoder-CqZHDp17.js} +2 -2
  20. package/build/server/assets/{app-C4Vf0mu1.js → app-DLSid73Q.js} +13263 -14020
  21. package/build/server/assets/{esm-CETb4fkq.js → esm-BzrGWk7J.js} +2 -2
  22. package/build/server/assets/{highlighted-body-JLMTFACH-CF_5tt3-.js → highlighted-body-JLMTFACH-CtQ_zvjG.js} +1 -1
  23. package/build/server/assets/{index-BrYeW--s.js → index-BI8sdTIq.js} +398 -490
  24. package/build/server/assets/{mermaid-WFAXDIZX-BHZz_uL6.js → mermaid-WFAXDIZX-BlWV_MqD.js} +1 -1
  25. package/build/server/assets/{token-k0na1G9v.js → token-BE7-D9Dt.js} +6 -6
  26. package/build/server/assets/{token-B94O3LuJ.js → token-DOXFZxpM.js} +5 -5
  27. package/build/server/assets/{token-util-DFlzY9Hw.js → token-util-DjnKfD7P.js} +2 -2
  28. package/build/server/assets/{token-util-DgTmPzWb.js → token-util-V29s95lj.js} +1 -1
  29. package/build/server/assets/{wrapper-BEqyNEir.js → wrapper-DBwRVVUb.js} +2 -2
  30. package/build/server/assets/{zstd-browser-decoder-LnaKiDUZ.js → zstd-browser-decoder-Crq3t_fM.js} +1 -1
  31. package/build/server/index.js +1 -1
  32. package/package.json +8 -8
  33. package/build/client/assets/app-BHCSMHev.css +0 -1
  34. package/build/client/assets/arrow-up-right-DyaB_ak4.js +0 -15
  35. package/build/client/assets/mermaid-WFAXDIZX-D8CjRQta.css +0 -1
  36. package/build/client/assets/root-C3ED6Dwc.css +0 -1
  37. package/build/client/assets/run-detail-CWoGxu_0.css +0 -1
@@ -1,14 +1,8 @@
1
- import { r as reactExports, j as jsxRuntimeExports, L as Link, g as reactDomExports, C as useSearchParams, B as useNavigate, D as useLocation, w as withComponentProps } from "./index-wl5l5E8H.js";
2
- import { R as ResolveHookModal, S as Send, u as unwrapOrThrow, W as WorkflowWebAPIError, g as getPaginationDisplay, f as fetchHookToken, D as DEFAULT_PAGE_SIZE, a as RelativeTime, A as Alert, b as AlertTitle, c as getErrorTitle, d as AlertDescription, e as getErrorMessage, C as CopyableText, h as DropdownMenu, i as DropdownMenuTrigger, E as Ellipsis, j as DropdownMenuContent, k as DropdownMenuItem, r as resumeHook, l as useDirection, m as createCollection, n as hideOthers, o as useFocusGuards, p as ReactRemoveScroll, q as ChevronUp, X, s as useWorkflowRunsInfinite, t as bulkCancelRuns, v as reenqueueRun, w as StatusBadge, Z as Zap, x as CircleX, y as RunActionsDropdownItems, z as Dialog, B as DialogContent, F as DialogClose, G as DialogTitle, H as DialogDescription, I as DialogPortal, J as DialogOverlay, K as unwrapServerActionResult, L as WorkflowGraphViewer, M as useOptimisticSearchParams, T as Tabs, N as TabsList, O as TabsTrigger, P as TabsContent, Q as ErrorBoundary } from "./url-state-JAVaNZ_m.js";
3
- import { c as createLucideIcon, m as useToast, a as cn, T as Tooltip, d as TooltipTrigger, S as Spinner, n as Check, o as Copy, e as TooltipContent, B as Button, C as ChevronRight, p as useComposedRefs, q as useLayoutEffect2, P as Primitive, s as useControllableState, v as useId, w as Popper, V as VISUALLY_HIDDEN_STYLES, x as createPopperScope, y as createContextScope, z as PopperAnchor, A as composeEventHandlers, D as Portal, E as Presence, F as FocusScope, G as DismissableLayer, H as PopperContent, J as useCallbackRef, K as createSlot, L as ChevronDown, M as useSize, N as BULK_CANCEL_MAX_RUN_IDS, t as toast, O as cva } from "./mermaid-WFAXDIZX-CB__BxYb.js";
4
- import { f as fetchHooks, a as fetchEvents, u as useServerConfig, b as fetchRun, c as fetchWorkflowsManifest } from "./rpc-client-SbyXJdFV.js";
5
- import { S as Skeleton, b as CircleAlert, a as parseWorkflowName } from "./skeleton-DMLgjvZZ.js";
6
- /**
7
- * @license lucide-react v0.575.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */
1
+ import { r as reactExports, j as jsxRuntimeExports, L as Link, g as reactDomExports, C as useSearchParams, B as useNavigate, D as useLocation, w as withComponentProps } from "./index-BUQuaV5X.js";
2
+ import { R as ResolveHookModal, S as Send, u as unwrapOrThrow, W as WorkflowWebAPIError, f as fetchHookToken, a as RelativeTime, A as Alert, b as AlertTitle, g as getErrorTitle, c as AlertDescription, d as getErrorMessage, C as CopyableText, D as DropdownMenu, e as DropdownMenuTrigger, E as Ellipsis, h as DropdownMenuContent, i as DropdownMenuItem, r as resumeHook, j as useDirection, k as createCollection, l as hideOthers, m as useFocusGuards, n as ReactRemoveScroll, o as ChevronUp, X, p as useWorkflowRunsInfinite, q as bulkCancelRuns, s as reenqueueRun, t as StatusBadge, Z as Zap, v as CircleX, w as RunActionsDropdownItems, x as Dialog, y as DialogContent, z as DialogClose, B as DialogTitle, F as DialogDescription, G as DialogPortal, H as DialogOverlay, I as unwrapServerActionResult, J as WorkflowGraphViewer, K as useOptimisticSearchParams, T as Tabs, L as TabsList, M as TabsTrigger, N as TabsContent, O as ErrorBoundary } from "./url-state-n9DuWtVx.js";
3
+ import { c as createLucideIcon, o as useToast, a as cn, T as Tooltip, e as TooltipTrigger, S as Spinner, p as Check, q as Copy, f as TooltipContent, B as Button, C as ChevronRight, s as useComposedRefs, v as useLayoutEffect2, P as Primitive, w as useControllableState, x as useId, y as Popper, V as VISUALLY_HIDDEN_STYLES, z as createPopperScope, A as createContextScope, D as PopperAnchor, E as composeEventHandlers, F as Portal, G as Presence, H as FocusScope, J as DismissableLayer, K as PopperContent, L as useCallbackRef, M as createSlot, N as ChevronDown, O as useSize, Q as BULK_CANCEL_MAX_RUN_IDS, t as toast, U as STATUS_DOT, X as cva } from "./mermaid-WFAXDIZX-CCgeQ0jh.js";
4
+ import { f as fetchHooks, a as fetchEvents, u as useServerConfig, b as fetchRun, c as fetchWorkflowsManifest } from "./rpc-client-DL_nSX36.js";
5
+ import { S as Skeleton, b as CircleAlert, a as parseWorkflowName } from "./skeleton-B2Cf2UXN.js";
12
6
  const __iconNode$6 = [
13
7
  ["path", { d: "m3 16 4 4 4-4", key: "1co6wj" }],
14
8
  ["path", { d: "M7 20V4", key: "1yoxec" }],
@@ -17,12 +11,6 @@ const __iconNode$6 = [
17
11
  ["path", { d: "M15 14h5l-5 6h5", key: "ur5jdg" }]
18
12
  ];
19
13
  const ArrowDownAZ = createLucideIcon("arrow-down-a-z", __iconNode$6);
20
- /**
21
- * @license lucide-react v0.575.0 - ISC
22
- *
23
- * This source code is licensed under the ISC license.
24
- * See the LICENSE file in the root directory of this source tree.
25
- */
26
14
  const __iconNode$5 = [
27
15
  ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
28
16
  ["path", { d: "M7 4v16", key: "1glfcx" }],
@@ -31,40 +19,16 @@ const __iconNode$5 = [
31
19
  ["path", { d: "M15 14h5l-5 6h5", key: "ur5jdg" }]
32
20
  ];
33
21
  const ArrowUpAZ = createLucideIcon("arrow-up-a-z", __iconNode$5);
34
- /**
35
- * @license lucide-react v0.575.0 - ISC
36
- *
37
- * This source code is licensed under the ISC license.
38
- * See the LICENSE file in the root directory of this source tree.
39
- */
40
22
  const __iconNode$4 = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
41
23
  const ChevronLeft = createLucideIcon("chevron-left", __iconNode$4);
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
24
  const __iconNode$3 = [
49
25
  ["path", { d: "M15 6a9 9 0 0 0-9 9V3", key: "1cii5b" }],
50
26
  ["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
51
27
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }]
52
28
  ];
53
29
  const GitBranch = createLucideIcon("git-branch", __iconNode$3);
54
- /**
55
- * @license lucide-react v0.575.0 - ISC
56
- *
57
- * This source code is licensed under the ISC license.
58
- * See the LICENSE file in the root directory of this source tree.
59
- */
60
30
  const __iconNode$2 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
61
31
  const Minus = createLucideIcon("minus", __iconNode$2);
62
- /**
63
- * @license lucide-react v0.575.0 - ISC
64
- *
65
- * This source code is licensed under the ISC license.
66
- * See the LICENSE file in the root directory of this source tree.
67
- */
68
32
  const __iconNode$1 = [
69
33
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
70
34
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
@@ -72,12 +36,6 @@ const __iconNode$1 = [
72
36
  ["path", { d: "M8 16H3v5", key: "1cv678" }]
73
37
  ];
74
38
  const RefreshCw = createLucideIcon("refresh-cw", __iconNode$1);
75
- /**
76
- * @license lucide-react v0.575.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */
81
39
  const __iconNode = [
82
40
  ["rect", { width: "8", height: "8", x: "3", y: "3", rx: "2", key: "by2w9f" }],
83
41
  ["path", { d: "M7 11v4a2 2 0 0 0 2 2h4", key: "xkn7yn" }],
@@ -98,7 +56,6 @@ function useHookActions({ onResolve, callbacks }) {
98
56
  setSelectedHook(null);
99
57
  }, []);
100
58
  const handleResolve = reactExports.useCallback(async (payload) => {
101
- var _a;
102
59
  if (isResolving || !selectedHook)
103
60
  return;
104
61
  try {
@@ -108,11 +65,11 @@ function useHookActions({ onResolve, callbacks }) {
108
65
  description: "The payload has been sent and the hook resolved."
109
66
  });
110
67
  setSelectedHook(null);
111
- (_a = callbacks == null ? void 0 : callbacks.onSuccess) == null ? void 0 : _a.call(callbacks);
68
+ callbacks?.onSuccess?.();
112
69
  } catch (err) {
113
70
  console.error("Failed to resolve hook:", err);
114
71
  toast2.error("Failed to resolve hook", {
115
- description: err instanceof Error ? err.message : "An unknown error occurred"
72
+ description: err instanceof Error ? err.message : "Try again."
116
73
  });
117
74
  } finally {
118
75
  setIsResolving(false);
@@ -319,8 +276,14 @@ function useLoadMoreOnScroll(loadMore, {
319
276
  }, [hasMore, isLoadingMore, root, rootMargin]);
320
277
  return sentinelRef;
321
278
  }
279
+ const DEFAULT_PAGE_SIZE = 10;
280
+ function getPaginationDisplay(currentPage, totalPages, hasMore) {
281
+ if (hasMore) {
282
+ return `Page ${currentPage} of ${totalPages}+`;
283
+ }
284
+ return `Page ${currentPage} of ${totalPages}`;
285
+ }
322
286
  function usePaginatedList(fetchFn) {
323
- var _a;
324
287
  const [cursor, setCursor] = reactExports.useState(void 0);
325
288
  const [hasMore, setHasMore] = reactExports.useState(false);
326
289
  const [currentPage, setCurrentPage] = reactExports.useState(0);
@@ -334,10 +297,9 @@ function usePaginatedList(fetchFn) {
334
297
  async (pageIndex, pageCursor, force = false) => {
335
298
  const cacheKey = pageCursor ?? "initial";
336
299
  setAllPageResults((prev) => {
337
- var _a2;
338
300
  const newMap = new Map(prev);
339
301
  newMap.set(pageIndex, {
340
- data: ((_a2 = prev.get(pageIndex)) == null ? void 0 : _a2.data) ?? null,
302
+ data: prev.get(pageIndex)?.data ?? null,
341
303
  isLoading: true,
342
304
  error: null
343
305
  });
@@ -384,10 +346,9 @@ function usePaginatedList(fetchFn) {
384
346
  } catch (err) {
385
347
  const error = err instanceof Error ? err : new WorkflowWebAPIError(String(err), { layer: "client" });
386
348
  setAllPageResults((prev) => {
387
- var _a2;
388
349
  const newMap = new Map(prev);
389
350
  newMap.set(pageIndex, {
390
- data: ((_a2 = prev.get(pageIndex)) == null ? void 0 : _a2.data) ?? null,
351
+ data: prev.get(pageIndex)?.data ?? null,
391
352
  isLoading: false,
392
353
  error
393
354
  });
@@ -445,7 +406,7 @@ function usePaginatedList(fetchFn) {
445
406
  isLoading: true,
446
407
  error: null
447
408
  };
448
- const globalError = ((_a = Array.from(allPageResults.values()).find((p) => p.error)) == null ? void 0 : _a.error) ?? null;
409
+ const globalError = Array.from(allPageResults.values()).find((p) => p.error)?.error ?? null;
449
410
  const globalLoading = Array.from(allPageResults.values()).some(
450
411
  (p) => p.isLoading
451
412
  );
@@ -778,7 +739,7 @@ function HooksTable({
778
739
  "No active hooks found. ",
779
740
  /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
780
741
  /* @__PURE__ */ jsxRuntimeExports.jsx(DocsLink, { href: "https://workflow-sdk.dev/docs/api-reference/workflow/create-hook", children: "Learn how to create a hook" })
781
- ] }) : loading && !(data == null ? void 0 : data.data) ? /* @__PURE__ */ jsxRuntimeExports.jsx(TableSkeleton, { variant: "hooks" }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
742
+ ] }) : loading && !data?.data ? /* @__PURE__ */ jsxRuntimeExports.jsx(TableSkeleton, { variant: "hooks" }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
782
743
  /* @__PURE__ */ jsxRuntimeExports.jsx(Card, { className: "overflow-hidden mt-4 bg-background", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CardContent, { className: "p-0 max-h-[calc(100vh-280px)] overflow-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Table, { children: [
783
744
  /* @__PURE__ */ jsxRuntimeExports.jsx(TableHeader, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow, { children: [
784
745
  /* @__PURE__ */ jsxRuntimeExports.jsx(TableHead, { className: "sticky top-0 bg-background z-10 border-b shadow-sm h-10", children: "Hook ID" }),
@@ -938,7 +899,7 @@ function SelectProvider(props) {
938
899
  }, "handleUserSelect");
939
900
  const initialValueRef = reactExports.useRef(value);
940
901
  reactExports.useEffect(() => {
941
- const associatedForm = form ? trigger == null ? void 0 : trigger.ownerDocument.getElementById(form) : trigger == null ? void 0 : trigger.form;
902
+ const associatedForm = form ? trigger?.ownerDocument.getElementById(form) : trigger?.form;
942
903
  if (associatedForm instanceof HTMLFormElement) {
943
904
  const reset = /* @__PURE__ */ __name$1(() => setValue(initialValueRef.current), "reset");
944
905
  associatedForm.addEventListener("reset", reset);
@@ -1205,10 +1166,10 @@ var SelectContentImpl = /* @__PURE__ */ reactExports.forwardRef(
1205
1166
  const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
1206
1167
  for (const candidate of candidates) {
1207
1168
  if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
1208
- candidate == null ? void 0 : candidate.scrollIntoView({ block: "nearest" });
1169
+ candidate?.scrollIntoView({ block: "nearest" });
1209
1170
  if (candidate === firstItem && viewport) viewport.scrollTop = 0;
1210
1171
  if (candidate === lastItem && viewport) viewport.scrollTop = viewport.scrollHeight;
1211
- candidate == null ? void 0 : candidate.focus();
1172
+ candidate?.focus();
1212
1173
  if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
1213
1174
  }
1214
1175
  },
@@ -1228,10 +1189,9 @@ var SelectContentImpl = /* @__PURE__ */ reactExports.forwardRef(
1228
1189
  if (content) {
1229
1190
  let pointerMoveDelta = { x: 0, y: 0 };
1230
1191
  const handlePointerMove = /* @__PURE__ */ __name$1((event) => {
1231
- var _a, _b;
1232
1192
  pointerMoveDelta = {
1233
- x: Math.abs(Math.round(event.pageX) - (((_a = triggerPointerDownPosRef.current) == null ? void 0 : _a.x) ?? 0)),
1234
- y: Math.abs(Math.round(event.pageY) - (((_b = triggerPointerDownPosRef.current) == null ? void 0 : _b.y) ?? 0))
1193
+ x: Math.abs(Math.round(event.pageX) - (triggerPointerDownPosRef.current?.x ?? 0)),
1194
+ y: Math.abs(Math.round(event.pageY) - (triggerPointerDownPosRef.current?.y ?? 0))
1235
1195
  };
1236
1196
  }, "handlePointerMove");
1237
1197
  const handlePointerUp = /* @__PURE__ */ __name$1((event) => {
@@ -1269,10 +1229,7 @@ var SelectContentImpl = /* @__PURE__ */ reactExports.forwardRef(
1269
1229
  const currentItem = enabledItems.find((item) => item.ref.current === document.activeElement);
1270
1230
  const nextItem = findNextItem(enabledItems, search, currentItem);
1271
1231
  if (nextItem) {
1272
- setTimeout(() => {
1273
- var _a;
1274
- return (_a = nextItem.ref.current) == null ? void 0 : _a.focus();
1275
- });
1232
+ setTimeout(() => nextItem.ref.current?.focus());
1276
1233
  }
1277
1234
  });
1278
1235
  const itemRefCallback = reactExports.useCallback(
@@ -1290,7 +1247,7 @@ var SelectContentImpl = /* @__PURE__ */ reactExports.forwardRef(
1290
1247
  },
1291
1248
  [context.value]
1292
1249
  );
1293
- const handleItemLeave = reactExports.useCallback(() => content == null ? void 0 : content.focus(), [content]);
1250
+ const handleItemLeave = reactExports.useCallback(() => content?.focus(), [content]);
1294
1251
  const itemTextRefCallback = reactExports.useCallback(
1295
1252
  (node, value, disabled) => {
1296
1253
  if (!node) return;
@@ -1344,8 +1301,7 @@ var SelectContentImpl = /* @__PURE__ */ reactExports.forwardRef(
1344
1301
  event.preventDefault();
1345
1302
  },
1346
1303
  onUnmountAutoFocus: composeEventHandlers(onCloseAutoFocus, (event) => {
1347
- var _a;
1348
- (_a = context.trigger) == null ? void 0 : _a.focus({ preventScroll: true });
1304
+ context.trigger?.focus({ preventScroll: true });
1349
1305
  event.preventDefault();
1350
1306
  }),
1351
1307
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -1501,7 +1457,7 @@ var SelectItemAlignedPosition = /* @__PURE__ */ reactExports.forwardRef(/* @__PU
1501
1457
  contentWrapper.style.margin = `${CONTENT_MARGIN}px 0`;
1502
1458
  contentWrapper.style.minHeight = minContentHeight + "px";
1503
1459
  contentWrapper.style.maxHeight = availableHeight + "px";
1504
- onPlaced == null ? void 0 : onPlaced();
1460
+ onPlaced?.();
1505
1461
  requestAnimationFrame(() => shouldExpandOnScrollRef.current = true);
1506
1462
  }
1507
1463
  }, [
@@ -1525,7 +1481,7 @@ var SelectItemAlignedPosition = /* @__PURE__ */ reactExports.forwardRef(/* @__PU
1525
1481
  (node) => {
1526
1482
  if (node && shouldRepositionRef.current === true) {
1527
1483
  position();
1528
- focusSelectedItem == null ? void 0 : focusSelectedItem();
1484
+ focusSelectedItem?.();
1529
1485
  shouldRepositionRef.current = false;
1530
1486
  }
1531
1487
  },
@@ -1642,7 +1598,7 @@ var SelectViewport = /* @__PURE__ */ reactExports.forwardRef(
1642
1598
  onScroll: composeEventHandlers(viewportProps.onScroll, (event) => {
1643
1599
  const viewport = event.currentTarget;
1644
1600
  const { contentWrapper, shouldExpandOnScrollRef } = viewportContext;
1645
- if ((shouldExpandOnScrollRef == null ? void 0 : shouldExpandOnScrollRef.current) && contentWrapper) {
1601
+ if (shouldExpandOnScrollRef?.current && contentWrapper) {
1646
1602
  const scrolledBy = Math.abs(prevScrollTopRef.current - viewport.scrollTop);
1647
1603
  if (scrolledBy > 0) {
1648
1604
  const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;
@@ -1695,10 +1651,7 @@ var SelectItem$1 = /* @__PURE__ */ reactExports.forwardRef(
1695
1651
  const [textValue, setTextValue] = reactExports.useState(textValueProp ?? "");
1696
1652
  const [isFocused, setIsFocused] = reactExports.useState(false);
1697
1653
  const handleItemRefCallback = useCallbackRef(
1698
- (node) => {
1699
- var _a;
1700
- return (_a = contentContext.itemRefCallback) == null ? void 0 : _a.call(contentContext, node, value, disabled);
1701
- }
1654
+ (node) => contentContext.itemRefCallback?.(node, value, disabled)
1702
1655
  );
1703
1656
  const composedRefs = useComposedRefs(forwardedRef, handleItemRefCallback);
1704
1657
  const textId = useId();
@@ -1718,7 +1671,7 @@ var SelectItem$1 = /* @__PURE__ */ reactExports.forwardRef(
1718
1671
  textId,
1719
1672
  isSelected,
1720
1673
  onItemTextChange: reactExports.useCallback((node) => {
1721
- setTextValue((prevTextValue) => prevTextValue || ((node == null ? void 0 : node.textContent) ?? "").trim());
1674
+ setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
1722
1675
  }, []),
1723
1676
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1724
1677
  Collection.ItemSlot,
@@ -1762,26 +1715,23 @@ var SelectItem$1 = /* @__PURE__ */ reactExports.forwardRef(
1762
1715
  pointerTypeRef.current = event.pointerType;
1763
1716
  }),
1764
1717
  onPointerMove: composeEventHandlers(itemProps.onPointerMove, (event) => {
1765
- var _a;
1766
1718
  pointerTypeRef.current = event.pointerType;
1767
1719
  if (disabled) {
1768
- (_a = contentContext.onItemLeave) == null ? void 0 : _a.call(contentContext);
1720
+ contentContext.onItemLeave?.();
1769
1721
  } else if (pointerTypeRef.current === "mouse") {
1770
1722
  event.currentTarget.focus({ preventScroll: true });
1771
1723
  }
1772
1724
  }),
1773
1725
  onPointerLeave: composeEventHandlers(itemProps.onPointerLeave, (event) => {
1774
- var _a;
1775
1726
  if (event.currentTarget === document.activeElement) {
1776
- (_a = contentContext.onItemLeave) == null ? void 0 : _a.call(contentContext);
1727
+ contentContext.onItemLeave?.();
1777
1728
  }
1778
1729
  }),
1779
1730
  onKeyDown: composeEventHandlers(itemProps.onKeyDown, (event) => {
1780
- var _a;
1781
1731
  if (disabled || event.target !== event.currentTarget) {
1782
1732
  return;
1783
1733
  }
1784
- const isTypingAhead = ((_a = contentContext.searchRef) == null ? void 0 : _a.current) !== "";
1734
+ const isTypingAhead = contentContext.searchRef?.current !== "";
1785
1735
  if (isTypingAhead && event.key === " ") {
1786
1736
  return;
1787
1737
  }
@@ -1810,10 +1760,7 @@ var SelectItemText = /* @__PURE__ */ reactExports.forwardRef(
1810
1760
  const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
1811
1761
  const [itemTextNode, setItemTextNode] = reactExports.useState(null);
1812
1762
  const handleItemTextRefCallback = useCallbackRef(
1813
- (node) => {
1814
- var _a;
1815
- return (_a = contentContext.itemTextRefCallback) == null ? void 0 : _a.call(contentContext, node, itemContext.value, itemContext.disabled);
1816
- }
1763
+ (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled)
1817
1764
  );
1818
1765
  const composedRefs = useComposedRefs(
1819
1766
  forwardedRef,
@@ -1821,7 +1768,7 @@ var SelectItemText = /* @__PURE__ */ reactExports.forwardRef(
1821
1768
  itemContext.onItemTextChange,
1822
1769
  handleItemTextRefCallback
1823
1770
  );
1824
- const textContent = itemTextNode == null ? void 0 : itemTextNode.textContent;
1771
+ const textContent = itemTextNode?.textContent;
1825
1772
  const nativeOption = reactExports.useMemo(
1826
1773
  () => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value),
1827
1774
  [itemContext.disabled, itemContext.value, textContent]
@@ -1928,9 +1875,8 @@ var SelectScrollButtonImpl = /* @__PURE__ */ reactExports.forwardRef(/* @__PURE_
1928
1875
  return () => clearAutoScrollTimer();
1929
1876
  }, [clearAutoScrollTimer]);
1930
1877
  useLayoutEffect2(() => {
1931
- var _a;
1932
1878
  const activeItem = getItems().find((item) => item.ref.current === document.activeElement);
1933
- (_a = activeItem == null ? void 0 : activeItem.ref.current) == null ? void 0 : _a.scrollIntoView({ block: "nearest" });
1879
+ activeItem?.ref.current?.scrollIntoView({ block: "nearest" });
1934
1880
  }, [getItems]);
1935
1881
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
1936
1882
  Primitive.div,
@@ -1945,8 +1891,7 @@ var SelectScrollButtonImpl = /* @__PURE__ */ reactExports.forwardRef(/* @__PURE_
1945
1891
  }
1946
1892
  }),
1947
1893
  onPointerMove: composeEventHandlers(scrollIndicatorProps.onPointerMove, () => {
1948
- var _a;
1949
- (_a = contentContext.onItemLeave) == null ? void 0 : _a.call(contentContext);
1894
+ contentContext.onItemLeave?.();
1950
1895
  if (autoScrollTimerRef.current === null) {
1951
1896
  autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);
1952
1897
  }
@@ -2337,14 +2282,13 @@ function useTableSelection({
2337
2282
  );
2338
2283
  }
2339
2284
  function getRunReplayDisabledReason(run, runIdentityLoading) {
2340
- var _a;
2341
2285
  if (runIdentityLoading) {
2342
2286
  return "Loading run identity...";
2343
2287
  }
2344
2288
  if (!run) {
2345
2289
  return "Unable to verify whether this run can be replayed.";
2346
2290
  }
2347
- if ((_a = run.executionContext) == null ? void 0 : _a.dynamicWorkflow) {
2291
+ if (run.executionContext?.dynamicWorkflow) {
2348
2292
  return "Dynamic runs cannot be replayed as a new run.";
2349
2293
  }
2350
2294
  return void 0;
@@ -2472,7 +2416,7 @@ var CheckboxTrigger = /* @__PURE__ */ reactExports.forwardRef(
2472
2416
  const composedRefs = useComposedRefs(forwardedRef, setControl);
2473
2417
  const initialCheckedStateRef = reactExports.useRef(checked);
2474
2418
  reactExports.useEffect(() => {
2475
- const form = control == null ? void 0 : control.form;
2419
+ const form = control?.form;
2476
2420
  if (form) {
2477
2421
  const reset = /* @__PURE__ */ __name(() => setChecked(initialCheckedStateRef.current), "reset");
2478
2422
  form.addEventListener("reset", reset);
@@ -2630,7 +2574,7 @@ var CheckboxBubbleInput = /* @__PURE__ */ reactExports.forwardRef(
2630
2574
  } else if (checkedChanged) {
2631
2575
  const pendingUserClick = pendingUserClickRef.current;
2632
2576
  pendingUserClickRef.current = null;
2633
- const isPendingUserChange = (pendingUserClick == null ? void 0 : pendingUserClick.requestedChecked) === checked;
2577
+ const isPendingUserChange = pendingUserClick?.requestedChecked === checked;
2634
2578
  shouldStopClickPropagationRef.current = true;
2635
2579
  input.indeterminate = isIndeterminate(checked);
2636
2580
  setChecked.call(input, isIndeterminate(checked) ? false : checked);
@@ -2710,7 +2654,7 @@ const Checkbox = reactExports.forwardRef(({ className, checked, indeterminate, o
2710
2654
  id: checkboxId,
2711
2655
  checked: checkedState,
2712
2656
  onCheckedChange: (state) => {
2713
- onCheckedChange == null ? void 0 : onCheckedChange(state === true);
2657
+ onCheckedChange?.(state === true);
2714
2658
  },
2715
2659
  className: cn(
2716
2660
  "peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow",
@@ -2739,7 +2683,7 @@ function RunActionsDropdownContentInner({
2739
2683
  const [eventsLoading, setEventsLoading] = reactExports.useState(true);
2740
2684
  const [run, setRun] = reactExports.useState(void 0);
2741
2685
  const [runIdentityLoading, setRunIdentityLoading] = reactExports.useState(true);
2742
- const status = (run == null ? void 0 : run.status) || runStatus;
2686
+ const status = run?.status || runStatus;
2743
2687
  reactExports.useEffect(() => {
2744
2688
  setRun(void 0);
2745
2689
  setRunIdentityLoading(true);
@@ -2809,11 +2753,11 @@ function LazyDropdownMenu({
2809
2753
  ] });
2810
2754
  }
2811
2755
  const statusMap = {
2812
- pending: { label: "Pending", color: "bg-neutral-600 dark:bg-neutral-400" },
2813
- running: { label: "Running", color: "bg-blue-600 dark:bg-blue-400" },
2814
- completed: { label: "Completed", color: "bg-green-600 dark:bg-green-400" },
2815
- failed: { label: "Failed", color: "bg-red-600 dark:bg-red-400" },
2816
- cancelled: { label: "Cancelled", color: "bg-gray-600 dark:bg-gray-400" }
2756
+ pending: { label: "Pending", color: STATUS_DOT.pending },
2757
+ running: { label: "Running", color: STATUS_DOT.running },
2758
+ completed: { label: "Completed", color: STATUS_DOT.completed },
2759
+ failed: { label: "Failed", color: STATUS_DOT.failed },
2760
+ cancelled: { label: "Cancelled", color: STATUS_DOT.cancelled }
2817
2761
  };
2818
2762
  const HOUR_MS = 60 * 60 * 1e3;
2819
2763
  const DAY_MS = 24 * HOUR_MS;
@@ -2950,10 +2894,7 @@ function FilterControls({
2950
2894
  /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "w-[180px] h-9", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: "Filter by workflow" }) }),
2951
2895
  /* @__PURE__ */ jsxRuntimeExports.jsxs(SelectContent, { children: [
2952
2896
  /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: "all", children: "All Workflows" }),
2953
- Array.from(seenWorkflowNames).sort().map((name) => {
2954
- var _a;
2955
- return /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: name, children: ((_a = parseWorkflowName(name)) == null ? void 0 : _a.shortName) || name }, name);
2956
- })
2897
+ Array.from(seenWorkflowNames).sort().map((name) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: name, children: parseWorkflowName(name)?.shortName || name }, name))
2957
2898
  ] })
2958
2899
  ]
2959
2900
  }
@@ -3018,7 +2959,6 @@ function FilterControls({
3018
2959
  ] });
3019
2960
  }
3020
2961
  function RunsTable({ onRunClick }) {
3021
- var _a, _b, _c;
3022
2962
  const [searchParams] = useSearchParams();
3023
2963
  const handleWorkflowFilter = useWorkflowFilter();
3024
2964
  const handleStatusFilter = useStatusFilter();
@@ -3038,12 +2978,12 @@ function RunsTable({ onRunClick }) {
3038
2978
  const [hasLoadedOnce, setHasLoadedOnce] = reactExports.useState(false);
3039
2979
  const env = reactExports.useMemo(() => ({}), []);
3040
2980
  const isLocal = serverConfig.backendId === "local" || serverConfig.backendId === "@workflow/world-local";
3041
- const localDataDirPath = (_a = serverConfig.displayInfo) == null ? void 0 : _a["local.dataDirPath"];
3042
- const localShortName = (_b = serverConfig.displayInfo) == null ? void 0 : _b["local.shortName"];
2981
+ const localDataDirPath = serverConfig.displayInfo?.["local.dataDirPath"];
2982
+ const localShortName = serverConfig.displayInfo?.["local.shortName"];
3043
2983
  const [seenWorkflowNames, setSeenWorkflowNames] = reactExports.useState(
3044
2984
  /* @__PURE__ */ new Set()
3045
2985
  );
3046
- const isVercelBackend = ((_c = serverConfig.backendId) == null ? void 0 : _c.includes("vercel")) ?? false;
2986
+ const isVercelBackend = serverConfig.backendId?.includes("vercel") ?? false;
3047
2987
  const [listingWindow, setListingWindow] = reactExports.useState(
3048
2988
  () => isVercelBackend ? getListingWindow(period, periodPreset.ms) : void 0
3049
2989
  );
@@ -3070,8 +3010,8 @@ function RunsTable({ onRunClick }) {
3070
3010
  sortOrder,
3071
3011
  workflowName: workflowNameFilter === "all" ? void 0 : workflowNameFilter,
3072
3012
  status: status === "all" ? void 0 : status,
3073
- startTime: listingWindow == null ? void 0 : listingWindow.startTime,
3074
- endTime: listingWindow == null ? void 0 : listingWindow.endTime
3013
+ startTime: listingWindow?.startTime,
3014
+ endTime: listingWindow?.endTime
3075
3015
  });
3076
3016
  const [planInfo, setPlanInfo] = reactExports.useState(void 0);
3077
3017
  reactExports.useEffect(() => {
@@ -3245,7 +3185,7 @@ function RunsTable({ onRunClick }) {
3245
3185
  period,
3246
3186
  showPeriodPicker: isVercelBackend,
3247
3187
  planWindowMs,
3248
- planUpgradeAvailable: (planInfo == null ? void 0 : planInfo.upgradeAvailable) ?? false,
3188
+ planUpgradeAvailable: planInfo?.upgradeAvailable ?? false,
3249
3189
  onWorkflowChange: handleWorkflowFilter,
3250
3190
  onStatusChange: handleStatusFilter,
3251
3191
  onPeriodChange: handlePeriodFilter,
@@ -3294,49 +3234,46 @@ function RunsTable({ onRunClick }) {
3294
3234
  "."
3295
3235
  ] }),
3296
3236
  isLocalAndHasMissingData && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm flex items-center gap-2", children: "This view will update once you run a workflow." })
3297
- ] }) }) }) : runs.map((run) => {
3298
- var _a2;
3299
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
3300
- TableRow,
3301
- {
3302
- className: "cursor-pointer group relative",
3303
- onClick: () => onRunClick(run.runId),
3304
- "data-selected": selection.isSelected(run),
3305
- children: [
3306
- /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
3307
- Checkbox,
3308
- {
3309
- checked: selection.isSelected(run),
3310
- onCheckedChange: () => selection.toggleSelection(run),
3311
- "aria-label": `Select run ${run.runId}`
3312
- }
3313
- ) }),
3314
- /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CopyableText, { text: run.workflowName, overlay: true, children: ((_a2 = parseWorkflowName(run.workflowName)) == null ? void 0 : _a2.shortName) || "?" }) }),
3315
- /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "font-mono text-xs py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CopyableText, { text: run.runId, overlay: true, children: run.runId }) }),
3316
- /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
3317
- StatusBadge,
3318
- {
3319
- status: run.status,
3320
- context: run,
3321
- durationMs: run.startedAt ? (run.completedAt ? new Date(run.completedAt).getTime() : Date.now()) - new Date(run.startedAt).getTime() : void 0
3322
- }
3323
- ) }),
3324
- /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2 text-muted-foreground text-xs", children: run.startedAt ? /* @__PURE__ */ jsxRuntimeExports.jsx(RelativeTime, { date: run.startedAt }) : "-" }),
3325
- /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2 text-muted-foreground text-xs", children: run.completedAt ? /* @__PURE__ */ jsxRuntimeExports.jsx(RelativeTime, { date: run.completedAt }) : "-" }),
3326
- /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
3327
- LazyDropdownMenu,
3328
- {
3329
- env,
3330
- runId: run.runId,
3331
- runStatus: run.status,
3332
- onSuccess: onReload
3333
- }
3334
- ) })
3335
- ]
3336
- },
3337
- run.runId
3338
- );
3339
- }),
3237
+ ] }) }) }) : runs.map((run) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
3238
+ TableRow,
3239
+ {
3240
+ className: "cursor-pointer group relative",
3241
+ onClick: () => onRunClick(run.runId),
3242
+ "data-selected": selection.isSelected(run),
3243
+ children: [
3244
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
3245
+ Checkbox,
3246
+ {
3247
+ checked: selection.isSelected(run),
3248
+ onCheckedChange: () => selection.toggleSelection(run),
3249
+ "aria-label": `Select run ${run.runId}`
3250
+ }
3251
+ ) }),
3252
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CopyableText, { text: run.workflowName, overlay: true, children: parseWorkflowName(run.workflowName)?.shortName || "?" }) }),
3253
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "font-mono text-xs py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CopyableText, { text: run.runId, overlay: true, children: run.runId }) }),
3254
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
3255
+ StatusBadge,
3256
+ {
3257
+ status: run.status,
3258
+ context: run,
3259
+ durationMs: run.startedAt ? (run.completedAt ? new Date(run.completedAt).getTime() : Date.now()) - new Date(run.startedAt).getTime() : void 0
3260
+ }
3261
+ ) }),
3262
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2 text-muted-foreground text-xs", children: run.startedAt ? /* @__PURE__ */ jsxRuntimeExports.jsx(RelativeTime, { date: run.startedAt }) : "-" }),
3263
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2 text-muted-foreground text-xs", children: run.completedAt ? /* @__PURE__ */ jsxRuntimeExports.jsx(RelativeTime, { date: run.completedAt }) : "-" }),
3264
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
3265
+ LazyDropdownMenu,
3266
+ {
3267
+ env,
3268
+ runId: run.runId,
3269
+ runStatus: run.status,
3270
+ onSuccess: onReload
3271
+ }
3272
+ ) })
3273
+ ]
3274
+ },
3275
+ run.runId
3276
+ )),
3340
3277
  isLoadingMore && /* @__PURE__ */ jsxRuntimeExports.jsx(TableRow, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { colSpan: 7, className: "py-3", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-center gap-2 text-sm text-muted-foreground", children: [
3341
3278
  /* @__PURE__ */ jsxRuntimeExports.jsx(Spinner, { size: "md" }),
3342
3279
  "Loading more runs…"
@@ -3357,7 +3294,7 @@ function RunsTable({ onRunClick }) {
3357
3294
  ] }) }),
3358
3295
  isVercelBackend && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
3359
3296
  periodPreset.label,
3360
- (planInfo == null ? void 0 : planInfo.upgradeAvailable) ? ` · plan window ${planInfo.currentLookbackDays} day${planInfo.currentLookbackDays === 1 ? "" : "s"}` : ""
3297
+ planInfo?.upgradeAvailable ? ` · plan window ${planInfo.currentLookbackDays} day${planInfo.currentLookbackDays === 1 ? "" : "s"}` : ""
3361
3298
  ] })
3362
3299
  ] }),
3363
3300
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -3623,14 +3560,14 @@ function calculateNodePositions(rawNodes, edges) {
3623
3560
  }
3624
3561
  function adaptManifest(raw) {
3625
3562
  const workflows = {};
3626
- console.log("[adaptManifest] Raw manifest version:", raw == null ? void 0 : raw.version);
3563
+ console.log("[adaptManifest] Raw manifest version:", raw?.version);
3627
3564
  console.log(
3628
3565
  "[adaptManifest] Raw workflows keys:",
3629
- Object.keys((raw == null ? void 0 : raw.workflows) || {})
3566
+ Object.keys(raw?.workflows || {})
3630
3567
  );
3631
- if (!(raw == null ? void 0 : raw.workflows)) {
3568
+ if (!raw?.workflows) {
3632
3569
  console.log("[adaptManifest] No workflows in manifest, returning empty");
3633
- return { version: (raw == null ? void 0 : raw.version) || "1.0.0", workflows: {} };
3570
+ return { version: raw?.version || "1.0.0", workflows: {} };
3634
3571
  }
3635
3572
  for (const [filePath, workflowsInFile] of Object.entries(raw.workflows)) {
3636
3573
  for (const [workflowName, entry] of Object.entries(workflowsInFile)) {
@@ -3685,7 +3622,7 @@ function useWorkflowGraphManifest() {
3685
3622
  );
3686
3623
  console.log(
3687
3624
  "[useWorkflowGraphManifest] Workflows in raw:",
3688
- Object.keys((rawManifest == null ? void 0 : rawManifest.workflows) || {})
3625
+ Object.keys(rawManifest?.workflows || {})
3689
3626
  );
3690
3627
  const adaptedManifest = adaptManifest(rawManifest);
3691
3628
  console.log(
@@ -3731,13 +3668,13 @@ function WorkflowsList({ onWorkflowSelect }) {
3731
3668
  [workflows]
3732
3669
  );
3733
3670
  const selectedWorkflowStepCount = reactExports.useMemo(
3734
- () => (selectedWorkflow == null ? void 0 : selectedWorkflow.nodes.filter((node) => node.data.nodeKind === "step").length) ?? 0,
3671
+ () => selectedWorkflow?.nodes.filter((node) => node.data.nodeKind === "step").length ?? 0,
3735
3672
  [selectedWorkflow]
3736
3673
  );
3737
3674
  const handleViewWorkflow = (workflow) => {
3738
3675
  setSelectedWorkflow(workflow);
3739
3676
  setSheetOpen(true);
3740
- onWorkflowSelect == null ? void 0 : onWorkflowSelect(workflow.workflowName);
3677
+ onWorkflowSelect?.(workflow.workflowName);
3741
3678
  };
3742
3679
  if (loading) {
3743
3680
  return /* @__PURE__ */ jsxRuntimeExports.jsx(TableSkeleton, { variant: "workflows", rows: 6 });
@@ -3796,7 +3733,7 @@ function WorkflowsList({ onWorkflowSelect }) {
3796
3733
  /* @__PURE__ */ jsxRuntimeExports.jsxs(SheetHeader, { children: [
3797
3734
  /* @__PURE__ */ jsxRuntimeExports.jsxs(SheetTitle, { className: "flex items-center gap-2", children: [
3798
3735
  /* @__PURE__ */ jsxRuntimeExports.jsx(Workflow, { className: "h-5 w-5" }),
3799
- selectedWorkflow == null ? void 0 : selectedWorkflow.workflowName
3736
+ selectedWorkflow?.workflowName
3800
3737
  ] }),
3801
3738
  selectedWorkflow && /* @__PURE__ */ jsxRuntimeExports.jsx(SheetDescription, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
3802
3739
  /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: "text-xs", children: selectedWorkflow.filePath }),