@elevasis/ui 2.17.0 → 2.18.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/dist/charts/index.js +2 -2
  2. package/dist/{chunk-ABUDMATM.js → chunk-66VY5EMV.js} +4 -4
  3. package/dist/{chunk-2TDZBYXI.js → chunk-A2AZY5SF.js} +1 -1
  4. package/dist/{chunk-FNWWVX5N.js → chunk-B6FIIEFO.js} +245 -86
  5. package/dist/{chunk-MJ6YV2B5.js → chunk-DDZMBNTY.js} +1 -1
  6. package/dist/{chunk-R7GKX4HW.js → chunk-EY322HXF.js} +175 -78
  7. package/dist/{chunk-JU6UB4YA.js → chunk-FM6LSZ45.js} +3 -3
  8. package/dist/{chunk-OCCZRPER.js → chunk-I3LQGLUC.js} +1 -1
  9. package/dist/{chunk-MDO4UCEJ.js → chunk-LT33DSMO.js} +45 -80
  10. package/dist/{chunk-TP5NMF6K.js → chunk-P6TC4K7I.js} +3 -3
  11. package/dist/{chunk-TTP62HWW.js → chunk-SQPM2QDH.js} +7 -13
  12. package/dist/{chunk-S6CYH4RI.js → chunk-SS2UVUSG.js} +27 -5
  13. package/dist/{chunk-MUZIYL5Q.js → chunk-UA36WILN.js} +83 -310
  14. package/dist/{chunk-OXWQQCDR.js → chunk-WP3IYOVJ.js} +226 -211
  15. package/dist/components/index.d.ts +9 -4
  16. package/dist/components/index.js +32 -18
  17. package/dist/features/crm/index.js +5 -5
  18. package/dist/features/dashboard/index.js +6 -6
  19. package/dist/features/delivery/index.js +5 -5
  20. package/dist/features/lead-gen/index.d.ts +152 -16
  21. package/dist/features/lead-gen/index.js +9 -9
  22. package/dist/features/monitoring/index.js +7 -7
  23. package/dist/features/monitoring/requests/index.js +4 -4
  24. package/dist/features/operations/index.d.ts +1 -0
  25. package/dist/features/operations/index.js +8 -8
  26. package/dist/features/settings/index.js +5 -5
  27. package/dist/hooks/index.d.ts +359 -46
  28. package/dist/hooks/index.js +4 -4
  29. package/dist/hooks/published.d.ts +359 -46
  30. package/dist/hooks/published.js +4 -4
  31. package/dist/index.d.ts +359 -46
  32. package/dist/index.js +4 -4
  33. package/dist/provider/index.js +3 -3
  34. package/dist/provider/published.js +2 -2
  35. package/dist/types/index.d.ts +12 -6
  36. package/dist/zustand/index.js +2 -2
  37. package/package.json +3 -3
@@ -1,20 +1,20 @@
1
1
  import { ChatHeader, ChatSidebar } from './chunk-ROSMICXG.js';
2
2
  import { SubshellLoader } from './chunk-ADSSLKKP.js';
3
- import { BaseNode, useGraphTheme, BaseEdge, FormFieldRenderer, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphBackground, GraphFitViewButton, GraphFitViewHandler } from './chunk-ABUDMATM.js';
4
- import { ResourceHealthPanel } from './chunk-JU6UB4YA.js';
5
- import { useCyberColors, CyberDonut } from './chunk-MJ6YV2B5.js';
3
+ import { BaseNode, useGraphTheme, BaseEdge, FormFieldRenderer, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphBackground, GraphFitViewButton, GraphFitViewHandler } from './chunk-66VY5EMV.js';
4
+ import { ResourceHealthPanel } from './chunk-FM6LSZ45.js';
5
+ import { useCyberColors, CyberDonut } from './chunk-DDZMBNTY.js';
6
6
  import { AppShellLoader } from './chunk-M25JL54Z.js';
7
7
  import { PageContainer } from './chunk-BZZCNLT6.js';
8
8
  import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
9
9
  import { CustomModal, ConfirmationModal } from './chunk-GBMNCNHX.js';
10
10
  import { getResourceStatusColor, useTimelineData, useAgentIterationData, getStatusIcon } from './chunk-E4WQGJNS.js';
11
- import { useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useCommandQueueTotals, useStatusFilter, useResourceSearch, useResourcesDomainFilters, usePaginationState, useResources, useRecentExecutionsByResource, filterByDomainFilters, useExecuteAsync, useResourceDefinition, isSessionCapable, useDeleteTask, useCommandQueue, useSubmitAction, useCommandViewData, useCommandViewStats, useCommandViewStore, useResourceExecutions, useCheckpointTasks, useExecutionPanelState, useDeleteSession, useCreateSession, useSessions, useSessionExecutions, useSession, useBulkDeleteExecutions } from './chunk-R7GKX4HW.js';
11
+ import { useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useCommandQueueTotals, useStatusFilter, useResourceSearch, useResourcesDomainFilters, usePaginationState, useResources, useRecentExecutionsByResource, filterByDomainFilters, useExecuteAsync, useResourceDefinition, isSessionCapable, useDeleteTask, useCommandQueue, useSubmitAction, useCommandViewData, useCommandViewStats, useCommandViewStore, useResourceExecutions, useCheckpointTasks, useExecutionPanelState, useDeleteSession, useCreateSession, useSessions, useSessionExecutions, useSession, useBulkDeleteExecutions } from './chunk-EY322HXF.js';
12
12
  import { showApiErrorNotification, showSuccessNotification } from './chunk-GRGRBWIO.js';
