feat(core): structural montage editing — reorder + remove (0.6.40)#69
Merged
Conversation
Spine 2c. Rewrites photoMontage/videoMontage so each shot is a
self-contained named beat `shot-${i}` (fade-in ∥ Ken Burns ∥ fade-out);
every layer starts at opacity 0 and adjacent shots overlap by the
crossfade via a negative `gap` in the seq. No shot references its
neighbour, so a shot is an independent unit you can edit by overlay and
survive AI regeneration:
- reorder via the existing beat `order` patch
- remove via a new generic compose verb `removeTimeline: ["shot-2"]`
(splices a beat/step from its parent by label; the seq re-accumulates
so later shots ripple up; unknown label → orphan, never silent)
- swap an image via a plain nodes.<id>.src patch
Stable addresses (shot-/cross- labels, node ids) preserved → clip-ripple
and anchored titles keep resolving. Montage opens on a fade-up / closes
on a fade-out (symmetric → edit-safe). Montage has no golden snapshot, so
the timing shift is a generator-output change, not a determinism break.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Spine 2c — structural editing of montages, regen-surviving. Clip-ripple (0.6.39) made retiming survive AI regeneration via label-anchored
video.start; this makes structure survive too. A human reorders or drops a montage shot in an overlay JSON and the edit re-applies after the base is regenerated.How
1. Montage rewrite — self-contained named shot beats (
packages/core/src/montage.ts)Each shot is now a named beat
shot-${i}that owns only its own layer's motion (fade-in ∥ Ken Burns ∥ fade-out). Every layer starts atopacity: 0; adjacent shots overlap by the crossfade via a negativegapin theseq. No shot references its neighbour, so it can move/drop as a unit. Stableshot-${i}/cross-${i}labels + node ids preserved → clip-ripple and anchored titles keep resolving.2. New generic compose verb
removeTimeline(packages/core/src/compose.ts)Splices a beat/step out of its parent by label (parallel to
removeNodes); theseqre-accumulates so later steps ripple up. Unknown label → orphan, never a silent drop.3. The three edits, all overlay-time + regen-surviving
orderpatch (no new code)removeTimeline: ["shot-2"](the dropped layer just stays invisible)nodes.<id>.srcpatchVerification
verify-overlay examples/scenes/photo-montage.ts examples/overlays/montage-restructure.json→ 4 applied, 0 orphanedreframe labelsconfirms eachshot-istarts 0.70s (the transition) before the prior ends — true crossfade overlapNotes
regen-contract.md): reordering a shot to the first slot drops its opening fade-up (the crossfade offset was baked for the original order).start: "shot-2") must also be neutralised (patchstartto a number) or post-compose validation rejects the dangling anchor — documented.🤖 Generated with Claude Code