From 4f562cf0fffddb59359b40e7f8b4261a599d58dc Mon Sep 17 00:00:00 2001 From: digital-garbage <133010426+digital-garbage@users.noreply.github.com> Date: Fri, 19 Jun 2026 09:53:41 +0300 Subject: [PATCH] Movie Editor: timeline clip shows what it was generated with, not live plan text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- movie_editor/frontend/timeline.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/movie_editor/frontend/timeline.js b/movie_editor/frontend/timeline.js index 9e43108d..d581dac3 100644 --- a/movie_editor/frontend/timeline.js +++ b/movie_editor/frontend/timeline.js @@ -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);