13
13
  import { useGraphHighlighting, calculateGraphHeight, Graph_module_css_default, GRAPH_CONSTANTS } from './chunk-22UVE3RA.js';
14
14
  import { useMergedExecution } from './chunk-3ZMAGTWF.js';
15
- import { useOptionalElevasisFeatures, useElevasisFeatures } from './chunk-2TDZBYXI.js';
15
+ import { useOptionalElevasisFeatures, useElevasisFeatures } from './chunk-A2AZY5SF.js';
16
16
  import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
17
- import { JsonViewer, CardHeader, PageTitleCaption, CollapsibleSection, TabCountBadge, ResourceCard, ContextViewer, EmptyState, APIErrorAlert } from './chunk-TTP62HWW.js';
17
+ import { JsonViewer, CardHeader, PageTitleCaption, CollapsibleSection, TabCountBadge, ResourceCard, ContextViewer, EmptyState, APIErrorAlert } from './chunk-SQPM2QDH.js';
18
18
  import { StyledMarkdown } from './chunk-3KMDHCAR.js';
19
19
  import { NavigationButton } from './chunk-NYBEU5TE.js';
20
20
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
@@ -2375,9 +2375,19 @@ var ResourceFilter = ({ value, onChange, fullWidth }) => {
2375
2375
  )
2376
2376
  ] });
2377
2377
  };
2378
- function ResourceHeader({ resource, type, connected, runningCount, sessionCapable }) {
2378
+ function ResourceHeader({
2379
+ resource,
2380
+ type,
2381
+ connected,
2382
+ runningCount,
2383
+ sessionCapable,
2384
+ organizationName: organizationNameProp,
2385
+ onRun,
2386
+ onNavigateToResources,
2387
+ onNavigateToSessions
2388
+ }) {
2379
2389
  const { currentMembership } = useOrganization();
2380
- const organizationName = currentMembership?.organization?.name;
2390
+ const organizationName = organizationNameProp ?? currentMembership?.organization?.name;
2381
2391
  const navigate = useNavigate();
2382
2392
  const Icon = getResourceIcon(type);
2383
2393
  const clipboard = useClipboard({ timeout: 2e3 });
@@ -2388,12 +2398,11 @@ function ResourceHeader({ resource, type, connected, runningCount, sessionCapabl
2388
2398
  color: "teal"
2389
2399
  });
2390
2400
  };
2391
- const handleGoToSessions = () => {
2392
- navigate({
2393
- to: "/operations/sessions",
2394
- search: { agent: resource.resourceId }
2395
- });
2396
- };
2401
+ const handleGoToSessions = onNavigateToSessions ?? (() => navigate({
2402
+ to: "/operations/sessions",
2403
+ search: { agent: resource.resourceId }
2404
+ }));
2405
+ const handleGoToResources = onNavigateToResources ?? (() => navigate({ to: "/operations/resources" }));
2397
2406
  return /* @__PURE__ */ jsxs(Fragment, { children: [
2398
2407
  /* @__PURE__ */ jsx(
2399
2408
  PageTitleCaption,
@@ -2429,17 +2438,9 @@ function ResourceHeader({ resource, type, connected, runningCount, sessionCapabl
2429
2438
  runningCount,
2430
2439
  " running"
2431
2440
  ] }),
2441
+ onRun && /* @__PURE__ */ jsx(Button, { size: "xs", variant: "filled", leftSection: /* @__PURE__ */ jsx(IconPlayerPlay, { size: 16 }), onClick: onRun, children: "Run" }),
2432
2442
  type === "agent" && sessionCapable && /* @__PURE__ */ jsx(Button, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ jsx(IconMessage, { size: 16 }), onClick: handleGoToSessions, children: "Go to Sessions" }),
2433
- /* @__PURE__ */ jsx(
2434
- Button,
2435
- {
2436
- size: "sm",
2437
- variant: "light",
2438
- leftSection: /* @__PURE__ */ jsx(IconArrowLeft, { size: 16 }),
2439
- onClick: () => navigate({ to: "/operations/resources" }),
2440
- children: "Resources"
2441
- }
2442
- )
2443
+ /* @__PURE__ */ jsx(Button, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ jsx(IconArrowLeft, { size: 16 }), onClick: handleGoToResources, children: "Resources" })
2443
2444
  ] })
2444
2445
  ] })
2445
2446
  ] });
@@ -3035,7 +3036,7 @@ var CommandQueueSidebar = ({
3035
3036
  }) => {
3036
3037
  const colors = useCyberColors();
3037
3038
  const features = useOptionalElevasisFeatures();
3038
- const resolvedTimeRange = timeRange ?? features?.timeRange ?? "24h";
3039
+ const resolvedTimeRange = timeRange ?? features?.timeRange ?? "30d";
3039
3040
  const statusFilter = status === "all" ? void 0 : status;
3040
3041
  const { data: checkpointData, isLoading: isDonutLoading } = useCommandQueueTotals({
3041
3042
  timeRange: resolvedTimeRange,
@@ -3709,75 +3710,6 @@ function ResourcesSidebar({ timeRange }) {
3709
3710
  ] })
3710
3711
  ] });
