@principal-ai/subsystems-react 0.28.6 → 0.28.7

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.
@@ -55,7 +55,11 @@ import { ConstructsCatalog } from './ConstructsCatalog';
55
55
  import type { SubsystemOpenFileOptions } from './declarationRef';
56
56
  import { SubsystemComponentNode, SubsystemGroupNode, SubsystemEdge, SUBSYSTEM_CALLBACKS, hexWithAlpha, EDGE_DIM_ALPHA, fileMatchForNode, flowElementVisibility } from './nodes';
57
57
  import { SubsystemDiagnosticToggle, type SubsystemDiagnostic } from './DiagnosticToggle';
58
- import { SubsystemIssueList, type SubsystemIssue } from './IssueList';
58
+ import {
59
+ SubsystemIssueList,
60
+ type SubsystemIssue,
61
+ type SubsystemIssueCategory,
62
+ } from './IssueList';
59
63
  import { SubsystemFileTree } from './SubsystemFileTree';
60
64
  import { GraphLayoutCover } from './GraphLayoutCover';
61
65
  import { GRAPH_NAV_PROPS, GraphChrome } from './graphChrome';
@@ -246,6 +250,12 @@ export interface SubsystemComponentGraphProps {
246
250
  * diagnostics on iff `issues` is non-empty, and the title-row chip toggles it.
247
251
  */
248
252
  showIssues?: boolean;
253
+ /**
254
+ * When the issues list is active, land it focused on this verification
255
+ * layer: that category expands, the rest start collapsed. Optional — the
256
+ * plain issues view expands everything.
257
+ */
258
+ focusIssueCategory?: SubsystemIssueCategory;
249
259
  /** Click an issue — focus its target on the graph / open detail. */
250
260
  onSelectIssue?: (issue: SubsystemIssue) => void;
251
261
  /** Apply an issue's deterministic fix. */
@@ -375,7 +385,7 @@ interface InnerProps extends SubsystemComponentGraphProps {
375
385
  measured: { w: number; h: number } | null;
376
386
  }
377
387
 
378
- function Inner({ components, relations, walkthroughs, initialWalkthroughId, onReorderWalkthroughs, onSelect, onEdgeSelect, measured: _measured, maxNodeWidth, showEdgeLabels, edgeView, title, hideSidebar, walkthroughStepMode = 'focus', autoPlayWalkthroughs = false, walkthroughAutoPlayIntervalMs = WALKTHROUGH_PLAY_PAUSE_MS, zoomOnWalkthroughFocus = true, graphTitle, showWalkthroughTitle = false, description, canvasOverlay, sidebarExtra, sidebarAfterDescription, diagnostic, issues, showIssues, onSelectIssue, onApplyIssueFix, onHoverIssue, renderFileView, renderFileViewer, renderWalkthroughViewer, onFileSelect, onVerifyComponent, componentVerification, persistKey }: InnerProps) {
388
+ function Inner({ components, relations, walkthroughs, initialWalkthroughId, onReorderWalkthroughs, onSelect, onEdgeSelect, measured: _measured, maxNodeWidth, showEdgeLabels, edgeView, title, hideSidebar, walkthroughStepMode = 'focus', autoPlayWalkthroughs = false, walkthroughAutoPlayIntervalMs = WALKTHROUGH_PLAY_PAUSE_MS, zoomOnWalkthroughFocus = true, graphTitle, showWalkthroughTitle = false, description, canvasOverlay, sidebarExtra, sidebarAfterDescription, diagnostic, issues, showIssues, focusIssueCategory, onSelectIssue, onApplyIssueFix, onHoverIssue, renderFileView, renderFileViewer, renderWalkthroughViewer, onFileSelect, onVerifyComponent, componentVerification, persistKey }: InnerProps) {
379
389
  const { theme } = useTheme();
380
390
  const { fitView } = useReactFlow();
381
391
  const viewport = useViewport();
@@ -1738,6 +1748,7 @@ function Inner({ components, relations, walkthroughs, initialWalkthroughId, onRe
1738
1748
  {issuesActive ? (
1739
1749
  <SubsystemIssueList
1740
1750
  issues={issues ?? []}
1751
+ focusCategory={focusIssueCategory}
1741
1752
  onSelectIssue={onSelectIssue}
1742
1753
  onApplyFix={onApplyIssueFix}
1743
1754
  onHoverIssue={onHoverIssue}