Skip to content

fix(studio): moving clips that sit in wrapper divs no longer times the wrappers - #6046

Open
miguel-heygen wants to merge 2 commits into
mainfrom
fix/studio-move-wrapper-timing
Open

miguel-heygen wants to merge 2 commits into
mainfrom
fix/studio-move-wrapper-timing

Conversation

@miguel-heygen

@miguel-heygen miguel-heygen commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

What

Opening a new track while moving clips in Studio no longer writes data-start / data-track-index onto untimed wrapper elements around those clips.

Why

Inside Studio, the preview runtime gives an id'd or animated untimed element a timing so the timeline can show it as a row. Opening a new track (dropping in the gap above or below the rows) renumbered every row of the file, so those wrappers were saved with data-start="0" and a track. The project then failed hyperframes check with video_nested_in_timed_element, which means a render with wrong frames. A drop onto an existing row writes only the dragged clip and was never affected. The same renumber also serves the z-order menu's "new track" move and asset drops into a new track, and the asset drop could fail outright next to such a wrapper.

Related work

The runtime marks the elements it times for discovery with data-hf-autostamped; its tests pin that stamping, so the runtime is unchanged. Editing such a row directly still makes its timing part of the file, as before.

How

Rows are tagged runtimeStamped where they are created from the manifest. The shared new-track layout (layoutAfterTrackInsert, used by all three paths) leaves those rows out of the renumber unless they are the dragged clip or part of the selection.

Test plan

  • Unit tests added/updated. New pipeline tests go from a manifest row through the drag commit to the saved HTML: wrappers stay untimed, a selected wrapper is still renumbered, and an asset drop renumbers no wrapper. 3 of the 5 tests in the file fail without the fix; 5/5 three runs in a row. Studio player and hooks suites (3884 tests) pass.
  • Manual testing performed. A wrapper fixture moved to a new track through the real commit path passes hyperframes check; before the fix it failed with three video_nested_in_timed_element errors. I did not drive a real browser.
  • Documentation updated (not applicable).
  • Comments follow CONTRIBUTING.md "Comments".

Before

main: one clip dragged to a new track, with three wrapper divs around clips. The saved index.html gains data-start="0" and a track on every wrapper, and hyperframes check fails with three video_nested_in_timed_element errors. This is the saved file and the check output, not a Studio screen: the browser harness available here shows no timeline rows.

Before: saved file and check output on main

After

This branch, the same move: only the dragged video's track changes, the wrappers are untouched, and hyperframes check passes (0 errors, 0 warnings).

After: saved file and check output on this branch

…e wrappers

Opening a new track renumbered every row of the file, including wrapper divs the preview runtime timed only so the timeline could show them. Those rows now stay out of the renumber unless the user moved them, so the file never gains data-start/data-track-index on an untimed wrapper.
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 271 (base branch 271), smooth 127 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (0)

Unstable (1)

  • seqplainkeys-none-pct-r0-root-z100: tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo false, teleport true / tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true / tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant