Skip to content

[Bug]: Inserting a word into a clip drops the speed and Full Camera regions of its right half #1037

Description

@EtienneLescot

What happens

Typing a word into the transcript cuts the clip under the caret and inserts the generated word as a clip between the two halves. Zooms, annotations, trims and audio on the right half survive. Speed regions and Full Camera regions there are lost, and one straddling the cut is truncated at it.

Cause

fanOutAnchors (src/lib/ai-edition/document/insertion.ts:128) copies the rows anchored to the cut clip onto both halves, from a hand-picked list: trimRanges, zoomRanges, annotations, audioTracks. legacyEditor.speedRegions and legacyEditor.cameraFullscreenRegions are not in it, so those rows stay on the left half, and rederiveRegionMs clamps them to its source window.

Expected

Every anchored collection fans out to both halves. mapAllRegionCollections in timeline.ts already walks all of them; #1033 (the duplicated clip, #1007) reuses it for the same reason.

How it was found

While fixing #1007, with a throwaway unit test: after the split, the zoom on the right half survives, the speed and Full Camera regions do not. Not seen in the app yet.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions