@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
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * SubsystemModelTransition — a sibling of `SubsystemComponentGraph` that
3
3
  * presents ONE subsystem as a sequence of steps (e.g. constructs → static
4
- * topology → dynamic topology → walkthrough) and animates between them.
4
+ * topology → dynamic topology → trail) and animates between them.
5
5
  *
6
6
  * Same look as the component graph: it reuses the same node / frame / edge
7
7
  * components and the edge-label chrome, so only the motion is new. Each step is
@@ -31,11 +31,11 @@ import {
31
31
  buildSubsystemGraph,
32
32
  edgeColor,
33
33
  MECHANISM_DESCRIPTIONS,
34
- walkthroughStepGraphEdgeId,
34
+ trailStepGraphEdgeId,
35
35
  type SubsystemEdgeProvenance,
36
36
  type SubsystemGraphNode,
37
37
  type SubsystemModelDocument,
38
- type SubsystemWalkthrough,
38
+ type SubsystemTrail,
39
39
  } from './model';
40
40
  import {
41
41
  hexWithAlpha,
@@ -63,12 +63,12 @@ export interface SubsystemTransitionStep {
63
63
  /** Explicit boundary frame colors (region key → hex); host override. */
64
64
  boundaryColors?: Record<string, string>;
65
65
  /**
66
- * Cycle this step's walkthrough hops: focus each step (dim non-participants,
67
- * number the labels, frame the step). Typically only the walkthrough layer.
66
+ * Cycle this step's trail steps: focus each step (dim non-participants,
67
+ * number the labels, frame the step). Typically only the trail layer.
68
68
  */
69
- autoPlayWalkthroughs?: boolean;
70
- /** Show the focused walkthrough's title chip (with step ticks). */
71
- showWalkthroughTitle?: boolean;
69
+ autoPlayTrails?: boolean;
70
+ /** Show the focused trail's title chip (with step ticks). */
71
+ showTrailTitle?: boolean;
72
72
  }
73
73
 
74
74
  export interface SubsystemModelTransitionProps {
@@ -81,10 +81,10 @@ export interface SubsystemModelTransitionProps {
81
81
  fitPadding?: number;
82
82
  /** Called when a node is clicked. */
83
83
  onSelect?: (componentAlias: string) => void;
84
- /** How an autoplayed walkthrough step reads. @default 'focus' */
85
- walkthroughStepMode?: 'focus' | 'dim';
86
- /** Dwell per walkthrough step while autoplaying, ms. @default 4000 */
87
- walkthroughAutoPlayIntervalMs?: number;
84
+ /** How an autoplayed trail step reads. @default 'focus' */
85
+ trailStepMode?: 'focus' | 'dim';
86
+ /** Dwell per trail step while autoplaying, ms. @default 4000 */
87
+ trailAutoPlayIntervalMs?: number;
88
88
  className?: string;
89
89
  style?: CSSProperties;
90
90
  }
@@ -238,8 +238,8 @@ function TransitionInner({
238
238
  durationMs = 950,
239
239
  fitPadding = 0.18,
240
240
  onSelect,
241
- walkthroughStepMode = 'focus',
242
- walkthroughAutoPlayIntervalMs = 4000,
241
+ trailStepMode = 'focus',
242
+ trailAutoPlayIntervalMs = 4000,
243
243
  className,
244
244
  style,
245
245
  }: SubsystemModelTransitionProps) {
@@ -361,69 +361,69 @@ function TransitionInner({
361
361
 
362
362
  const activeLayout = layouts?.[activeIndex];
363
363
 
364
- // Walkthrough step focus: cycle the active step's hops, dim non-participants,
364
+ // Trail step focus: cycle the active step's steps, dim non-participants,
365
365
  // number the labels, and (in `focus` mode) frame the step.
366
366
  const activeStepDef = steps[activeIndex];
367
- const activeWalkthroughs = activeStepDef?.model.walkthroughs;
367
+ const activeTrails = activeStepDef?.model.trails;
368
368
  const autoPlaySteps =
369
- activeStepDef?.autoPlayWalkthroughs === true && (activeWalkthroughs?.length ?? 0) > 0;
370
- const hopList = useMemo(() => {
369
+ activeStepDef?.autoPlayTrails === true && (activeTrails?.length ?? 0) > 0;
370
+ const stepList = useMemo(() => {
371
371
  const out: Array<{
372
372
  edgeId: string;
373
373
  from: string;
374
374
  to: string;
375
375
  stepNo: number;
376
376
  total: number;
377
- walkthroughId: string;
378
- walkthroughTitle: string;
377
+ trailId: string;
378
+ trailTitle: string;
379
379
  }> = [];
380
- for (const wt of (activeWalkthroughs ?? []) as SubsystemWalkthrough[]) {
380
+ for (const wt of (activeTrails ?? []) as SubsystemTrail[]) {
381
381
  wt.steps.forEach((s, i) => {
382
382
  out.push({
383
- edgeId: walkthroughStepGraphEdgeId(s),
383
+ edgeId: trailStepGraphEdgeId(s),
384
384
  from: s.from,
385
385
  to: s.to,
386
386
  stepNo: i + 1,
387
387
  total: wt.steps.length,
388
- walkthroughId: wt.id,
389
- walkthroughTitle: wt.title,
388
+ trailId: wt.id,
389
+ trailTitle: wt.title,
390
390
  });
391
391
  });
392
392
  }
393
393
  return out;
394
- }, [activeWalkthroughs]);
394
+ }, [activeTrails]);
395
395
  const [stepPointer, setStepPointer] = useState(0);
396
396
  useEffect(() => {
397
397
  setStepPointer(0);
398
- }, [activeIndex, hopList.length]);
398
+ }, [activeIndex, stepList.length]);
399
399
  useEffect(() => {
400
- if (!autoPlaySteps || hopList.length === 0) return;
401
- // Pointer 0 = whole flow (no step focus); 1..N = each hop, then wraps.
400
+ if (!autoPlaySteps || stepList.length === 0) return;
401
+ // Pointer 0 = whole flow (no step focus); 1..N = each step, then wraps.
402
402
  const t = window.setInterval(
403
- () => setStepPointer((p) => (p + 1) % (hopList.length + 1)),
404
- Math.max(600, walkthroughAutoPlayIntervalMs),
403
+ () => setStepPointer((p) => (p + 1) % (stepList.length + 1)),
404
+ Math.max(600, trailAutoPlayIntervalMs),
405
405
  );
406
406
  return () => window.clearInterval(t);
407
- }, [autoPlaySteps, hopList.length, walkthroughAutoPlayIntervalMs]);
408
- const focusedHop =
409
- autoPlaySteps && hopList.length > 0 && stepPointer > 0
410
- ? hopList[(stepPointer - 1) % hopList.length]
407
+ }, [autoPlaySteps, stepList.length, trailAutoPlayIntervalMs]);
408
+ const focusedStep =
409
+ autoPlaySteps && stepList.length > 0 && stepPointer > 0
410
+ ? stepList[(stepPointer - 1) % stepList.length]
411
411
  : undefined;
412
412
  const stepNoByEdge = useMemo(() => {
413
- // Unique step numbers per edge — a hop reused across walkthroughs (e.g. a
413
+ // Unique step numbers per edge — a step reused across trails (e.g. a
414
414
  // shared `capture-event` call) would otherwise stack `4: 4: 4:`.
415
415
  const m = new Map<string, number[]>();
416
- for (const h of hopList) {
416
+ for (const h of stepList) {
417
417
  const arr = m.get(h.edgeId) ?? [];
418
418
  if (!arr.includes(h.stepNo)) arr.push(h.stepNo);
419
419
  m.set(h.edgeId, arr);
420
420
  }
421
421
  for (const arr of m.values()) arr.sort((a, b) => a - b);
422
422
  return m;
423
- }, [hopList]);
423
+ }, [stepList]);
424
424
  const focusParticipants = useMemo(
425
- () => (focusedHop ? new Set([focusedHop.from, focusedHop.to]) : null),
426
- [focusedHop],
425
+ () => (focusedStep ? new Set([focusedStep.from, focusedStep.to]) : null),
426
+ [focusedStep],
427
427
  );
428
428
 
429
429
  const nodes: Node[] = useMemo(() => {
@@ -459,34 +459,34 @@ function TransitionInner({
459
459
  return out;
460
460
  }, [display, activeLayout, unionMeta, focusParticipants]);
461
461
 
462
- // Real graph edges once settled; step focus adds hop numbers and dims the
463
- // non-focused hops.
462
+ // Real graph edges once settled; step focus adds step numbers and dims the
463
+ // non-focused steps.
464
464
  const edges: Edge[] = useMemo(() => {
465
465
  if (!settled) return [];
466
466
  const list = activeLayout?.edges ?? [];
467
- const numbering = autoPlaySteps && hopList.length > 0;
468
- if (!numbering && !focusedHop) return list;
467
+ const numbering = autoPlaySteps && stepList.length > 0;
468
+ if (!numbering && !focusedStep) return list;
469
469
  return list.map((e) => {
470
- // Number every hop while autoplaying (whole view included); dim only the
471
- // hops other than the focused one.
470
+ // Number every step while autoplaying (whole view included); dim only the
471
+ // steps other than the focused one.
472
472
  const stepNos = numbering ? stepNoByEdge.get(e.id) : undefined;
473
- const dimmed = focusedHop ? e.id !== focusedHop.edgeId : false;
473
+ const dimmed = focusedStep ? e.id !== focusedStep.edgeId : false;
474
474
  if (!stepNos && !dimmed) return e;
475
475
  return {
476
476
  ...e,
477
477
  data: { ...(e.data as object), stepNos, dimmed },
478
478
  } as Edge;
479
479
  });
480
- }, [settled, activeLayout, focusedHop, stepNoByEdge, autoPlaySteps, hopList.length]);
480
+ }, [settled, activeLayout, focusedStep, stepNoByEdge, autoPlaySteps, stepList.length]);
481
481
 
482
- // Camera: frame a focused hop's endpoints, or the whole graph during the
482
+ // Camera: frame a focused step's endpoints, or the whole graph during the
483
483
  // "whole flow" phase.
484
484
  useEffect(() => {
485
- if (walkthroughStepMode !== 'focus' || !settled || !sized || !rfSized || !autoPlaySteps)
485
+ if (trailStepMode !== 'focus' || !settled || !sized || !rfSized || !autoPlaySteps)
486
486
  return;
487
487
  if (!activeLayout) return;
488
- const rects = focusedHop
489
- ? [focusedHop.from, focusedHop.to]
488
+ const rects = focusedStep
489
+ ? [focusedStep.from, focusedStep.to]
490
490
  .map((id) => activeLayout.rects.get(id))
491
491
  .filter((r): r is Rect => !!r)
492
492
  : [...activeLayout.rects.values()];
@@ -497,11 +497,11 @@ function TransitionInner({
497
497
  const maxY = Math.max(...rects.map((r) => r.y + r.h));
498
498
  fitBounds(
499
499
  { x: minX, y: minY, width: maxX - minX, height: maxY - minY },
500
- { padding: focusedHop ? 0.3 : fitPadding, duration: durationMs },
500
+ { padding: focusedStep ? 0.3 : fitPadding, duration: durationMs },
501
501
  );
502
502
  }, [
503
- walkthroughStepMode,
504
- focusedHop,
503
+ trailStepMode,
504
+ focusedStep,
505
505
  settled,
506
506
  sized,
507
507
  rfSized,
@@ -546,9 +546,9 @@ function TransitionInner({
546
546
  </ReactFlow>
547
547
  </SubsystemCallbacksProvider>
548
548
  )}
549
- {activeStepDef?.showWalkthroughTitle && focusedHop && (
549
+ {activeStepDef?.showTrailTitle && focusedStep && (
550
550
  <div
551
- aria-label={`${focusedHop.walkthroughTitle}, step ${focusedHop.stepNo} of ${focusedHop.total}`}
551
+ aria-label={`${focusedStep.trailTitle}, step ${focusedStep.stepNo} of ${focusedStep.total}`}
552
552
  style={{
553
553
  position: 'absolute',
554
554
  top: 12,
@@ -581,14 +581,14 @@ function TransitionInner({
581
581
  textAlign: 'center',
582
582
  }}
583
583
  >
584
- {focusedHop.walkthroughTitle}
584
+ {focusedStep.trailTitle}
585
585
  </div>
586
- {focusedHop.total > 0 && (
586
+ {focusedStep.total > 0 && (
587
587
  <div style={{ display: 'flex', gap: 3, padding: '0 6px 5px' }} aria-hidden="true">
588
- {Array.from({ length: focusedHop.total }, (_, i) => {
588
+ {Array.from({ length: focusedStep.total }, (_, i) => {
589
589
  const n = i + 1;
590
- const active = n === focusedHop.stepNo;
591
- const done = n < focusedHop.stepNo;
590
+ const active = n === focusedStep.stepNo;
591
+ const done = n < focusedStep.stepNo;
592
592
  return (
593
593
  <span
594
594
  key={n}
@@ -4,11 +4,11 @@ import { cleanup, fireEvent, render, waitFor } from '@testing-library/react/pure
4
4
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
5
5
  import {
6
6
  STEP_COPY_FEEDBACK_MS,
7
- WalkthroughsPanel,
8
- type WalkthroughsPanelProps,
9
- } from './WalkthroughsPanel';
10
- import type { SubsystemWalkthrough } from './model';
11
- import { buildStepBrief } from './walkthroughBrief';
7
+ TrailsPanel,
8
+ type TrailsPanelProps,
9
+ } from './TrailsPanel';
10
+ import type { SubsystemTrail } from './model';
11
+ import { buildStepBrief } from './trailBrief';
12
12
 
13
13
  // Bun's happy-dom test environment needs `@happy-dom/global-registrator`, which
14
14
  // isn't installed here, so wire the DOM primitives React DOM + Testing Library
@@ -33,7 +33,7 @@ globals.sessionStorage = dom.sessionStorage;
33
33
  globals.matchMedia = dom.matchMedia.bind(dom);
34
34
 
35
35
 
36
- const walkthroughs: SubsystemWalkthrough[] = [
36
+ const trails: SubsystemTrail[] = [
37
37
  {
38
38
  id: 'auth-flow',
39
39
  title: 'Auth flow',
@@ -63,13 +63,13 @@ beforeEach(() => {
63
63
 
64
64
  afterEach(cleanup);
65
65
 
66
- function renderPanel(overrides: Partial<WalkthroughsPanelProps> = {}) {
67
- const props: WalkthroughsPanelProps = {
68
- walkthroughs,
69
- expandedWalkthroughs: new Set(['auth-flow']),
70
- focusedWalkthroughId: null,
66
+ function renderPanel(overrides: Partial<TrailsPanelProps> = {}) {
67
+ const props: TrailsPanelProps = {
68
+ trails,
69
+ expandedTrails: new Set(['auth-flow']),
70
+ focusedTrailId: null,
71
71
  focusedStepIndex: null,
72
- hoveredWalkthroughStep: null,
72
+ hoveredTrailStep: null,
73
73
  onToggleCollapsed: () => {},
74
74
  onFocusFlow: () => {},
75
75
  onClearFocus: () => {},
@@ -81,14 +81,14 @@ function renderPanel(overrides: Partial<WalkthroughsPanelProps> = {}) {
81
81
  };
82
82
  return render(
83
83
  <ThemeProvider theme={defaultEditorTheme}>
84
- <WalkthroughsPanel {...props} />
84
+ <TrailsPanel {...props} />
85
85
  </ThemeProvider>,
86
86
  );
87
87
  }
88
88
 
89
89
  const COPY_LABEL = 'Copy step 1 of Auth flow for an agent';
90
90
 
91
- describe('WalkthroughsPanel step copy', () => {
91
+ describe('TrailsPanel step copy', () => {
92
92
  test('copy icon is hidden until the step row is hovered', () => {
93
93
  const { getByText, queryByLabelText } = renderPanel();
94
94
  expect(queryByLabelText(COPY_LABEL)).toBeNull();
@@ -111,7 +111,7 @@ describe('WalkthroughsPanel step copy', () => {
111
111
  fireEvent.mouseDown(copy);
112
112
  fireEvent.click(copy);
113
113
  await waitFor(() => expect(writeText).toHaveBeenCalledTimes(1));
114
- expect(writeText).toHaveBeenCalledWith(buildStepBrief(walkthroughs[0]!, 0));
114
+ expect(writeText).toHaveBeenCalledWith(buildStepBrief(trails[0]!, 0));
115
115
  expect(copy.getAttribute('title')).toBe('Copied');
116
116
  });
117
117
 
@@ -121,7 +121,7 @@ describe('WalkthroughsPanel step copy', () => {
121
121
  const row = getByText('Login.submit').closest('button')!;
122
122
  fireEvent.mouseEnter(row);
123
123
  fireEvent.click(row);
124
- expect(onFocusStep).toHaveBeenCalledWith(walkthroughs[0]!, 0);
124
+ expect(onFocusStep).toHaveBeenCalledWith(trails[0]!, 0);
125
125
  });
126
126
 
127
127
  test('the copied checkmark clears after the feedback window', async () => {