Movie Editor: timeline clip shows what it was generated with, not live plan text

Completes untying plan edits from the rendered result on the timeline. The clip
is the RESULT, so it now labels itself from the frozen render prompt
(renderPromptForScene) instead of the live scene text — editing a scene's prompt
in the plan no longer mutates the already-generated clip's identity here (it just
shows 'edited' until you regenerate). Falls back to live plan text only when the
scene isn't generated yet. Video clips unchanged.

With the earlier immutable-length fix, a plan edit (prompt/length) now leaves an
existing generated video's content, duration, AND label on the timeline alone;
only regeneration updates it. Editorial props (effects/trim/audio) stay live.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
digital-garbage
2026-06-19 09:53:41 +03:00
co-authored by Claude Opus 4.8
parent af07b7bb25
commit 4f562cf0ff
+5 -1
View File
@@ -640,9 +640,13 @@
const root = unitCuts > 1
? (p.scenes || []).find((s) => (s.gen_unit_id || s.id) === (scene.gen_unit_id || scene.id) && !(s.cut_offset_frames > 0))
: null;
// The timeline clip is the RESULT: show what it was actually generated with (the frozen
// render prompt), not the live plan text — editing a scene in the plan must not mutate the
// already-generated video here. Falls back to live plan text only when not yet generated.
const frozen = !S.isVideoClip(scene) && S.renderPromptForScene ? S.renderPromptForScene(scene.id) : null;
const label = S.isVideoClip(scene)
? ((mref && (st.mediaBin || []).find((m) => m.id === mref)?.name) || "Video clip")
: (scene.text || (root && root.text) || (subclip ? "cut" : "empty scene"));
: ((frozen && frozen.text) || scene.text || (root && root.text) || (subclip ? "cut" : "empty scene"));
clip.append(el("div", "clip-text" + (label && label !== "empty scene" && label !== "cut" && label !== "Video clip" ? "" : " empty"), label));
const charIds = S.sceneCharacterIds(scene.id);