@principal-ai/subsystems-react 0.44.4 → 0.45.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.
Files changed (126) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.ts +8 -8
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +4 -4
  5. package/dist/index.js.map +1 -1
  6. package/dist/pierre/{PierreWalkthroughCodeView.d.ts → PierreTrailCodeView.d.ts} +11 -11
  7. package/dist/pierre/PierreTrailCodeView.d.ts.map +1 -0
  8. package/dist/pierre/{PierreWalkthroughCodeView.js → PierreTrailCodeView.js} +36 -36
  9. package/dist/pierre/PierreTrailCodeView.js.map +1 -0
  10. package/dist/pierre/index.d.ts +2 -2
  11. package/dist/pierre/index.d.ts.map +1 -1
  12. package/dist/pierre/index.js +1 -1
  13. package/dist/pierre/index.js.map +1 -1
  14. package/dist/stories/Subsystem/AggregateGraph/aggregateViewFixture.d.ts.map +1 -1
  15. package/dist/stories/Subsystem/AggregateGraph/aggregateViewFixture.js +1 -1
  16. package/dist/stories/Subsystem/AggregateGraph/aggregateViewFixture.js.map +1 -1
  17. package/dist/stories/Subsystem/C4Graph/c4Fixture.js +1 -1
  18. package/dist/stories/Subsystem/C4Graph/c4Fixture.js.map +1 -1
  19. package/dist/stories/Subsystem/ComponentGraph/fixtures.d.ts +9 -9
  20. package/dist/stories/Subsystem/ComponentGraph/fixtures.d.ts.map +1 -1
  21. package/dist/stories/Subsystem/ComponentGraph/fixtures.js +12 -12
  22. package/dist/stories/Subsystem/ComponentGraph/fixtures.js.map +1 -1
  23. package/dist/subsystem/C4Graph.d.ts +2 -2
  24. package/dist/subsystem/C4Graph.js +2 -2
  25. package/dist/subsystem/ConstructsCatalog.d.ts +1 -1
  26. package/dist/subsystem/ConstructsCatalog.js +1 -1
  27. package/dist/subsystem/DiagnosticToggle.d.ts +1 -1
  28. package/dist/subsystem/DiagnosticToggle.js +1 -1
  29. package/dist/subsystem/FileDrawer.d.ts +2 -2
  30. package/dist/subsystem/FileDrawer.js +2 -2
  31. package/dist/subsystem/IssueList.d.ts +6 -6
  32. package/dist/subsystem/IssueList.d.ts.map +1 -1
  33. package/dist/subsystem/IssueList.js +9 -9
  34. package/dist/subsystem/IssueList.js.map +1 -1
  35. package/dist/subsystem/SubsystemAggregateGraph.d.ts +3 -3
  36. package/dist/subsystem/SubsystemAggregateGraph.d.ts.map +1 -1
  37. package/dist/subsystem/SubsystemAggregateGraph.js +2 -2
  38. package/dist/subsystem/SubsystemComponentGraph.d.ts +45 -45
  39. package/dist/subsystem/SubsystemComponentGraph.d.ts.map +1 -1
  40. package/dist/subsystem/SubsystemComponentGraph.js +284 -277
  41. package/dist/subsystem/SubsystemComponentGraph.js.map +1 -1
  42. package/dist/subsystem/SubsystemModelTransition.d.ts +10 -10
  43. package/dist/subsystem/SubsystemModelTransition.d.ts.map +1 -1
  44. package/dist/subsystem/SubsystemModelTransition.js +42 -42
  45. package/dist/subsystem/SubsystemModelTransition.js.map +1 -1
  46. package/dist/subsystem/TrailsPanel.d.ts +55 -0
  47. package/dist/subsystem/TrailsPanel.d.ts.map +1 -0
  48. package/dist/subsystem/{WalkthroughsPanel.js → TrailsPanel.js} +51 -51
  49. package/dist/subsystem/TrailsPanel.js.map +1 -0
  50. package/dist/subsystem/declarationRef.d.ts +1 -1
  51. package/dist/subsystem/declarationRef.d.ts.map +1 -1
  52. package/dist/subsystem/model.d.ts +40 -40
  53. package/dist/subsystem/model.d.ts.map +1 -1
  54. package/dist/subsystem/model.js +17 -17
  55. package/dist/subsystem/model.js.map +1 -1
  56. package/dist/subsystem/nodes.d.ts +1 -1
  57. package/dist/subsystem/nodes.js +1 -1
  58. package/dist/subsystem/toC4.d.ts +2 -2
  59. package/dist/subsystem/toC4.d.ts.map +1 -1
  60. package/dist/subsystem/toC4.js +2 -2
  61. package/dist/subsystem/toC4.js.map +1 -1
  62. package/dist/subsystem/trailBrief.d.ts +18 -0
  63. package/dist/subsystem/trailBrief.d.ts.map +1 -0
  64. package/dist/subsystem/{walkthroughBrief.js → trailBrief.js} +8 -8
  65. package/dist/subsystem/trailBrief.js.map +1 -0
  66. package/package.json +3 -3
  67. package/src/index.ts +15 -15
  68. package/src/pierre/{PierreWalkthroughCodeView.tsx → PierreTrailCodeView.tsx} +56 -56
  69. package/src/pierre/index.ts +2 -2
  70. package/src/stories/Pierre/CodeView.stories.tsx +3 -3
  71. package/src/stories/Subsystem/AggregateGraph/AggregateFrameGraph.stories.tsx +1 -1
  72. package/src/stories/Subsystem/AggregateGraph/aggregateViewFixture.ts +1 -1
  73. package/src/stories/Subsystem/C4Graph/c4Fixture.ts +1 -1
  74. package/src/stories/Subsystem/ComponentDeclarationAudit.stories.tsx +8 -8
  75. package/src/stories/Subsystem/ComponentGraph/AnimatedProgression.stories.tsx +13 -13
  76. package/src/stories/Subsystem/ComponentGraph/Appearance.stories.tsx +2 -2
  77. package/src/stories/Subsystem/ComponentGraph/Basics.stories.tsx +5 -5
  78. package/src/stories/Subsystem/ComponentGraph/Captures.stories.tsx +8 -8
  79. package/src/stories/Subsystem/ComponentGraph/CustomEntities.stories.tsx +3 -3
  80. package/src/stories/Subsystem/ComponentGraph/Diagnostics.stories.tsx +6 -6
  81. package/src/stories/Subsystem/ComponentGraph/EdgeViews.stories.tsx +12 -12
  82. package/src/stories/Subsystem/ComponentGraph/Flows.stories.tsx +36 -36
  83. package/src/stories/Subsystem/ComponentGraph/FrameworkStereotype.stories.tsx +7 -7
  84. package/src/stories/Subsystem/ComponentGraph/GraphTitle.stories.tsx +4 -4
  85. package/src/stories/Subsystem/ComponentGraph/IssueOverlay.stories.tsx +8 -8
  86. package/src/stories/Subsystem/ComponentGraph/Issues.stories.tsx +4 -4
  87. package/src/stories/Subsystem/ComponentGraph/ModuleBadges.stories.tsx +3 -3
  88. package/src/stories/Subsystem/ComponentGraph/Modules.stories.tsx +5 -5
  89. package/src/stories/Subsystem/ComponentGraph/Packages.stories.tsx +6 -6
  90. package/src/stories/Subsystem/ComponentGraph/Processes.stories.tsx +3 -3
  91. package/src/stories/Subsystem/ComponentGraph/Proposed.stories.tsx +4 -4
  92. package/src/stories/Subsystem/ComponentGraph/{ProposedWalkthroughs.stories.tsx → ProposedTrails.stories.tsx} +9 -9
  93. package/src/stories/Subsystem/ComponentGraph/Reorder.stories.tsx +19 -19
  94. package/src/stories/Subsystem/ComponentGraph/Scenarios.stories.tsx +21 -21
  95. package/src/stories/Subsystem/ComponentGraph/{WalkthroughAutoplay.stories.tsx → TrailAutoplay.stories.tsx} +22 -22
  96. package/src/stories/Subsystem/ComponentGraph/WorkspacePackageFrames.stories.tsx +3 -3
  97. package/src/stories/Subsystem/ComponentGraph/fixtures.ts +19 -19
  98. package/src/subsystem/C4Graph.tsx +2 -2
  99. package/src/subsystem/ConstructsCatalog.tsx +1 -1
  100. package/src/subsystem/DiagnosticToggle.tsx +1 -1
  101. package/src/subsystem/FileDrawer.tsx +2 -2
  102. package/src/subsystem/IssueList.focus.test.tsx +4 -4
  103. package/src/subsystem/IssueList.icon.test.tsx +3 -3
  104. package/src/subsystem/IssueList.tsx +14 -14
  105. package/src/subsystem/SubsystemAggregateGraph.tsx +3 -3
  106. package/src/subsystem/SubsystemComponentGraph.tsx +377 -371
  107. package/src/subsystem/SubsystemModelTransition.tsx +61 -61
  108. package/src/subsystem/{WalkthroughsPanel.test.tsx → TrailsPanel.test.tsx} +16 -16
  109. package/src/subsystem/{WalkthroughsPanel.tsx → TrailsPanel.tsx} +81 -81
  110. package/src/subsystem/declarationRef.ts +1 -1
  111. package/src/subsystem/formatDeclaration.test.ts +6 -6
  112. package/src/subsystem/model.test.ts +25 -25
  113. package/src/subsystem/model.ts +51 -51
  114. package/src/subsystem/nodes.tsx +1 -1
  115. package/src/subsystem/toC4.test.ts +1 -1
  116. package/src/subsystem/toC4.ts +3 -3
  117. package/src/subsystem/{walkthroughBrief.test.ts → trailBrief.test.ts} +10 -10
  118. package/src/subsystem/{walkthroughBrief.ts → trailBrief.ts} +8 -8
  119. package/dist/pierre/PierreWalkthroughCodeView.d.ts.map +0 -1
  120. package/dist/pierre/PierreWalkthroughCodeView.js.map +0 -1
  121. package/dist/subsystem/WalkthroughsPanel.d.ts +0 -55
  122. package/dist/subsystem/WalkthroughsPanel.d.ts.map +0 -1
  123. package/dist/subsystem/WalkthroughsPanel.js.map +0 -1
  124. package/dist/subsystem/walkthroughBrief.d.ts +0 -18
  125. package/dist/subsystem/walkthroughBrief.d.ts.map +0 -1
  126. package/dist/subsystem/walkthroughBrief.js.map +0 -1
