Adopt the shared interface pattern language

This commit is contained in:
2026-08-04 08:21:50 +02:00
parent 06f93f4f7a
commit 629f76440b
7 changed files with 102 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
import assert from "node:assert/strict";
import fs from "node:fs";
const page = fs.readFileSync("src/features/workflow/WorkflowPage.tsx", "utf8");
const runs = fs.readFileSync("src/features/workflow/WorkflowRunsDialog.tsx", "utf8");
const inspector = fs.readFileSync("src/features/workflow/WorkflowInspector.tsx", "utf8");
const styles = fs.readFileSync("src/styles/workflow.css", "utf8");
assert.ok(page.includes("DocumentationHelpLink"), "Workflow exposes configured-system help");
assert.ok(page.includes("useUnsavedDraftGuard"), "Workflow protects dirty graph revisions during navigation");
assert.ok(page.includes("<ConfirmDialog"), "Destructive and corrective definition actions use shared confirmation");
assert.ok(page.includes("<Dialog"), "Definition settings and derivation use shared focus-contained dialogs");
assert.ok(page.includes("onClick={() => addNodeFromPalette(nodeType.type)}"), "Palette nodes have a keyboard/pointer alternative to drag and drop");
assert.ok(inspector.includes("onEdgeChange"), "Edges can be edited without reconnect dragging");
assert.ok(runs.includes("StatusBadge"), "Run and handoff states are not conveyed by color alone");
assert.ok(runs.includes("DismissibleAlert"), "Run failures use the shared alert contract");
assert.ok(!page.includes("window.alert("), "Workflow must not use browser alerts");
assert.ok(styles.includes("@media (max-width: 680px)"), "Workflow retains a narrow-viewport layout");
assert.ok(styles.includes("@media (prefers-reduced-motion: reduce)"), "Workflow honors reduced motion");
console.log("Workflow interface pattern contract passed.");