@elevasis/ui 2.17.2 → 2.19.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 (63) hide show
  1. package/dist/api/index.js +2 -2
  2. package/dist/app/index.js +5 -5
  3. package/dist/charts/index.js +3 -3
  4. package/dist/chunk-3JCMO7SD.js +14 -0
  5. package/dist/{chunk-TP5NMF6K.js → chunk-46Z2VHY3.js} +4 -4
  6. package/dist/{chunk-FNWWVX5N.js → chunk-5SCVXZPM.js} +358 -188
  7. package/dist/{chunk-TTP62HWW.js → chunk-BHR7IV72.js} +10 -15
  8. package/dist/{chunk-MJ6YV2B5.js → chunk-CTTY6FUT.js} +2 -2
  9. package/dist/{chunk-P3TFNFZS.js → chunk-EUWBY43Z.js} +2 -2
  10. package/dist/{chunk-MDO4UCEJ.js → chunk-IBOX2M24.js} +47 -82
  11. package/dist/{chunk-HH3RNG2O.js → chunk-JEQM67SO.js} +307 -173
  12. package/dist/{chunk-2TDZBYXI.js → chunk-LR5CRY5A.js} +1 -1
  13. package/dist/{chunk-JU6UB4YA.js → chunk-LVCJ2H2T.js} +4 -4
  14. package/dist/{chunk-GRGRBWIO.js → chunk-M7W7CGPL.js} +1 -1
  15. package/dist/{chunk-34NQLV2W.js → chunk-MJAKU2WA.js} +3 -3
  16. package/dist/{chunk-OCCZRPER.js → chunk-Q4QJOSVS.js} +1 -1
  17. package/dist/{chunk-R73EHHPN.js → chunk-Q5HC6ENG.js} +18 -2
  18. package/dist/{chunk-VDM6DQES.js → chunk-R7OJCNL3.js} +1 -1
  19. package/dist/{chunk-6RWMRQN5.js → chunk-TIIPYB2Z.js} +1 -1
  20. package/dist/{chunk-ABUDMATM.js → chunk-TKEKYPZA.js} +6 -6
  21. package/dist/{chunk-R7GKX4HW.js → chunk-UU6PJ4EJ.js} +192 -82
  22. package/dist/{chunk-7L42RRHZ.js → chunk-Y7TDUZEH.js} +221 -514
  23. package/dist/{chunk-7GCWOUFT.js → chunk-YVAXWM3W.js} +73 -121
  24. package/dist/components/index.d.ts +219 -2810
  25. package/dist/components/index.js +41 -27
  26. package/dist/features/crm/index.d.ts +54 -53
  27. package/dist/features/crm/index.js +11 -11
  28. package/dist/features/dashboard/index.js +12 -12
  29. package/dist/features/delivery/index.d.ts +2642 -2605
  30. package/dist/features/delivery/index.js +11 -11
  31. package/dist/features/lead-gen/index.d.ts +152 -16
  32. package/dist/features/lead-gen/index.js +11 -22
  33. package/dist/features/monitoring/index.js +13 -13
  34. package/dist/features/monitoring/requests/index.d.ts +38 -27
  35. package/dist/features/monitoring/requests/index.js +212 -106
  36. package/dist/features/operations/index.d.ts +9 -26
  37. package/dist/features/operations/index.js +15 -15
  38. package/dist/features/settings/index.d.ts +36 -37
  39. package/dist/features/settings/index.js +12 -12
  40. package/dist/hooks/delivery/index.d.ts +2712 -2699
  41. package/dist/hooks/delivery/index.js +2 -2
  42. package/dist/hooks/index.d.ts +1997 -4627
  43. package/dist/hooks/index.js +10 -10
  44. package/dist/hooks/published.d.ts +1997 -4627
  45. package/dist/hooks/published.js +10 -10
  46. package/dist/index.d.ts +1124 -3673
  47. package/dist/index.js +11 -11
  48. package/dist/layout/index.d.ts +14 -2
  49. package/dist/layout/index.js +1 -1
  50. package/dist/provider/index.d.ts +320 -249
  51. package/dist/provider/index.js +8 -8
  52. package/dist/provider/published.d.ts +320 -249
  53. package/dist/provider/published.js +5 -5
  54. package/dist/sse/index.d.ts +1 -6
  55. package/dist/theme/index.js +2 -2
  56. package/dist/types/index.d.ts +1608 -2487
  57. package/dist/utils/index.d.ts +32 -1
  58. package/dist/utils/index.js +1 -1
  59. package/dist/zustand/index.d.ts +4 -8
  60. package/dist/zustand/index.js +2 -2
  61. package/package.json +4 -4
  62. package/dist/chunk-ADSSLKKP.js +0 -10
  63. /package/dist/{chunk-GCBWGGI6.js → chunk-OD7GWIZS.js} +0 -0
@@ -1,32 +1,32 @@
1
1
  import { ChatHeader, ChatSidebar } from './chunk-ROSMICXG.js';
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';
2
+ import { SubshellSidebarLoader, SubshellLoader } from './chunk-3JCMO7SD.js';
3
+ import { BaseNode, useGraphTheme, BaseEdge, FormFieldRenderer, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphBackground, GraphFitViewButton, GraphFitViewHandler } from './chunk-TKEKYPZA.js';
4
+ import { ResourceHealthPanel } from './chunk-LVCJ2H2T.js';
5
+ import { useCyberColors, CyberDonut } from './chunk-CTTY6FUT.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';
12
- import { showApiErrorNotification, showSuccessNotification } from './chunk-GRGRBWIO.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-UU6PJ4EJ.js';
12
+ import { showApiErrorNotification, showSuccessNotification } from './chunk-M7W7CGPL.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-LR5CRY5A.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-BHR7IV72.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';
21
21
  import { useAppearance } from './chunk-QJ2KCHKX.js';
22
22
  import { topbarHeight } from './chunk-DT3QYZVU.js';
