fix: clarify live launch from replay view
This commit is contained in:
@@ -107,6 +107,8 @@ describe("DemoRunLaunchControl", () => {
|
|||||||
agent: timelineAgent(run),
|
agent: timelineAgent(run),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
expect(screen.getByText("Live target ready")).toBeInTheDocument();
|
||||||
|
expect(screen.getByText("Direct view is replay; launch starts live operations.")).toBeInTheDocument();
|
||||||
await userEvent.click(screen.getByRole("button", { name: "Run prepared workflow" }));
|
await userEvent.click(screen.getByRole("button", { name: "Run prepared workflow" }));
|
||||||
|
|
||||||
expect(run).toHaveBeenCalledWith("live");
|
expect(run).toHaveBeenCalledWith("live");
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ export const DemoRunLaunchControl = ({
|
|||||||
? "Run prepared workflow"
|
? "Run prepared workflow"
|
||||||
: "Play replay walkthrough";
|
: "Play replay walkthrough";
|
||||||
const canLaunch = launchLive ? timelineAgent.canRunLive : timelineAgent.canRun;
|
const canLaunch = launchLive ? timelineAgent.canRunLive : timelineAgent.canRun;
|
||||||
|
const statusLabel = liveTargetReady ? "Live target ready" : status.label;
|
||||||
|
const statusDetail = liveTargetReady && status.kind === "replay"
|
||||||
|
? "Direct view is replay; launch starts live operations."
|
||||||
|
: status.detail;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
@@ -40,8 +44,8 @@ export const DemoRunLaunchControl = ({
|
|||||||
>
|
>
|
||||||
<div className="demo-run-launch-control__copy" role="status" aria-live="polite">
|
<div className="demo-run-launch-control__copy" role="status" aria-live="polite">
|
||||||
<span className="demo-run-launch-control__eyebrow">Prepared workflow</span>
|
<span className="demo-run-launch-control__eyebrow">Prepared workflow</span>
|
||||||
<strong>{status.label}</strong>
|
<strong>{statusLabel}</strong>
|
||||||
<p>{status.detail}</p>
|
<p>{statusDetail}</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="demo-run-launch-control__actions">
|
<div className="demo-run-launch-control__actions">
|
||||||
<button
|
<button
|
||||||
|
|||||||
Reference in New Issue
Block a user