@principal-ai/subsystems-react 0.44.3 → 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 (129) 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 +307 -309
  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 +30 -0
  57. package/dist/subsystem/nodes.d.ts.map +1 -1
  58. package/dist/subsystem/nodes.js +29 -0
  59. package/dist/subsystem/nodes.js.map +1 -1
  60. package/dist/subsystem/toC4.d.ts +2 -2
  61. package/dist/subsystem/toC4.d.ts.map +1 -1
  62. package/dist/subsystem/toC4.js +2 -2
  63. package/dist/subsystem/toC4.js.map +1 -1
  64. package/dist/subsystem/trailBrief.d.ts +18 -0
  65. package/dist/subsystem/trailBrief.d.ts.map +1 -0
  66. package/dist/subsystem/{walkthroughBrief.js → trailBrief.js} +8 -8
  67. package/dist/subsystem/trailBrief.js.map +1 -0
  68. package/package.json +3 -3
  69. package/src/index.ts +15 -15
  70. package/src/pierre/{PierreWalkthroughCodeView.tsx → PierreTrailCodeView.tsx} +56 -56
  71. package/src/pierre/index.ts +2 -2
  72. package/src/stories/Pierre/CodeView.stories.tsx +3 -3
  73. package/src/stories/Subsystem/AggregateGraph/AggregateFrameGraph.stories.tsx +1 -1
  74. package/src/stories/Subsystem/AggregateGraph/aggregateViewFixture.ts +1 -1
  75. package/src/stories/Subsystem/C4Graph/c4Fixture.ts +1 -1
  76. package/src/stories/Subsystem/ComponentDeclarationAudit.stories.tsx +8 -8
  77. package/src/stories/Subsystem/ComponentGraph/AnimatedProgression.stories.tsx +13 -13
  78. package/src/stories/Subsystem/ComponentGraph/Appearance.stories.tsx +2 -2
  79. package/src/stories/Subsystem/ComponentGraph/Basics.stories.tsx +5 -5
  80. package/src/stories/Subsystem/ComponentGraph/Captures.stories.tsx +8 -8
  81. package/src/stories/Subsystem/ComponentGraph/CustomEntities.stories.tsx +3 -3
  82. package/src/stories/Subsystem/ComponentGraph/Diagnostics.stories.tsx +6 -6
  83. package/src/stories/Subsystem/ComponentGraph/EdgeViews.stories.tsx +12 -12
  84. package/src/stories/Subsystem/ComponentGraph/Flows.stories.tsx +36 -36
  85. package/src/stories/Subsystem/ComponentGraph/FrameworkStereotype.stories.tsx +7 -7
  86. package/src/stories/Subsystem/ComponentGraph/GraphTitle.stories.tsx +4 -4
  87. package/src/stories/Subsystem/ComponentGraph/IssueOverlay.stories.tsx +8 -8
  88. package/src/stories/Subsystem/ComponentGraph/Issues.stories.tsx +4 -4
  89. package/src/stories/Subsystem/ComponentGraph/ModuleBadges.stories.tsx +3 -3
  90. package/src/stories/Subsystem/ComponentGraph/Modules.stories.tsx +5 -5
  91. package/src/stories/Subsystem/ComponentGraph/Packages.stories.tsx +6 -6
  92. package/src/stories/Subsystem/ComponentGraph/Processes.stories.tsx +3 -3
  93. package/src/stories/Subsystem/ComponentGraph/Proposed.stories.tsx +4 -4
  94. package/src/stories/Subsystem/ComponentGraph/{ProposedWalkthroughs.stories.tsx → ProposedTrails.stories.tsx} +9 -9
  95. package/src/stories/Subsystem/ComponentGraph/Reorder.stories.tsx +19 -19
  96. package/src/stories/Subsystem/ComponentGraph/Scenarios.stories.tsx +21 -21
  97. package/src/stories/Subsystem/ComponentGraph/{WalkthroughAutoplay.stories.tsx → TrailAutoplay.stories.tsx} +22 -22
  98. package/src/stories/Subsystem/ComponentGraph/WorkspacePackageFrames.stories.tsx +3 -3
  99. package/src/stories/Subsystem/ComponentGraph/fixtures.ts +19 -19
  100. package/src/subsystem/C4Graph.tsx +2 -2
  101. package/src/subsystem/ConstructsCatalog.tsx +1 -1
  102. package/src/subsystem/DiagnosticToggle.tsx +1 -1
  103. package/src/subsystem/FileDrawer.tsx +2 -2
  104. package/src/subsystem/IssueList.focus.test.tsx +4 -4
  105. package/src/subsystem/IssueList.icon.test.tsx +3 -3
  106. package/src/subsystem/IssueList.tsx +14 -14
  107. package/src/subsystem/SubsystemAggregateGraph.tsx +3 -3
  108. package/src/subsystem/SubsystemComponentGraph.tsx +400 -403
  109. package/src/subsystem/SubsystemModelTransition.tsx +61 -61
  110. package/src/subsystem/{WalkthroughsPanel.test.tsx → TrailsPanel.test.tsx} +16 -16
  111. package/src/subsystem/{WalkthroughsPanel.tsx → TrailsPanel.tsx} +81 -81
  112. package/src/subsystem/declarationRef.ts +1 -1
  113. package/src/subsystem/formatDeclaration.test.ts +6 -6
  114. package/src/subsystem/model.test.ts +25 -25
  115. package/src/subsystem/model.ts +51 -51
  116. package/src/subsystem/nodes.test.ts +42 -1
  117. package/src/subsystem/nodes.tsx +38 -0
  118. package/src/subsystem/toC4.test.ts +1 -1
  119. package/src/subsystem/toC4.ts +3 -3
  120. package/src/subsystem/{walkthroughBrief.test.ts → trailBrief.test.ts} +10 -10
  121. package/src/subsystem/{walkthroughBrief.ts → trailBrief.ts} +8 -8
  122. package/dist/pierre/PierreWalkthroughCodeView.d.ts.map +0 -1
  123. package/dist/pierre/PierreWalkthroughCodeView.js.map +0 -1
  124. package/dist/subsystem/WalkthroughsPanel.d.ts +0 -55
  125. package/dist/subsystem/WalkthroughsPanel.d.ts.map +0 -1
  126. package/dist/subsystem/WalkthroughsPanel.js.map +0 -1
  127. package/dist/subsystem/walkthroughBrief.d.ts +0 -18
  128. package/dist/subsystem/walkthroughBrief.d.ts.map +0 -1
  129. package/dist/subsystem/walkthroughBrief.js.map +0 -1
