@industry-theme/principal-view-panels 0.11.29 → 0.11.31

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.
@@ -7,6 +7,7 @@ export interface TraceListProps {
7
7
  onTraceClick?: (trace: RegisteredTrace) => void;
8
8
  onTraceSelect?: (trace: RegisteredTrace) => void;
9
9
  onWorkflowClick?: (trace: RegisteredTrace, storyboardId: string, workflowId: string, scenarioId: string, spanId: string) => void;
10
+ onRemoveTrace?: (trace: RegisteredTrace) => void;
10
11
  onClearAll?: () => void;
11
12
  expandedTraceIds?: Set<string>;
12
13
  showSearch?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"TraceList.d.ts","sourceRoot":"","sources":["../../src/components/TraceList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAQrD,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAChD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IACjD,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACjI,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AASD;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA6e9C,CAAC"}
1
+ {"version":3,"file":"TraceList.d.ts","sourceRoot":"","sources":["../../src/components/TraceList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAQrD,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAChD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IACjD,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACjI,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IACjD,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AASD;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAgiB9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"panelContext.d.ts","sourceRoot":"","sources":["../../src/mocks/panelContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EAIl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CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"StoryboardListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/StoryboardListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAqE9D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAquBvE,CAAC"}
1
+ {"version":3,"file":"StoryboardListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/StoryboardListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAqE9D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAyuBvE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TraceListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/TraceListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAezD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA0gC7D,CAAC"}
1
+ {"version":3,"file":"TraceListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/TraceListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAczD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAskC7D,CAAC"}
@@ -96408,13 +96408,6 @@ function getMatchedScenarioIds(trace) {
96408
96408
  var _a;
96409
96409
  return ((_a = trace.scenarioMatches) == null ? void 0 : _a.map((m) => m.scenarioId)) ?? [];
96410
96410
  }
96411
- function getMatchedStoryboardIds(trace) {
96412
- var _a, _b;
96413
- const ids = /* @__PURE__ */ new Set();
96414
- (_a = trace.scenarioMatches) == null ? void 0 : _a.forEach((m) => ids.add(m.storyboardId));
96415
- (_b = trace.storyboardMatches) == null ? void 0 : _b.forEach((m) => ids.add(m.storyboardId));
96416
- return Array.from(ids);
96417
- }
96418
96411
  function getPrimaryStoryboardId(trace) {
96419
96412
  var _a, _b;
96420
96413
  if ((((_a = trace.scenarioMatches) == null ? void 0 : _a.length) ?? 0) > 0) {
@@ -99653,7 +99646,7 @@ const StoryboardListPanel = ({
99653
99646
  return filteredStoryboards.map((storyboard) => storyboard.canvas);
99654
99647
  }, [filteredStoryboards]);
99655
99648
  const handleTreeNodeClick = useCallback((node2) => {
99656
- var _a, _b, _c;
99649
+ var _a, _b, _c, _d;
99657
99650
  if (node2.type === "overview" && node2.markdownPath) {
99658
99651
  const canvasId = ((_a = node2.canvas) == null ? void 0 : _a.id) || "storyboard" in node2 && ((_c = (_b = node2.storyboard) == null ? void 0 : _b.canvas) == null ? void 0 : _c.id) || "unknown";
99659
99652
  setSelectedNodeId(`overview:${canvasId}`);
@@ -99692,7 +99685,10 @@ const StoryboardListPanel = ({
99692
99685
  var _a2;
99693
99686
  return wf.file.path === ((_a2 = node2.workflow) == null ? void 0 : _a2.path);
99694
99687
  });
99695
- const workflowToSend = fullWorkflow ? fullWorkflow.template : node2.workflow;
99688
+ if (!fullWorkflow) {
99689
+ console.warn("[StoryboardListPanel] Workflow template not loaded for:", (_d = node2.workflow) == null ? void 0 : _d.path);
99690
+ return;
99691
+ }
99696
99692
  events.emit({
99697
99693
  type: "custom",
99698
99694
  source: "storyboard-list-panel",
@@ -99703,8 +99699,7 @@ const StoryboardListPanel = ({
99703
99699
  canvas: node2.storyboard.canvas,
99704
99700
  canvasFileInfo,
99705
99701
  workflowId: node2.workflow.id,
99706
- workflow: workflowToSend,
99707
- // Send full template with scenarios and description
99702
+ workflow: fullWorkflow.template,
99708
99703
  workflowFileInfo,
99709
99704
  openMode: "detail"
99710
99705
  // Indicates canvas detail should be opened
@@ -100431,6 +100426,7 @@ const TraceList = ({
100431
100426
  onTraceClick,
100432
100427
  onTraceSelect,
100433
100428
  onWorkflowClick,
100429
+ onRemoveTrace,
100434
100430
  onClearAll,
100435
100431
  expandedTraceIds,
100436
100432
  showSearch = true,
@@ -100503,16 +100499,16 @@ const TraceList = ({
100503
100499
  boxSizing: "border-box"
100504
100500
  },
100505
100501
  children: [
100506
- showSearch && traces.length > 0 && /* @__PURE__ */ jsxs(
100502
+ showSearch && traces.length > 5 && /* @__PURE__ */ jsxs(
100507
100503
  "div",
100508
100504
  {
100509
100505
  style: {
100510
100506
  display: "flex",
100511
- gap: theme2.space[1],
100507
+ gap: 0,
100512
100508
  flexShrink: 0,
100513
100509
  minWidth: 0,
100514
100510
  width: "100%",
100515
- padding: theme2.space[2],
100511
+ padding: 0,
100516
100512
  borderBottom: `1px solid ${theme2.colors.border}`,
100517
100513
  boxSizing: "border-box"
100518
100514
  },
@@ -100553,7 +100549,8 @@ const TraceList = ({
100553
100549
  fontSize: theme2.fontSizes[1],
100554
100550
  fontFamily: theme2.fonts.body,
100555
100551
  border: `1px solid ${theme2.colors.border}`,
100556
- borderRadius: theme2.radii[2],
100552
+ borderRight: "none",
100553
+ borderRadius: 0,
100557
100554
  background: theme2.colors.backgroundSecondary,
100558
100555
  color: theme2.colors.text,
100559
100556
  outline: "none",
@@ -100600,7 +100597,7 @@ const TraceList = ({
100600
100597
  color: theme2.colors.error,
100601
100598
  background: "transparent",
100602
100599
  border: `1px solid ${theme2.colors.border}`,
100603
- borderRadius: theme2.radii[2],
100600
+ borderRadius: 0,
100604
100601
  cursor: "pointer",
100605
100602
  transition: "all 0.15s ease",
100606
100603
  flexShrink: 0,
@@ -100634,7 +100631,7 @@ const TraceList = ({
100634
100631
  overflowX: "hidden",
100635
100632
  display: "flex",
100636
100633
  flexDirection: "column",
100637
- gap: theme2.space[1]
100634
+ gap: 0
100638
100635
  },
100639
100636
  children: groupedTraces.length === 0 ? /* @__PURE__ */ jsx(
100640
100637
  "div",
@@ -100644,6 +100641,7 @@ const TraceList = ({
100644
100641
  alignItems: "center",
100645
100642
  justifyContent: "center",
100646
100643
  height: "100%",
100644
+ fontFamily: theme2.fonts.body,
100647
100645
  color: theme2.colors.textSecondary,
100648
100646
  fontSize: theme2.fontSizes[2],
100649
100647
  padding: theme2.space[4],
@@ -100663,7 +100661,7 @@ const TraceList = ({
100663
100661
  {
100664
100662
  onClick: () => onTraceClick == null ? void 0 : onTraceClick(trace),
100665
100663
  style: {
100666
- padding: theme2.space[3],
100664
+ padding: `${theme2.space[3]}px ${theme2.space[3]}px`,
100667
100665
  borderBottom: `1px solid ${theme2.colors.border}`,
100668
100666
  borderLeft: (expandedTraceIds == null ? void 0 : expandedTraceIds.has(trace.traceId)) ? `2px solid ${theme2.colors.primary}` : "2px solid transparent",
100669
100667
  borderTop: "none",
@@ -100727,6 +100725,7 @@ const TraceList = ({
100727
100725
  "span",
100728
100726
  {
100729
100727
  style: {
100728
+ fontFamily: theme2.fonts.body,
100730
100729
  fontSize: theme2.fontSizes[2],
100731
100730
  fontWeight: theme2.fontWeights.medium,
100732
100731
  color: trace.hasErrors ? theme2.colors.error : theme2.colors.text,
@@ -100741,6 +100740,7 @@ const TraceList = ({
100741
100740
  "span",
100742
100741
  {
100743
100742
  style: {
100743
+ fontFamily: theme2.fonts.body,
100744
100744
  fontSize: theme2.fontSizes[1],
100745
100745
  color: theme2.colors.textSecondary,
100746
100746
  whiteSpace: "nowrap",
@@ -100759,6 +100759,7 @@ const TraceList = ({
100759
100759
  display: "flex",
100760
100760
  alignItems: "center",
100761
100761
  gap: theme2.space[2],
100762
+ fontFamily: theme2.fonts.body,
100762
100763
  fontSize: theme2.fontSizes[1],
100763
100764
  minWidth: 0
100764
100765
  },
@@ -100775,6 +100776,7 @@ const TraceList = ({
100775
100776
  alignItems: "center",
100776
100777
  gap: theme2.space[1],
100777
100778
  padding: "2px 8px",
100779
+ fontFamily: theme2.fonts.body,
100778
100780
  fontSize: theme2.fontSizes[1],
100779
100781
  backgroundColor: `${theme2.colors.primary}15`,
100780
100782
  color: theme2.colors.primary,
@@ -100817,6 +100819,7 @@ const TraceList = ({
100817
100819
  "span",
100818
100820
  {
100819
100821
  style: {
100822
+ fontFamily: theme2.fonts.body,
100820
100823
  color: theme2.colors.textSecondary,
100821
100824
  whiteSpace: "nowrap",
100822
100825
  flexShrink: 0
@@ -100831,36 +100834,85 @@ const TraceList = ({
100831
100834
  ]
100832
100835
  }
100833
100836
  ),
100834
- /* @__PURE__ */ jsx(
100835
- "code",
100837
+ /* @__PURE__ */ jsxs(
100838
+ "div",
100836
100839
  {
100837
- onClick: (e) => handleTraceIdClick(trace, e),
100838
- title: `View trace ${trace.traceId}`,
100839
100840
  style: {
100840
- fontSize: theme2.fontSizes[1],
100841
- fontFamily: theme2.fonts.monospace,
100842
- color: onTraceSelect ? theme2.colors.primary : theme2.colors.textMuted,
100843
- whiteSpace: "nowrap",
100844
- cursor: onTraceSelect ? "pointer" : "default",
100845
- padding: "2px 4px",
100846
- borderRadius: theme2.radii[1],
100847
- transition: "all 0.15s ease",
100848
- userSelect: "none",
100841
+ display: "flex",
100842
+ flexDirection: "column",
100843
+ alignItems: "flex-end",
100844
+ gap: theme2.space[1],
100849
100845
  flexShrink: 0
100850
100846
  },
100851
- onMouseEnter: (e) => {
100852
- if (onTraceSelect) {
100853
- e.currentTarget.style.background = `${theme2.colors.primary}15`;
100854
- e.currentTarget.style.color = theme2.colors.primary;
100855
- }
100856
- },
100857
- onMouseLeave: (e) => {
100858
- if (onTraceSelect) {
100859
- e.currentTarget.style.background = "transparent";
100860
- e.currentTarget.style.color = theme2.colors.primary;
100861
- }
100862
- },
100863
- children: truncateTraceId(trace.traceId)
100847
+ children: [
100848
+ /* @__PURE__ */ jsx(
100849
+ "code",
100850
+ {
100851
+ onClick: (e) => handleTraceIdClick(trace, e),
100852
+ title: `View trace ${trace.traceId}`,
100853
+ style: {
100854
+ fontSize: theme2.fontSizes[1],
100855
+ fontFamily: theme2.fonts.monospace,
100856
+ color: onTraceSelect ? theme2.colors.primary : theme2.colors.textMuted,
100857
+ whiteSpace: "nowrap",
100858
+ cursor: onTraceSelect ? "pointer" : "default",
100859
+ padding: "2px 4px",
100860
+ borderRadius: theme2.radii[1],
100861
+ transition: "all 0.15s ease",
100862
+ userSelect: "none"
100863
+ },
100864
+ onMouseEnter: (e) => {
100865
+ if (onTraceSelect) {
100866
+ e.currentTarget.style.background = `${theme2.colors.primary}15`;
100867
+ e.currentTarget.style.color = theme2.colors.primary;
100868
+ }
100869
+ },
100870
+ onMouseLeave: (e) => {
100871
+ if (onTraceSelect) {
100872
+ e.currentTarget.style.background = "transparent";
100873
+ e.currentTarget.style.color = theme2.colors.primary;
100874
+ }
100875
+ },
100876
+ children: truncateTraceId(trace.traceId)
100877
+ }
100878
+ ),
100879
+ onRemoveTrace && /* @__PURE__ */ jsxs(
100880
+ "button",
100881
+ {
100882
+ onClick: (e) => {
100883
+ e.stopPropagation();
100884
+ onRemoveTrace(trace);
100885
+ },
100886
+ title: "Remove trace",
100887
+ style: {
100888
+ display: "flex",
100889
+ alignItems: "center",
100890
+ gap: theme2.space[1],
100891
+ padding: "2px 6px",
100892
+ fontSize: theme2.fontSizes[0],
100893
+ fontFamily: theme2.fonts.body,
100894
+ color: theme2.colors.textSecondary,
100895
+ background: "transparent",
100896
+ border: "none",
100897
+ borderRadius: theme2.radii[1],
100898
+ cursor: "pointer",
100899
+ transition: "all 0.15s ease"
100900
+ },
100901
+ onMouseEnter: (e) => {
100902
+ e.currentTarget.style.color = theme2.colors.error;
100903
+ e.currentTarget.style.background = `${theme2.colors.error}10`;
100904
+ },
100905
+ onMouseLeave: (e) => {
100906
+ e.currentTarget.style.color = theme2.colors.textSecondary;
100907
+ e.currentTarget.style.background = "transparent";
100908
+ },
100909
+ children: [
100910
+ /* @__PURE__ */ jsx(X, { size: 12 }),
100911
+ "Remove"
100912
+ ]
100913
+ }
100914
+ )
100915
+ ]
100864
100916
  }
100865
100917
  )
100866
100918
  ]
@@ -101133,11 +101185,21 @@ const TraceListPanel = ({
101133
101185
  const schematicsSlice = context.schematics;
101134
101186
  const versionSnapshots = (schematicsSlice == null ? void 0 : schematicsSlice.data) || [];
101135
101187
  const schematicsLoading = (schematicsSlice == null ? void 0 : schematicsSlice.loading) || false;
101188
+ const showConfigurationTab = context.showConfigurationTab ?? false;
101136
101189
  const traceWorkflowsSet = React__default.useMemo(() => {
101137
101190
  const workflowSet = /* @__PURE__ */ new Set();
101138
101191
  traces.forEach((trace) => {
101139
- const storyboardIds = getMatchedStoryboardIds(trace);
101140
- storyboardIds.forEach((id2) => workflowSet.add(id2));
101192
+ var _a, _b;
101193
+ (_a = trace.scenarioMatches) == null ? void 0 : _a.forEach((match) => {
101194
+ if (match.workflowId) {
101195
+ workflowSet.add(match.workflowId);
101196
+ }
101197
+ });
101198
+ (_b = trace.storyboardMatches) == null ? void 0 : _b.forEach((match) => {
101199
+ if (match.workflowId) {
101200
+ workflowSet.add(match.workflowId);
101201
+ }
101202
+ });
101141
101203
  });
101142
101204
  return workflowSet;
101143
101205
  }, [traces]);
@@ -101186,7 +101248,13 @@ const TraceListPanel = ({
101186
101248
  } : void 0
101187
101249
  });
101188
101250
  const discovery = new LibraryDiscovery(fsAdapter);
101189
- const result = await discovery.discover(fileTree);
101251
+ let result;
101252
+ try {
101253
+ result = await discovery.discover(fileTree);
101254
+ } catch (discoveryError) {
101255
+ console.warn("[TraceListPanel] LibraryDiscovery failed, using empty result:", discoveryError);
101256
+ result = { allServiceNames: [], libraries: [], errors: [], scopeToServiceMap: /* @__PURE__ */ new Map() };
101257
+ }
101190
101258
  setDiscoveredServices(result.allServiceNames);
101191
101259
  if (result.errors.length > 0) {
101192
101260
  console.warn("[TraceListPanel] Discovery errors:", result.errors);
@@ -101340,6 +101408,16 @@ const TraceListPanel = ({
101340
101408
  actions.clearTelemetry();
101341
101409
  }
101342
101410
  };
101411
+ const handleRemoveTrace = (trace) => {
101412
+ setExpandedTraceIds((prev) => {
101413
+ const newSet = new Set(prev);
101414
+ newSet.delete(trace.traceId);
101415
+ return newSet;
101416
+ });
101417
+ if (actions && "removeTrace" in actions && typeof actions.removeTrace === "function") {
101418
+ actions.removeTrace(trace.traceId);
101419
+ }
101420
+ };
101343
101421
  const handleWorkflowClick = (trace, storyboardId, workflowIdParam, scenarioId, spanId) => {
101344
101422
  var _a;
101345
101423
  if (!events) return;
@@ -101527,12 +101605,13 @@ const TraceListPanel = ({
101527
101605
  fontFamily: theme2.fonts.body,
101528
101606
  fontSize: theme2.fontSizes[1],
101529
101607
  fontWeight: theme2.fontWeights.medium,
101530
- backgroundColor: activeTab === "traces" ? theme2.colors.background : "transparent",
101531
- color: activeTab === "traces" ? theme2.colors.text : theme2.colors.textSecondary,
101608
+ backgroundColor: "transparent",
101609
+ color: activeTab === "traces" ? theme2.colors.primary : theme2.colors.textSecondary,
101532
101610
  border: "none",
101533
- borderBottom: activeTab === "traces" ? `2px solid ${theme2.colors.primary}` : "2px solid transparent",
101611
+ boxShadow: "none",
101534
101612
  cursor: "pointer",
101535
101613
  outline: "none",
101614
+ WebkitAppearance: "none",
101536
101615
  display: "flex",
101537
101616
  alignItems: "center",
101538
101617
  justifyContent: "center",
@@ -101541,7 +101620,7 @@ const TraceListPanel = ({
101541
101620
  children: isCompactTabs ? /* @__PURE__ */ jsx(Activity, { size: 16 }) : "Traces"
101542
101621
  }
101543
101622
  ),
101544
- /* @__PURE__ */ jsx(
101623
+ showConfigurationTab && /* @__PURE__ */ jsx(
101545
101624
  "button",
101546
101625
  {
101547
101626
  onClick: () => setActiveTab("configuration"),
@@ -101553,12 +101632,13 @@ const TraceListPanel = ({
101553
101632
  fontFamily: theme2.fonts.body,
101554
101633
  fontSize: theme2.fontSizes[1],
101555
101634
  fontWeight: theme2.fontWeights.medium,
101556
- backgroundColor: activeTab === "configuration" ? theme2.colors.background : "transparent",
101557
- color: activeTab === "configuration" ? theme2.colors.text : theme2.colors.textSecondary,
101635
+ backgroundColor: "transparent",
101636
+ color: activeTab === "configuration" ? theme2.colors.primary : theme2.colors.textSecondary,
101558
101637
  border: "none",
101559
- borderBottom: activeTab === "configuration" ? `2px solid ${theme2.colors.primary}` : "2px solid transparent",
101638
+ boxShadow: "none",
101560
101639
  cursor: "pointer",
101561
101640
  outline: "none",
101641
+ WebkitAppearance: "none",
101562
101642
  display: "flex",
101563
101643
  alignItems: "center",
101564
101644
  justifyContent: "center",
@@ -101571,7 +101651,7 @@ const TraceListPanel = ({
101571
101651
  "button",
101572
101652
  {
101573
101653
  onClick: () => setActiveTab("schematics"),
101574
- title: "Schematics",
101654
+ title: "Storyboards",
101575
101655
  style: {
101576
101656
  flex: 1,
101577
101657
  height: "100%",
@@ -101579,18 +101659,19 @@ const TraceListPanel = ({
101579
101659
  fontFamily: theme2.fonts.body,
101580
101660
  fontSize: theme2.fontSizes[1],
101581
101661
  fontWeight: theme2.fontWeights.medium,
101582
- backgroundColor: activeTab === "schematics" ? theme2.colors.background : "transparent",
101583
- color: activeTab === "schematics" ? theme2.colors.text : theme2.colors.textSecondary,
101662
+ backgroundColor: "transparent",
101663
+ color: activeTab === "schematics" ? theme2.colors.primary : theme2.colors.textSecondary,
101584
101664
  border: "none",
101585
- borderBottom: activeTab === "schematics" ? `2px solid ${theme2.colors.primary}` : "2px solid transparent",
101665
+ boxShadow: "none",
101586
101666
  cursor: "pointer",
101587
101667
  outline: "none",
101668
+ WebkitAppearance: "none",
101588
101669
  display: "flex",
101589
101670
  alignItems: "center",
101590
101671
  justifyContent: "center",
101591
101672
  gap: "6px"
101592
101673
  },
101593
- children: isCompactTabs ? /* @__PURE__ */ jsx(GitBranch, { size: 16 }) : "Schematics"
101674
+ children: isCompactTabs ? /* @__PURE__ */ jsx(GitBranch, { size: 16 }) : "Storyboards"
101594
101675
  }
101595
101676
  )
101596
101677
  ]
@@ -101604,11 +101685,12 @@ const TraceListPanel = ({
101604
101685
  onTraceClick: handleTraceClick,
101605
101686
  onTraceSelect: handleTraceSelect,
101606
101687
  onWorkflowClick: handleWorkflowClick,
101688
+ onRemoveTrace: handleRemoveTrace,
101607
101689
  onClearAll: handleClearAll,
101608
101690
  expandedTraceIds,
101609
101691
  emptyMessage: traces.length === 0 ? "No traces received yet. Waiting for telemetry data..." : void 0
101610
101692
  }
101611
- ) }) : activeTab === "configuration" ? /* @__PURE__ */ jsx("div", { style: { flex: 1, padding: "16px", overflow: "auto" }, children: configLoading ? /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", height: "100%" }, children: /* @__PURE__ */ jsx("div", { style: { fontFamily: theme2.fonts.body, fontSize: theme2.fontSizes[1], color: theme2.colors.textSecondary }, children: "Loading resources..." }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
101693
+ ) }) : activeTab === "configuration" && showConfigurationTab ? /* @__PURE__ */ jsx("div", { style: { flex: 1, padding: "16px", overflow: "auto" }, children: configLoading ? /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", height: "100%" }, children: /* @__PURE__ */ jsx("div", { style: { fontFamily: theme2.fonts.body, fontSize: theme2.fontSizes[1], color: theme2.colors.textSecondary }, children: "Loading resources..." }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
101612
101694
  /* @__PURE__ */ jsxs("div", { style: { marginBottom: "16px" }, children: [
101613
101695
  /* @__PURE__ */ jsx("h2", { style: { margin: "0 0 8px 0", fontFamily: theme2.fonts.heading, fontSize: theme2.fontSizes[3], fontWeight: theme2.fontWeights.semibold }, children: "Library Resources" }),
101614
101696
  /* @__PURE__ */ jsx("p", { style: { margin: 0, fontFamily: theme2.fonts.body, fontSize: theme2.fontSizes[1], color: theme2.colors.textSecondary }, children: "Configure OpenTelemetry and other resources in library.yaml" })
@@ -101955,18 +102037,40 @@ const TraceListPanel = ({
101955
102037
  /* @__PURE__ */ jsx("div", { style: { fontFamily: theme2.fonts.body, fontSize: theme2.fontSizes[1], color: theme2.colors.textSecondary }, children: "No schematics found" }),
101956
102038
  /* @__PURE__ */ jsx("div", { style: { fontFamily: theme2.fonts.body, fontSize: theme2.fontSizes[0], color: theme2.colors.textMuted, textAlign: "center", maxWidth: "400px" }, children: "Schematics are fetched from traces with version information (repositoryUrl + commitSha). Make sure traces have version attributes and schematics are registered in the version registry." })
101957
102039
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
101958
- versionSnapshots.length > 0 && /* @__PURE__ */ jsx("div", { style: { padding: "12px 16px", borderBottom: `1px solid ${theme2.colors.border}` }, children: /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "center", gap: "8px", cursor: "pointer", fontFamily: theme2.fonts.body, fontSize: theme2.fontSizes[1] }, children: [
101959
- /* @__PURE__ */ jsx(
101960
- "input",
101961
- {
101962
- type: "checkbox",
101963
- checked: workflowFilterMode === "with-traces",
101964
- onChange: (e) => setWorkflowFilterMode(e.target.checked ? "with-traces" : "all"),
101965
- style: { cursor: "pointer" }
101966
- }
101967
- ),
101968
- /* @__PURE__ */ jsx("span", { children: "Show only workflows with traces" })
101969
- ] }) }),
102040
+ versionSnapshots.length > 0 && /* @__PURE__ */ jsx(
102041
+ "div",
102042
+ {
102043
+ style: {
102044
+ display: "flex",
102045
+ borderBottom: `1px solid ${theme2.colors.border}`
102046
+ },
102047
+ children: ["with-traces", "all", "without-traces"].map((mode, index2) => {
102048
+ const isSelected = workflowFilterMode === mode;
102049
+ const label = mode === "all" ? "All" : mode === "with-traces" ? "With Traces" : "Without Traces";
102050
+ return /* @__PURE__ */ jsx(
102051
+ "button",
102052
+ {
102053
+ onClick: () => setWorkflowFilterMode(mode),
102054
+ style: {
102055
+ flex: 1,
102056
+ padding: "10px 12px",
102057
+ fontFamily: theme2.fonts.body,
102058
+ fontSize: theme2.fontSizes[1],
102059
+ fontWeight: isSelected ? theme2.fontWeights.medium : theme2.fontWeights.body,
102060
+ backgroundColor: isSelected ? theme2.colors.primary : theme2.colors.backgroundSecondary,
102061
+ color: isSelected ? theme2.colors.textOnPrimary : theme2.colors.textSecondary,
102062
+ border: "none",
102063
+ borderRight: index2 < 2 ? `1px solid ${theme2.colors.border}` : "none",
102064
+ cursor: "pointer",
102065
+ transition: "background-color 0.15s, color 0.15s"
102066
+ },
102067
+ children: label
102068
+ },
102069
+ mode
102070
+ );
102071
+ })
102072
+ }
102073
+ ),
101970
102074
  /* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ jsx(
101971
102075
  StoryboardWorkflowsTreeCore,
101972
102076
  {
@@ -106404,7 +106508,7 @@ const JsonViewer = ({
106404
106508
  base0F: theme2.colors.error
106405
106509
  // Deprecated, brown
106406
106510
  };
106407
- }, [theme2, isDarkMode]);
106511
+ }, [theme2]);
106408
106512
  const shouldExpandNodeInitially = useMemo(() => {
106409
106513
  return (_keyPath, _data, level) => {
106410
106514
  return level < initialExpandDepth;