@tangle-network/sandbox-ui 1.1.1 → 1.1.3

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.
@@ -2618,7 +2618,7 @@ function retryImport(factory, retries = 2, delayMs = 350) {
2618
2618
  });
2619
2619
  }
2620
2620
  function lazyWorkflowGraph() {
2621
- return lazy(() => retryImport(() => import("./WorkflowGraph-CmPjsJA6.js").then((m) => ({ default: m.WorkflowGraph }))));
2621
+ return lazy(() => retryImport(() => import("./WorkflowGraph-DYsP_Kcg.js").then((m) => ({ default: m.WorkflowGraph }))));
2622
2622
  }
2623
2623
  var GraphErrorBoundary = class extends Component {
2624
2624
  state = { hasError: false };
@@ -2678,7 +2678,7 @@ function WorkflowGraph(props) {
2678
2678
  * taking the pane down.
2679
2679
  */
2680
2680
  function lazyCanvas() {
2681
- return lazy(() => retryImport(() => import("./AgentGraphCanvas-FT8XUEC6.js").then((m) => ({ default: m.AgentGraphCanvas }))));
2681
+ return lazy(() => retryImport(() => import("./AgentGraphCanvas-D7jjAE6i.js").then((m) => ({ default: m.AgentGraphCanvas }))));
2682
2682
  }
2683
2683
  /** The agents as a list, for when the canvas cannot load. */
2684
2684
  function AgentListFallback({ nodes, selectedId, onSelect, className, onRetry }) {
@@ -1,5 +1,5 @@
1
1
  import { t as MOTION_CONTROL } from "./motion-Bn7ESHrj.js";
2
- import { T as statusBorder, U as fmtTokenTotal, V as fmtCost, a as useColorMode, c as NodeMark, d as RESTING_BORDER, f as RESTING_SHADOW, i as motionAllowed, o as KIND_ACCENT, p as STATUS_COLOR, r as SELECTION_OUTLINE, y as edgeColor } from "./AgentGraph-CiaKH13k.js";
2
+ import { T as statusBorder, U as fmtTokenTotal, V as fmtCost, a as useColorMode, c as NodeMark, d as RESTING_BORDER, f as RESTING_SHADOW, i as motionAllowed, o as KIND_ACCENT, p as STATUS_COLOR, r as SELECTION_OUTLINE, y as edgeColor } from "./AgentGraph-CWW3Zx1N.js";
3
3
  import { t as loadElk } from "./elk-loader-Dl9S7jQk.js";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
@@ -959,6 +959,7 @@ function AgentGraphCanvas({ nodes, edges, selectedId, onSelect, direction = "TB"
959
959
  const readerMoved = useRef(false);
960
960
  const framed = useRef(null);
961
961
  const layoutIdentity = layout ? `${layoutKey}:${layout.columns}` : null;
962
+ const minZoom = layout && canvas ? Math.max(.02, Math.min(.2, (canvas.width - 32) / layout.width, (canvas.height - 32) / layout.height)) : .2;
962
963
  useEffect(() => {
963
964
  const inst = rfRef.current;
964
965
  if (!ready || !inst || !layoutIdentity || !canvas) return;
@@ -971,7 +972,7 @@ function AgentGraphCanvas({ nodes, edges, selectedId, onSelect, direction = "TB"
971
972
  inst.fitView({
972
973
  padding: `${FIT_PADDING}px`,
973
974
  maxZoom: 1,
974
- minZoom: .2,
975
+ minZoom,
975
976
  duration: animate ? 220 : 0
976
977
  });
977
978
  setShown(true);
@@ -980,7 +981,8 @@ function AgentGraphCanvas({ nodes, edges, selectedId, onSelect, direction = "TB"
980
981
  }, [
981
982
  ready,
982
983
  layoutIdentity,
983
- canvas
984
+ canvas,
985
+ minZoom
984
986
  ]);
985
987
  const select = useCallback((id) => {
986
988
  if (byId.has(id)) onSelect?.(id);
@@ -1035,7 +1037,7 @@ function AgentGraphCanvas({ nodes, edges, selectedId, onSelect, direction = "TB"
1035
1037
  zoomOnPinch: true,
1036
1038
  zoomOnDoubleClick: false,
1037
1039
  panOnDrag: true,
1038
- minZoom: .2,
1040
+ minZoom,
1039
1041
  maxZoom: 1.75,
1040
1042
  "aria-label": "Agent topology",
1041
1043
  children: [
@@ -1,4 +1,4 @@
1
- import { A as buildWorkflowGraph, B as clampPreview, C as problemSurface, E as COMPACT_NODE_SIZE, F as worstSeverity, H as fmtDuration, N as triggerNodeIndex, P as wfEdgeId, S as problemBorder, T as statusBorder, V as fmtCost, W as fmtTokens, _ as StatusFooter, a as useColorMode, b as emptySlotLabel, c as NodeMark, d as RESTING_BORDER, f as RESTING_SHADOW, i as motionAllowed, j as isStructuralKind, l as ProblemMarker, m as STATUS_LABEL, p as STATUS_COLOR, r as SELECTION_OUTLINE, u as ProblemMessages, v as StatusPill, w as problemTitle, x as kindAccent, y as edgeColor, z as shortModel } from "./AgentGraph-CiaKH13k.js";
1
+ import { A as buildWorkflowGraph, B as clampPreview, C as problemSurface, E as COMPACT_NODE_SIZE, F as worstSeverity, H as fmtDuration, N as triggerNodeIndex, P as wfEdgeId, S as problemBorder, T as statusBorder, V as fmtCost, W as fmtTokens, _ as StatusFooter, a as useColorMode, b as emptySlotLabel, c as NodeMark, d as RESTING_BORDER, f as RESTING_SHADOW, i as motionAllowed, j as isStructuralKind, l as ProblemMarker, m as STATUS_LABEL, p as STATUS_COLOR, r as SELECTION_OUTLINE, u as ProblemMessages, v as StatusPill, w as problemTitle, x as kindAccent, y as edgeColor, z as shortModel } from "./AgentGraph-CWW3Zx1N.js";
2
2
  import { n as classifyOutput, t as NodeOutputBody } from "./node-output-DlySTwxr.js";
3
3
  import { t as loadElk } from "./elk-loader-Dl9S7jQk.js";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import { a as CodeSurface, i as CODE_THEME, n as buildUnifiedPatch, r as compute
13
13
  import { n as PreviewView, t as EmbeddedAppView } from "./embedded-app-view-DXsoPale.js";
14
14
  import { OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, findUnsupportedOpenUINode, validateOpenUIJsonArtifact, validateOpenUIJsonNode } from "./openui.js";
15
15
  import { a as MessageList, c as UserMessage, d as modelProvider, f as snapHarnessToModel, g as ReasoningLevelPicker, h as HARNESS_REASONING_OPTIONS, i as MessageAuthor, l as isViewerMessage, m as DEFAULT_REASONING_LEVEL_OPTIONS, n as ChatContainer, o as TRANSCRIPT_TEXT, p as AgentProfilePicker, r as ChatMessage, s as ThinkingIndicator, t as AgentTimeline, u as ArtifactAgentDock } from "./chat-4OZD23RA.js";
16
- import { _ as TraceWorkspace, a as InlineToolItem, b as TraceWaterfall, c as RunPhaseList, d as TaskList, f as ToolCallFeed, g as taskStatus, h as taskProgress, i as InlineThinkingItem, l as RunRowShell, m as showsTaskPriority, n as ApprovalDiffSummary, o as LiveDuration, p as parseToolEvent, r as ExpandedToolDetail, s as RunGroup, t as ApprovalCard, u as RunRowStatusDot, v as foldAgentRows, x as traceSpanMark, y as useAgentStream } from "./run-CUcmbRvq.js";
16
+ import { _ as TraceWorkspace, a as InlineToolItem, b as TraceWaterfall, c as RunPhaseList, d as TaskList, f as ToolCallFeed, g as taskStatus, h as taskProgress, i as InlineThinkingItem, l as RunRowShell, m as showsTaskPriority, n as ApprovalDiffSummary, o as LiveDuration, p as parseToolEvent, r as ExpandedToolDetail, s as RunGroup, t as ApprovalCard, u as RunRowStatusDot, v as foldAgentRows, x as traceSpanMark, y as useAgentStream } from "./run-C91XKDrv.js";
17
17
  import "./vault-tree.js";
18
18
  import { a as TangleLoginButton, i as UserMenu, n as GitHubLoginButton, r as LoginLayout, t as AuthHeader } from "./auth-BDpoZ_2f.js";
19
19
  import { t as AgentMessagingConnection } from "./connections-DymjzHe_.js";
@@ -1,7 +1,7 @@
1
1
  import { t as cn } from "./utils-BER_bdgE.js";
2
2
  import { i as modelBrandFor, t as ModelBrandStack } from "./model-brand-bTcMjQtB.js";
3
3
  import { t as ProviderIcon } from "./provider-logo-CPKRPHcS.js";
4
- import { t as AgentGraph } from "./AgentGraph-CiaKH13k.js";
4
+ import { t as AgentGraph } from "./AgentGraph-CWW3Zx1N.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
7
7
  import { X } from "lucide-react";
@@ -225,8 +225,11 @@ function agentOf(span, byId) {
225
225
  function agentGraphAt(spans, byId, at, epoch, cards) {
226
226
  const nodes = [];
227
227
  const edges = [];
228
+ const seen = /* @__PURE__ */ new Set();
228
229
  for (const span of spans) {
229
230
  if (span.kind !== "pipeline" || !span.id || at !== null && span.startMs > at) continue;
231
+ if (seen.has(span.id)) continue;
232
+ seen.add(span.id);
230
233
  const running = at === null ? span.status === "running" : span.endMs > at || span.status === "running";
231
234
  nodes.push({
232
235
  id: span.id,
@@ -379,10 +382,10 @@ function TraceWorkspace({ trace, streamUrl, events, onTimeChange, files, scorebo
379
382
  }
380
383
  })
381
384
  }),
382
- /* @__PURE__ */ jsx("section", {
385
+ files && /* @__PURE__ */ jsx("section", {
383
386
  "aria-label": "Code at the cursor",
384
387
  className: "flex min-h-[70vh] flex-col overflow-hidden rounded-xl border border-border bg-card",
385
- children: files ?? /* @__PURE__ */ jsx(NotTimeIndexed, { label: "Files" })
388
+ children: files
386
389
  }),
387
390
  scoreboard && /* @__PURE__ */ jsx("section", {
388
391
  "aria-label": "Scoreboard at the cursor",
package/dist/run.js CHANGED
@@ -1 +1 @@
1
- export { t as ApprovalCard, n as ApprovalDiffSummary, r as ExpandedToolDetail, i as InlineThinkingItem, a as InlineToolItem, o as LiveDuration, s as RunGroup, c as RunPhaseList, l as RunRowShell, u as RunRowStatusDot, d as TaskList, f as ToolCallFeed, b as TraceWaterfall, _ as TraceWorkspace, v as foldAgentRows, p as parseToolEvent, m as showsTaskPriority, h as taskProgress, g as taskStatus, x as traceSpanMark, y as useAgentStream } from "./run-CUcmbRvq.js";
1
+ export { t as ApprovalCard, n as ApprovalDiffSummary, r as ExpandedToolDetail, i as InlineThinkingItem, a as InlineToolItem, o as LiveDuration, s as RunGroup, c as RunPhaseList, l as RunRowShell, u as RunRowStatusDot, d as TaskList, f as ToolCallFeed, b as TraceWaterfall, _ as TraceWorkspace, v as foldAgentRows, p as parseToolEvent, m as showsTaskPriority, h as taskProgress, g as taskStatus, x as traceSpanMark, y as useAgentStream } from "./run-C91XKDrv.js";
package/dist/workflows.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { i as modelBrandFor, t as ModelBrandStack } from "./model-brand-bTcMjQtB.js";
2
- import { A as buildWorkflowGraph, D as TRIGGER_NODE_ID, I as actionPathLabel, L as humanizeIdentifier, M as triggerNodeId, N as triggerNodeIndex, O as actionNodeId, R as parseActionPath, c as NodeMark, g as STATUS_TONE, h as STATUS_PILL, k as branchNodeId, m as STATUS_LABEL, n as WorkflowGraph, p as STATUS_COLOR, s as KIND_ICON, t as AgentGraph, v as StatusPill, z as shortModel } from "./AgentGraph-CiaKH13k.js";
2
+ import { A as buildWorkflowGraph, D as TRIGGER_NODE_ID, I as actionPathLabel, L as humanizeIdentifier, M as triggerNodeId, N as triggerNodeIndex, O as actionNodeId, R as parseActionPath, c as NodeMark, g as STATUS_TONE, h as STATUS_PILL, k as branchNodeId, m as STATUS_LABEL, n as WorkflowGraph, p as STATUS_COLOR, s as KIND_ICON, t as AgentGraph, v as StatusPill, z as shortModel } from "./AgentGraph-CWW3Zx1N.js";
3
3
  import { n as classifyOutput, r as condenseText, t as NodeOutputBody } from "./node-output-DlySTwxr.js";
4
4
  export { AgentGraph, KIND_ICON, ModelBrandStack, NodeMark, NodeOutputBody, StatusPill as NodeStatusPill, STATUS_COLOR, STATUS_LABEL, STATUS_PILL, STATUS_TONE, TRIGGER_NODE_ID, WorkflowGraph as WorkflowGraphLazy, actionNodeId, actionPathLabel, branchNodeId, buildWorkflowGraph, classifyOutput, condenseText, humanizeIdentifier, modelBrandFor, parseActionPath, shortModel, triggerNodeId, triggerNodeIndex };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox-ui",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "license": "MIT",
5
5
  "description": "Unified UI component library for Tangle Sandbox — primitives, chat, dashboard, terminal, editor, and workspace components",
6
6
  "repository": {
@@ -138,7 +138,7 @@
138
138
  "@nanostores/react": ">=0.8.4 <2.0.0",
139
139
  "@tangle-network/agent-interface": "^1.0.0 || ^2.0.0 || ^3.0.0 || ^5.2.0",
140
140
  "@tangle-network/brand": "^1.29.0",
141
- "@tangle-network/charts": "^0.21.4",
141
+ "@tangle-network/charts": "^0.21.20",
142
142
  "@tangle-network/ui": "^11.45.0",
143
143
  "@tanstack/react-query": "^5.0.0",
144
144
  "@tiptap/core": ">=3.20.4 <4.0.0",
@@ -237,7 +237,7 @@
237
237
  "@tailwindcss/postcss": "^4.3.3",
238
238
  "@tangle-network/agent-interface": "5.7.1",
239
239
  "@tangle-network/brand": "1.29.0",
240
- "@tangle-network/charts": "^0.21.4",
240
+ "@tangle-network/charts": "^0.21.20",
241
241
  "@tanstack/react-query": "^5.104.5",
242
242
  "@testing-library/dom": "^10.4.2",
243
243
  "@testing-library/jest-dom": "^7.0.1",