23
- import { getErrorInfo, formatErrorMessage, getResourceIcon, formatRelativeTime, DOMAIN_MAP, getNodeId, PAGE_SIZE_DEFAULT, debounce } from './chunk-GCBWGGI6.js';
23
+ import { getErrorInfo, formatErrorMessage, getResourceIcon, formatRelativeTime, DOMAIN_MAP, getNodeId, PAGE_SIZE_DEFAULT, debounce } from './chunk-OD7GWIZS.js';
24
24
  import { ResourceStatusColors, toWorkflowLogMessages } from './chunk-KRWALB24.js';
25
25
  import { useInitialization } from './chunk-DK2HVHCY.js';
26
26
  import { useOrganization } from './chunk-DD3CCMCZ.js';
27
27
  import { z } from 'zod';
28
- import { Stack, Group, Text, Badge, Title, Textarea, Alert, Button, ActionIcon, Collapse, Card, ThemeIcon, SimpleGrid, Divider, Paper, Space, CopyButton, Center, Tooltip, Code, Menu, useMantineTheme, UnstyledButton, Select, RangeSlider, Loader, Box, Progress, Tabs, Pagination, TextInput, Modal, LoadingOverlay, SegmentedControl, Switch, ScrollArea, MultiSelect } from '@mantine/core';
29
- import { IconBrain, IconFileText, IconMail, IconSend, IconClock, IconArrowUp, IconMessageCircle, IconRocket, IconEye, IconEdit, IconAlertTriangle, IconRefresh, IconX, IconCheck, IconCode, IconAlertCircle, IconChevronRight, IconTool, IconSettings, IconCpu, IconClockHour4, IconVersions, IconPlayerPlay, IconNetwork, IconSitemap, IconCopy, IconPlayerStop, IconReload, IconTrash, IconTerminal2, IconBug, IconChevronDown, IconMessage, IconArrowLeft, IconRobot, IconGitBranch, IconDotsVertical, IconFilter, IconCircleCheck, IconCategory, IconDatabase, IconApps, IconRoute, IconAdjustmentsHorizontal, IconSearch, IconCircleX, IconCircleDashed, IconExternalLink, IconTopologyStar3, IconInfoCircle, IconPlus, IconLayoutSidebarRightExpand, IconNote, IconArchive, IconDownload, IconTimeline, IconActivityHeartbeat, IconClockPause, IconArrowsMaximize, IconShare2, IconHistory } from '@tabler/icons-react';
28
+ import { Stack, Group, Text, Badge, Title, Textarea, Alert, Button, ActionIcon, Collapse, Card, ThemeIcon, SimpleGrid, Divider, Paper, Space, CopyButton, Center, Tooltip, Code, Menu, useMantineTheme, UnstyledButton, Select, RangeSlider, Box, Progress, Tabs, Pagination, TextInput, Modal, LoadingOverlay, Loader, SegmentedControl, Switch, ScrollArea, MultiSelect } from '@mantine/core';
29
+ import { IconBrain, IconFileText, IconMail, IconSend, IconClock, IconArrowUp, IconMessageCircle, IconRocket, IconEye, IconEdit, IconAlertTriangle, IconRefresh, IconX, IconCheck, IconCode, IconAlertCircle, IconChevronRight, IconTool, IconSettings, IconCpu, IconClockHour4, IconVersions, IconPlayerPlay, IconNetwork, IconSitemap, IconCopy, IconPlayerStop, IconReload, IconTrash, IconTerminal2, IconBug, IconChevronDown, IconMessage, IconArrowLeft, IconRobot, IconGitBranch, IconDotsVertical, IconFilter, IconCircleCheck, IconCategory, IconDatabase, IconApps, IconRoute, IconAdjustmentsHorizontal, IconSearch, IconCircleX, IconCircleDashed, IconExternalLink, IconFolders, IconBraces, IconBolt, IconTopologyStar3, IconInfoCircle, IconPlus, IconLayoutSidebarRightExpand, IconNote, IconArchive, IconDownload, IconTimeline, IconActivityHeartbeat, IconClockPause, IconArrowsMaximize, IconShare2, IconHistory } from '@tabler/icons-react';
30
30
  import { useForm } from '@mantine/form';
31
31
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
32
32
  import { memo, useState, useMemo, useRef, useCallback, useEffect, useDeferredValue, useEffectEvent } from 'react';
@@ -1108,8 +1108,16 @@ function ActionModal({
1108
1108
  {}
1109
1109
  );
1110
1110
  };
