fix: clarify live launch from replay view

This commit is contained in:
lda
2026-07-12 11:02:30 +07:00 Verified
parent a8182f3d17
commit ded9c678c5
2 changed files with 8 additions and 2 deletions
@@ -107,6 +107,8 @@ describe("DemoRunLaunchControl", () => {
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" }));
expect(run).toHaveBeenCalledWith("live");
@@ -30,6 +30,10 @@ export const DemoRunLaunchControl = ({
? "Run prepared workflow"
: "Play replay walkthrough";
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 (
<section
@@ -40,8 +44,8 @@ export const DemoRunLaunchControl = ({
>
<div className="demo-run-launch-control__copy" role="status" aria-live="polite">
<span className="demo-run-launch-control__eyebrow">Prepared workflow</span>
<strong>{status.label}</strong>
<p>{status.detail}</p>
<strong>{statusLabel}</strong>
<p>{statusDetail}</p>
</div>
<div className="demo-run-launch-control__actions">
<button