@agentiffai/design 1.3.26 → 1.3.27

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.
@@ -35,7 +35,7 @@ var tokens = {
35
35
  text: {
36
36
  primary: "#FFFFFF",
37
37
  secondary: "#B4B8C5",
38
- tertiary: "#9CA3AF"},
38
+ tertiary: "#6B7280"},
39
39
  // Teal (brand aligned)
40
40
  error: "#EF4444",
41
41
  // Sky Blue (brand aligned)
@@ -76,7 +76,7 @@ var tokens = {
76
76
  },
77
77
  typography: {
78
78
  fontFamily: {
79
- primary: "'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif"},
79
+ primary: "'TT Interphases Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif"},
80
80
  fontSize: {
81
81
  xs: "0.875rem",
82
82
  // 14px (was 12px, increased for better readability)
@@ -2208,9 +2208,10 @@ var ICONS = {
2208
2208
  };
2209
2209
  function ItemWithLogs({
2210
2210
  run,
2211
- onRunSelect
2211
+ onRunSelect,
2212
+ isExpanded,
2213
+ onToggleExpand
2212
2214
  }) {
2213
- const [isExpanded, setIsExpanded] = useState(false);
2214
2215
  const logSections = run.logs ? [
2215
2216
  {
2216
2217
  title: "Action History",
@@ -2224,12 +2225,19 @@ function ItemWithLogs({
2224
2225
  }
2225
2226
  ] : [];
2226
2227
  const handleClick = () => {
2227
- setIsExpanded(!isExpanded);
2228
+ onToggleExpand(run.id);
2228
2229
  onRunSelect?.(run.id);
2229
2230
  };
2230
2231
  return /* @__PURE__ */ jsxs(ItemDisclosure, { id: run.id, "data-testid": `run-item-${run.id}`, children: [
2231
2232
  /* @__PURE__ */ jsx(ItemHeader, { slot: "trigger", onClick: handleClick, $isExpanded: isExpanded, children: /* @__PURE__ */ jsxs(ItemContainer, { as: "div", children: [
2232
- /* @__PURE__ */ jsx(ItemIcon, { src: ICONS[run.icon || "loader"], alt: "", "data-testid": `run-icon-${run.status}` }),
2233
+ /* @__PURE__ */ jsx(
2234
+ ItemIcon,
2235
+ {
2236
+ src: ICONS[run.icon || "loader"],
2237
+ alt: "",
2238
+ "data-testid": `run-icon-${run.status}`
2239
+ }
2240
+ ),
2233
2241
  /* @__PURE__ */ jsx(ItemName, { "data-testid": "run-name", children: run.name }),
2234
2242
  /* @__PURE__ */ jsxs(RunStatus, { $status: run.status, "data-testid": `run-status-${run.status}`, children: [
2235
2243
  run.status === "completed" && /* @__PURE__ */ jsx("img", { src: ICONS.checkFill, alt: "", style: { width: "16px", height: "16px" } }),
@@ -2286,7 +2294,9 @@ function groupRunsByWorkflow(runs) {
2286
2294
  function WorkflowGroupItem({
2287
2295
  group,
2288
2296
  onRunSelect,
2289
- expandedKeys
2297
+ expandedKeys,
2298
+ expandedRunIds,
2299
+ onToggleRunExpand
2290
2300
  }) {
2291
2301
  const groupId = `workflow-${group.workflowId}`;
2292
2302
  const isExpanded = expandedKeys.has(groupId);
@@ -2294,15 +2304,34 @@ function WorkflowGroupItem({
2294
2304
  /* @__PURE__ */ jsx(Heading, { level: 4, children: /* @__PURE__ */ jsxs(CategoryHeader, { slot: "trigger", style: { paddingLeft: "8px" }, children: [
2295
2305
  /* @__PURE__ */ jsxs(CategoryTitle, { children: [
2296
2306
  /* @__PURE__ */ jsx("span", { style: { fontSize: tokens.typography.fontSize.sm, fontWeight: 400 }, children: group.workflowName }),
2297
- /* @__PURE__ */ jsxs("span", { style: { fontSize: tokens.typography.fontSize.xs, color: tokens.colors.text.tertiary, marginLeft: "8px" }, children: [
2298
- "(",
2299
- group.runs.length,
2300
- ")"
2301
- ] })
2307
+ /* @__PURE__ */ jsxs(
2308
+ "span",
2309
+ {
2310
+ style: {
2311
+ fontSize: tokens.typography.fontSize.xs,
2312
+ color: tokens.colors.text.tertiary,
2313
+ marginLeft: "8px"
2314
+ },
2315
+ children: [
2316
+ "(",
2317
+ group.runs.length,
2318
+ ")"
2319
+ ]
2320
+ }
2321
+ )
2302
2322
  ] }),
2303
2323
  /* @__PURE__ */ jsx(ChevronIcon, { $isExpanded: isExpanded, children: /* @__PURE__ */ jsx("img", { src: ICONS.chevronDown, alt: "" }) })
2304
2324
  ] }) }),
2305
- /* @__PURE__ */ jsx(CategoryDisclosurePanel, { children: group.runs.map((run) => /* @__PURE__ */ jsx(ItemWithLogs, { run, onRunSelect }, run.id)) })
2325
+ /* @__PURE__ */ jsx(CategoryDisclosurePanel, { children: group.runs.map((run) => /* @__PURE__ */ jsx(
2326
+ ItemWithLogs,
2327
+ {
2328
+ run,
2329
+ onRunSelect,
2330
+ isExpanded: expandedRunIds.has(run.id),
2331
+ onToggleExpand: onToggleRunExpand
2332
+ },
2333
+ run.id
2334
+ )) })
2306
2335
  ] });
2307
2336
  }
2308
2337
  function GroupedRunsRenderer({
@@ -2310,15 +2339,26 @@ function GroupedRunsRenderer({
2310
2339
  onRunSelect,
2311
2340
  expandedKeys,
2312
2341
  setExpandedKeys,
2342
+ expandedRunIds,
2343
+ onToggleRunExpand,
2313
2344
  ariaLabel,
2314
2345
  emptyMessage
2315
2346
  }) {
2316
2347
  if (groups.length === 0) {
2317
- return /* @__PURE__ */ jsx(ItemContainer, { children: /* @__PURE__ */ jsx(ItemName, { $dimmed: true, children: emptyMessage }) });
2348
+ return /* @__PURE__ */ jsx(ItemContainer, { "data-testid": "empty-state", children: /* @__PURE__ */ jsx(ItemName, { $dimmed: true, children: emptyMessage }) });
2318
2349
  }
2319
2350
  const firstGroup = groups[0];
2320
2351
  if (groups.length === 1 && firstGroup && firstGroup.runs.length === 1) {
2321
- return /* @__PURE__ */ jsx(Fragment, { children: firstGroup.runs.map((run) => /* @__PURE__ */ jsx(ItemWithLogs, { run, onRunSelect }, run.id)) });
2352
+ return /* @__PURE__ */ jsx(Fragment, { children: firstGroup.runs.map((run) => /* @__PURE__ */ jsx(
2353
+ ItemWithLogs,
2354
+ {
2355
+ run,
2356
+ onRunSelect,
2357
+ isExpanded: expandedRunIds.has(run.id),
2358
+ onToggleExpand: onToggleRunExpand
2359
+ },
2360
+ run.id
2361
+ )) });
2322
2362
  }
2323
2363
  return /* @__PURE__ */ jsx(
2324
2364
  StyledDisclosureGroup,
@@ -2332,7 +2372,9 @@ function GroupedRunsRenderer({
2332
2372
  {
2333
2373
  group,
2334
2374
  onRunSelect,
2335
- expandedKeys
2375
+ expandedKeys,
2376
+ expandedRunIds,
2377
+ onToggleRunExpand
2336
2378
  },
2337
2379
  group.workflowId
2338
2380
  ))
@@ -2347,6 +2389,18 @@ function RunsTabContent({
2347
2389
  /* @__PURE__ */ new Set(["executing", "completed", "failed"])
2348
2390
  // All status sections open by default
2349
2391
  );
2392
+ const [expandedRunIds, setExpandedRunIds] = useState(/* @__PURE__ */ new Set());
2393
+ const handleToggleRunExpand = useCallback((runId) => {
2394
+ setExpandedRunIds((prev) => {
2395
+ const next = new Set(prev);
2396
+ if (next.has(runId)) {
2397
+ next.delete(runId);
2398
+ } else {
2399
+ next.add(runId);
2400
+ }
2401
+ return next;
2402
+ });
2403
+ }, []);
2350
2404
  const executingRuns = runs.filter((r) => normalizeCategory(r.category) === "executing");
2351
2405
  const completedRuns = runs.filter((r) => normalizeCategory(r.category) === "completed");
2352
2406
  const failedRuns = runs.filter((r) => normalizeCategory(r.category) === "failed");
@@ -2376,6 +2430,8 @@ function RunsTabContent({
2376
2430
  onRunSelect,
2377
2431
  expandedKeys,
2378
2432
  setExpandedKeys,
2433
+ expandedRunIds,
2434
+ onToggleRunExpand: handleToggleRunExpand,
2379
2435
  ariaLabel: "Executing workflows",
2380
2436
  emptyMessage: "No executing items"
2381
2437
  }
@@ -2396,6 +2452,8 @@ function RunsTabContent({
2396
2452
  onRunSelect,
2397
2453
  expandedKeys,
2398
2454
  setExpandedKeys,
2455
+ expandedRunIds,
2456
+ onToggleRunExpand: handleToggleRunExpand,
2399
2457
  ariaLabel: "Completed workflows",
2400
2458
  emptyMessage: "No completed items"
2401
2459
  }
@@ -2416,6 +2474,8 @@ function RunsTabContent({
2416
2474
  onRunSelect,
2417
2475
  expandedKeys,
2418
2476
  setExpandedKeys,
2477
+ expandedRunIds,
2478
+ onToggleRunExpand: handleToggleRunExpand,
2419
2479
  ariaLabel: "Failed workflows",
2420
2480
  emptyMessage: "No failed items"
2421
2481
  }