1111
+ const fieldDefaults = (action.form?.fields || []).reduce(
1112
+ (acc, field) => {
1113
+ acc[field.name] = field.defaultValue ?? "";
1114
+ return acc;
1115
+ },
1116
+ {}
1117
+ );
1111
1118
  const form = useForm({
1112
1119
  initialValues: {
1120
+ ...fieldDefaults,
1113
1121
  ...getInitialValuesFromContext(),
1114
1122
  ...action.payloadTemplate || {},
1115
1123
  notes: ""
@@ -3000,7 +3008,7 @@ function CommandQueueSidebarMiddle({
3000
3008
  });
3001
3009
  return /* @__PURE__ */ jsxs(Fragment, { children: [
3002
3010
  /* @__PURE__ */ jsx(SubshellSidebarSection, { icon: IconCategory, label: "Checkpoint Groups", withTopBorder: true }),
3003
- /* @__PURE__ */ jsx(Stack, { gap: "xs", p: "sm", style: { flex: 1, overflowY: "auto" }, children: isLoading ? /* @__PURE__ */ jsx(Center, { p: "xl", children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3011
+ /* @__PURE__ */ jsx(Stack, { gap: "xs", p: "sm", style: { flex: 1, overflowY: "auto" }, children: isLoading ? /* @__PURE__ */ jsx(SubshellSidebarLoader, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
3004
3012
  /* @__PURE__ */ jsx(
3005
3013
  CheckpointGroup,
3006
3014
  {
@@ -3036,7 +3044,7 @@ var CommandQueueSidebar = ({
3036
3044
  }) => {
3037
3045
  const colors = useCyberColors();
3038
3046
  const features = useOptionalElevasisFeatures();
3039
- const resolvedTimeRange = timeRange ?? features?.timeRange ?? "24h";
3047
+ const resolvedTimeRange = timeRange ?? features?.timeRange ?? "30d";
3040
3048
  const statusFilter = status === "all" ? void 0 : status;
3041
3049
  const { data: checkpointData, isLoading: isDonutLoading } = useCommandQueueTotals({
3042
3050
  timeRange: resolvedTimeRange,
@@ -3485,7 +3493,7 @@ function ResourcesSidebar({ timeRange }) {
3485
3493
  return { donutSuccessCount: success, donutFailedCount: failed };
3486
3494
  }, [executionData, domainFilteredResources]);
3487
3495
  if (!organizationReady || isResourcesLoading) {
3488
- return /* @__PURE__ */ jsx(Box, { style: { flex: 1, minHeight: 0, padding: theme.spacing.sm }, children: /* @__PURE__ */ jsx(Center, { p: "xl", children: /* @__PURE__ */ jsx(Loader, {}) }) });
3496
+ return /* @__PURE__ */ jsx(SubshellSidebarLoader, {});
3489
3497
  }
3490
3498
  if (error) {
3491
3499
  return /* @__PURE__ */ jsxs(Box, { style: { flex: 1, minHeight: 0, padding: theme.spacing.sm }, children: [
@@ -4003,7 +4011,7 @@ function CommandQueuePage({
4003
4011
  const features = useOptionalElevasisFeatures();
4004
4012
  const [deleteConfirmId, setDeleteConfirmId] = useState(null);
4005
4013
  const { mutate: deleteTask, isPending: isDeleting } = useDeleteTask();
4006
- const resolvedTimeRange = timeRange ?? features?.timeRange ?? "24h";
4014
+ const resolvedTimeRange = timeRange ?? features?.timeRange ?? "30d";
4007
4015
  const serverStatus = status === "all" ? void 0 : status;
4008
4016
  const { page, setPage, offset, totalPages } = usePaginationState(pageSize, [
4009
4017
  selectedCheckpoint,
@@ -4011,12 +4019,7 @@ function CommandQueuePage({
4011
4019
  resolvedTimeRange,
4012
4020
  priorityRange
4013
4021
  ]);
4014
- const { data: checkpointData, isLoading: isLoadingCheckpoints } = useCommandQueueTotals({
4015
- timeRange: resolvedTimeRange,
4016
- priorityMin: priorityRange[0],
4017
- priorityMax: priorityRange[1]
4018
- });
4019
- const { data: tasks = [], isLoading: isLoadingTasks } = useCommandQueue({
4022
+ const { data: taskList, isLoading: isLoadingTasks } = useCommandQueue({
4020
4023
  status: serverStatus,
4021
4024
  humanCheckpoint: selectedCheckpoint,
4022
4025
  timeRange: resolvedTimeRange,
@@ -4025,16 +4028,46 @@ function CommandQueuePage({
4025
4028
  limit: pageSize,
4026
4029
  offset
4027
4030
  });
4031
+ const tasks = taskList?.tasks ?? [];
4028
4032
  useEffect(() => {
4029
4033
  if (!isLoadingTasks && tasks.length === 0 && page > 1) {
4030
4034
  setPage(page - 1);
4031
4035
  }
4032
4036
  }, [tasks.length, isLoadingTasks]);
4033
- if (isLoadingCheckpoints || !organizationReady) return /* @__PURE__ */ jsx(AppShellLoader, {});
4034
- const totalTasks = checkpointData?.total ?? 0;
4037
+ if (!organizationReady) return /* @__PURE__ */ jsx(AppShellLoader, {});
4038
+ const totalTasks = taskList?.total ?? 0;
4035
4039
  return /* @__PURE__ */ jsxs(Stack, { children: [
4036
4040
  /* @__PURE__ */ jsx(PageTitleCaption, { title: "Command Queue", caption: "Human-in-the-loop approval system for agent/workflow actions" }),
4037
- /* @__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(
4041
+ /* @__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" ? (() => {
4042
+ const pending = tasks.filter((t) => t.status === "pending");
4043
+ const other = tasks.filter((t) => t.status !== "pending");
4044
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
4045
+ pending.length > 0 && /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
4046
+ /* @__PURE__ */ jsx(Text, { c: "dimmed", fw: 600, tt: "uppercase", size: "xs", children: "Pending" }),
4047
+ pending.map((task) => /* @__PURE__ */ jsx(
4048
+ CommandQueueTaskRow,
4049
+ {
4050
+ task,
4051
+ onClick: () => onNavigateToTask(task.id),
4052
+ onDelete: (taskId) => setDeleteConfirmId(taskId)
4053
+ },
4054
+ task.id
4055
+ ))
4056
+ ] }),
4057
+ other.length > 0 && /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
4058
+ /* @__PURE__ */ jsx(Text, { c: "dimmed", fw: 600, tt: "uppercase", size: "xs", children: "Other" }),
4059
+ other.map((task) => /* @__PURE__ */ jsx(
4060
+ CommandQueueTaskRow,
4061
+ {
4062
+ task,
4063
+ onClick: () => onNavigateToTask(task.id),
4064
+ onDelete: (taskId) => setDeleteConfirmId(taskId)
4065
+ },
4066
+ task.id
4067
+ ))
4068
+ ] })
4069
+ ] });
4070
+ })() : tasks.map((task) => /* @__PURE__ */ jsx(
4038
4071
  CommandQueueTaskRow,
4039
4072
  {
4040
4073
  task,
@@ -4112,9 +4145,11 @@ function CommandQueueDetailPage({
4112
4145
  const [confirmAction, setConfirmAction] = useState(null);
4113
4146
  const [deleteConfirmOpened, setDeleteConfirmOpened] = useState(false);
4114
4147
  const [contextView, setContextView] = useState("formatted");
4148
+ const [actionsView, setActionsView] = useState("formatted");
4149
+ const [payloadView, setPayloadView] = useState("formatted");
4115
4150
  const [submitResultError, setSubmitResultError] = useState(null);
4116
- const { data: tasks, isLoading } = useCommandQueue();
4117
- const task = tasks?.find((t) => t.id === taskId);
4151
+ const { data: taskList, isLoading } = useCommandQueue();
4152
+ const task = taskList?.tasks.find((t) => t.id === taskId);
4118
4153
  const richTextRenderer = renderRichText ? (props) => renderRichText(props) : void 0;
4119
4154
  const submitCallbacks = {
4120
4155
  onSuccess: (data) => {
@@ -4164,25 +4199,13 @@ function CommandQueueDetailPage({
4164
4199
  if (isLoading) return /* @__PURE__ */ jsx(AppShellLoader, {});
4165
4200
  if (!task) {
4166
4201
  return /* @__PURE__ */ jsxs(Stack, { children: [
4167
- /* @__PURE__ */ jsx(
4168
- PageTitleCaption,
4169
- {
4170
- title: "Task Not Found",
4171
- rightSection: /* @__PURE__ */ jsx(Button, { variant: "subtle", leftSection: /* @__PURE__ */ jsx(IconArrowLeft, { size: 16 }), onClick: onNavigateBack, size: "sm", children: "Back to Queue" })
4172
- }
4173
- ),
4202
+ /* @__PURE__ */ jsx(PageTitleCaption, { title: "Task Not Found" }),
4203
+ /* @__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 }) }) }),
4174
4204
  /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsx(Text, { ta: "center", c: "dimmed", children: "This task no longer exists or could not be loaded." }) })
4175
4205
  ] });
4176
4206
  }
4177
4207
  return /* @__PURE__ */ jsxs(Stack, { children: [
4178
- /* @__PURE__ */ jsx(
4179
- PageTitleCaption,
4180
- {
4181
- title: "Task Detail",
4182
- caption: task.description || "Task approval required",
4183
- rightSection: /* @__PURE__ */ jsx(Button, { variant: "light", leftSection: /* @__PURE__ */ jsx(IconArrowLeft, { size: 16 }), onClick: onNavigateBack, size: "sm", children: "Back to Queue" })
4184
- }
4185
- ),
4208
+ /* @__PURE__ */ jsx(PageTitleCaption, { title: "Task Detail", caption: task.description || "Task approval required" }),
4186
4209
  /* @__PURE__ */ jsxs(Group, { justify: "space-between", children: [
4187
4210
  /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
4188
4211
  /* @__PURE__ */ jsxs(Badge, { color: getPriorityColor2(task.priority), variant: "light", size: "sm", children: [
@@ -4210,6 +4233,7 @@ function CommandQueueDetailPage({
4210
4233
  ] }),
4211
4234
  /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
4212
4235
  task.status === "failed" && /* @__PURE__ */ jsx(Button, { variant: "light", color: "red", size: "xs", loading: isPending, onClick: handleRetry, children: "Retry" }),
4236
+ /* @__PURE__ */ jsx(ActionIcon, { variant: "subtle", size: "sm", title: "Back to Queue", onClick: onNavigateBack, children: /* @__PURE__ */ jsx(IconArrowLeft, { size: 16 }) }),
4213
4237
  /* @__PURE__ */ jsx(
4214
4238
  ActionIcon,
4215
4239
  {
@@ -4225,128 +4249,201 @@ function CommandQueueDetailPage({
4225
4249
  ] })
4226
4250
  ] }),
4227
4251
  /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
4228
- /* @__PURE__ */ jsx(Title, { order: 3, children: "Resources" }),
4229
- /* @__PURE__ */ jsxs(SimpleGrid, { cols: 2, children: [
4230
- /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
4231
- /* @__PURE__ */ jsx(Text, { size: "xs", children: "Task ID" }),
4232
- /* @__PURE__ */ jsxs(Group, { gap: 4, children: [
4233
- /* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", c: "var(--color-text-subtle)", children: task.id }),
4234
- /* @__PURE__ */ jsx(CopyButton, { value: task.id, children: ({ copied, copy }) => /* @__PURE__ */ jsx(
4235
- ActionIcon,
4236
- {
4237
- onClick: copy,
4238
- variant: "subtle",
4239
- size: "xs",
4240
- color: copied ? "green" : "var(--color-text-subtle)",
4241
- children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 14 }) : /* @__PURE__ */ jsx(IconCopy, { size: 14 })
4242
- }
4243
- ) })
4244
- ] })
4252
+ /* @__PURE__ */ jsx(
4253
+ CardHeader,
4254
+ {
4255
+ icon: /* @__PURE__ */ jsx(IconFolders, { size: 18 }),
4256
+ title: "Resources",
4257
+ rightSection: /* @__PURE__ */ jsx(
4258
+ Button,
4259
+ {
4260
+ variant: "light",
4261
+ color: "var(--color-primary)",
4262
+ size: "xs",
4263
+ leftSection: /* @__PURE__ */ jsx(IconExternalLink, { size: 14 }),
4264
+ onClick: () => window.open(
4265
+ `/operations/resources/${task.originResourceType}/${task.originResourceId}?exec=${task.originExecutionId}`,
4266
+ "_blank",
4267
+ "noopener,noreferrer"
4268
+ ),
4269
+ children: "View Origin Execution"
4270
+ }
4271
+ )
4272
+ }
4273
+ ),
4274
+ /* @__PURE__ */ jsxs(SimpleGrid, { cols: { base: 1, sm: 2, md: 3 }, spacing: "xs", children: [
4275
+ /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
4276
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", style: { flexShrink: 0 }, children: "Task ID" }),
4277
+ /* @__PURE__ */ jsx(
4278
+ Text,
4279
+ {
4280
+ size: "xs",
4281
+ ff: "monospace",
4282
+ c: "var(--color-text-subtle)",
4283
+ style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", flex: 1 },
4284
+ children: task.id
4285
+ }
4286
+ ),
4287
+ /* @__PURE__ */ jsx(CopyButton, { value: task.id, children: ({ copied, copy }) => /* @__PURE__ */ jsx(
4288
+ ActionIcon,
4289
+ {
4290
+ onClick: copy,
4291
+ variant: "subtle",
4292
+ size: "xs",
4293
+ color: copied ? "green" : "var(--color-text-subtle)",
4294
+ style: { flexShrink: 0 },
4295
+ children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 12 }) : /* @__PURE__ */ jsx(IconCopy, { size: 12 })
4296
+ }
4297
+ ) })
4245
4298
  ] }),
4246
- task.humanCheckpoint && /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
4247
- /* @__PURE__ */ jsx(Text, { size: "xs", children: "Checkpoint" }),
4248
- /* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", c: "var(--color-text-subtle)", children: task.humanCheckpoint })
4249
- ] })
4250
- ] }),
4251
- /* @__PURE__ */ jsxs(SimpleGrid, { cols: 2, children: [
4252
- /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
4253
- /* @__PURE__ */ jsx(Text, { size: "xs", children: "Origin Resource" }),
4254
- /* @__PURE__ */ jsxs(Group, { gap: 4, children: [
4255
- /* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", c: "var(--color-text-subtle)", children: task.originResourceId }),
4256
- /* @__PURE__ */ jsx(CopyButton, { value: task.originResourceId, 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
- children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 14 }) : /* @__PURE__ */ jsx(IconCopy, { size: 14 })
4264
- }
4265
- ) })
4266
- ] })
4299
+ task.humanCheckpoint && /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
4300
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", style: { flexShrink: 0 }, children: "Checkpoint" }),
4301
+ /* @__PURE__ */ jsx(
4302
+ Text,
4303
+ {
4304
+ size: "xs",
4305
+ ff: "monospace",
4306
+ c: "var(--color-text-subtle)",
4307
+ style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", flex: 1 },
4308
+ children: task.humanCheckpoint
4309
+ }
4310
+ )
4267
4311
  ] }),
4268
- /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
4269
- /* @__PURE__ */ jsx(Text, { size: "xs", children: "Origin Execution ID" }),
4270
- /* @__PURE__ */ jsxs(Group, { gap: 4, children: [
4271
- /* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", c: "var(--color-text-subtle)", children: task.originExecutionId }),
4272
- /* @__PURE__ */ jsx(CopyButton, { value: `${orgName}/${task.originResourceId} ${task.originExecutionId}`, children: ({ copied, copy }) => /* @__PURE__ */ jsx(
4273
- ActionIcon,
4274
- {
4275
- onClick: copy,
4276
- variant: "subtle",
4277
- size: "xs",
4278
- color: copied ? "green" : "var(--color-text-subtle)",
4279
- children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 14 }) : /* @__PURE__ */ jsx(IconCopy, { size: 14 })
4280
- }
4281
- ) })
4282
- ] })
4283
- ] })
4284
- ] }),
4285
- /* @__PURE__ */ jsxs(SimpleGrid, { cols: 2, children: [
4286
- /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
4287
- /* @__PURE__ */ jsx(Text, { size: "xs", children: "Target Resource" }),
4288
- /* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", c: "var(--color-text-subtle)", children: task.targetResourceId || "N/A" })
4312
+ /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
4313
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", style: { flexShrink: 0 }, children: "Origin Resource" }),
4314
+ /* @__PURE__ */ jsx(
4315
+ Text,
4316
+ {
4317
+ size: "xs",
4318
+ ff: "monospace",
4319
+ c: "var(--color-text-subtle)",
4320
+ style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", flex: 1 },
4321
+ children: task.originResourceId
4322
+ }
4323
+ ),
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
+ style: { flexShrink: 0 },
4332
+ children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 12 }) : /* @__PURE__ */ jsx(IconCopy, { size: 12 })
4333
+ }
4334
+ ) })
4289
4335
  ] }),
4290
- /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
4291
- /* @__PURE__ */ jsx(Text, { size: "xs", children: "Target Execution ID" }),
4292
- /* @__PURE__ */ jsxs(Group, { gap: 4, children: [
4293
- /* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", c: "var(--color-text-subtle)", children: task.targetExecutionId ?? "N/A" }),
4294
- task.targetExecutionId && /* @__PURE__ */ jsx(CopyButton, { value: `${orgName}/${task.targetResourceId} ${task.targetExecutionId}`, children: ({ copied, copy }) => /* @__PURE__ */ jsx(
4295
- ActionIcon,
4296
- {
4297
- onClick: copy,
4298
- variant: "subtle",
4299
- size: "xs",
4300
- color: copied ? "green" : "var(--color-text-subtle)",
4301
- children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 14 }) : /* @__PURE__ */ jsx(IconCopy, { size: 14 })
4302
- }
4303
- ) })
4304
- ] })
4305
- ] })
4306
- ] }),
4307
- /* @__PURE__ */ jsx(Group, { justify: "flex-end", children: /* @__PURE__ */ jsx(
4308
- Button,
4309
- {
4310
- variant: "light",
4311
- color: "var(--color-primary)",
4312
- size: "sm",
4313
- leftSection: /* @__PURE__ */ jsx(IconExternalLink, { size: 14 }),
4314
- onClick: () => window.open(
4315
- `/operations/resources/${task.originResourceType}/${task.originResourceId}?exec=${task.originExecutionId}`,
4316
- "_blank",
4317
- "noopener,noreferrer"
4336
+ /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
4337
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", style: { flexShrink: 0 }, children: "Origin Exec ID" }),
4338
+ /* @__PURE__ */ jsx(
4339
+ Text,
4340
+ {
4341
+ size: "xs",
4342
+ ff: "monospace",
4343
+ c: "var(--color-text-subtle)",
4344
+ style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", flex: 1 },
4345
+ children: task.originExecutionId
4346
+ }
4318
4347
  ),
4319
- children: "View Origin Execution"
4320
- }
4321
- ) })
4348
+ /* @__PURE__ */ jsx(CopyButton, { value: `${orgName}/${task.originResourceId} ${task.originExecutionId}`, children: ({ copied, copy }) => /* @__PURE__ */ jsx(
4349
+ ActionIcon,
4350
+ {
4351
+ onClick: copy,
4352
+ variant: "subtle",
4353
+ size: "xs",
4354
+ color: copied ? "green" : "var(--color-text-subtle)",
4355
+ style: { flexShrink: 0 },
4356
+ children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 12 }) : /* @__PURE__ */ jsx(IconCopy, { size: 12 })
4357
+ }
4358
+ ) })
4359
+ ] }),
4360
+ /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
4361
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", style: { flexShrink: 0 }, children: "Target Resource" }),
4362
+ /* @__PURE__ */ jsx(
4363
+ Text,
4364
+ {
4365
+ size: "xs",
4366
+ ff: "monospace",
4367
+ c: "var(--color-text-subtle)",
4368
+ style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", flex: 1 },
4369
+ children: task.targetResourceId || "N/A"
4370
+ }
4371
+ )
4372
+ ] }),
4373
+ /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
4374
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", style: { flexShrink: 0 }, children: "Target Exec ID" }),
4375
+ /* @__PURE__ */ jsx(
4376
+ Text,
4377
+ {
4378
+ size: "xs",
4379
+ ff: "monospace",
4380
+ c: "var(--color-text-subtle)",
4381
+ style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", flex: 1 },
4382
+ children: task.targetExecutionId ?? "N/A"
4383
+ }
4384
+ ),
4385
+ task.targetExecutionId && /* @__PURE__ */ jsx(CopyButton, { value: `${orgName}/${task.targetResourceId} ${task.targetExecutionId}`, children: ({ copied, copy }) => /* @__PURE__ */ jsx(
4386
+ ActionIcon,
4387
+ {
4388
+ onClick: copy,
4389
+ variant: "subtle",
4390
+ size: "xs",
4391
+ color: copied ? "green" : "var(--color-text-subtle)",
4392
+ style: { flexShrink: 0 },
4393
+ children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 12 }) : /* @__PURE__ */ jsx(IconCopy, { size: 12 })
4394
+ }
4395
+ ) })
4396
+ ] })
4397
+ ] })
4322
4398
  ] }) }),
