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", () => {
|
||||
render(
|
||||
<GuidedProductMoment
|
||||
beat={findBeat("interrupt-evidence", "approval")!}
|
||||
beat={findBeat("typed-human-boundary", "approval")!}
|
||||
demo={demo}
|
||||
contract={contract}
|
||||
operation={null}
|
||||
@@ -74,7 +74,7 @@ describe("GuidedProductMoment", () => {
|
||||
it("makes resume operation proof primary on resume beat", () => {
|
||||
render(
|
||||
<GuidedProductMoment
|
||||
beat={findBeat("interrupt-evidence", "resume")!}
|
||||
beat={findBeat("resume-output-evidence", "resume")!}
|
||||
demo={demo}
|
||||
contract={contract}
|
||||
operation={resumeOperation}
|
||||
@@ -86,10 +86,34 @@ describe("GuidedProductMoment", () => {
|
||||
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", () => {
|
||||
render(
|
||||
<GuidedProductMoment
|
||||
beat={findBeat("interrupt-evidence", "approval")!}
|
||||
beat={findBeat("typed-human-boundary", "approval")!}
|
||||
demo={demo}
|
||||
contract={contract}
|
||||
operation={null}
|
||||
|
||||
@@ -68,6 +68,7 @@ describe("RunOutputFacts", () => {
|
||||
expect(screen.getByText("ISSUE-001")).toBeDefined();
|
||||
expect(screen.getByText("local://issue-board/ISSUE-001")).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>
|
||||
<dt>Markdown preview</dt>
|
||||
<dd>
|
||||
<pre className="run-facts-markdown-preview">{facts.output.markdownPreview}</pre>
|
||||
<div className="run-facts-markdown-region" role="region" aria-label="workflow markdown output">
|
||||
<pre className="run-facts-markdown-preview">{facts.output.markdownPreview}</pre>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
)}
|
||||
|
||||
@@ -1916,6 +1916,16 @@
|
||||
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) {
|
||||
.guided-product-moment__approval-grid,
|
||||
.guided-product-moment__resume-grid {
|
||||
|
||||
Reference in New Issue
Block a user