feat: add presentation graph spotlight

This commit is contained in:
lda
2026-07-03 05:27:27 +07:00 Verified
parent 7ab3cb0bf8
commit 045f25ae72
7 changed files with 155 additions and 1 deletions
@@ -0,0 +1,30 @@
import { presentationNodes } from "./WorkflowGraphStage.js";
type NodeSpotlightProps = {
readonly nodeId: string;
readonly close: () => void;
};
const nodeDescription = (nodeId: string): string => {
if (nodeId === "review_issues") {
return "NodeUse of a typed interrupt boundary. It exposes request and resume schemas and waits for a submitted or cancelled outcome.";
}
if (nodeId === "create_issues") {
return "NodeUse that writes selected review items into the local issue-board source.";
}
return "NodeUse in the prepared report workflow. The presentation graph is curated, but every node maps back to real workflow/run evidence.";
};
export const NodeSpotlight = ({ nodeId, close }: NodeSpotlightProps) => {
const node = presentationNodes.find((candidate) => candidate.id === nodeId);
if (!node) return null;
return (
<aside className="node-spotlight" role="dialog" aria-label={node.label}>
<button type="button" onClick={close}>Close</button>
<p>NodeUse</p>
<h2>{node.label}</h2>
<p>{nodeDescription(node.id)}</p>
</aside>
);
};