refactor: keep Scene 11 outcomes in approval beat

This commit is contained in:
lda
2026-07-12 09:21:37 +07:00 Verified
parent e37336617e
commit 87ab2a5b4a
4 changed files with 53 additions and 2 deletions
@@ -35,7 +35,7 @@ type DemoWorkflowLayout = "operation" | "graph" | "interrupt" | "approval" | "ev
const layoutForBeat = (beatId: string): DemoWorkflowLayout => {
if (beatId === "operation" || beatId === "resume") return "operation";
if (beatId === "interrupt") return "interrupt";
if (beatId === "approval" || beatId === "cancel") return "approval";
if (beatId === "approval") return "approval";
if (beatId === "trace" || beatId === "output") return "evidence";
return "graph";
};
@@ -79,6 +79,9 @@ describe("GuidedProductMoment", () => {
expect(screen.getByText("project-brief.md")).toBeInTheDocument();
expect(screen.getByText("issue-board.json")).toBeInTheDocument();
expect(screen.getByRole("group", { name: /operator resume decision/i })).toBeInTheDocument();
expect(screen.getByRole("button", { name: "Submit" })).toBeEnabled();
expect(screen.getByRole("button", { name: "Request revision" })).toBeEnabled();
expect(screen.getByText(/submitted\s*\/\s*cancelled/i)).toBeInTheDocument();
expect(screen.queryByText("Output not created yet")).not.toBeInTheDocument();
});
@@ -70,7 +70,7 @@ export const InterruptDecisionForm = ({
<dt>Typed</dt>
<dd>{interrupt.typed ? "yes" : "no"}</dd>
<dt>Outcomes</dt>
<dd>{interrupt.outcomes.join(", ")}</dd>
<dd>{interrupt.outcomes.join(" / ")}</dd>
</dl>
{showReportPreview && interrupt.reportMarkdownPreview && (