4323
4399
  /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
4324
- /* @__PURE__ */ jsxs(Group, { justify: "space-between", align: "center", children: [
4325
- /* @__PURE__ */ jsx(Title, { order: 3, children: "Context" }),
4326
- /* @__PURE__ */ jsx(
4327
- SegmentedControl,
4328
- {
4329
- value: contextView,
4330
- onChange: (v) => setContextView(v),
4331
- size: "xs",
4332
- data: [
4333
- { label: "Formatted", value: "formatted" },
4334
- { label: "JSON", value: "json" }
4335
- ]
4336
- }
4337
- )
4338
- ] }),
4400
+ /* @__PURE__ */ jsx(
4401
+ CardHeader,
4402
+ {
4403
+ icon: /* @__PURE__ */ jsx(IconBraces, { size: 18 }),
4404
+ title: "Context",
4405
+ rightSection: /* @__PURE__ */ jsx(
4406
+ SegmentedControl,
4407
+ {
4408
+ value: contextView,
4409
+ onChange: (v) => setContextView(v),
4410
+ size: "xs",
4411
+ data: [
4412
+ { label: "Formatted", value: "formatted" },
4413
+ { label: "JSON", value: "json" }
4414
+ ]
4415
+ }
4416
+ )
4417
+ }
4418
+ ),
4339
4419
  contextView === "formatted" ? /* @__PURE__ */ jsx(ContextViewer, { data: task.context }) : /* @__PURE__ */ jsx(JsonViewer, { data: task.context })
