fix: type-check presentation hierarchy projections

This commit is contained in:
lda
2026-07-11 09:32:05 +07:00 Verified
parent a7f9308156
commit 3587bc3fb7
2 changed files with 3 additions and 1 deletions
@@ -241,6 +241,8 @@ const authoringPhaseForBeat = (beatId: string): AuthoringPhaseId => {
const AuthoringScene = ({ scene, beat }: { scene: SceneDefinition; beat: SceneBeatDefinition }) => {
const projection = projectPreparedAuthoringPhase(authoringPhaseForBeat(beat.id));
const primaryCommand = projection.commands[0];
// The prepared recording is the factual source for this public-operation label.
if (!primaryCommand) throw new Error(`Authoring phase ${projection.phase} has no public operation`);
return (
<>
@@ -172,7 +172,7 @@ export const beatVisualContractFor = (
beatId: string,
): SceneBeatVisualContract => {
const key = `${sceneId}/${beatId}`;
const contract = beatContracts[key];
const contract = beatContracts[key as keyof typeof beatContracts];
if (!contract) throw new Error(`No visual contract for ${key}`);
return { sceneId, beatId, ...contract };
};