@@ -302,13 +302,13 @@ const augmentationCases: { label: string; component: SubsystemComponent }[] = [
302
302
  label: 'augmented — no own declaration (bare signature today)',
303
303
  component: {
304
304
  alias: 'aug-bare',
305
- name: 'WalkthroughsPanel',
305
+ name: 'TrailsPanel',
306
306
  construct: 'function',
307
- file: 'packages/subsystems-react/src/subsystem/WalkthroughsPanel.tsx',
307
+ file: 'packages/subsystems-react/src/subsystem/TrailsPanel.tsx',
308
308
  purl: 'pkg:github/principal-ai/subsystem-modeling',
309
- symbol: 'WalkthroughsPanel',
309
+ symbol: 'TrailsPanel',
310
310
  signatureAugmentation: {
311
- parameters: [{ type: 'WalkthroughsPanelProps' }],
311
+ parameters: [{ type: 'TrailsPanelProps' }],
312
312
  returnType: 'JSX.Element',
313
313
  },
314
314
  },
@@ -337,15 +337,15 @@ const augmentationCases: { label: string; component: SubsystemComponent }[] = [
337
337
  label: 'baseline — no augmentation',
338
338
  component: {
339
339
  alias: 'no-aug',
340
- name: 'reorderWalkthroughs',
340
+ name: 'reorderTrails',
341
341
  construct: 'function',
342
342
  file: 'packages/subsystems-react/src/subsystem/model.ts',
343
343
  purl: 'pkg:github/principal-ai/subsystem-modeling',
344
- symbol: 'reorderWalkthroughs',
344
+ symbol: 'reorderTrails',
345
345
  declaration: {
346
346
  kind: 'function',
347
- parameters: [{ name: 'walkthroughs', type: 'SubsystemWalkthrough[]' }],
348
- returnType: 'SubsystemWalkthrough[]',
347
+ parameters: [{ name: 'trails', type: 'SubsystemTrail[]' }],
348
+ returnType: 'SubsystemTrail[]',
349
349
  } satisfies GraphifyComponentDetail,
350
350
  },
351
351
  },
@@ -6,11 +6,11 @@ import {
6
6
  SubsystemModelTransition,
7
7
  type SubsystemTransitionStep,
8
8
  } from '../../../subsystem/SubsystemModelTransition';
9
- import type { SubsystemComponent, SubsystemWalkthrough } from '../../../subsystem/model';
9
+ import type { SubsystemComponent, SubsystemTrail } from '../../../subsystem/model';
10
10
 
11
11
  /**
12
12
  * Harness for `SubsystemModelTransition` — the same progression cases
13
- * (constructs → static → dynamic → walkthrough) animated between, with a nav.
13
+ * (constructs → static → dynamic → trail) animated between, with a nav.
14
14
  */
15
15
 
16
16
  const meta = {
@@ -34,7 +34,7 @@ const components: SubsystemComponent[] = [
34
34
  { alias: 'Database', name: 'Database', construct: 'external', role: 'service', purl: 'external', file: '' },
35
35
  ];
36
36
 
37
- const walkthroughs: SubsystemWalkthrough[] = [
37
+ const trails: SubsystemTrail[] = [
38
38
  {
39
39
  id: 'wt-book',
40
40
  title: 'Guest books',
@@ -56,7 +56,7 @@ const walkthroughs: SubsystemWalkthrough[] = [
56
56
  },
57
57
  ];
58
58
 
59
- const LABELS = ['Constructs', 'Static topology', 'Dynamic topology', 'Walkthrough'];
59
+ const LABELS = ['Constructs', 'Static topology', 'Dynamic topology', 'Trail'];
60
60
 
61
61
  const STEPS: SubsystemTransitionStep[] = [
62
62
  {
@@ -72,22 +72,22 @@ const STEPS: SubsystemTransitionStep[] = [
72
72
  moduleNesting: 'path',
73
73
  },
74
74
  {
75
- model: { title: 'Booking', components, walkthroughs },
75
+ model: { title: 'Booking', components, trails },
76
76
  moduleNesting: 'path',
77
- autoPlayWalkthroughs: true,
78
- showWalkthroughTitle: true,
77
+ autoPlayTrails: true,
78
+ showTrailTitle: true,
79
79
  },
80
80
  ];
81
81
 
82
82
  const STEP_MS = 4000;
83
83
 
84
- /** Dwell long enough for an autoplaying step to cycle all its hops. */
84
+ /** Dwell long enough for an autoplaying step to cycle all its steps. */
85
85
  function dwellFor(index: number): number {
86
86
  const step = STEPS[index];
87
- if (step?.autoPlayWalkthroughs) {
88
- const hops = step.model.walkthroughs?.reduce((n, w) => n + w.steps.length, 0) ?? 0;
89
- // Whole-flow phase + one tick per hop.
90
- if (hops > 0) return (hops + 1) * STEP_MS;
87
+ if (step?.autoPlayTrails) {
88
+ const steps = step.model.trails?.reduce((n, w) => n + w.steps.length, 0) ?? 0;
89
+ // Whole-flow phase + one tick per step.
90
+ if (steps > 0) return (steps + 1) * STEP_MS;
91
91
  }
92
92
  return 3200;
93
93
  }
@@ -109,7 +109,7 @@ function Harness() {
109
109
  <SubsystemModelTransition
110
110
  steps={steps}
111
111
  activeIndex={active}
112
- walkthroughAutoPlayIntervalMs={STEP_MS}
112
+ trailAutoPlayIntervalMs={STEP_MS}
113
113
  />
114
114
  <div style={{ position: 'absolute', top: 12, left: 12, display: 'flex', gap: 8, zIndex: 10 }}>
115
115
  {LABELS.map((label, i) => (
@@ -5,7 +5,7 @@ import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme
5
5
  import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
6
6
  import type { SubsystemComponent, SubsystemComponentEdge } from '../../../subsystem/model';
7
7
  import type { GraphifyComponentDetail } from '../../../graphify';
8
- import { investigateOnlyComponents, investigateOnlyWalkthroughs } from './fixtures';
8
+ import { investigateOnlyComponents, investigateOnlyTrails } from './fixtures';
9
9
 
10
10
  const meta = {
11
11
  title: 'Subsystem/ComponentGraph/Appearance',
@@ -32,7 +32,7 @@ export const NarrowMaxWidth: Story = {
32
32
  <div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
33
33
  <SubsystemComponentGraph
34
34
  components={investigateOnlyComponents}
35
- walkthroughs={investigateOnlyWalkthroughs}
35
+ trails={investigateOnlyTrails}
36
36
  maxNodeWidth={140}
37
37
  />
38
38
  </div>
@@ -4,7 +4,7 @@ import type { Meta, StoryObj } from '@storybook/react';
4
4
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
5
5
  import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
6
6
  import type { SubsystemComponent, SubsystemComponentEdge } from '../../../subsystem/model';
7
- import { components, graphSpecFromHops } from './fixtures';
7
+ import { components, graphSpecFromSteps } from './fixtures';
8
8
 
9
9
  const meta = {
10
10
  title: 'Subsystem/ComponentGraph/Basics',
@@ -33,7 +33,7 @@ const twoNodeComponents = components([
33
33
  ['dst', 'SessionReader', 'class', 'SessionReader.ts', 'pkg:github/principal-ai/agent-monitoring', 'normalizes sessions into events'],
34
34
  ]);
35
35
 
36
- const twoNodeEdges = graphSpecFromHops([
36
+ const twoNodeEdges = graphSpecFromSteps([
37
37
  ['src', 'dst', 'calls'],
38
38
  ]);
39
39
 
@@ -44,7 +44,7 @@ function TwoNodeDemo({ showEdgeLabels = true }: { showEdgeLabels?: boolean }) {
44
44
  <div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
45
45
  <SubsystemComponentGraph
46
46
  components={twoNodeComponents}
47
- walkthroughs={twoNodeEdges.walkthroughs}
47
+ trails={twoNodeEdges.trails}
48
48
  onSelect={(id) => setSelected(id)}
49
49
  onEdgeSelect={(e) => setSelectedEdge(e)}
50
50
  showEdgeLabels={showEdgeLabels}
@@ -102,11 +102,11 @@ function PlaygroundDemo({ leftCount, rightCount, showEdgeLabels }: { leftCount:
102
102
  edgeSpec.push([`l${i}`, `r${j}`, 'calls']);
103
103
  }
104
104
  }
105
- const graph = graphSpecFromHops(edgeSpec);
105
+ const graph = graphSpecFromSteps(edgeSpec);
106
106
 
107
107
  return (
108
108
  <div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
109
- <SubsystemComponentGraph components={comps} walkthroughs={graph.walkthroughs} showEdgeLabels={showEdgeLabels} />
109
+ <SubsystemComponentGraph components={comps} trails={graph.trails} showEdgeLabels={showEdgeLabels} />
110
110
  </div>
111
111
  );
112
112
  }
@@ -5,7 +5,7 @@ import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme
5
5
  import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
6
6
  import type { SubsystemComponent, SubsystemComponentEdge } from '../../../subsystem/model';
7
7
  import type { GraphifyComponentDetail } from '../../../graphify';
8
- import { components, graphSpecFromHops, readerDetail, investigateOnlyComponents, investigateOnlyWalkthroughs } from './fixtures';
8
+ import { components, graphSpecFromSteps, readerDetail, investigateOnlyComponents, investigateOnlyTrails } from './fixtures';
9
9
 
10
10
  const meta = {
11
11
  title: 'Subsystem/ComponentGraph/Captures',
@@ -37,7 +37,7 @@ const v2ReaderComponents = components([
37
37
  ['registry', 'supported-agents', 'function', 'supported-agents.ts', 'pkg:github/principal-ai/agent-monitoring', 'registry of supported agents (the shared seam)', 'registerAgent'],
38
38
  ]);
39
39
 
40
- const v2ReaderEdges = graphSpecFromHops([
40
+ const v2ReaderEdges = graphSpecFromSteps([
41
41
  ['transcript', 'reader', 'calls'],
42
42
  ['paths', 'reader', 'uses'],
43
43
  ['capture', 'reader', 'calls'],
@@ -55,7 +55,7 @@ function V2ReaderDemo() {
55
55
  <div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
56
56
  <SubsystemComponentGraph
57
57
  components={v2ReaderComponents}
58
- walkthroughs={v2ReaderEdges.walkthroughs}
58
+ trails={v2ReaderEdges.trails}
59
59
  onSelect={(id) => setSelected(id)}
60
60
  onEdgeSelect={(e) => setSelectedEdge(e)}
61
61
  />
@@ -80,7 +80,7 @@ export const V2ReaderSubsystem: Story = {
80
80
  export const InvestigateOnly: Story = {
81
81
  render: () => (
82
82
  <div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
83
- <SubsystemComponentGraph components={investigateOnlyComponents} walkthroughs={investigateOnlyWalkthroughs} />
83
+ <SubsystemComponentGraph components={investigateOnlyComponents} trails={investigateOnlyTrails} />
84
84
  </div>
85
85
  ),
86
86
  };
@@ -98,7 +98,7 @@ const minimalComponents = components([
98
98
  ['transcript', 'transcript', 'function', 'transcript.ts', 'pkg:github/principal-ai/agent-monitoring', 'parses session records + type guards', 'transcript'],
99
99
  ]);
100
100
 
101
- const sharedEdges = graphSpecFromHops([
101
+ const sharedEdges = graphSpecFromSteps([
102
102
  ['transcript', 'record', 'uses'],
103
103
  ['reader', 'normalize', 'calls'],
104
104
  ['normalize', 'record', 'uses'],
@@ -137,7 +137,7 @@ function MinimalVsResolvedDemo({ resolved }: { resolved: boolean }) {
137
137
  <div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
138
138
  <SubsystemComponentGraph
139
139
  components={resolved ? resolvedComponents : minimalComponents}
140
- walkthroughs={sharedEdges.walkthroughs}
140
+ trails={sharedEdges.trails}
141
141
  onSelect={(id) => setSelected(id)}
142
142
  />
143
143
  <div style={{ marginTop: 8, fontFamily: 'monospace', fontSize: 12, color: '#aaa' }}>
@@ -191,7 +191,7 @@ const investigationComponents: SubsystemComponent[] = [
191
191
  },
192
192
  ];
193
193
 
194
- const investigationEdges = graphSpecFromHops([
194
+ const investigationEdges = graphSpecFromSteps([
195
195
  ['adapter', 'contracts', 'uses'],
196
196
  ['ingestion', 'adapter', 'uses'],
197
197
  ['ingestion', 'contracts', 'uses'],
@@ -203,7 +203,7 @@ function InvestigationDemo() {
203
203
  <div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
204
204
  <SubsystemComponentGraph
205
205
  components={investigationComponents}
206
- walkthroughs={investigationEdges.walkthroughs}
206
+ trails={investigationEdges.trails}
207
207
  onSelect={(id) => setSelected(id)}
208
208
  />
209
209
  <div style={{ marginTop: 8, fontFamily: 'monospace', fontSize: 12, color: '#aaa' }}>
@@ -5,7 +5,7 @@ import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme
5
5
  import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
6
6
  import type { SubsystemComponent, SubsystemComponentEdge } from '../../../subsystem/model';
7
7
  import type { GraphifyCustomEntityDetail } from '../../../graphify';
8
- import { graphSpecFromHops } from './fixtures';
8
+ import { graphSpecFromSteps } from './fixtures';
9
9
 
10
10
  /** Authored attributes surfaced in the declaration panel. */
11
11
  function entityDetail(attributes: Array<[string, string]>): GraphifyCustomEntityDetail {
@@ -143,7 +143,7 @@ const components: SubsystemComponent[] = [
143
143
  },
144
144
  ];
145
145
 
146
- const entityGraph = graphSpecFromHops([
146
+ const entityGraph = graphSpecFromSteps([
147
147
  ['wr', 'store', 'feeds'],
148
148
  ['store', 'tech', 'feeds'],
149
149
  ['tech', 'sup', 'watches'],
@@ -178,7 +178,7 @@ export const NovaTechWorkRequests: Story = {
178
178
  title="Custom entities — NovaTech work-request chain"
179
179
  description="Persons, an agent, and a queue as `custom_entity` nodes (badge = entityKind). Actors keep the themed coral; the agent and queue wear authored `color` overrides. Click a node for its declaration — `entity 'Name' — kind` plus authored `attributes` (key: value)."
180
180
  components={components}
181
- walkthroughs={entityGraph.walkthroughs}
181
+ trails={entityGraph.trails}
182
182
  />
183
183
  </div>
184
184
  ),
@@ -7,7 +7,7 @@ import {
7
7
  SubsystemDiagnosticToggle,
8
8
  type SubsystemDiagnosticStatus,
9
9
  } from '../../../subsystem/DiagnosticToggle';
10
- import { components, graphSpecFromHops } from './fixtures';
10
+ import { components, graphSpecFromSteps } from './fixtures';
11
11
 
12
12
  const meta = {
13
13
  title: 'Subsystem/ComponentGraph/Diagnostics',
@@ -34,7 +34,7 @@ const graphComponents = components([
34
34
  ['caller', 'Web client', 'external', '', 'external', undefined, undefined],
35
35
  ]);
36
36
 
37
- const graphEdges = graphSpecFromHops([
37
+ const graphEdges = graphSpecFromSteps([
38
38
  ['caller', 'entry', 'calls'],
39
39
  ['entry', 'store', 'writes'],
40
40
  ['entry', 'stripe', 'calls'],
@@ -81,7 +81,7 @@ export const GraphClean: Story = {
81
81
  <div style={{ width: '100%', height: '100vh' }}>
82
82
  <SubsystemComponentGraph
83
83
  components={graphComponents}
84
- walkthroughs={graphEdges.walkthroughs}
84
+ trails={graphEdges.trails}
85
85
  title="Checkout"
86
86
  description={GRAPH_DESCRIPTION}
87
87
  diagnostic={{ status: 'ok', onToggle: () => {} }}
@@ -95,7 +95,7 @@ export const GraphWithIssues: Story = {
95
95
  <div style={{ width: '100%', height: '100vh' }}>
96
96
  <SubsystemComponentGraph
97
97
  components={graphComponents}
98
- walkthroughs={graphEdges.walkthroughs}
98
+ trails={graphEdges.trails}
99
99
  title="Checkout"
100
100
  description={GRAPH_DESCRIPTION}
101
101
  diagnostic={{ status: 'issues', issueCount: 3, onToggle: () => {} }}
@@ -110,7 +110,7 @@ export const GraphStale: Story = {
110
110
  <div style={{ width: '100%', height: '100vh' }}>
111
111
  <SubsystemComponentGraph
112
112
  components={graphComponents}
113
- walkthroughs={graphEdges.walkthroughs}
113
+ trails={graphEdges.trails}
114
114
  title="Checkout"
115
115
  description={GRAPH_DESCRIPTION}
116
116
  diagnostic={{ status: 'issues', issueCount: 3, stale: true, onToggle: () => {} }}
@@ -125,7 +125,7 @@ export const GraphChipOnly: Story = {
125
125
  <div style={{ width: '100%', height: '100vh' }}>
126
126
  <SubsystemComponentGraph
127
127
  components={graphComponents}
128
- walkthroughs={graphEdges.walkthroughs}
128
+ trails={graphEdges.trails}
129
129
  title="Checkout"
130
130
  diagnostic={{ status: 'gaps', issueCount: 2, onToggle: () => {} }}
131
131
  />
@@ -4,7 +4,7 @@ import type { Meta, StoryObj } from '@storybook/react';
4
4
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
5
5
  import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
6
6
  import type { SubsystemEdgeView, SubsystemGraphifyRelation } from '../../../subsystem/model';
7
- import { components, walkthroughFromHops } from './fixtures';
7
+ import { components, trailFromSteps } from './fixtures';
8
8
 
9
9
  const meta = {
10
10
  title: 'Subsystem/ComponentGraph/EdgeViews',
@@ -28,9 +28,9 @@ type Story = StoryObj<typeof meta>;
28
28
  // ---------------------------------------------------------------------------
29
29
  // A graph that carries BOTH edge sources between overlapping node pairs:
30
30
  // svc --references--> reader (graphify static edge)
31
- // svc --calls--> reader (runtime hop)
31
+ // svc --calls--> reader (runtime step)
32
32
  // store --references--> db (graphify static edge)
33
- // store --calls--> db (runtime hop)
33
+ // store --calls--> db (runtime step)
34
34
  // so switching the label view visibly changes which labels appear.
35
35
  // ---------------------------------------------------------------------------
36
36
  const labelViewComponents = components([
@@ -49,14 +49,14 @@ const labelViewGraphify: SubsystemGraphifyRelation[] = [
49
49
  { id: 'g-reader-event', from: 'reader', to: 'event', relation: 'references' },
50
50
  ];
51
51
 
52
- const labelViewWalkthroughs = [
53
- walkthroughFromHops('tl-capture', 'Capture session', [
52
+ const labelViewTrails = [
53
+ trailFromSteps('tl-capture', 'Capture session', [
54
54
  ['api', 'svc', 'calls', 'src/api/handler.ts', 42],
55
55
  ['svc', 'store', 'writes', 'src/session/SessionService.ts', 88],
56
56
  ['store', 'db', 'calls', 'src/session/SessionStore.ts', 120],
57
57
  ['svc', 'event', 'produces', 'src/session/SessionService.ts', 95],
58
58
  ]),
59
- walkthroughFromHops('tl-normalize', 'Normalize records', [
59
+ trailFromSteps('tl-normalize', 'Normalize records', [
60
60
  ['svc', 'reader', 'calls', 'src/session/SessionService.ts', 61],
61
61
  ['reader', 'event', 'produces', 'src/session/SessionReader.ts', 77],
62
62
  ]),
@@ -64,7 +64,7 @@ const labelViewWalkthroughs = [
64
64
 
65
65
  const VIEWS: { value: SubsystemEdgeView; label: string }[] = [
66
66
  { value: 'graphify', label: 'Graphify' },
67
- { value: 'walkthroughs', label: 'Walkthroughs' },
67
+ { value: 'trails', label: 'Trails' },
68
68
  ];
69
69
 
70
70
  function EdgeViewDemo() {
@@ -119,9 +119,9 @@ function EdgeViewDemo() {
119
119
  <SubsystemComponentGraph
120
120
  components={labelViewComponents}
121
121
  graphifyRelations={labelViewGraphify}
122
- walkthroughs={labelViewWalkthroughs}
122
+ trails={labelViewTrails}
123
123
  title="edge views"
124
- description="The graphify and walkthrough edge sources are disjoint and never shown together. Toggle the view: **Graphify** draws `svc --references--> reader`; **Walkthroughs** draws `svc --calls--> reader`. The model is the same either way."
124
+ description="The graphify and trail edge sources are disjoint and never shown together. Toggle the view: **Graphify** draws `svc --references--> reader`; **Trails** draws `svc --calls--> reader`. The model is the same either way."
125
125
  showEdgeLabels={showEdgeLabels}
126
126
  edgeView={view}
127
127
  />
@@ -130,7 +130,7 @@ function EdgeViewDemo() {
130
130
  );
131
131
  }
132
132
 
133
- /** Interactive toggle between the `graphify` and `walkthroughs` edge views. */
133
+ /** Interactive toggle between the `graphify` and `trails` edge views. */
134
134
  export const ToggleEdgeView: Story = {
135
135
  render: () => <EdgeViewDemo />,
136
136
  };
@@ -142,7 +142,7 @@ export const ViewControl: Story = {
142
142
  <SubsystemComponentGraph
143
143
  components={labelViewComponents}
144
144
  graphifyRelations={labelViewGraphify}
145
- walkthroughs={labelViewWalkthroughs}
145
+ trails={labelViewTrails}
146
146
  showEdgeLabels={args.showEdgeLabels}
147
147
  edgeView={args.edgeView}
148
148
  />
@@ -154,6 +154,6 @@ export const ViewControl: Story = {
154
154
  },
155
155
  argTypes: {
156
156
  showEdgeLabels: { control: 'boolean' },
157
- edgeView: { control: 'inline-radio', options: ['graphify', 'walkthroughs'] },
157
+ edgeView: { control: 'inline-radio', options: ['graphify', 'trails'] },
158
158
  },
159
159
  };
@@ -3,9 +3,9 @@ import '@xyflow/react/dist/style.css';
3
3
  import type { Meta, StoryObj } from '@storybook/react';
4
4
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
5
5
  import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
6
- import type { SubsystemComponent, SubsystemWalkthrough } from '../../../subsystem/model';
7
- import { PierreWalkthroughCodeView } from '../../../pierre';
8
- import type { WalkthroughViewerContext } from '../../../subsystem/SubsystemComponentGraph';
6
+ import type { SubsystemComponent, SubsystemTrail } from '../../../subsystem/model';
7
+ import { PierreTrailCodeView } from '../../../pierre';
8
+ import type { TrailViewerContext } from '../../../subsystem/SubsystemComponentGraph';
9
9
 
10
10
  const meta = {
11
11
  title: 'Subsystem/ComponentGraph/Flows',
@@ -129,7 +129,7 @@ const drawingComponents: SubsystemComponent[] = [
129
129
  const STORY_PURL = 'pkg:github/principal-ai/desktop-app';
130
130
  const stepPurl = (file: string) => `${STORY_PURL}#${file}`;
131
131
 
132
- const drawingWalkthroughs: SubsystemWalkthrough[] = [
132
+ const drawingTrails: SubsystemTrail[] = [
133
133
  {
134
134
  id: 'tl-open-drawing',
135
135
  title: 'Open drawing',
@@ -165,17 +165,17 @@ const drawingWalkthroughs: SubsystemWalkthrough[] = [
165
165
  ];
166
166
 
167
167
  function FlowsDemo() {
168
- const renderWalkthroughViewer = useCallback(
168
+ const renderTrailViewer = useCallback(
169
169
  ({
170
- walkthrough,
170
+ trail,
171
171
  stepIndex,
172
172
  onOpenFile,
173
173
  proposedAliases,
174
174
  resolveSymbol,
175
175
  onSymbolClick,
176
- }: WalkthroughViewerContext) => (
177
- <PierreWalkthroughCodeView
178
- walkthrough={walkthrough}
176
+ }: TrailViewerContext) => (
177
+ <PierreTrailCodeView
178
+ trail={trail}
179
179
  stepIndex={stepIndex}
180
180
  readFile={readStoryFile}
181
181
  contextLines={4}
@@ -192,10 +192,10 @@ function FlowsDemo() {
192
192
  <div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
193
193
  <SubsystemComponentGraph
194
194
  components={drawingComponents}
195
- walkthroughs={drawingWalkthroughs}
195
+ trails={drawingTrails}
196
196
  title="drawing-files flow"
197
- description="Three walkthroughs over one graph — opening, saving, and deleting a drawing. The sidebar's **Walkthroughs** panel lists each step by **symbol**; clicking a step focuses that hop and scrolls the bottom CodeView to that snippet."
198
- renderWalkthroughViewer={renderWalkthroughViewer}
197
+ description="Three trails over one graph — opening, saving, and deleting a drawing. The sidebar's **Trails** panel lists each step by **symbol**; clicking a step focuses that step and scrolls the bottom CodeView to that snippet."
198
+ renderTrailViewer={renderTrailViewer}
199
199
  renderFileViewer={(file, opts) => (
200
200
  <div
201
201
  style={{
@@ -222,10 +222,10 @@ export const ThreeFlows: Story = {
222
222
  };
223
223
 
224
224
  /**
225
- * The proposed-seam failure mode: a walkthrough hop whose component is
225
+ * The proposed-seam failure mode: a trail step whose component is
226
226
  * `proposed` points at a file that isn't in the checkout yet (no story
227
- * fixture). The hop must render an inline "Proposed — … isn't in the local
228
- * checkout yet." placeholder with no Open-file affordance, while the live hops
227
+ * fixture). The step must render an inline "Proposed — … isn't in the local
228
+ * checkout yet." placeholder with no Open-file affordance, while the live steps
229
229
  * around it still render their snippets — one bad step must not blank the flow.
230
230
  */
231
231
  const proposedComponents: SubsystemComponent[] = [
@@ -243,7 +243,7 @@ const proposedComponents: SubsystemComponent[] = [
243
243
  },
244
244
  ];
245
245
 
246
- const proposedWalkthroughs: SubsystemWalkthrough[] = [
246
+ const proposedTrails: SubsystemTrail[] = [
247
247
  {
248
248
  id: 'tl-associate-run',
249
249
  title: 'Associate a finished run with its model (proposed)',
@@ -256,7 +256,7 @@ const proposedWalkthroughs: SubsystemWalkthrough[] = [
256
256
  line: 45,
257
257
  purl: stepPurl('src/hooks/useDrawingsHost.ts'),
258
258
  symbol: 'useDrawingsHost.openDrawing',
259
- annotation: 'Live hop — its snippet still renders.',
259
+ annotation: 'Live step — its snippet still renders.',
260
260
  },
261
261
  {
262
262
  from: 'storage',
@@ -273,17 +273,17 @@ const proposedWalkthroughs: SubsystemWalkthrough[] = [
273
273
  ];
274
274
 
275
275
  function ProposedMissingStepDemo() {
276
- const renderWalkthroughViewer = useCallback(
276
+ const renderTrailViewer = useCallback(
277
277
  ({
278
- walkthrough,
278
+ trail,
279
279
  stepIndex,
280
280
  onOpenFile,
281
281
  proposedAliases,
282
282
  resolveSymbol,
283
283
  onSymbolClick,
284
- }: WalkthroughViewerContext) => (
285
- <PierreWalkthroughCodeView
286
- walkthrough={walkthrough}
284
+ }: TrailViewerContext) => (
285
+ <PierreTrailCodeView
286
+ trail={trail}
287
287
  stepIndex={stepIndex}
288
288
  readFile={readStoryFile}
289
289
  contextLines={4}
@@ -300,10 +300,10 @@ function ProposedMissingStepDemo() {
300
300
  <div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
301
301
  <SubsystemComponentGraph
302
302
  components={proposedComponents}
303
- walkthroughs={proposedWalkthroughs}
303
+ trails={proposedTrails}
304
304
  title="proposed seam with a missing file"
305
- description="Expand **Associate a finished run with its model** and click either step. The proposed hop has no file in the checkout, so its snippet shows an inline *Proposed — … isn't in the local checkout yet.* placeholder instead of failing the whole flow."
306
- renderWalkthroughViewer={renderWalkthroughViewer}
305
+ description="Expand **Associate a finished run with its model** and click either step. The proposed step has no file in the checkout, so its snippet shows an inline *Proposed — … isn't in the local checkout yet.* placeholder instead of failing the whole flow."
306
+ renderTrailViewer={renderTrailViewer}
307
307
  renderFileViewer={(file) => (
308
308
  <div
309
309
  style={{
@@ -328,7 +328,7 @@ export const ProposedMissingStep: Story = {
328
328
 
329
329
  // --- Clickable constructs -------------------------------------------------
330
330
  //
331
- // A walkthrough step's line is an edge between two constructs. When the host
331
+ // A trail step's line is an edge between two constructs. When the host
332
332
  // supplies `resolveSymbol`/`onSymbolClick` (the graph derives them from the
333
333
  // step's `from`/`to` components), a token in the snippet that names either
334
334
  // endpoint becomes clickable — clicking it opens that construct's file at its
@@ -440,7 +440,7 @@ function readClickableFile(path: string): Promise<string> {
440
440
  return Promise.resolve(content);
441
441
  }
442
442
 
443
- const clickableWalkthroughs: SubsystemWalkthrough[] = [
443
+ const clickableTrails: SubsystemTrail[] = [
444
444
  {
445
445
  id: 'tl-load',
446
446
  title: 'Load drawings',
@@ -472,17 +472,17 @@ const clickableWalkthroughs: SubsystemWalkthrough[] = [
472
472
 
473
473
  function ClickableConstructsDemo() {
474
474
  const [opened, setOpened] = React.useState<string | null>(null);
475
- const renderWalkthroughViewer = useCallback(
475
+ const renderTrailViewer = useCallback(
476
476
  ({
477
- walkthrough,
477
+ trail,
478
478
  stepIndex,
479
479
  onOpenFile,
480
480
  proposedAliases,
481
481
  resolveSymbol,
482
482
  onSymbolClick,
483
- }: WalkthroughViewerContext) => (
484
- <PierreWalkthroughCodeView
485
- walkthrough={walkthrough}
483
+ }: TrailViewerContext) => (
484
+ <PierreTrailCodeView
485
+ trail={trail}
486
486
  stepIndex={stepIndex}
487
487
  readFile={readClickableFile}
488
488
  contextLines={4}
@@ -516,11 +516,11 @@ function ClickableConstructsDemo() {
516
516
  <div style={{ flex: 1, minHeight: 0 }}>
517
517
  <SubsystemComponentGraph
518
518
  components={clickableComponents}
519
- walkthroughs={clickableWalkthroughs}
520
- initialWalkthroughId="tl-load"
519
+ trails={clickableTrails}
520
+ initialTrailId="tl-load"
521
521
  title="clickable constructs"
522
- description="A walkthrough step's line is an edge to a construct. Tokens that name the step's `from`/`to` components are clickable and open that construct's declaration line in the file drawer — including a **method** endpoint (click `list` to jump to `DrawingStore.list`)."
523
- renderWalkthroughViewer={renderWalkthroughViewer}
522
+ description="A trail step's line is an edge to a construct. Tokens that name the step's `from`/`to` components are clickable and open that construct's declaration line in the file drawer — including a **method** endpoint (click `list` to jump to `DrawingStore.list`)."
523
+ renderTrailViewer={renderTrailViewer}
524
524
  onFileSelect={setOpened}
525
525
  renderFileViewer={(file, opts) => (
526
526
  <div style={{ padding: 12, fontFamily: 'monospace', fontSize: 12, color: '#bbb' }}>
@@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/react';
3
3
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
4
4
  import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
5
5
  import type { SubsystemComponent } from '../../../subsystem/model';
6
- import { walkthroughFromHops } from './fixtures';
6
+ import { trailFromSteps } from './fixtures';
7
7
 
8
8
  const meta = {
9
9
  title: 'Subsystem/ComponentGraph/FrameworkStereotype',
@@ -117,8 +117,8 @@ const reactUiComponents: SubsystemComponent[] = [
117
117
  },
118
118
  ];
119
119
 
120
- const reactUiWalkthroughs = [
121
- walkthroughFromHops('react-ui-hops', 'React UI hops', [
120
+ const reactUiTrails = [
121
+ trailFromSteps('react-ui-steps', 'React UI steps', [
122
122
  ['http-entry', 'create-graph', 'calls', 'packages/subsystems-studio/src/bun/http-server.ts', 1],
123
123
  ['sessions-view', 'drawings-host', 'uses', 'packages/subsystems-studio/src/mainview/views/AgentSessions.tsx', 1],
124
124
  ['analysis-view', 'graph-doc-type', 'uses', 'packages/subsystems-studio/src/mainview/views/AnalysisView.tsx', 1],
@@ -133,7 +133,7 @@ export const ReactComponentsAndHooks: Story = {
133
133
  title="Framework + stereotype"
134
134
  description="construct stays language-shaped (function / type_alias). framework + stereotype label React units as component / hook without inventing a react_component construct. Empty fields mean language-only."
135
135
  components={reactUiComponents}
136
- walkthroughs={reactUiWalkthroughs}
136
+ trails={reactUiTrails}
137
137
  />
138
138
  </div>
139
139
  ),
@@ -192,8 +192,8 @@ const nestComponents: SubsystemComponent[] = [
192
192
  },
193
193
  ];
194
194
 
195
- const nestWalkthroughs = [
196
- walkthroughFromHops('nest-stack-hops', 'Nest controller stack hops', [
195
+ const nestTrails = [
196
+ trailFromSteps('nest-stack-steps', 'Nest controller stack steps', [
197
197
  ['logging-mw', 'auth-guard', 'uses', 'src/logging/logging.middleware.ts', 1],
198
198
  ['auth-guard', 'graphs-controller', 'uses', 'src/auth/auth.guard.ts', 1],
199
199
  ['graphs-controller', 'graphs-service', 'calls', 'src/graphs/graphs.controller.ts', 1],
@@ -207,7 +207,7 @@ export const NestControllerStack: Story = {
207
207
  title="Nest framework stereotypes"
208
208
  description="Same optional fields work outside React: class/function constructs plus nestjs controller / guard / middleware / injectable stereotypes."
209
209
  components={nestComponents}
210
- walkthroughs={nestWalkthroughs}
210
+ trails={nestTrails}
211
211
  />
212
212
  </div>
213
213
  ),