4340
4420
  ] }) }),
4341
4421
  (task.status === "pending" || task.status === "failed") && task.actions.length > 0 && /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
4342
- /* @__PURE__ */ jsx(Title, { order: 3, children: "Actions" }),
4343
- /* @__PURE__ */ jsx(Group, { gap: "sm", children: task.actions.map((action) => {
4422
+ /* @__PURE__ */ jsx(
4423
+ CardHeader,
4424
+ {
4425
+ icon: /* @__PURE__ */ jsx(IconBolt, { size: 18 }),
4426
+ title: "Actions",
4427
+ rightSection: /* @__PURE__ */ jsx(
4428
+ SegmentedControl,
4429
+ {
4430
+ value: actionsView,
4431
+ onChange: (v) => setActionsView(v),
4432
+ size: "xs",
4433
+ data: [
4434
+ { label: "Formatted", value: "formatted" },
4435
+ { label: "JSON", value: "json" }
4436
+ ]
4437
+ }
4438
+ )
4439
+ }
4440
+ ),
4441
+ actionsView === "formatted" ? /* @__PURE__ */ jsx(Group, { gap: "sm", children: task.actions.map((action) => {
4344
4442
  const Icon = getIcon(action.icon);
4345
- const variant = "light";
4346
4443
  return /* @__PURE__ */ jsx(
4347
4444
  Button,
4348
4445
  {
4349
- variant,
4446
+ variant: "light",
4350
4447
  color: action.color || (action.type === "danger" ? "red" : "blue"),
4351
4448
  leftSection: Icon ? /* @__PURE__ */ jsx(Icon, { size: 16 }) : null,
4352
4449
  loading: isPending,
@@ -4357,10 +4454,24 @@ function CommandQueueDetailPage({
4357
4454
  },
4358
4455
  action.id
4359
4456
  );
4360
- }) })
4457
+ }) }) : /* @__PURE__ */ jsx(JsonViewer, { data: task.actions })
4361
4458
  ] }) }),
