fix: clarify demo factual panels with scroll containment and approval-only output
This commit is contained in:
@@ -47,7 +47,7 @@ describe("GuidedProductMoment", () => {
|
|||||||
it("makes approval the primary product decision with factual panels", () => {
|
it("makes approval the primary product decision with factual panels", () => {
|
||||||
render(
|
render(
|
||||||
<GuidedProductMoment
|
<GuidedProductMoment
|
||||||
beat={findBeat("interrupt-evidence", "approval")!}
|
beat={findBeat("typed-human-boundary", "approval")!}
|
||||||
demo={demo}
|
demo={demo}
|
||||||
contract={contract}
|
contract={contract}
|
||||||
operation={null}
|
operation={null}
|
||||||
@@ -74,7 +74,7 @@ describe("GuidedProductMoment", () => {
|
|||||||
it("makes resume operation proof primary on resume beat", () => {
|
it("makes resume operation proof primary on resume beat", () => {
|
||||||
render(
|
render(
|
||||||
<GuidedProductMoment
|
<GuidedProductMoment
|
||||||
beat={findBeat("interrupt-evidence", "resume")!}
|
beat={findBeat("resume-output-evidence", "resume")!}
|
||||||
demo={demo}
|
demo={demo}
|
||||||
contract={contract}
|
contract={contract}
|
||||||
operation={resumeOperation}
|
operation={resumeOperation}
|
||||||
@@ -86,10 +86,34 @@ describe("GuidedProductMoment", () => {
|
|||||||
expect(screen.getByLabelText("workflow.runs.resume operation")).toBeInTheDocument();
|
expect(screen.getByLabelText("workflow.runs.resume operation")).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("keeps approval focused on input and decision without pre-resume output", () => {
|
||||||
|
render(
|
||||||
|
<GuidedProductMoment
|
||||||
|
beat={findBeat("typed-human-boundary", "approval")!}
|
||||||
|
demo={demo}
|
||||||
|
contract={contract}
|
||||||
|
operation={null}
|
||||||
|
approvalActions={{
|
||||||
|
state: "ready",
|
||||||
|
canSubmit: true,
|
||||||
|
canCancel: true,
|
||||||
|
submit: vi.fn(async () => {}),
|
||||||
|
cancel: vi.fn(async () => {}),
|
||||||
|
}}
|
||||||
|
openEvidence={vi.fn()}
|
||||||
|
/>,
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(screen.getByText("Workflow input")).toBeInTheDocument();
|
||||||
|
expect(screen.getByRole("group", { name: /operator resume decision/i })).toBeInTheDocument();
|
||||||
|
expect(screen.queryByText("Output not created yet")).not.toBeInTheDocument();
|
||||||
|
expect(screen.getByText(/lda.chat Thesis And Project Readiness Report/i)).toBeInTheDocument();
|
||||||
|
});
|
||||||
|
|
||||||
it("marks the primary surface for visual hierarchy", () => {
|
it("marks the primary surface for visual hierarchy", () => {
|
||||||
render(
|
render(
|
||||||
<GuidedProductMoment
|
<GuidedProductMoment
|
||||||
beat={findBeat("interrupt-evidence", "approval")!}
|
beat={findBeat("typed-human-boundary", "approval")!}
|
||||||
demo={demo}
|
demo={demo}
|
||||||
contract={contract}
|
contract={contract}
|
||||||
operation={null}
|
operation={null}
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ describe("RunOutputFacts", () => {
|
|||||||
expect(screen.getByText("ISSUE-001")).toBeDefined();
|
expect(screen.getByText("ISSUE-001")).toBeDefined();
|
||||||
expect(screen.getByText("local://issue-board/ISSUE-001")).toBeDefined();
|
expect(screen.getByText("local://issue-board/ISSUE-001")).toBeDefined();
|
||||||
expect(screen.getByText("Create the selected issue.")).toBeDefined();
|
expect(screen.getByText("Create the selected issue.")).toBeDefined();
|
||||||
|
expect(screen.getByRole("region", { name: /workflow markdown output/i })).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,9 @@ export const RunOutputFacts = ({ facts }: RunOutputFactsProps) => (
|
|||||||
<dd>{facts.output.output.comment ?? "none"}</dd>
|
<dd>{facts.output.output.comment ?? "none"}</dd>
|
||||||
<dt>Markdown preview</dt>
|
<dt>Markdown preview</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
<div className="run-facts-markdown-region" role="region" aria-label="workflow markdown output">
|
||||||
<pre className="run-facts-markdown-preview">{facts.output.markdownPreview}</pre>
|
<pre className="run-facts-markdown-preview">{facts.output.markdownPreview}</pre>
|
||||||
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1916,6 +1916,16 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.run-facts-markdown-region {
|
||||||
|
min-height: 0;
|
||||||
|
overflow: auto;
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.run-facts-markdown-region::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 900px) {
|
@media (max-width: 900px) {
|
||||||
.guided-product-moment__approval-grid,
|
.guided-product-moment__approval-grid,
|
||||||
.guided-product-moment__resume-grid {
|
.guided-product-moment__resume-grid {
|
||||||
|
|||||||
Reference in New Issue
Block a user