3711
3712
  }
3712
- function ResourceHeader2({
3713
- resource,
3714
- type,
3715
- connected,
3716
- runningCount,
3717
- sessionCapable,
3718
- onRun,
3719
- onNavigateToResources,
3720
- onNavigateToSessions
3721
- }) {
3722
- const { currentMembership } = useOrganization();
3723
- const organizationName = currentMembership?.organization?.name;
3724
- const navigate = useNavigate();
3725
- const Icon = getResourceIcon(type);
3726
- const clipboard = useClipboard({ timeout: 2e3 });
3727
- const handleCopyId = () => {
3728
- clipboard.copy(`"${organizationName}/${resource.resourceId}"`);
3729
- notifications.show({
3730
- message: "Resource ID copied to clipboard",
3731
- color: "teal"
3732
- });
3733
- };
3734
- const handleGoToSessions = onNavigateToSessions ?? (() => navigate({
3735
- to: "/operations/sessions",
3736
- search: { agent: resource.resourceId }
3737
- }));
3738
- const handleGoToResources = onNavigateToResources ?? (() => navigate({ to: "/operations/resources" }));
3739
- return /* @__PURE__ */ jsxs(Fragment, { children: [
3740
- /* @__PURE__ */ jsx(
3741
- PageTitleCaption,
3742
- {
3743
- title: resource.name,
3744
- caption: resource.description || `${type.charAt(0).toUpperCase()}${type.slice(1)} details`
3745
- }
3746
- ),
3747
- /* @__PURE__ */ jsxs(Group, { justify: "space-between", children: [
3748
- /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
3749
- /* @__PURE__ */ jsx(Icon, { size: 20, color: "var(--color-primary)" }),
3750
- /* @__PURE__ */ jsxs(Badge, { color: "blue", variant: "light", children: [
3751
- type.charAt(0).toUpperCase(),
3752
- type.slice(1)
3753
- ] }),
3754
- /* @__PURE__ */ jsx(Badge, { color: ResourceStatusColors[resource.status], variant: "outline", size: "sm", children: resource.status.toUpperCase() }),
3755
- resource.version && /* @__PURE__ */ jsxs(Badge, { variant: "outline", size: "sm", children: [
3756
- "v",
3757
- resource.version
3758
- ] }),
3759
- /* @__PURE__ */ jsxs(Group, { gap: 4, children: [
3760
- /* @__PURE__ */ jsxs(Text, { size: "sm", ff: "monospace", c: "dimmed", children: [
3761
- organizationName,
3762
- "/",
3763
- resource.resourceId
3764
- ] }),
3765
- /* @__PURE__ */ jsx(Tooltip, { label: clipboard.copied ? "Copied!" : "Copy ID", children: /* @__PURE__ */ jsx(ActionIcon, { size: "sm", variant: "subtle", onClick: handleCopyId, color: clipboard.copied ? "teal" : "gray", children: /* @__PURE__ */ jsx(IconCopy, { size: 14, color: clipboard.copied ? "teal" : "gray" }) }) })
3766
- ] })
3767
- ] }),
3768
- /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
3769
- connected && /* @__PURE__ */ jsx(Badge, { color: "green", variant: "dot", children: "CONNECTED" }),
3770
- runningCount && runningCount > 0 && /* @__PURE__ */ jsxs(Badge, { color: "blue", variant: "filled", children: [
3771
- runningCount,
3772
- " running"
3773
- ] }),
3774
- onRun && /* @__PURE__ */ jsx(Button, { size: "xs", variant: "filled", leftSection: /* @__PURE__ */ jsx(IconPlayerPlay, { size: 16 }), onClick: onRun, children: "Run" }),
3775
- type === "agent" && sessionCapable && /* @__PURE__ */ jsx(Button, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ jsx(IconMessage, { size: 16 }), onClick: handleGoToSessions, children: "Go to Sessions" }),
3776
- /* @__PURE__ */ jsx(Button, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ jsx(IconArrowLeft, { size: 16 }), onClick: handleGoToResources, children: "Resources" })
3777
- ] })
3778
- ] })
3779
- ] });
3780
- }
3781
3713
  function ResourceErrorState2({ error }) {
3782
3714
  return /* @__PURE__ */ jsx(Stack, { children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(Stack, { align: "center", children: [
3783
3715
  /* @__PURE__ */ jsx(Text, { c: "red", children: "Failed to load resource" }),
@@ -4022,7 +3954,7 @@ function ResourceDetailPage({
4022
3954
  ),
4023
3955
  /* @__PURE__ */ jsxs(Stack, { children: [
4024
3956
  /* @__PURE__ */ jsx(
4025
- ResourceHeader2,
3957
+ ResourceHeader,
4026
3958
  {
4027
3959
  resource: validResource,
4028
3960
  type,
@@ -4071,7 +4003,7 @@ function CommandQueuePage({
4071
4003
  const features = useOptionalElevasisFeatures();
4072
4004
  const [deleteConfirmId, setDeleteConfirmId] = useState(null);
4073
4005
  const { mutate: deleteTask, isPending: isDeleting } = useDeleteTask();
4074
- const resolvedTimeRange = timeRange ?? features?.timeRange ?? "24h";
4006
+ const resolvedTimeRange = timeRange ?? features?.timeRange ?? "30d";
4075
4007
  const serverStatus = status === "all" ? void 0 : status;
4076
4008
  const { page, setPage, offset, totalPages } = usePaginationState(pageSize, [
4077
4009
  selectedCheckpoint,
@@ -4079,12 +4011,7 @@ function CommandQueuePage({
4079
4011
  resolvedTimeRange,
4080
4012
  priorityRange
4081
4013
  ]);
4082
- const { data: checkpointData, isLoading: isLoadingCheckpoints } = useCommandQueueTotals({
4083
- timeRange: resolvedTimeRange,
4084
- priorityMin: priorityRange[0],
4085
- priorityMax: priorityRange[1]
4086
- });
4087
- const { data: tasks = [], isLoading: isLoadingTasks } = useCommandQueue({
4014
+ const { data: taskList, isLoading: isLoadingTasks } = useCommandQueue({
4088
4015
  status: serverStatus,
4089
4016
  humanCheckpoint: selectedCheckpoint,
4090
4017
  timeRange: resolvedTimeRange,
@@ -4093,16 +4020,46 @@ function CommandQueuePage({
4093
4020
  limit: pageSize,
4094
4021
  offset
4095
4022
  });
4023
+ const tasks = taskList?.tasks ?? [];
4096
4024
  useEffect(() => {
4097
4025
  if (!isLoadingTasks && tasks.length === 0 && page > 1) {
4098
4026
  setPage(page - 1);
4099
4027
  }
4100
4028
  }, [tasks.length, isLoadingTasks]);
4101
- if (isLoadingCheckpoints || !organizationReady) return /* @__PURE__ */ jsx(AppShellLoader, {});
4102
- const totalTasks = checkpointData?.total ?? 0;
4029
+ if (!organizationReady) return /* @__PURE__ */ jsx(AppShellLoader, {});
4030
+ const totalTasks = taskList?.total ?? 0;
4103
4031
  return /* @__PURE__ */ jsxs(Stack, { children: [
4104
4032
  /* @__PURE__ */ jsx(PageTitleCaption, { title: "Command Queue", caption: "Human-in-the-loop approval system for agent/workflow actions" }),
4105
- /* @__PURE__ */ jsx(Stack, { gap: "xs", children: isLoadingTasks ? /* @__PURE__ */ jsx(AppShellLoader, {}) : tasks.length === 0 ? /* @__PURE__ */ jsx(Card, { withBorder: true, children: /* @__PURE__ */ jsx(Text, { ta: "center", c: "dimmed", children: "No tasks found" }) }) : tasks.map((task) => /* @__PURE__ */ jsx(
4033
+ /* @__PURE__ */ jsx(Stack, { gap: "xs", children: isLoadingTasks ? /* @__PURE__ */ jsx(AppShellLoader, {}) : tasks.length === 0 ? /* @__PURE__ */ jsx(Card, { withBorder: true, children: /* @__PURE__ */ jsx(Text, { ta: "center", c: "dimmed", children: "No tasks found" }) }) : status === "all" ? (() => {
4034
+ const pending = tasks.filter((t) => t.status === "pending");
4035
+ const other = tasks.filter((t) => t.status !== "pending");
4036
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
4037
+ pending.length > 0 && /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
4038
+ /* @__PURE__ */ jsx(Text, { c: "dimmed", fw: 600, tt: "uppercase", size: "xs", children: "Pending" }),
4039
+ pending.map((task) => /* @__PURE__ */ jsx(
4040
+ CommandQueueTaskRow,
4041
+ {
4042
+ task,
4043
+ onClick: () => onNavigateToTask(task.id),
4044
+ onDelete: (taskId) => setDeleteConfirmId(taskId)
4045
+ },
4046
+ task.id
4047
+ ))
4048
+ ] }),
4049
+ other.length > 0 && /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
4050
+ /* @__PURE__ */ jsx(Text, { c: "dimmed", fw: 600, tt: "uppercase", size: "xs", children: "Other" }),
4051
+ other.map((task) => /* @__PURE__ */ jsx(
4052
+ CommandQueueTaskRow,
4053
+ {
4054
+ task,
4055
+ onClick: () => onNavigateToTask(task.id),
4056
+ onDelete: (taskId) => setDeleteConfirmId(taskId)
4057
+ },
4058
+ task.id
4059
+ ))
4060
+ ] })
4061
+ ] });
4062
+ })() : tasks.map((task) => /* @__PURE__ */ jsx(
4106
4063
  CommandQueueTaskRow,
4107
4064
  {
4108
4065
  task,
@@ -4181,8 +4138,8 @@ function CommandQueueDetailPage({
4181
4138
  const [deleteConfirmOpened, setDeleteConfirmOpened] = useState(false);
4182
4139
  const [contextView, setContextView] = useState("formatted");
4183
4140
  const [submitResultError, setSubmitResultError] = useState(null);
4184
- const { data: tasks, isLoading } = useCommandQueue();
4185
- const task = tasks?.find((t) => t.id === taskId);
4141
+ const { data: taskList, isLoading } = useCommandQueue();
4142
+ const task = taskList?.tasks.find((t) => t.id === taskId);
4186
4143
  const richTextRenderer = renderRichText ? (props) => renderRichText(props) : void 0;
4187
4144
  const submitCallbacks = {
4188
4145
  onSuccess: (data) => {
@@ -4232,25 +4189,13 @@ function CommandQueueDetailPage({
4232
4189
  if (isLoading) return /* @__PURE__ */ jsx(AppShellLoader, {});
4233
4190
  if (!task) {
4234
4191
  return /* @__PURE__ */ jsxs(Stack, { children: [
4235
- /* @__PURE__ */ jsx(
4236
- PageTitleCaption,
4237
- {
4238
- title: "Task Not Found",
4239
- rightSection: /* @__PURE__ */ jsx(Button, { variant: "subtle", leftSection: /* @__PURE__ */ jsx(IconArrowLeft, { size: 16 }), onClick: onNavigateBack, size: "sm", children: "Back to Queue" })
4240
- }
4241
- ),
4192
+ /* @__PURE__ */ jsx(PageTitleCaption, { title: "Task Not Found" }),
4193
+ /* @__PURE__ */ jsx(Group, { justify: "flex-end", children: /* @__PURE__ */ jsx(ActionIcon, { variant: "subtle", size: "sm", title: "Back to Queue", onClick: onNavigateBack, children: /* @__PURE__ */ jsx(IconArrowLeft, { size: 16 }) }) }),
4242
4194
  /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsx(Text, { ta: "center", c: "dimmed", children: "This task no longer exists or could not be loaded." }) })
4243
4195
  ] });
4244
4196
  }
4245
4197
  return /* @__PURE__ */ jsxs(Stack, { children: [
4246
- /* @__PURE__ */ jsx(
4247
- PageTitleCaption,
4248
- {
4249
- title: "Task Detail",
4250
- caption: task.description || "Task approval required",
4251
- rightSection: /* @__PURE__ */ jsx(Button, { variant: "light", leftSection: /* @__PURE__ */ jsx(IconArrowLeft, { size: 16 }), onClick: onNavigateBack, size: "sm", children: "Back to Queue" })
4252
- }
4253
- ),
4198
+ /* @__PURE__ */ jsx(PageTitleCaption, { title: "Task Detail", caption: task.description || "Task approval required" }),
4254
4199
  /* @__PURE__ */ jsxs(Group, { justify: "space-between", children: [
4255
4200
  /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
4256
4201
  /* @__PURE__ */ jsxs(Badge, { color: getPriorityColor2(task.priority), variant: "light", size: "sm", children: [
@@ -4278,6 +4223,7 @@ function CommandQueueDetailPage({
4278
4223
  ] }),
4279
4224
  /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
4280
4225
  task.status === "failed" && /* @__PURE__ */ jsx(Button, { variant: "light", color: "red", size: "xs", loading: isPending, onClick: handleRetry, children: "Retry" }),
4226
+ /* @__PURE__ */ jsx(ActionIcon, { variant: "subtle", size: "sm", title: "Back to Queue", onClick: onNavigateBack, children: /* @__PURE__ */ jsx(IconArrowLeft, { size: 16 }) }),
4281
4227
  /* @__PURE__ */ jsx(
4282
4228
  ActionIcon,
4283
4229
  {
@@ -4294,82 +4240,128 @@ function CommandQueueDetailPage({
4294
4240
  ] }),
4295
4241
  /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
4296
4242
  /* @__PURE__ */ jsx(Title, { order: 3, children: "Resources" }),
4297
- /* @__PURE__ */ jsxs(SimpleGrid, { cols: 2, children: [
4298
- /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
4299
- /* @__PURE__ */ jsx(Text, { size: "xs", children: "Task ID" }),
4300
- /* @__PURE__ */ jsxs(Group, { gap: 4, children: [
4301
- /* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", c: "var(--color-text-subtle)", children: task.id }),
4302
- /* @__PURE__ */ jsx(CopyButton, { value: task.id, children: ({ copied, copy }) => /* @__PURE__ */ jsx(
4303
- ActionIcon,
4304
- {
4305
- onClick: copy,
4306
- variant: "subtle",
4307
- size: "xs",
4308
- color: copied ? "green" : "var(--color-text-subtle)",
4309
- children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 14 }) : /* @__PURE__ */ jsx(IconCopy, { size: 14 })
4310
- }
4311
- ) })
4312
- ] })
4243
+ /* @__PURE__ */ jsxs(SimpleGrid, { cols: { base: 1, sm: 2, md: 3 }, spacing: "xs", children: [
4244
+ /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
4245
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", style: { flexShrink: 0 }, children: "Task ID" }),
4246
+ /* @__PURE__ */ jsx(
4247
+ Text,
4248
+ {
4249
+ size: "xs",
4250
+ ff: "monospace",
4251
+ c: "var(--color-text-subtle)",
4252
+ style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", flex: 1 },
4253
+ children: task.id
4254
+ }
4255
+ ),
4256
+ /* @__PURE__ */ jsx(CopyButton, { value: task.id, children: ({ copied, copy }) => /* @__PURE__ */ jsx(
4257
+ ActionIcon,
4258
+ {
4259
+ onClick: copy,
4260
+ variant: "subtle",
4261
+ size: "xs",
4262
+ color: copied ? "green" : "var(--color-text-subtle)",
4263
+ style: { flexShrink: 0 },
4264
+ children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 12 }) : /* @__PURE__ */ jsx(IconCopy, { size: 12 })
4265
+ }
4266
+ ) })
4313
4267
  ] }),
4314
- task.humanCheckpoint && /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
4315
- /* @__PURE__ */ jsx(Text, { size: "xs", children: "Checkpoint" }),
4316
- /* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", c: "var(--color-text-subtle)", children: task.humanCheckpoint })
4317
- ] })
4318
- ] }),
4319
- /* @__PURE__ */ jsxs(SimpleGrid, { cols: 2, children: [
4320
- /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
4321
- /* @__PURE__ */ jsx(Text, { size: "xs", children: "Origin Resource" }),
4322
- /* @__PURE__ */ jsxs(Group, { gap: 4, children: [
4323
- /* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", c: "var(--color-text-subtle)", children: task.originResourceId }),
4324
- /* @__PURE__ */ jsx(CopyButton, { value: task.originResourceId, children: ({ copied, copy }) => /* @__PURE__ */ jsx(
4325
- ActionIcon,
4326
- {
4327
- onClick: copy,
4328
- variant: "subtle",
4329
- size: "xs",
4330
- color: copied ? "green" : "var(--color-text-subtle)",
4331
- children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 14 }) : /* @__PURE__ */ jsx(IconCopy, { size: 14 })
4332
- }
4333
- ) })
4334
- ] })
4268
+ task.humanCheckpoint && /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
4269
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", style: { flexShrink: 0 }, children: "Checkpoint" }),
4270
+ /* @__PURE__ */ jsx(
4271
+ Text,
4272
+ {
4273
+ size: "xs",
4274
+ ff: "monospace",
4275
+ c: "var(--color-text-subtle)",
4276
+ style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", flex: 1 },
4277
+ children: task.humanCheckpoint
4278
+ }
4279
+ )
4335
4280
  ] }),
4336
- /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
4337
- /* @__PURE__ */ jsx(Text, { size: "xs", children: "Origin Execution ID" }),
4338
- /* @__PURE__ */ jsxs(Group, { gap: 4, children: [
4339
- /* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", c: "var(--color-text-subtle)", children: task.originExecutionId }),
4340
- /* @__PURE__ */ jsx(CopyButton, { value: `${orgName}/${task.originResourceId} ${task.originExecutionId}`, children: ({ copied, copy }) => /* @__PURE__ */ jsx(
4341
- ActionIcon,
4342
- {
4343
- onClick: copy,
4344
- variant: "subtle",
4345
- size: "xs",
4346
- color: copied ? "green" : "var(--color-text-subtle)",
4347
- children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 14 }) : /* @__PURE__ */ jsx(IconCopy, { size: 14 })
4348
- }
4349
- ) })
4350
- ] })
4351
- ] })
4352
- ] }),
4353
- /* @__PURE__ */ jsxs(SimpleGrid, { cols: 2, children: [
4354
- /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
4355
- /* @__PURE__ */ jsx(Text, { size: "xs", children: "Target Resource" }),
4356
- /* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", c: "var(--color-text-subtle)", children: task.targetResourceId || "N/A" })
4281
+ /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
4282
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", style: { flexShrink: 0 }, children: "Origin Resource" }),
4283
+ /* @__PURE__ */ jsx(
4284
+ Text,
4285
+ {
4286
+ size: "xs",
4287
+ ff: "monospace",
4288
+ c: "var(--color-text-subtle)",
4289
+ style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", flex: 1 },
4290
+ children: task.originResourceId
4291
+ }
4292
+ ),
4293
+ /* @__PURE__ */ jsx(CopyButton, { value: task.originResourceId, children: ({ copied, copy }) => /* @__PURE__ */ jsx(
4294
+ ActionIcon,
4295
+ {
4296
+ onClick: copy,
4297
+ variant: "subtle",
4298
+ size: "xs",
4299
+ color: copied ? "green" : "var(--color-text-subtle)",
4300
+ style: { flexShrink: 0 },
4301
+ children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 12 }) : /* @__PURE__ */ jsx(IconCopy, { size: 12 })
4302
+ }
4303
+ ) })
4357
4304
  ] }),
4358
- /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
4359
- /* @__PURE__ */ jsx(Text, { size: "xs", children: "Target Execution ID" }),
4360
- /* @__PURE__ */ jsxs(Group, { gap: 4, children: [
4361
- /* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", c: "var(--color-text-subtle)", children: task.targetExecutionId ?? "N/A" }),
4362
- task.targetExecutionId && /* @__PURE__ */ jsx(CopyButton, { value: `${orgName}/${task.targetResourceId} ${task.targetExecutionId}`, children: ({ copied, copy }) => /* @__PURE__ */ jsx(
4363
- ActionIcon,
4364
- {
4365
- onClick: copy,
4366
- variant: "subtle",
4367
- size: "xs",
4368
- color: copied ? "green" : "var(--color-text-subtle)",
4369
- children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 14 }) : /* @__PURE__ */ jsx(IconCopy, { size: 14 })
4370
- }
4371
- ) })
4372
- ] })
4305
+ /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
4306
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", style: { flexShrink: 0 }, children: "Origin Exec ID" }),
4307
+ /* @__PURE__ */ jsx(
4308
+ Text,
4309
+ {
4310
+ size: "xs",
4311
+ ff: "monospace",
4312
+ c: "var(--color-text-subtle)",
4313
+ style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", flex: 1 },
4314
+ children: task.originExecutionId
4315
+ }
4316
+ ),
4317
+ /* @__PURE__ */ jsx(CopyButton, { value: `${orgName}/${task.originResourceId} ${task.originExecutionId}`, children: ({ copied, copy }) => /* @__PURE__ */ jsx(
4318
+ ActionIcon,
4319
+ {
4320
+ onClick: copy,
4321
+ variant: "subtle",
4322
+ size: "xs",
4323
+ color: copied ? "green" : "var(--color-text-subtle)",
4324
+ style: { flexShrink: 0 },
4325
+ children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 12 }) : /* @__PURE__ */ jsx(IconCopy, { size: 12 })
4326
+ }
4327
+ ) })
4328
+ ] }),
4329
+ /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
4330
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", style: { flexShrink: 0 }, children: "Target Resource" }),
4331
+ /* @__PURE__ */ jsx(
4332
+ Text,
4333
+ {
4334
+ size: "xs",
4335
+ ff: "monospace",
4336
+ c: "var(--color-text-subtle)",
4337
+ style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", flex: 1 },
4338
+ children: task.targetResourceId || "N/A"
4339
+ }
4340
+ )
4341
+ ] }),
4342
+ /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
4343
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", style: { flexShrink: 0 }, children: "Target Exec ID" }),
4344
+ /* @__PURE__ */ jsx(
4345
+ Text,
4346
+ {
4347
+ size: "xs",
4348
+ ff: "monospace",
4349
+ c: "var(--color-text-subtle)",
4350
+ style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", flex: 1 },
4351
+ children: task.targetExecutionId ?? "N/A"
4352
+ }
4353
+ ),
4354
+ task.targetExecutionId && /* @__PURE__ */ jsx(CopyButton, { value: `${orgName}/${task.targetResourceId} ${task.targetExecutionId}`, children: ({ copied, copy }) => /* @__PURE__ */ jsx(
4355
+ ActionIcon,
4356
+ {
4357
+ onClick: copy,
4358
+ variant: "subtle",
4359
+ size: "xs",
4360
+ color: copied ? "green" : "var(--color-text-subtle)",
4361
+ style: { flexShrink: 0 },
4362
+ children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 12 }) : /* @__PURE__ */ jsx(IconCopy, { size: 12 })
4363
+ }
4364
+ ) })
4373
4365
  ] })
4374
4366
  ] }),
4375
4367
  /* @__PURE__ */ jsx(Group, { justify: "flex-end", children: /* @__PURE__ */ jsx(
@@ -7132,7 +7124,7 @@ function formatGeneratedTimestamp(value) {
7132
7124
  minute: "2-digit"
7133
7125
  }).format(new Date(value));
7134
7126
  }
7135
- function OrganizationGraphPage({ lens = "default", timeRange = "24h" }) {
7127
+ function OrganizationGraphPage({ lens = "default", timeRange = "30d" }) {
7136
7128
  const { organizationModel, organizationGraph } = useElevasisFeatures();
7137
7129
  const { data: commandViewData, isLoading, error } = useCommandViewData();
7138
7130
  const { data: commandViewStats } = useCommandViewStats(timeRange, { enabled: lens === "command-view" });
@@ -7808,6 +7800,11 @@ function CommandViewSidebarContent({ timeRange }) {
7808
7800
  if (!selectedNode) return null;
7809
7801
  return getNodeId(selectedNode);
7810
7802
  }, [selectedNode]);
7803
+ const {
7804
+ page: executionPage,
7805
+ setPage: setExecutionPage,
7806
+ totalPages: totalExecutionPages
7807
+ } = usePaginationState(10, [selectedResourceId, timeRange]);
7811
7808
  const getNavigationUrl = () => {
7812
7809
  if (!selectedNode || !selectedResourceId) return null;
7813
7810
  if (selectedNode.type === "agent") return `/operations/resources/agent/${selectedResourceId}`;
@@ -7823,6 +7820,8 @@ function CommandViewSidebarContent({ timeRange }) {
7823
7820
  } = useResourceExecutions({
7824
7821
  resourceId: selectedResourceId,
7825
7822
  timeRange,
7823
+ page: executionPage,
7824
+ limit: 10,
7826
7825
  enabled: isNavigable
7827
7826
  });
7828
7827
  const {
@@ -7979,17 +7978,29 @@ function CommandViewSidebarContent({ timeRange }) {
7979
7978
  /* @__PURE__ */ jsx(Space, { h: "sm" })
7980
7979
  ] })
7981
7980
  ] }),
7982
- selectedNode && isNavigable && /* @__PURE__ */ jsx(Stack, { p: "sm", children: executionsLoading ? /* @__PURE__ */ jsx(Center, { py: "md", children: /* @__PURE__ */ jsx(Loader, { size: "sm" }) }) : executionsError ? /* @__PURE__ */ jsx(APIErrorAlert, { error: executionsError, title: "Failed to load executions" }) : executionsData && executionsData.executions.length > 0 ? EXECUTION_SECTIONS.map((section) => /* @__PURE__ */ jsx(
7983
- ExecutionStatusSection,
7984
- {
7985
- executions: executionsData.executions,
7986
- status: section.status,
7987
- title: section.title,
7988
- badgeColor: section.badgeColor,
7989
- resourceUrl
7990
- },
7991
- section.status
7992
- )) : executionsData ? /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "No executions in the selected time range" }) : null }),
7981
+ selectedNode && isNavigable && /* @__PURE__ */ jsx(Stack, { p: "sm", children: executionsLoading ? /* @__PURE__ */ jsx(Center, { py: "md", children: /* @__PURE__ */ jsx(Loader, { size: "sm" }) }) : executionsError ? /* @__PURE__ */ jsx(APIErrorAlert, { error: executionsError, title: "Failed to load executions" }) : executionsData && executionsData.executions.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
7982
+ EXECUTION_SECTIONS.map((section) => /* @__PURE__ */ jsx(
7983
+ ExecutionStatusSection,
7984
+ {
7985
+ executions: executionsData.executions,
7986
+ status: section.status,
7987
+ title: section.title,
7988
+ badgeColor: section.badgeColor,
7989
+ resourceUrl
7990
+ },
7991
+ section.status
7992
+ )),
7993
+ totalExecutionPages(executionsData.totalExecutions) > 1 && /* @__PURE__ */ jsx(Group, { justify: "center", children: /* @__PURE__ */ jsx(
7994
+ Pagination,
7995
+ {
7996
+ size: "sm",
7997
+ total: totalExecutionPages(executionsData.totalExecutions),
7998
+ value: executionPage,
7999
+ onChange: setExecutionPage,
8000
+ boundaries: 1
8001
+ }
8002
+ ) })
8003
+ ] }) : executionsData ? /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "No executions in the selected time range" }) : null }),
7993
8004
  selectedNode && isHumanCheckpoint && /* @__PURE__ */ jsx(Stack, { p: "sm", children: checkpointTasksLoading ? /* @__PURE__ */ jsx(Center, { py: "md", children: /* @__PURE__ */ jsx(Loader, { size: "sm" }) }) : checkpointTasksError ? /* @__PURE__ */ jsx(APIErrorAlert, { error: checkpointTasksError, title: "Failed to load pending tasks" }) : checkpointTasksData && checkpointTasksData.tasks.length > 0 ? /* @__PURE__ */ jsxs("div", { children: [
7994
8005
  /* @__PURE__ */ jsxs(Group, { justify: "space-between", mb: 8, children: [
7995
8006
  /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", fw: 600, tt: "uppercase", children: "Pending Tasks" }),
@@ -9134,6 +9145,7 @@ var ExecutionLogsSidebar = () => {
9134
9145
  const [filter, setFilter] = useState("all");
9135
9146
  const [deleteModalOpen, setDeleteModalOpen] = useState(false);
9136
9147
  const bulkDelete = useBulkDeleteExecutions();
9148
+ const { page, setPage, offset, totalPages } = usePaginationState(PAGE_SIZE_DEFAULT, [resourceId, filter]);
9137
9149
  if (!operationsApiUrl || !operationsSSEManager) {
9138
9150
  return /* @__PURE__ */ jsx(Box, { p: "sm", style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ jsx(
9139
9151
  APIErrorAlert,
@@ -9142,11 +9154,12 @@ var ExecutionLogsSidebar = () => {
9142
9154
  }
9143
9155
  ) });
9144
9156
  }
9145
- const { executions, isLoading, isFetched, selectedId, setSelectedId, setResourceStatusFilter, runningCount } = useExecutionPanelState({
9157
+ const { executions, total, isLoading, isFetched, selectedId, setSelectedId, setResourceStatusFilter, runningCount } = useExecutionPanelState({
9146
9158
  resourceId,
9147
9159
  apiUrl: operationsApiUrl,
9148
9160
  manager: operationsSSEManager,
9149
- limit: PAGE_SIZE_DEFAULT
9161
+ limit: PAGE_SIZE_DEFAULT,
9162
+ offset
9150
9163
  });
9151
9164
  const handleFilterChange = (value) => {
9152
9165
  const nextFilter = value || "dev";
@@ -9165,6 +9178,7 @@ var ExecutionLogsSidebar = () => {
9165
9178
  }
9166
9179
  };
9167
9180
  const filteredExecutions = filter === "all" ? executions : executions.filter((exec) => exec.resourceStatus === filter);
9181
+ const totalExecutions = total;
9168
9182
  if (isLoading || !isFetched) {
9169
9183
  return /* @__PURE__ */ jsx(Center, { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ jsx(Loader, { size: "md" }) });
9170
9184
  }
@@ -9226,7 +9240,8 @@ var ExecutionLogsSidebar = () => {
9226
9240
  "No ",
9227
9241
  filter === "all" ? "" : filter,
9228
9242
  " executions yet"
9229
- ] }) }) })
9243
+ ] }) }) }),
9244
+ totalPages(totalExecutions) > 1 && /* @__PURE__ */ jsx(Group, { justify: "center", mt: "md", children: /* @__PURE__ */ jsx(Pagination, { size: "sm", total: totalPages(totalExecutions), value: page, onChange: setPage, boundaries: 1 }) })
9230
9245
  ] }),
9231
9246
  /* @__PURE__ */ jsx(
9232
9247
  ConfirmationModal,
@@ -9292,7 +9307,7 @@ function CommandQueueSidebarConnected() {
9292
9307
  }
9293
9308
  var OperationsSidebarMiddle = () => {
9294
9309
  const { currentPath, currentSearch, navigate } = useRouterContext();
9295
- const { timeRange = "24h" } = useElevasisFeatures();
9310
+ const { timeRange = "30d" } = useElevasisFeatures();
9296
9311
  if (currentPath.startsWith("/operations/sessions")) {
9297
9312
  return /* @__PURE__ */ jsx(
9298
9313
  SessionsSidebar,