4362
4459
  task.selectedAction && /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
4363
- /* @__PURE__ */ jsx(Title, { order: 3, children: "Action" }),
4460
+ /* @__PURE__ */ jsxs(Group, { justify: "space-between", align: "center", children: [
4461
+ /* @__PURE__ */ jsx(Title, { order: 3, children: "Action" }),
4462
+ task.actionPayload != null && (typeof task.actionPayload !== "object" || Object.keys(task.actionPayload).length > 0) && /* @__PURE__ */ jsx(
4463
+ SegmentedControl,
4464
+ {
4465
+ value: payloadView,
4466
+ onChange: (v) => setPayloadView(v),
4467
+ size: "xs",
4468
+ data: [
4469
+ { label: "Formatted", value: "formatted" },
4470
+ { label: "JSON", value: "json" }
4471
+ ]
4472
+ }
4473
+ )
4474
+ ] }),
4364
4475
  /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
4365
4476
  /* @__PURE__ */ jsx(ThemeIcon, { size: "sm", variant: "light", color: "green", radius: "xl", children: /* @__PURE__ */ jsx(IconCheck, { size: 12 }) }),
4366
4477
  /* @__PURE__ */ jsxs(Text, { fw: 600, size: "sm", style: { fontFamily: "var(--mantine-font-family-headings)" }, children: [
@@ -4369,7 +4480,7 @@ function CommandQueueDetailPage({
4369
4480
  ] }),
4370
4481
  task.targetExecutionId && /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: "cyan", leftSection: /* @__PURE__ */ jsx(IconPlayerPlay, { size: 10 }), children: "Executed" })
