docs: complete presentation demo chrome slice

This commit is contained in:
lda
2026-07-12 16:09:00 +07:00 Verified
parent 7fb48f0f96
commit db6e5c4de6
6 changed files with 121 additions and 16 deletions
+8 -10
View File
@@ -195,12 +195,11 @@ the public JSON-RPC operations and record live evidence using the same
DemoRunFacts projection. Raw protocol payloads are available through the
evidence receipt and inspector.
Scene 10's operation beat exposes the explicit `Run prepared workflow` action
even when a direct link is currently showing replay evidence. With a healthy
target, it starts the live chain through the existing `/api/rpc` proxy. If the
health probe fails, the surface shows the failure reason, offers `Retry live
service`, and keeps `Play replay walkthrough` as an explicit fallback. The
presentation does not silently replace a live failure with recorded evidence.
Scenes 812 share one compact footer demo rail. Scene 8 remains a local scripted conversation, with its chat composer as the main surface, while the rail owns `Run prepared workflow`, replay fallback, retry, running, paused, resuming, and completed labels.
With a healthy target, the rail starts the live chain through the existing
`/api/rpc` proxy; when health fails, it keeps `Play replay walkthrough` as an
explicit fallback. The presentation does not silently replace a live failure
with recorded evidence.
For local live rehearsal, run both services:
@@ -369,14 +368,13 @@ workflow authoring RPC operations.
the next execution slice.` and makes no run or RPC request.
The authoring scenes consume deterministic prepared data and never call
workflow authoring RPCs. Scene 8 also skips live target probing so its request
and Send path remain fully local. Scene 9 ends at the truthful run-request
workflow authoring RPCs. Scene 9 ends at the truthful run-request
handoff; Scenes 1012 own run activation, typed approval, resume, output, and
trace evidence. No Scene 9 message submission starts a workflow run.
### Demo Climax (Scenes 1012)
### Demo Climax (Scenes 812)
Scenes 10 through 12 are the demo climax. They keep a continuity rail visible
Scenes 8 through 12 are the demo climax. They keep a continuity rail visible
while the prepared replay moves from persisted workflow run, to typed human
interrupt, to resume/output/evidence. The rail and outcome panel are
presentation-only projections over the committed replay; they do not add live
@@ -280,6 +280,46 @@ describe("PresentationRoute", () => {
expect(screen.getAllByRole("button", { name: "Run prepared workflow" })).toHaveLength(1);
});
it("backtracks across demo scenes without leaving stale footer chrome", async () => {
window.sessionStorage.setItem("lda.workflowConsole.target", "http://127.0.0.1:8765/rpc");
window.location.hash = "#scene/agent-handoff/request";
const { PresentationRoute } = await import("./PresentationRoute.js");
render(<PresentationRoute />);
expect(await screen.findByRole("textbox", { name: /authoring request/i })).toBeInTheDocument();
expect(screen.getByRole("button", { name: "Run prepared workflow" })).toBeInTheDocument();
window.location.hash = "#scene/run-from-deployment/operation";
fireEvent(window, new Event("hashchange"));
expect(await screen.findByRole("button", { name: "Run prepared workflow" })).toBeInTheDocument();
expect(screen.queryByRole("region", { name: "prepared workflow launch" })).not.toBeInTheDocument();
window.location.hash = "#scene/run-from-deployment/graph";
fireEvent(window, new Event("hashchange"));
expect(await screen.findByRole("heading", { name: /Run From Deployment/i })).toBeInTheDocument();
expect(screen.queryByRole("region", { name: "prepared workflow launch" })).not.toBeInTheDocument();
expect(screen.queryByText("Replay evidence")).not.toBeInTheDocument();
window.location.hash = "#scene/thesis/title";
fireEvent(window, new Event("hashchange"));
expect(await screen.findByRole("heading", { name: /Design and Implementation of lda\.chat/i })).toBeInTheDocument();
expect(screen.queryByLabelText("presentation evidence mode")).not.toBeInTheDocument();
expect(screen.queryByRole("button", { name: "Run prepared workflow" })).not.toBeInTheDocument();
expect(screen.queryByRole("button", { name: "Retry live service" })).not.toBeInTheDocument();
expect(screen.queryByTestId("presentation-demo-rail")).not.toBeInTheDocument();
});
it("removes the paused footer label after approval is submitted", async () => {
setReplayMode();
window.location.hash = "#scene/typed-human-boundary/approval";
const { PresentationRoute } = await import("./PresentationRoute.js");
render(<PresentationRoute />);
expect(await screen.findByText("Run paused - review required")).toBeInTheDocument();
await userEvent.click(screen.getByRole("button", { name: "Submit" }));
expect(screen.queryByText("Run paused - review required")).not.toBeInTheDocument();
});
it("uses stored target for live presentation mode", async () => {
window.sessionStorage.setItem("lda.workflowConsole.target", "http://127.0.0.1:8765/rpc");
window.location.hash = "#scene/run-from-deployment/operation";
@@ -6,6 +6,16 @@ const css = readFileSync(join(import.meta.dirname, "presentation.css"), "utf8").
const demoWorkflowCss = readFileSync(join(import.meta.dirname, "styles", "demo-workflow.css"), "utf8").replace(/\r\n/g, "\n");
describe("presentation.css", () => {
it("keeps the demo footer rail compact and removes the old launch control", () => {
const railBlock = css.match(/\.presentation-demo-rail\s*\{(?<body>[\s\S]*?)\n\}/)?.groups?.body;
expect(railBlock).toContain("min-width: min(22rem, 42vw)");
expect(railBlock).toContain("min-height: 1.9rem");
expect(railBlock).toContain("display: flex");
expect(railBlock).toContain("align-items: center");
expect(demoWorkflowCss).not.toContain(".demo-run-launch-control");
});
it("allows hidden primary-region scrolling for browser zoom overflow", () => {
const primaryBlock = css.match(
/\.presentation-stage__primary\s*\{\n position: relative;(?<body>[\s\S]*?)\n\}/,