@agimon-ai/po-workflow 0.0.0-alpha.192 → 0.0.0-alpha.194

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.
@@ -2,7 +2,7 @@ import { createApiClient, defineActivityGroup, defineChannelFile, defineDockFace
2
2
  import { View } from "react-native-unistyles/components/native/View";
3
3
  import { Text } from "react-native-unistyles/components/native/Text";
4
4
  import { ScrollView } from "react-native-unistyles/components/native/ScrollView";
5
- import { ArrowRightIcon, Badge, Button, ChevronDownIcon, ChevronRightIcon, CodeBlock, Dot, EmptyState, FileIcon, FolderIcon, Input, ListRow, LiveDuration, Markdown, MessageItem, MessageItemBody, MessageItemHeader, MessageItemStatus, Sheet, SheetBody, SheetContent, SheetHeader, SheetList, SheetTitle, StatusBadge, Textarea, WorkflowIcon, fontOf, toolTone } from "@agimon-ai/po-native-components";
5
+ import { ArrowRightIcon, Badge, Button, ChevronDownIcon, ChevronRightIcon, CodeBlock, Dot, EmptyState, FileIcon, FolderIcon, Input, ListRow, LiveDuration, Markdown, MessageItem, MessageItemBody, MessageItemHeader, MessageItemStatus, SearchIcon, Sheet, SheetBody, SheetContent, SheetHeader, SheetList, SheetTitle, StatusBadge, Textarea, WorkflowIcon, fontOf, toolTone } from "@agimon-ai/po-native-components";
6
6
  import { createElement, memo, useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
7
7
  import { StyleSheet } from "react-native-unistyles";
8
8
  import { Pressable } from "react-native-unistyles/components/native/Pressable";
@@ -1280,16 +1280,11 @@ function DynamicWorkflowView({ runs, now, connected = true, defaultExpandedKeys
1280
1280
  style: styles$9.notice,
1281
1281
  children: "Connection paused. These are the last reported workflow states."
1282
1282
  }),
1283
- !runs.length && /* @__PURE__ */ jsxs(View, {
1284
- style: styles$9.empty,
1285
- children: [/* @__PURE__ */ jsx(Text, {
1286
- accessibilityRole: "header",
1287
- style: styles$9.heading,
1288
- children: "No workflows yet"
1289
- }), /* @__PURE__ */ jsx(Text, {
1290
- style: styles$9.body,
1291
- children: "Workflows appear here when Po starts them. You can carry on with your conversation."
1292
- })]
1283
+ !runs.length && /* @__PURE__ */ jsx(EmptyState, {
1284
+ surface: "plain",
1285
+ icon: /* @__PURE__ */ jsx(WorkflowIcon, { size: 20 }),
1286
+ title: "No workflows yet",
1287
+ description: "Workflows appear here when Po starts them. You can carry on with your conversation."
1293
1288
  }),
1294
1289
  runs.map((run) => /* @__PURE__ */ jsxs(View, {
1295
1290
  style: styles$9.run,
@@ -1411,14 +1406,6 @@ const styles$9 = StyleSheet.create((theme) => ({
1411
1406
  minWidth: 0,
1412
1407
  uni__dependencies: [0]
1413
1408
  },
1414
- body: {
1415
- color: theme.colors.text,
1416
- fontFamily: fontOf(theme.fontFamily.sans),
1417
- fontSize: theme.fontSize.base,
1418
- lineHeight: theme.lineHeight.base,
1419
- flexShrink: 1,
1420
- uni__dependencies: [0]
1421
- },
1422
1409
  title: {
1423
1410
  color: theme.colors.hi,
1424
1411
  fontFamily: fontOf(theme.fontFamily.sans),
@@ -1428,14 +1415,6 @@ const styles$9 = StyleSheet.create((theme) => ({
1428
1415
  flexShrink: 1,
1429
1416
  uni__dependencies: [0]
1430
1417
  },
1431
- heading: {
1432
- color: theme.colors.hi,
1433
- fontFamily: fontOf(theme.fontFamily.sans),
1434
- fontSize: theme.fontSize.lg,
1435
- lineHeight: theme.lineHeight.lg,
1436
- fontWeight: theme.fontWeight.semibold,
1437
- uni__dependencies: [0]
1438
- },
1439
1418
  runTitle: {
1440
1419
  color: theme.colors.hi,
1441
1420
  fontFamily: fontOf(theme.fontFamily.sans),
@@ -1489,11 +1468,6 @@ const styles$9 = StyleSheet.create((theme) => ({
1489
1468
  lineHeight: theme.lineHeight.base,
1490
1469
  uni__dependencies: [0]
1491
1470
  },
1492
- empty: {
1493
- paddingVertical: theme.spacing(6),
1494
- gap: theme.spacing(2),
1495
- uni__dependencies: [0]
1496
- },
1497
1471
  group: {
1498
1472
  minWidth: 0,
1499
1473
  borderWidth: 1,
@@ -1938,8 +1912,18 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
1938
1912
  }, value))
1939
1913
  }),
1940
1914
  visibleRuns.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
1915
+ size: "compact",
1916
+ surface: "plain",
1917
+ icon: /* @__PURE__ */ jsx(SearchIcon, { size: 16 }),
1941
1918
  title: "No matching runs",
1942
- description: "Try another name or status."
1919
+ description: "Try another name or status.",
1920
+ secondaryAction: {
1921
+ label: "Clear filters",
1922
+ onAction: () => {
1923
+ setSearch("");
1924
+ setFilter(FILTER.all);
1925
+ }
1926
+ }
1943
1927
  }) : null,
1944
1928
  visibleRuns.map((item) => /* @__PURE__ */ jsx(ListRow, {
1945
1929
  title: item.displayName,
@@ -2013,14 +1997,14 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
2013
1997
  }, `${run?.workspace}/${run?.routeKey ?? run?.runKey}/${item.name}`),
2014
1998
  ListFooterComponent: artifacts === void 0 ? void 0 : /* @__PURE__ */ jsx(Fragment, { children: artifacts }),
2015
1999
  ListEmptyComponent: !run ? /* @__PURE__ */ jsx(EmptyState, {
2000
+ icon: /* @__PURE__ */ jsx(WorkflowIcon, { size: 20 }),
2016
2001
  title: "No workflow runs",
2017
2002
  description: "Launch a workflow to see its progress here.",
2018
- children: /* @__PURE__ */ jsx(Button, {
2019
- variant: "primary",
2020
- disabled: !canAct,
2021
- onPress: onLaunch,
2022
- children: "Launch a workflow"
2023
- })
2003
+ action: {
2004
+ label: "Launch workflow",
2005
+ onAction: onLaunch,
2006
+ disabled: !canAct
2007
+ }
2024
2008
  }) : void 0
2025
2009
  }), run && current !== void 0 ? /* @__PURE__ */ jsx(Text, {
2026
2010
  style: [styles$7.meta, styles$7.actions],
@@ -2428,6 +2412,7 @@ function WorkflowLauncher(props) {
2428
2412
  const [selected, setSelected] = useState();
2429
2413
  if (props.sessionId === null || !state.open) return null;
2430
2414
  const workflow = state.workflows.find((item) => item.path === selected);
2415
+ const shown = filterCatalog(state.workflows, filter);
2431
2416
  return /* @__PURE__ */ jsx(Sheet, {
2432
2417
  open: true,
2433
2418
  onOpenChange: (open) => {
@@ -2458,7 +2443,7 @@ function WorkflowLauncher(props) {
2458
2443
  style: styles$5.error,
2459
2444
  children: state.warning
2460
2445
  }) : null,
2461
- filterCatalog(state.workflows, filter).map((item) => /* @__PURE__ */ jsx(ListRow, {
2446
+ shown.map((item) => /* @__PURE__ */ jsx(ListRow, {
2462
2447
  title: item.name || item.relativePath,
2463
2448
  description: item.error !== void 0 ? /* @__PURE__ */ jsx(Text, {
2464
2449
  style: styles$5.error,
@@ -2469,9 +2454,24 @@ function WorkflowLauncher(props) {
2469
2454
  if (item.error === void 0) setSelected(item.path);
2470
2455
  }
2471
2456
  }, item.path)),
2472
- state.workflows.length === 0 ? /* @__PURE__ */ jsx(Text, {
2473
- style: styles$5.meta,
2474
- children: "No workflows reported yet."
2457
+ state.workflows.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
2458
+ testID: "catalog-empty",
2459
+ size: "compact",
2460
+ surface: "plain",
2461
+ icon: /* @__PURE__ */ jsx(WorkflowIcon, { size: 16 }),
2462
+ title: "No workflows found",
2463
+ description: "Add a workflow file under automations/workflows to launch it from here."
2464
+ }) : shown.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
2465
+ testID: "catalog-no-match",
2466
+ size: "compact",
2467
+ surface: "plain",
2468
+ icon: /* @__PURE__ */ jsx(SearchIcon, { size: 16 }),
2469
+ title: "No matching workflows",
2470
+ description: "Try another name, tag, or job.",
2471
+ secondaryAction: {
2472
+ label: "Clear filter",
2473
+ onAction: () => setFilter("")
2474
+ }
2475
2475
  }) : null
2476
2476
  ]
2477
2477
  }) })] })
@@ -3311,7 +3311,6 @@ var workflows_native_default = defineActivityGroup({
3311
3311
  keys: "w r",
3312
3312
  icon: () => createElement(WorkflowIcon),
3313
3313
  widgetKeys: ["workflow-mcp-progress", "workflow-mcp-follow"],
3314
- order: 30,
3315
3314
  transientTab: workflowsTab,
3316
3315
  activeSource: {
3317
3316
  subscribe(listener) {