@industry-theme/principal-view-panels 0.7.2 → 0.8.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.
@@ -47,27 +47,6 @@ declare const meta: {
47
47
  };
48
48
  export default meta;
49
49
  type Story = StoryObj<typeof meta>;
50
- /**
51
- * Step 1: Canvas Only
52
- *
53
- * Starting point - just architecture documentation.
54
- * Shows canvas structure with nodes and edges representing the checkout flow.
55
- */
56
- export declare const Step1_CanvasOnly: Story;
57
- /**
58
- * Step 2: Canvas + Narrative Templates
59
- *
60
- * Add workflow scenarios to make telemetry human-readable.
61
- * Defines success, failure, timeout scenarios but has no execution data yet.
62
- */
63
- export declare const Step2_CanvasWithNarratives: Story;
64
- /**
65
- * Step 3: Successful Checkout Execution
66
- *
67
- * Complete flow - canvas + workflows + test execution showing successful checkout.
68
- * Click workflow steps to highlight corresponding canvas nodes!
69
- */
70
- export declare const Step3_SuccessfulCheckout: Story;
71
50
  /**
72
51
  * Payment Declined Scenario
73
52
  *
@@ -121,4 +100,12 @@ export declare const CoLocatedExecutions: Story;
121
100
  * Click the "Docs" button in the header to open the documentation file.
122
101
  */
123
102
  export declare const CanvasWithDocumentation: Story;
103
+ /**
104
+ * Story: Incomplete Template Data Warning
105
+ *
106
+ * Demonstrates what happens when the workflow template expects variables
107
+ * that aren't present in the execution data. The system will show a warning
108
+ * banner about incomplete template data.
109
+ */
110
+ export declare const IncompleteTemplateData: Story;
124
111
  //# sourceMappingURL=WorkflowScenariosPanel.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WorkflowScenariosPanel.stories.d.ts","sourceRoot":"","sources":["../../src/panels/WorkflowScenariosPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;A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AKG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAgDtC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,EAAE,KAgD5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAgD9B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,EAAE,KA6GtC,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,mBAAmB,EAAE,KA6KjC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAwDrC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,EAAE,KAsGpC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { PanelContextValue, PanelActions } from '@principal-ade/panel-framework-core';
