feat: reweight defense story and presenter notes

This commit is contained in:
lda
2026-07-13 07:55:34 +07:00 Verified
parent ab943deed5
commit 18c930449a
15 changed files with 703 additions and 172 deletions
@@ -418,6 +418,7 @@ describe("useDemoTimeline", () => {
expect(result.current.state.phase).toBe("paused");
expect(result.current.state.events[result.current.state.appliedCount - 1]?.stage).toBe("run_resume");
expect(result.current.recordingId).toBe("lda-report-revision-v1");
expect(result.current.output?.approved).toBe(false);
expect(result.current.output?.created_issues).toHaveLength(0);
expect(result.current.trace).toBeNull();
+5 -3
View File
@@ -48,8 +48,10 @@ export type DemoTimelineController = {
readonly primeReplayToStage: (stage: DemoEvent["stage"] | null) => void;
};
const deriveRecordingId = (state: DemoTimelineState): string | null =>
state.mode === "replay" ? "lda-report-success-v1" : null;
const deriveRecordingId = (
mode: DemoMode,
activeRecording: DemoRecording | null,
): string | null => mode === "replay" ? activeRecording?.recordingId ?? null : null;
const deriveMissingMessage = (mode: DemoMode, target: string | null): string | null => {
if (mode !== "live" || target !== null) return null;
@@ -349,7 +351,7 @@ export const useDemoTimeline = (
output,
trace,
missingDeploymentMessage: deriveMissingMessage(state.mode, target),
recordingId: deriveRecordingId(state),
recordingId: deriveRecordingId(state.mode, activeRecording.current),
canStart: state.mode === "replay" || target !== null,
setMode,
start,