@@ -3,7 +3,7 @@ import React from 'react';
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 { components, graphSpecFromHops } from './fixtures';
6
+ import { components, graphSpecFromSteps } from './fixtures';
7
7
 
8
8
  const meta = {
9
9
  title: 'Subsystem/ComponentGraph/GraphTitle',
@@ -30,7 +30,7 @@ const graphOnlyComponents = components([
30
30
  ['caller', 'Web client', 'external', '', 'external', undefined, undefined],
31
31
  ]);
32
32
 
33
- const graphOnlyEdges = graphSpecFromHops([
33
+ const graphOnlyEdges = graphSpecFromSteps([
34
34
  ['caller', 'entry', 'calls'],
35
35
  ['entry', 'store', 'writes'],
36
36
  ['entry', 'stripe', 'calls'],
@@ -41,7 +41,7 @@ function GraphOnly() {
41
41
  <div style={{ width: '100%', height: '100vh' }}>
42
42
  <SubsystemComponentGraph
43
43
  components={graphOnlyComponents}
44
- walkthroughs={graphOnlyEdges.walkthroughs}
44
+ trails={graphOnlyEdges.trails}
45
45
  graphTitle="Checkout"
46
46
  hideSidebar
47
47
  />
@@ -60,7 +60,7 @@ export const WithSidebar: Story = {
60
60
  <div style={{ width: '100%', height: '100vh' }}>
61
61
  <SubsystemComponentGraph
62
62
  components={graphOnlyComponents}
63
- walkthroughs={graphOnlyEdges.walkthroughs}
63
+ trails={graphOnlyEdges.trails}
64
64
  title="Checkout"
65
65
  description="A small e-commerce checkout subsystem: an HTTP entry point that writes to retained cart state and calls out to Stripe."
66
66
  graphTitle="Checkout"
@@ -3,7 +3,7 @@ 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';
6
+ import type { SubsystemComponent, SubsystemTrail } from '../../../subsystem/model';
7
7
  import {
8
8
  issueCategory,
9
9
  type SubsystemIssue,
@@ -20,8 +20,8 @@ import {
20
20
  * ("Maintain run — fire-and-forget RPC, wait for the finish event"): the
21
21
  * renderer picker → host RPC → background runner → maintain orchestrator →
22
22
  * opencode V2 session, plus the liveness-probe handshake. Its components and
23
- * three walkthroughs are reproduced verbatim below; the topology is carried by
24
- * the walkthroughs, exactly as stored.
23
+ * three trails are reproduced verbatim below; the topology is carried by
24
+ * the trails, exactly as stored.
25
25
  *
26
26
  * What this story exercises: the graph's diagnostics surface over the real
27
27
  * model — the title-row status chip, the grouped issue list, the per-node
@@ -204,8 +204,8 @@ const MAINTAIN_COMPONENTS: SubsystemComponent[] = [
204
204
  },
205
205
  ];
206
206
 
207
- /** The model's three runtime walkthroughs, verbatim (these carry the topology). */
208
- const MAINTAIN_WALKTHROUGHS: SubsystemWalkthrough[] = [
207
+ /** The model's three runtime trails, verbatim (these carry the topology). */
208
+ const MAINTAIN_TRAILS: SubsystemTrail[] = [
209
209
  {
210
210
  id: 'wt-start-maintain',
211
211
  title: 'Start a maintenance run',
@@ -421,7 +421,7 @@ const MAINTAIN_WALKTHROUGHS: SubsystemWalkthrough[] = [
421
421
  * Maintain-run model. The stored model's verification block is clean
422
422
  * (13/13 anchored, 0 missing), so these are the *shape* of findings the
423
423
  * diagnostics layer would receive — one per rung of the verification ladder
424
- * (file → symbol → declaration → type → signature) plus the topology / walkthrough
424
+ * (file → symbol → declaration → type → signature) plus the topology / trail
425
425
  * layers — to exercise the proposal end to end.
426
426
  */
427
427
  const MAINTAIN_ISSUES: SubsystemIssue[] = [
@@ -497,7 +497,7 @@ const MAINTAIN_ISSUES: SubsystemIssue[] = [
497
497
  {
498
498
  id: 'mr-wt',
499
499
  severity: 'info',
500
- kind: 'walkthrough',
500
+ kind: 'trail',
501
501
  message:
502
502
  'Step 7 (terminal-matcher → session-runner) references a line that moved (was :469).',
503
503
  target: {
@@ -556,7 +556,7 @@ function MaintainRunGraph({
556
556
  <div style={{ flex: 1, minHeight: 0 }}>
557
557
  <SubsystemComponentGraph
558
558
  components={MAINTAIN_COMPONENTS}
559
- walkthroughs={MAINTAIN_WALKTHROUGHS}
559
+ trails={MAINTAIN_TRAILS}
560
560
  title="Maintain run"
561
561
  description="Fire-and-forget RPC, wait for the finish event — picker → RPC → background runner → orchestrator → opencode V2 session, plus the liveness-probe handshake."
562
562
  diagnostic={{ status, issueCount, onToggle: () => {} }}
@@ -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 { SubsystemIssueList, type SubsystemIssue } from '../../../subsystem/IssueList';
7
- import { components, graphSpecFromHops } from './fixtures';
7
+ import { components, graphSpecFromSteps } from './fixtures';
8
8
 
9
9
  const meta = {
10
10
  title: 'Subsystem/ComponentGraph/Issues',
@@ -57,7 +57,7 @@ const ISSUES: SubsystemIssue[] = [
57
57
  {
58
58
  id: 'i6',
59
59
  severity: 'info',
60
- kind: 'walkthrough',
60
+ kind: 'trail',
61
61
  message: 'Step 2 references a line that moved (was :42).',
62
62
  target: {
63
63
  kind: 'step',
@@ -133,7 +133,7 @@ const graphComponents = components([
133
133
  ['stripe', 'Stripe', 'external', '', 'external', undefined, undefined],
134
134
  ]);
135
135
 
136
- const graphEdges = graphSpecFromHops([
136
+ const graphEdges = graphSpecFromSteps([
137
137
  ['entry', 'store', 'writes'],
138
138
  ['entry', 'stripe', 'calls'],
139
139
  ]);
@@ -166,7 +166,7 @@ export const GraphWithIssues: Story = {
166
166
  <div style={{ width: '100%', height: '100vh' }}>
167
167
  <SubsystemComponentGraph
168
168
  components={graphComponents}
169
- walkthroughs={graphEdges.walkthroughs}
169
+ trails={graphEdges.trails}
170
170
  title="Checkout"
171
171
  description="A small e-commerce checkout subsystem."
172
172
  diagnostic={{
@@ -9,7 +9,7 @@ import type {
9
9
  SubsystemGraphNode,
10
10
  SubsystemProcessRegion,
11
11
  } from '../../../subsystem/model';
12
- import { graphSpecFromHops } from './fixtures';
12
+ import { graphSpecFromSteps } from './fixtures';
13
13
 
14
14
  const meta = {
15
15
  title: 'Subsystem/ComponentGraph/ModuleBadges',
@@ -102,7 +102,7 @@ const deepComponents: SubsystemComponent[] = [
102
102
  },
103
103
  ];
104
104
 
105
- const deepEdges = graphSpecFromHops([
105
+ const deepEdges = graphSpecFromSteps([
106
106
  ['node-comp', 'group-comp', 'calls'],
107
107
  ['edge-comp', 'group-comp', 'calls'],
108
108
  ['model-view', 'layers', 'calls'],
@@ -122,7 +122,7 @@ export const DeepModulePaths: Story = {
122
122
  'click the badge to expand the full path (the badge widens past the frame edge — the frame itself stays put), click again to collapse it back.'
123
123
  }
124
124
  components={deepComponents}
125
- walkthroughs={deepEdges.walkthroughs}
125
+ trails={deepEdges.trails}
126
126
  />
127
127
  </div>
128
128
  ),
@@ -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 { graphSpecFromHops } from './fixtures';
6
+ import { graphSpecFromSteps } from './fixtures';
7
7
 
8
8
  const meta = {
9
9
  title: 'Subsystem/ComponentGraph/Modules',
@@ -120,7 +120,7 @@ const moduleComponents: SubsystemComponent[] = [
120
120
  },
121
121
  ];
122
122
 
123
- const moduleEdges = graphSpecFromHops([
123
+ const moduleEdges = graphSpecFromSteps([
124
124
  ['parse', 'record', 'uses'],
125
125
  ['is-rollout', 'record', 'uses'],
126
126
  ['reader', 'normalize', 'calls'],
@@ -137,7 +137,7 @@ export const ModuleBoundaries: Story = {
137
137
  title="Module boundaries"
138
138
  description="Concrete exports keep their real construct. Shared `module` (the source path) draws the file as a dashed frame — not `construct: module`. Singleton modules (registerAgent) stay unframed."
139
139
  components={moduleComponents}
140
- walkthroughs={moduleEdges.walkthroughs}
140
+ trails={moduleEdges.trails}
141
141
  />
142
142
  </div>
143
143
  ),
@@ -259,7 +259,7 @@ const nestedComponents: SubsystemComponent[] = [
259
259
  },
260
260
  ];
261
261
 
262
- const nestedEdges = graphSpecFromHops([
262
+ const nestedEdges = graphSpecFromSteps([
263
263
  ['boot', 'write-session', 'calls'],
264
264
  ['trail-view', 'bridge', 'calls'],
265
265
  ['trail-view', 'use-trail', 'uses'],
@@ -278,7 +278,7 @@ export const ProcessAndModuleNesting: Story = {
278
278
  title="Process × module nesting"
279
279
  description="process frames wrap module frames wrap exports. Leaves parent to module:; module groups parent to process: when every member shares that process."
280
280
  components={nestedComponents}
281
- walkthroughs={nestedEdges.walkthroughs}
281
+ trails={nestedEdges.trails}
282
282
  />
283
283
  </div>
284
284
  ),
@@ -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 { graphSpecFromHops } from './fixtures';
6
+ import { graphSpecFromSteps } from './fixtures';
7
7
 
8
8
  const meta = {
9
9
  title: 'Subsystem/ComponentGraph/Packages',
@@ -80,7 +80,7 @@ const multiRepoComponents: SubsystemComponent[] = [
80
80
  },
81
81
  ];
82
82
 
83
- const multiRepoEdges = graphSpecFromHops([
83
+ const multiRepoEdges = graphSpecFromSteps([
84
84
  ['dispatch', 'session', 'calls'],
85
85
  ['dispatch', 'parse', 'calls'],
86
86
  ['parse', 'normalize', 'calls'],
@@ -90,7 +90,7 @@ export const MultiRepoPackageFrames: Story = {
90
90
  name: 'Multi-repo package frames',
91
91
  args: {
92
92
  components: multiRepoComponents,
93
- walkthroughs: multiRepoEdges.walkthroughs,
93
+ trails: multiRepoEdges.trails,
94
94
  },
95
95
  render: (args) => (
96
96
  <div style={{ width: '100vw', height: '100vh' }}>
@@ -106,7 +106,7 @@ export const SingleRepoNoPackageFrames: Story = {
106
106
  name: 'Single-repo (no package frames)',
107
107
  args: {
108
108
  components: singleRepo,
109
- walkthroughs: multiRepoEdges.walkthroughs,
109
+ trails: multiRepoEdges.trails,
110
110
  },
111
111
  render: (args) => (
112
112
  <div style={{ width: '100vw', height: '100vh' }}>
@@ -218,7 +218,7 @@ const nestedComponents: SubsystemComponent[] = [
218
218
  },
219
219
  ];
220
220
 
221
- const nestedEdges = graphSpecFromHops([
221
+ const nestedEdges = graphSpecFromSteps([
222
222
  ['boot', 'dispatch', 'calls'],
223
223
  ['dispatch', 'session', 'calls'],
224
224
  ['dispatch', 'parse', 'calls'],
@@ -229,7 +229,7 @@ export const PackageProcessModuleNesting: Story = {
229
229
  name: 'Package → process → module nesting',
230
230
  args: {
231
231
  components: nestedComponents,
232
- walkthroughs: nestedEdges.walkthroughs,
232
+ trails: nestedEdges.trails,
233
233
  },
234
234
  render: (args) => (
235
235
  <div style={{ width: '100vw', height: '100vh' }}>
@@ -2,7 +2,7 @@ import '@xyflow/react/dist/style.css';
2
2
  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
- import { components, graphSpecFromHops } from './fixtures';
5
+ import { components, graphSpecFromSteps } from './fixtures';
6
6
 
7
7
  const meta = {
8
8
  title: 'Subsystem/ComponentGraph/Processes',
@@ -54,7 +54,7 @@ const processComponents = [
54
54
  },
55
55
  ];
56
56
 
57
- const processEdges = graphSpecFromHops([
57
+ const processEdges = graphSpecFromSteps([
58
58
  ['main', 'store', 'writes'],
59
59
  ['main', 'bridge', 'calls'],
60
60
  ['bridge', 'view', 'feeds'],
@@ -69,7 +69,7 @@ export const ProcessBoundaries: Story = {
69
69
  title="Process boundaries"
70
70
  description="Host and renderer each render in their own ELK-aware boundary frame. The worker process holds a single node and still gets a frame (singleton frames default on). The telemetry service has no `process` and sits outside every boundary."
71
71
  components={processComponents}
72
- walkthroughs={processEdges.walkthroughs}
72
+ trails={processEdges.trails}
73
73
  />
74
74
  </div>
75
75
  ),
@@ -9,7 +9,7 @@ import type {
9
9
  SubsystemComponent,
10
10
  SubsystemGraphNode,
11
11
  } from '../../../subsystem/model';
12
- import { walkthroughFromHops } from './fixtures';
12
+ import { trailFromSteps } from './fixtures';
13
13
 
14
14
  const meta = {
15
15
  title: 'Subsystem/ComponentGraph/Proposed',
@@ -225,8 +225,8 @@ const migrationComponents: SubsystemComponent[] = [
225
225
  },
226
226
  ];
227
227
 
228
- const migrationWalkthroughs = [
229
- walkthroughFromHops('migration-hops', 'Migration hops', [
228
+ const migrationTrails = [
229
+ trailFromSteps('migration-steps', 'Migration steps', [
230
230
  ['audit', 'maintain', 'calls', 'src/bun/verify-subsystem-component.ts', 1],
231
231
  ['maintain', 'lifecycle', 'uses', 'src/bun/maintain-model.ts', 1],
232
232
  ['lifecycle', 'cli', 'calls', 'src/bun/opencode-v2.ts', 1],
@@ -239,7 +239,7 @@ function MigrationDemo() {
239
239
  <div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
240
240
  <SubsystemComponentGraph
241
241
  components={migrationComponents}
242
- walkthroughs={migrationWalkthroughs}
242
+ trails={migrationTrails}
243
243
  onSelect={(id) => setSelected(id)}
244
244
  />
245
245
  <div style={{ marginTop: 8, padding: '0 12px', fontFamily: 'monospace', fontSize: 12, color: '#aaa' }}>
@@ -3,10 +3,10 @@ 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';
6
+ import type { SubsystemComponent, SubsystemTrail } from '../../../subsystem/model';
7
7
 
8
8
  const meta = {
9
- title: 'Subsystem/ComponentGraph/ProposedWalkthroughs',
9
+ title: 'Subsystem/ComponentGraph/ProposedTrails',
10
10
  component: SubsystemComponentGraph,
11
11
  parameters: {
12
12
  layout: 'fullscreen',
@@ -82,7 +82,7 @@ const components: SubsystemComponent[] = [
82
82
  },
83
83
  ];
84
84
 
85
- const walkthroughs: SubsystemWalkthrough[] = [
85
+ const trails: SubsystemTrail[] = [
86
86
  {
87
87
  id: 'wt-audit',
88
88
  title: 'Audit a model',
@@ -94,7 +94,7 @@ const walkthroughs: SubsystemWalkthrough[] = [
94
94
  file: 'src/bun/verify-subsystem-component.ts',
95
95
  line: 1,
96
96
  symbol: 'auditSubsystemModel',
97
- annotation: 'Live-only walkthrough — no proposed badge.',
97
+ annotation: 'Live-only trail — no proposed badge.',
98
98
  },
99
99
  ],
100
100
  },
@@ -117,7 +117,7 @@ const walkthroughs: SubsystemWalkthrough[] = [
117
117
  file: 'src/bun/maintain-model.ts',
118
118
  line: 1,
119
119
  symbol: 'runMaintainModel',
120
- annotation: 'Hop onto the proposed lifecycle — step index is tinted.',
120
+ annotation: 'Step onto the proposed lifecycle — step index is tinted.',
121
121
  },
122
122
  {
123
123
  from: 'lifecycle',
@@ -146,19 +146,19 @@ const walkthroughs: SubsystemWalkthrough[] = [
146
146
  },
147
147
  ];
148
148
 
149
- function ProposedWalkthroughsDemo() {
149
+ function ProposedTrailsDemo() {
150
150
  return (
151
151
  <div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
152
152
  <SubsystemComponentGraph
153
153
  components={components}
154
- walkthroughs={walkthroughs}
154
+ trails={trails}
155
155
  title="proposed-work marker"
156
- description="Walkthroughs that touch a **proposed** component get their title tinted darkgoldenrod in the flows panel; expand a row and each hop onto a proposed component is tinted too (index and title). Nodes for proposed components already draw dashed darkgoldenrod on the canvas."
156
+ description="Trails that touch a **proposed** component get their title tinted darkgoldenrod in the flows panel; expand a row and each step onto a proposed component is tinted too (index and title). Nodes for proposed components already draw dashed darkgoldenrod on the canvas."
157
157
  />
158
158
  </div>
159
159
  );
160
160
  }
161
161
 
162
162
  export const ProposedWorkflows: Story = {
163
- render: () => <ProposedWalkthroughsDemo />,
163
+ render: () => <ProposedTrailsDemo />,
164
164
  };
@@ -3,8 +3,8 @@ 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 { WalkthroughsPanel } from '../../../subsystem/WalkthroughsPanel';
7
- import type { SubsystemComponent, SubsystemWalkthrough } from '../../../subsystem/model';
6
+ import { TrailsPanel } from '../../../subsystem/TrailsPanel';
7
+ import type { SubsystemComponent, SubsystemTrail } from '../../../subsystem/model';
8
8
 
9
9
  const meta = {
10
10
  title: 'Subsystem/ComponentGraph/Reorder',
@@ -68,7 +68,7 @@ const components: SubsystemComponent[] = [
68
68
  },
69
69
  ];
70
70
 
71
- const initialWalkthroughs: SubsystemWalkthrough[] = [
71
+ const initialTrails: SubsystemTrail[] = [
72
72
  {
73
73
  id: 'tl-open-drawing',
74
74
  title: 'Open drawing',
@@ -103,9 +103,9 @@ const initialWalkthroughs: SubsystemWalkthrough[] = [
103
103
  },
104
104
  ];
105
105
 
106
- const orderLabel = (list: SubsystemWalkthrough[]) => list.map((w) => w.title).join(' → ');
106
+ const orderLabel = (list: SubsystemTrail[]) => list.map((w) => w.title).join(' → ');
107
107
 
108
- function OrderHeader({ list }: { list: SubsystemWalkthrough[] }) {
108
+ function OrderHeader({ list }: { list: SubsystemTrail[] }) {
109
109
  return (
110
110
  <div
111
111
  style={{
@@ -125,22 +125,22 @@ function OrderHeader({ list }: { list: SubsystemWalkthrough[] }) {
125
125
  }
126
126
 
127
127
  function ReorderGraphDemo() {
128
- const [walkthroughs, setWalkthroughs] = useState(initialWalkthroughs);
128
+ const [trails, setTrails] = useState(initialTrails);
129
129
  const onReorder = useCallback(
130
- (next: SubsystemWalkthrough[]) => setWalkthroughs(next),
130
+ (next: SubsystemTrail[]) => setTrails(next),
131
131
  [],
132
132
  );
133
133
 
134
134
  return (
135
135
  <div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
136
- <OrderHeader list={walkthroughs} />
136
+ <OrderHeader list={trails} />
137
137
  <div style={{ flex: 1, minHeight: 0 }}>
138
138
  <SubsystemComponentGraph
139
139
  components={components}
140
- walkthroughs={walkthroughs}
141
- onReorderWalkthroughs={onReorder}
140
+ trails={trails}
141
+ onReorderTrails={onReorder}
142
142
  title="drawing-files flows"
143
- description="Drag the grip at the right of a walkthrough row to reorder it. Grips show only while every row is collapsed — expand one and they hide. The header above mirrors the array order; dropping a row calls `onReorderWalkthroughs` with the next array."
143
+ description="Drag the grip at the right of a trail row to reorder it. Grips show only while every row is collapsed — expand one and they hide. The header above mirrors the array order; dropping a row calls `onReorderTrails` with the next array."
144
144
  />
145
145
  </div>
146
146
  </div>
@@ -148,7 +148,7 @@ function ReorderGraphDemo() {
148
148
  }
149
149
 
150
150
  function PanelOnlyDemo() {
151
- const [walkthroughs, setWalkthroughs] = useState(initialWalkthroughs);
151
+ const [trails, setTrails] = useState(initialTrails);
152
152
  // Start collapsed so the drag grips are visible; expanding any row hides them
153
153
  // (reordering is only offered when every row is collapsed).
154
154
  const [expanded, setExpanded] = useState<Set<string>>(new Set());
@@ -163,7 +163,7 @@ function PanelOnlyDemo() {
163
163
 
164
164
  return (
165
165
  <div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
166
- <OrderHeader list={walkthroughs} />
166
+ <OrderHeader list={trails} />
167
167
  <div style={{ flex: 1, minHeight: 0, display: 'flex' }}>
168
168
  <div
169
169
  style={{
@@ -173,12 +173,12 @@ function PanelOnlyDemo() {
173
173
  borderRight: '1px solid #2a2a2a',
174
174
  }}
175
175
  >
176
- <WalkthroughsPanel
177
- walkthroughs={walkthroughs}
178
- expandedWalkthroughs={expanded}
179
- focusedWalkthroughId={null}
176
+ <TrailsPanel
177
+ trails={trails}
178
+ expandedTrails={expanded}
179
+ focusedTrailId={null}
180
180
  focusedStepIndex={null}
181
- hoveredWalkthroughStep={null}
181
+ hoveredTrailStep={null}
182
182
  onToggleCollapsed={onToggleCollapsed}
183
183
  onFocusFlow={() => {}}
184
184
  onClearFocus={() => {}}
@@ -186,7 +186,7 @@ function PanelOnlyDemo() {
186
186
  onHoverStep={() => {}}
187
187
  onHoverFlow={() => {}}
188
188
  onLeaveStep={() => {}}
189
- onReorder={setWalkthroughs}
189
+ onReorder={setTrails}
190
190
  />
191
191
  </div>
192
192
  </div>
@@ -9,7 +9,7 @@ import type {
9
9
  SubsystemModelDocument,
10
10
  } from '../../../subsystem/model';
11
11
  import type { GraphifyComponentDetail } from '../../../graphify';
12
- import { components, graphSpecFromHops } from './fixtures';
12
+ import { components, graphSpecFromSteps } from './fixtures';
13
13
 
14
14
  const meta = {
15
15
  title: 'Subsystem/ComponentGraph/Scenarios',
@@ -92,7 +92,7 @@ const mermaidComponents: SubsystemComponent[] = [
92
92
  },
93
93
  ];
94
94
 
95
- const mermaidEdges = graphSpecFromHops([
95
+ const mermaidEdges = graphSpecFromSteps([
96
96
  ['input', 'slide', 'feeds'],
97
97
  ['slide', 'chunk', 'produces'],
98
98
  ['chunk', 'lazy', 'feeds'],
@@ -106,7 +106,7 @@ function MermaidDemo() {
106
106
  <div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
107
107
  <SubsystemComponentGraph
108
108
  components={mermaidComponents}
109
- walkthroughs={mermaidEdges.walkthroughs}
109
+ trails={mermaidEdges.trails}
110
110
  onSelect={(id) => setSelected(id)}
111
111
  />
112
112
  <div style={{ marginTop: 8, fontFamily: 'monospace', fontSize: 12, color: '#aaa' }}>
@@ -137,7 +137,7 @@ const multiRepoComponents = components([
137
137
  ['rewire', 'extract.py', 'function', 'graphify/extract.py', graphifyPurl, 'corpus pass folding unique-label stubs onto definitions', '_rewire_unique_stub_nodes'],
138
138
  ]);
139
139
 
140
- const multiRepoEdges = graphSpecFromHops([
140
+ const multiRepoEdges = graphSpecFromSteps([
141
141
  ['detail', 'reftypes', 'uses'],
142
142
  ['resolver', 'reftypes', 'uses'],
143
143
  ['resolver', 'engine', 'calls'],
@@ -151,7 +151,7 @@ function MultiRepoDemo() {
151
151
  title="Type-ref resolution across repos"
152
152
  description="Two repos → two file trees. Each tree is scoped to its repo's files and headed by the owner avatar + repo name. Cross-repo edges land on external stubs."
153
153
  components={multiRepoComponents}
154
- walkthroughs={multiRepoEdges.walkthroughs}
154
+ trails={multiRepoEdges.trails}
155
155
  />
156
156
  </div>
157
157
  );
@@ -354,7 +354,7 @@ const accessSurfaceComponents: SubsystemComponent[] = [
354
354
  },
355
355
  ];
356
356
 
357
- const accessSurfaceEdges = graphSpecFromHops([
357
+ const accessSurfaceEdges = graphSpecFromSteps([
358
358
  ['agents', 'http-entry', 'calls'],
359
359
  ['http-entry', 'create', 'calls'],
360
360
  ['http-entry', 'update', 'calls'],
@@ -384,7 +384,7 @@ function AccessSurfacesDemo() {
384
384
  title="Access surfaces, roles, and process boundaries"
385
385
  description="Two process regions (host, renderer) + boundary entries; agents and the external service float outside every boundary. Hover for the role badge; click the store to drill into its state-only detail."
386
386
  components={accessSurfaceComponents}
387
- walkthroughs={accessSurfaceEdges.walkthroughs}
387
+ trails={accessSurfaceEdges.trails}
388
388
  onSelect={(id) => setSelected(id)}
389
389
  onEdgeSelect={(e) => setSelectedEdge(e)}
390
390
  />
@@ -534,7 +534,7 @@ const storeFlavorComponents: SubsystemComponent[] = [
534
534
  },
535
535
  ];
536
536
 
537
- const storeFlavorEdges = graphSpecFromHops([
537
+ const storeFlavorEdges = graphSpecFromSteps([
538
538
  ['f1-create', 'f1-store', 'writes'],
539
539
  ['f1-get', 'f1-store', 'reads'],
540
540
  ['f2-cache', 'f2-store', 'writes'],
@@ -549,7 +549,7 @@ function StoreFlavorsDemo() {
549
549
  title="Store flavors"
550
550
  description="construct:= the node's verifiable anchor. Class-managed stores are TWO nodes: the manager class (declaration, methods) + the state (store block). Click any node to see its anchor-honest drill-down."
551
551
  components={storeFlavorComponents}
552
- walkthroughs={storeFlavorEdges.walkthroughs}
552
+ trails={storeFlavorEdges.trails}
553
553
  onSelect={(id) => setSelected(id)}
554
554
  />
555
555
  <div style={{ marginTop: 8, fontFamily: 'monospace', fontSize: 12, color: '#aaa' }}>
@@ -637,7 +637,7 @@ const sharedStoreComponents: SubsystemComponent[] = [
637
637
  },
638
638
  ];
639
639
 
640
- const sharedStoreEdges = graphSpecFromHops([
640
+ const sharedStoreEdges = graphSpecFromSteps([
641
641
  ['ss-load', 'ss-store', 'reads'],
642
642
  ['ss-save', 'ss-store', 'writes'],
643
643
  ['ss-watch', 'ss-store', 'watches'],
@@ -652,7 +652,7 @@ function SharedStoreDemo() {
652
652
  title="Shared store across processes"
653
653
  description="A store with no process sits outside every boundary; accessors from both processes reach across to it."
654
654
  components={sharedStoreComponents}
655
- walkthroughs={sharedStoreEdges.walkthroughs}
655
+ trails={sharedStoreEdges.trails}
656
656
  onEdgeSelect={(e) => setSelectedEdge(e)}
657
657
  />
658
658
  <div style={{ marginTop: 8, fontFamily: 'monospace', fontSize: 12, color: '#aaa' }}>
@@ -919,7 +919,7 @@ const storeSpectrumComponents: SubsystemComponent[] = [
919
919
  },
920
920
  ];
921
921
 
922
- const storeSpectrumEdges = graphSpecFromHops([
922
+ const storeSpectrumEdges = graphSpecFromSteps([
923
923
  ['load', 'db', 'reads'],
924
924
  ['create', 'graph-store', 'writes'],
925
925
  ['cache', 'cache-state', 'writes'],
@@ -938,7 +938,7 @@ function StoreStateSpectrumDemo() {
938
938
  title="State → Store spectrum, all modeled as store"
939
939
  description="Every holder here claims construct: 'store' (state-block anatomy). They differ only in what they hold and how long it lives. Which ones do you call a store? Where is the cut?"
940
940
  components={storeSpectrumComponents}
941
- walkthroughs={storeSpectrumEdges.walkthroughs}
941
+ trails={storeSpectrumEdges.trails}
942
942
  onSelect={(id) => setSelected(id)}
943
943
  />
944
944
  <div style={{ marginTop: 8, fontFamily: 'monospace', fontSize: 12, color: '#aaa' }}>
@@ -1114,7 +1114,7 @@ const typeSpectrumComponents: SubsystemComponent[] = [
1114
1114
  },
1115
1115
  ];
1116
1116
 
1117
- const typeSpectrumEdges = graphSpecFromHops([
1117
+ const typeSpectrumEdges = graphSpecFromSteps([
1118
1118
  ['listener', 'subscriber', 'uses'],
1119
1119
  ['subscriber', 'messages', 'uses'],
1120
1120
  ['state', 'listener', 'feeds'],
@@ -1130,7 +1130,7 @@ function TypeFamilySpectrumDemo() {
1130
1130
  title="Type-family — what a type can hold"
1131
1131
  description="Structured buckets: callable signature (generics + params), interface properties, enum members, union, plain alias reference. `rhs` = verbatim escape hatch for shapes that don't fit (mapped/conditional/template-literal). Click each to see the declaration."
1132
1132
  components={typeSpectrumComponents}
1133
- walkthroughs={typeSpectrumEdges.walkthroughs}
1133
+ trails={typeSpectrumEdges.trails}
1134
1134
  onSelect={(id) => setSelected(id)}
1135
1135
  />
1136
1136
  <div style={{ marginTop: 8, fontFamily: 'monospace', fontSize: 12, color: '#aaa' }}>
@@ -1209,7 +1209,7 @@ const queueComponents: SubsystemComponent[] = [
1209
1209
  },
1210
1210
  ];
1211
1211
 
1212
- const queueEdges = graphSpecFromHops([
1212
+ const queueEdges = graphSpecFromSteps([
1213
1213
  ['q-producer', 'q-queue', 'writes'],
1214
1214
  ['q-worker', 'q-queue', 'reads'],
1215
1215
  ['q-worker', 'q-results', 'writes'],
@@ -1223,7 +1223,7 @@ function QueueAsStoreDemo() {
1223
1223
  title="Queue as store"
1224
1224
  description="Ordered retained state. Stores as pipeline stages: producer writes the queue, the worker reads it and writes results."
1225
1225
  components={queueComponents}
1226
- walkthroughs={queueEdges.walkthroughs}
1226
+ trails={queueEdges.trails}
1227
1227
  onEdgeSelect={(e) => setSelectedEdge(e)}
1228
1228
  />
1229
1229
  <div style={{ marginTop: 8, fontFamily: 'monospace', fontSize: 12, color: '#aaa' }}>
@@ -1343,10 +1343,10 @@ const dataVizDoc: SubsystemModelDocument = {
1343
1343
  },
1344
1344
  },
1345
1345
  ],
1346
- walkthroughs: [
1346
+ trails: [
1347
1347
  {
1348
- id: 'data-viz-hops',
1349
- title: 'Runtime hops',
1348
+ id: 'data-viz-steps',
1349
+ title: 'Runtime steps',
1350
1350
  steps: [
1351
1351
  { from: 'agents', to: 'http-entry', mechanism: 'calls', file: 'src/http.ts', line: 1 },
1352
1352
  { from: 'http-entry', to: 'create', mechanism: 'calls', file: 'src/http.ts', line: 2 },
@@ -1430,7 +1430,7 @@ function DataVsVisualizationDemo() {
1430
1430
  title="the visualization"
1431
1431
  description="Same document, rendered: construct:→ node anatomy, role → topology glyph, process → boundary region, mechanism → edge color/style."
1432
1432
  components={doc.components}
1433
- walkthroughs={doc.walkthroughs}
1433
+ trails={doc.trails}
1434
1434
  />
1435
1435
  </div>
1436
1436
  </div>