4371
4482
  ] }),
4372
- task.actionPayload !== void 0 && task.actionPayload !== null && /* @__PURE__ */ jsx(JsonViewer, { data: task.actionPayload, maxHeight: 200 }),
4483
+ task.actionPayload != null && (typeof task.actionPayload !== "object" || Object.keys(task.actionPayload).length > 0) && (payloadView === "formatted" ? /* @__PURE__ */ jsx(ContextViewer, { data: task.actionPayload }) : /* @__PURE__ */ jsx(JsonViewer, { data: task.actionPayload, maxHeight: 200 })),
4373
4484
  task.completedAt && /* @__PURE__ */ jsxs(Text, { size: "xs", children: [
4374
4485
  "Completed ",
4375
4486
  formatDate(task.completedAt),
@@ -7064,7 +7175,7 @@ function formatGeneratedTimestamp(value) {
7064
7175
  minute: "2-digit"
7065
7176
  }).format(new Date(value));
7066
7177
  }
7067
- function OrganizationGraphPage({ lens = "default", timeRange = "24h" }) {
7178
+ function OrganizationGraphPage({ lens = "default", timeRange = "30d" }) {
7068
7179
  const { organizationModel, organizationGraph } = useElevasisFeatures();
7069
7180
  const { data: commandViewData, isLoading, error } = useCommandViewData();
7070
7181
  const { data: commandViewStats } = useCommandViewStats(timeRange, { enabled: lens === "command-view" });
@@ -7740,6 +7851,11 @@ function CommandViewSidebarContent({ timeRange }) {
7740
7851
  if (!selectedNode) return null;
7741
7852
  return getNodeId(selectedNode);
7742
7853
  }, [selectedNode]);
7854
+ const {
7855
+ page: executionPage,
7856
+ setPage: setExecutionPage,
7857
+ totalPages: totalExecutionPages
7858
+ } = usePaginationState(10, [selectedResourceId, timeRange]);
7743
7859
  const getNavigationUrl = () => {
7744
7860
  if (!selectedNode || !selectedResourceId) return null;
7745
7861
  if (selectedNode.type === "agent") return `/operations/resources/agent/${selectedResourceId}`;
@@ -7755,6 +7871,8 @@ function CommandViewSidebarContent({ timeRange }) {
7755
7871
  } = useResourceExecutions({
7756
7872
  resourceId: selectedResourceId,
7757
7873
  timeRange,
7874
+ page: executionPage,
7875
+ limit: 10,
7758
7876
  enabled: isNavigable
7759
7877
  });
7760
7878
  const {
@@ -7773,7 +7891,7 @@ function CommandViewSidebarContent({ timeRange }) {
7773
7891
  ];
7774
7892
  const centerValueColor = totalExecutions === 0 ? "var(--mantine-color-dimmed)" : successRate >= 95 ? colors.green : successRate >= 80 ? colors.yellow : colors.red;
7775
7893
  if (isLoading && !data) {
7776
- return /* @__PURE__ */ jsx(Box, { style: { flex: 1, minHeight: 0, padding: theme.spacing.sm }, children: /* @__PURE__ */ jsx(Center, { p: "xl", children: /* @__PURE__ */ jsx(Loader, {}) }) });
7894
+ return /* @__PURE__ */ jsx(SubshellSidebarLoader, {});
7777
7895
  }
7778
7896
  return /* @__PURE__ */ jsxs(
7779
7897
  Box,
@@ -7911,17 +8029,29 @@ function CommandViewSidebarContent({ timeRange }) {
7911
8029
  /* @__PURE__ */ jsx(Space, { h: "sm" })
7912
8030
  ] })
7913
8031
  ] }),
