feat: connect prepared run and refine presenter notes

This commit is contained in:
lda
2026-07-14 08:59:32 +07:00 Verified
parent 5ba9e55f92
commit 184e41858c
26 changed files with 296 additions and 114 deletions
@@ -18,6 +18,7 @@ type PreparedAuthoringLifecycleSceneProps = {
readonly scene: SceneDefinition;
readonly beat: SceneBeatDefinition;
readonly onAdvance?: (() => void) | undefined;
readonly onRunPreparedWorkflow?: (() => Promise<void>) | undefined;
readonly discussionRail?: ReactNode;
};
@@ -40,7 +41,7 @@ const steps = [
* Each beat shows a persistent prepared assistant beside one dominant phase
* projection sourced from the prepared authoring recording.
*/
export const PreparedAuthoringLifecycleScene = ({ scene, beat, onAdvance, discussionRail }: PreparedAuthoringLifecycleSceneProps) => {
export const PreparedAuthoringLifecycleScene = ({ scene, beat, onAdvance, onRunPreparedWorkflow, discussionRail }: PreparedAuthoringLifecycleSceneProps) => {
const [messageState, dispatch] = useReducer(
preparedLifecycleMessageReducer,
initialPreparedLifecycleMessageState,
@@ -81,7 +82,12 @@ export const PreparedAuthoringLifecycleScene = ({ scene, beat, onAdvance, discus
dispatch({ type: "artifact_submitted" });
onAdvance?.();
}
if (step === "deployment") dispatch({ type: "run_requested" });
if (step === "deployment") {
dispatch({ type: "run_requested" });
// This is the same mode-aware action as the footer control; the
// presentation remains on this beat so the presenter advances it.
void onRunPreparedWorkflow?.();
}
}}
/>
<div className="prepared-lifecycle-scene__presentation">