2
- import { type DiscoveredCanvas, type DiscoveredStoryboard, type DiscoveredExecution } from '@principal-ai/principal-view-core';
2
+ import { type DiscoveredCanvas, type DiscoveredStoryboard, type DiscoveredTestTrace } from '@principal-ai/principal-view-core';
3
3
  interface UseCanvasDataParams {
4
4
  context: PanelContextValue;
5
5
  actions: PanelActions;
@@ -7,7 +7,7 @@ interface UseCanvasDataParams {
7
7
  interface UseCanvasDataReturn {
8
8
  canvases: DiscoveredCanvas[];
9
9
  storyboards: DiscoveredStoryboard[];
10
- executions: DiscoveredExecution[];
10
+ testTraces: DiscoveredTestTrace[];
11
11
  isLoading: boolean;
12
12
  error: string | null;
13
13
  refreshCanvases: () => Promise<void>;
@@ -1,5 +1,5 @@
1
1
  import type { PanelContextValue, PanelActions } from '@principal-ade/panel-framework-core';
2
- import type { DiscoveredCanvas, DiscoveredStoryboard, DiscoveredExecution, DiscoveredWorkflow, WorkflowTemplate } from '@principal-ai/principal-view-core';
2
+ import type { DiscoveredCanvas, DiscoveredStoryboard, DiscoveredTestTrace, DiscoveredWorkflow, WorkflowTemplate } from '@principal-ai/principal-view-core';
3
3
  interface UseCanvasNarrativeDataParams {
4
4
  context: PanelContextValue;
5
5
  actions: PanelActions;
@@ -7,7 +7,7 @@ interface UseCanvasNarrativeDataParams {
7
7
  interface UseCanvasNarrativeDataReturn {
8
8
  canvases: DiscoveredCanvas[];
9
9
  storyboards: DiscoveredStoryboard[];
10
- executions: DiscoveredExecution[];
10
+ testTraces: DiscoveredTestTrace[];
11
11
  workflows: Array<{
12
12
  file: DiscoveredWorkflow;
13
13
  template: WorkflowTemplate;
@@ -1 +1 @@
1
- {"version":3,"file":"WorkflowRenderer.d.ts","sourceRoot":"","sources":["../../../src/panels/execution-viewer/WorkflowRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAoB,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAIvH,MAAM,WAAW,qBAAqB;IACpC,6CAA6C;IAC7C,QAAQ,EAAE,gBAAgB,CAAC;IAE3B,4BAA4B;IAC5B,MAAM,EAAE,SAAS,EAAE,CAAC;IAEpB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B,0BAA0B;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,sFAAsF;IACtF,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAE9D,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,kFAAkF;IAClF,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,yCAAyC;IACzC,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;CAChC;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAgiB5D,CAAC"}
1
+ {"version":3,"file":"WorkflowRenderer.d.ts","sourceRoot":"","sources":["../../../src/panels/execution-viewer/WorkflowRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAoB,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAIvH,MAAM,WAAW,qBAAqB;IACpC,6CAA6C;IAC7C,QAAQ,EAAE,gBAAgB,CAAC;IAE3B,4BAA4B;IAC5B,MAAM,EAAE,SAAS,EAAE,CAAC;IAEpB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B,0BAA0B;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,sFAAsF;IACtF,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAE9D,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,kFAAkF;IAClF,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,yCAAyC;IACzC,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;CAChC;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAsgB5D,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import type { WorkflowTemplate, WorkflowScenario, DiscoveredExecution, ExtendedCanvas } from '@principal-ai/principal-view-core';
2
+ import type { WorkflowTemplate, WorkflowScenario, DiscoveredTestTrace, ExtendedCanvas } from '@principal-ai/principal-view-core';
3
3
  interface WorkflowTemplatePanelProps {
4
4
  workflowTemplate: WorkflowTemplate;
5
5
  canvas?: ExtendedCanvas | null;
6
- availableExecutions?: DiscoveredExecution[];
6
+ availableExecutions?: DiscoveredTestTrace[];
7
7
  executionScenarioMap?: Record<string, string>;
8
8
  onExecutionSelect?: (executionId: string) => void;
9
9
  onScenarioHover?: (eventNames: string[] | null) => void;
@@ -50841,32 +50841,6 @@ const WorkflowRenderer = ({
50841
50841
  ...style2
50842
50842
  },
50843
50843
  children: [
50844
- result.hasMissingVars && /* @__PURE__ */ jsxs(
50845
- "div",
50846
- {
50847
- style: {
50848
- padding: "12px 20px",
50849
- backgroundColor: "#854d0e",
50850
- borderBottom: `1px solid #ca8a04`,
50851
- color: "#fef3c7",
50852
- fontSize: "13px",
50853
- display: "flex",
50854
- alignItems: "flex-start",
50855
- gap: "8px"
50856
- },
50857
- children: [
50858
- /* @__PURE__ */ jsx("span", { style: { fontSize: "16px" }, children: "⚠️" }),
50859
- /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
50860
- /* @__PURE__ */ jsx("div", { style: { fontWeight: 600, marginBottom: "4px" }, children: "Incomplete Template Data" }),
50861
- /* @__PURE__ */ jsxs("div", { style: { fontSize: "12px", opacity: 0.9 }, children: [
50862
- "Some template variables could not be resolved. The execution data may be missing expected attributes.",
50863
- /* @__PURE__ */ jsx("br", {}),
50864
- /* @__PURE__ */ jsx("strong", { children: 'Click "Raw Events" above to see the actual data available.' })
50865
- ] })
50866
- ] })
50867
- ]
50868
- }
50869
- ),
50870
50844
  /* @__PURE__ */ jsx(
50871
50845
  "div",
50872
50846
  {
@@ -52739,14 +52713,14 @@ const WorkflowTemplatePanel = ({
52739
52713
  };
52740
52714
  const EMPTY_CANVAS_ARRAY = [];
52741
52715
  const EMPTY_STORYBOARDS_ARRAY = [];
52742
- const EMPTY_EXECUTIONS_ARRAY = [];
52716
+ const EMPTY_TEST_TRACES_ARRAY = [];
52743
52717
  const useCanvasData = ({
52744
52718
  context,
52745
52719
  actions
52746
52720
  }) => {
52747
52721
  const [canvases, setCanvases] = useState(EMPTY_CANVAS_ARRAY);
52748
52722
  const [storyboards, setStoryboards] = useState(EMPTY_STORYBOARDS_ARRAY);
52749
- const [executions, setExecutions] = useState(EMPTY_EXECUTIONS_ARRAY);
52723
+ const [testTraces, setTestTraces] = useState(EMPTY_TEST_TRACES_ARRAY);
52750
52724
  const [isLoading, setIsLoading] = useState(true);
52751
52725
  const [error, setError] = useState(null);
52752
52726
  const fileTreeSlice = context.getSlice("fileTree");
@@ -52793,7 +52767,7 @@ const useCanvasData = ({
52793
52767
  );
52794
52768
  setCanvases(sortedCanvases);
52795
52769
  setStoryboards(result.storyboards);
52796
- setExecutions(result.executions);
52770
+ setTestTraces(result.testTraces);
52797
52771
  lastLoadedSha.current = fileTreeSha;
52798
52772
  } catch (err) {
52799
52773
  const errorMessage = err instanceof Error ? err.message : "Failed to load canvases";
@@ -52814,7 +52788,7 @@ const useCanvasData = ({
52814
52788
  return {
52815
52789
  canvases,
52816
52790
  storyboards,
52817
- executions,
52791
+ testTraces,
52818
52792
  isLoading,
52819
52793
  error,
52820
52794
  refreshCanvases
@@ -53084,7 +53058,7 @@ const WorkflowScenariosPanel = ({
53084
53058
  }) => {
53085
53059
  var _a, _b;
53086
53060
  const { theme } = useTheme$1();
53087
- const { storyboards, executions } = useCanvasData({ context, actions });
53061
+ const { storyboards, testTraces } = useCanvasData({ context, actions });
53088
53062
  const [state, setState] = useState({
53089
53063
  canvas: null,
53090
53064
  execution: null,
@@ -53204,13 +53178,13 @@ const WorkflowScenariosPanel = ({
53204
53178
  }
53205
53179
  }, []);
53206
53180
  useEffect(() => {
53207
- if (executions.length > 0 || storyboards.length > 0) {
53181
+ if (testTraces.length > 0 || storyboards.length > 0) {
53208
53182
  const availableNarratives = storyboards.flatMap((sb) => sb.workflows);
53209
53183
  setState((prev) => {
53210
53184
  const currentWorkflow = availableNarratives.find(
53211
53185
  (w) => w.id === prev.selectedWorkflowId
53212
53186
  );
53213
- const workflowExecutions = (currentWorkflow == null ? void 0 : currentWorkflow.executions) || [];
53187
+ const workflowExecutions = (currentWorkflow == null ? void 0 : currentWorkflow.testTraces) || [];
53214
53188
  const executionScenarioMap = {};
53215
53189
  if (prev.workflowTemplate && workflowExecutions.length > 0) {
53216
53190
  const readFile = actionsRef.current.readFile;
@@ -53245,7 +53219,7 @@ const WorkflowScenariosPanel = ({
53245
53219
  };
53246
53220
  });
53247
53221
  }
53248
- }, [executions, storyboards]);
53222
+ }, [testTraces, storyboards]);
53249
53223
  useEffect(() => {
53250
53224
  if (selectedCanvasIdProp && canvasPathProp) {
53251
53225
  console.log("[CanvasDetailPanel] Loading canvas from props:", selectedCanvasIdProp, canvasPathProp);
@@ -54638,7 +54612,7 @@ const useCanvasWorkflowData = ({
54638
54612
  const {
54639
54613
  canvases,
54640
54614
  storyboards,
54641
- executions,
54615
+ testTraces,
54642
54616
  isLoading: canvasesLoading,
54643
54617
  error: canvasesError,
54644
54618
  refreshCanvases
@@ -54718,7 +54692,7 @@ const useCanvasWorkflowData = ({
54718
54692
  return {
54719
54693
  canvases,
54720
54694
  storyboards,
54721
- executions,
54695
+ testTraces,
54722
54696
  workflows,
54723
54697
  isLoading,
54724
54698
  error,