7914
- 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(
7915
- ExecutionStatusSection,
7916
- {
7917
- executions: executionsData.executions,
7918
- status: section.status,
7919
- title: section.title,
7920
- badgeColor: section.badgeColor,
7921
- resourceUrl
7922
- },
7923
- section.status
7924
- )) : executionsData ? /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "No executions in the selected time range" }) : null }),
8032
+ 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: [
8033
+ EXECUTION_SECTIONS.map((section) => /* @__PURE__ */ jsx(
8034
+ ExecutionStatusSection,
8035
+ {
8036
+ executions: executionsData.executions,
8037
+ status: section.status,
8038
+ title: section.title,
8039
+ badgeColor: section.badgeColor,
8040
+ resourceUrl
8041
+ },
8042
+ section.status
8043
+ )),
8044
+ totalExecutionPages(executionsData.totalExecutions) > 1 && /* @__PURE__ */ jsx(Group, { justify: "center", children: /* @__PURE__ */ jsx(
8045
+ Pagination,
8046
+ {
8047
+ size: "sm",
8048
+ total: totalExecutionPages(executionsData.totalExecutions),
8049
+ value: executionPage,
8050
+ onChange: setExecutionPage,
8051
+ boundaries: 1
8052
+ }
8053
+ ) })
8054
+ ] }) : executionsData ? /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "No executions in the selected time range" }) : null }),
7925
8055
  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: [
7926
8056
  /* @__PURE__ */ jsxs(Group, { justify: "space-between", mb: 8, children: [
7927
8057
  /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", fw: 600, tt: "uppercase", children: "Pending Tasks" }),
@@ -8955,9 +9085,9 @@ function SessionsSidebar({
8955
9085
  const hasResourcesData = agents.length > 0;
8956
9086
  const hasSessionsData = agentSessions.length > 0;
8957
9087
  const isInitialLoading = !isReady || !organizationReady || isResourcesLoading && !hasResourcesData || isSessionView && (isCurrentSessionLoading || isSessionsLoading) && !hasSessionsData;
8958
- return /* @__PURE__ */ jsxs(Box, { style: { flex: 1, minHeight: 0, padding: theme.spacing.sm }, children: [
9088
+ return /* @__PURE__ */ jsxs(Box, { style: { flex: 1, minHeight: 0, padding: theme.spacing.sm, display: "flex", flexDirection: "column" }, children: [
8959
9089
  /* @__PURE__ */ jsx(Text, { size: "xs", fw: 600, c: "dimmed", tt: "uppercase", mb: "md", children: isSessionView ? "Sessions" : "Agents" }),
8960
- /* @__PURE__ */ jsx(ScrollArea, { style: { height: "100%" }, scrollbarSize: 8, children: isInitialLoading ? /* @__PURE__ */ jsx(Center, { p: "xl", children: /* @__PURE__ */ jsx(Loader, { size: "sm" }) }) : isSessionView ? agentSessions.length > 0 ? /* @__PURE__ */ jsx(Stack, { gap: "xs", children: agentSessions.map((session) => /* @__PURE__ */ jsx(
9090
+ /* @__PURE__ */ jsx(ScrollArea, { style: { flex: 1, minHeight: 0 }, scrollbarSize: 8, children: isInitialLoading ? /* @__PURE__ */ jsx(SubshellSidebarLoader, {}) : isSessionView ? agentSessions.length > 0 ? /* @__PURE__ */ jsx(Stack, { gap: "xs", children: agentSessions.map((session) => /* @__PURE__ */ jsx(
8961
9091
  SessionListItem,
8962
9092
  {
8963
9093
  session,
@@ -9066,6 +9196,7 @@ var ExecutionLogsSidebar = () => {
9066
9196
  const [filter, setFilter] = useState("all");
9067
9197
  const [deleteModalOpen, setDeleteModalOpen] = useState(false);
9068
9198
  const bulkDelete = useBulkDeleteExecutions();
9199
+ const { page, setPage, offset, totalPages } = usePaginationState(PAGE_SIZE_DEFAULT, [resourceId, filter]);
9069
9200
  if (!operationsApiUrl || !operationsSSEManager) {
9070
9201
  return /* @__PURE__ */ jsx(Box, { p: "sm", style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ jsx(
9071
9202
  APIErrorAlert,
@@ -9074,11 +9205,12 @@ var ExecutionLogsSidebar = () => {
9074
9205
  }
9075
9206
  ) });
9076
9207
  }
9077
- const { executions, isLoading, isFetched, selectedId, setSelectedId, setResourceStatusFilter, runningCount } = useExecutionPanelState({
9208
+ const { executions, total, isLoading, isFetched, selectedId, setSelectedId, setResourceStatusFilter, runningCount } = useExecutionPanelState({
9078
9209
  resourceId,
9079
9210
  apiUrl: operationsApiUrl,
9080
9211
  manager: operationsSSEManager,
9081
- limit: PAGE_SIZE_DEFAULT
9212
+ limit: PAGE_SIZE_DEFAULT,
9213
+ offset
9082
9214
  });
9083
9215
  const handleFilterChange = (value) => {
9084
9216
  const nextFilter = value || "dev";
@@ -9097,8 +9229,9 @@ var ExecutionLogsSidebar = () => {
9097
9229
  }
9098
9230
  };
9099
9231
  const filteredExecutions = filter === "all" ? executions : executions.filter((exec) => exec.resourceStatus === filter);
9232
+ const totalExecutions = total;
9100
9233
  if (isLoading || !isFetched) {
9101
- return /* @__PURE__ */ jsx(Center, { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ jsx(Loader, { size: "md" }) });
9234
+ return /* @__PURE__ */ jsx(SubshellSidebarLoader, {});
9102
9235
  }
9103
9236
  if (!resourceId) {
9104
9237
  return /* @__PURE__ */ jsx(Box, { p: "sm", style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ jsx(APIErrorAlert, { error: new Error("Resource ID not found in current operations route.") }) });
@@ -9158,7 +9291,8 @@ var ExecutionLogsSidebar = () => {
9158
9291
  "No ",
9159
9292
  filter === "all" ? "" : filter,
9160
9293
  " executions yet"
9161
- ] }) }) })
9294
+ ] }) }) }),
9295
+ 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 }) })
9162
9296
  ] }),
9163
9297
  /* @__PURE__ */ jsx(
9164
9298
  ConfirmationModal,
@@ -9224,7 +9358,7 @@ function CommandQueueSidebarConnected() {
9224
9358
  }
9225
9359
  var OperationsSidebarMiddle = () => {
9226
9360
  const { currentPath, currentSearch, navigate } = useRouterContext();
9227
- const { timeRange = "24h" } = useElevasisFeatures();
9361
+ const { timeRange = "30d" } = useElevasisFeatures();
9228
9362
  if (currentPath.startsWith("/operations/sessions")) {
9229
9363
  return /* @__PURE__ */ jsx(
9230
9364
  SessionsSidebar,