Skip to content

[3/22] fix: keep auto-length clips at their media's length after an edit - #342

Merged
dazzatronus merged 1 commit into
fix/luma-pairingfrom
fix/auto-length-resolve
Dec 4, 2026
Merged

dazzatronus merged 1 commit into
fix/luma-pairingfrom
fix/auto-length-resolve

Conversation

@dazzatronus

@dazzatronus dazzatronus commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

A video or audio clip with length: "auto" plays for its media's duration less its trim. Load measured that duration, but every later resolve gave "auto" the 3 s placeholder, so after any edit an auto-length clip shrank to 3 s.

Measured durations now live in a per-src map that every resolve reads. Three things fill it:

  • load probes each src, as before;
  • a player reports its media's duration once loaded, so a clip added, pasted or duplicated after load takes its length when the media arrives;
  • a src change through reloadAsset probes again.

Load also pairs lumas after lengths are measured. Before, a matte on an auto-length video was saved back as 3 s.

Verify: tests cover an edit after load; a clip added after load (20 s media, trim 2: 18 s, one history entry, the document keeps "auto"); a second clip on that src; media with no duration (stays 3 s); and a matte keeping its length. On a phone, a video added mid-edit grew from 3 s to its length once loaded.

Risk: a merge field that swaps an auto-length clip's src keeps the old length until reload.

# PR Adds Why it is separate
1/22 #340 Clipboard paste moves out of the keyboard controls Mechanical move
2/22 #341 Each luma matte pairs with its own clip Bug fix
3/22 #342 (this PR) Auto-length clips keep their media's length Bug fix
4/22 #343 Paste lands at the playhead from when Paste was pressed Bug fix
5/22 #358 splitClip and canSplitClip New public API
6/22 #344 Split in the clip context menu Desktop UI for split
7/22 #345 Split cuts keyframes Widens split's contract
8/22 #346 Undoing a move restores the clip's index Bug fix
9/22 #347 A move keeps auto-start clips in order Bug fix
10/22 #348 Trim a clip's start or end to the playhead New edit action
11/22 #349 Toolbar hover styles need a hover-capable pointer Changes the canvas toolbars on touch
12/22 #359 Action bar with Undo and Redo New timeline UI and option
13/22 #350 Split, Trim and Delete in the bar Clip actions and their reasons
14/22 #351 Paste's insert step moves out of the selection manager Mechanical move
15/22 #352 More menu with Duplicate Menu component
16/22 #353 Paste in the bar System clipboard from a tap
17/22 #360 Nudge and move a track New matte-following move
18/22 #354 Undo and redo select the changed clip Timeline behaviour on touch
19/22 #355 A toolbar timing change keeps the other value's link Bug fix
20/22 #356 Timing steppers and touch scrubbing Changes an existing control
21/22 #361 Stepped value field New UI primitive
22/22 #357 Position, scale and rotation fields Also shows on desktop

Merge bottom-up. Once its predecessor lands, retarget a PR to main and rebase it, so it squashes as its one commit. Later PRs build on earlier ones, so revert from the top down.

Merging this PR doesn't release: the release workflow holds a PR titled [n/m] until the last in its stack merges. Its squash subject is its one commit's: fix: keep auto-length clips at their media's length after an edit.

@dazzatronus dazzatronus changed the title [3/20] fix: keep auto-length clips at their media's length after an edit [3/22] fix: keep auto-length clips at their media's length after an edit Dec 4, 2026
@dazzatronus
dazzatronus added this pull request to stack #362 December 4, 2026 05:21
@dazzatronus
dazzatronus merged commit 60c0658 into main Dec 4, 2026
1 check passed
github-actions Bot pushed a commit that referenced this pull request Dec 4, 2026
# [2.37.0](v2.36.0...v2.37.0) (2026-12-04)

### Bug Fixes

* keep a clip's linked timing when the toolbar changes its other value ([#355](#355)) ([51e3cdc](51e3cdc))
* keep auto-length clips at their media's length after an edit ([#342](#342)) ([60c0658](60c0658))
* keep clips that start automatically in order when another clip moves ([#347](#347)) ([8e38aef](8e38aef))
* keep toolbar buttons from sticking in hover on touch ([#349](#349)) ([284359b](284359b))
* pair each luma matte with its own clip ([#341](#341)) ([3c02eae](3c02eae))
* paste at the playhead where Paste was pressed ([#343](#343)) ([e9ebd4a](e9ebd4a))
* put a clip back in its place when a move is undone ([#346](#346)) ([e3c2a8c](e3c2a8c))

### Features

* add a More menu to the action bar ([#352](#352)) ([6e459fd](6e459fd))
* add a stepped value field ([#361](#361)) ([9a80f4d](9a80f4d)), closes [#357](#357)
* add an action bar for touch editing ([#359](#359)) ([f25644c](f25644c))
* add clip actions to the action bar ([#350](#350)) ([16d50ee](16d50ee))
* add clip timing steppers and touch scrubbing ([#356](#356)) ([6e37036](6e37036))
* add Split to the clip context menu ([#344](#344)) ([691d981](691d981))
* nudge and move clips from the action bar ([#360](#360)) ([dde0818](dde0818))
* paste from the action bar ([#353](#353)) ([67c8baa](67c8baa))
* reveal the clip an undo or redo changed ([#354](#354)) ([ecd9df6](ecd9df6))
* split a clip at the playhead ([#358](#358)) ([5636b57](5636b57))
* split clips with keyframes ([#345](#345)) ([fdd7be1](fdd7be1))
* trim a clip to the playhead ([#348](#348)) ([6ef9b99](6ef9b99))
@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.37.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant