fix(core): splitElementInHtml data-end + text-content inner wrapper#1273
Closed
vanceingalls wants to merge 3 commits into
Closed
fix(core): splitElementInHtml data-end + text-content inner wrapper#1273vanceingalls wants to merge 3 commits into
vanceingalls wants to merge 3 commits into
Conversation
vanceingalls
added a commit
that referenced
this pull request
Jun 8, 2026
…1273) Covers the three bugs fixed in the parent commit: - setElementDuration sibling cleanup (data-end removes data-duration, vice versa) - text-content op with non-div inner wrappers (p, span) - data-playback-rate absent → trim offset must not be NaN Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ack-rate - setElementDuration: remove stale sibling timing attr on write - text-content: target single element child regardless of tag name - data-playback-rate: Number.isFinite guard replaces || 1 - rename `rounded` to `endTime` (it was an end-time, not a duration) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…1273) Covers the three bugs fixed in the parent commit: - setElementDuration sibling cleanup (data-end removes data-duration, vice versa) - text-content op with non-div inner wrappers (p, span) - data-playback-rate absent → trim offset must not be NaN Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
d8b13e9 to
b72dc5a
Compare
Collaborator
|
Closing — all three fixes (setElementDuration stale sibling, text-content inner wrapper, data-playback-rate NaN guard) have been folded into the gesture-to-keyframes branch (PR #1256). They'll land with that stack. |
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
Three independent correctness fixes in
packages/core/src/studio-api/helpers/sourceMutation.ts, extracted as a standalone PR so they can merge without waiting for the R1 stack.1.
setElementDuration— stale sibling attributeWhen writing
data-end, the old code leftdata-durationuntouched (and vice versa). An element that previously useddata-durationand got split would have both attributes after the split, with the runtime reading whichever it found first.2.
text-contentop — inner wrapper breadthThe
text-contentpatch targetsfirstElementChildto avoid clobbering outer element structure. The old check requiredtagName === "div"; the generator can wrap text in any single-child element (<p>,<span>, etc.).3.
data-playback-rate— NaN defaultparseFloaton a missing attribute returnsNaN. The trim offset calculation would produceNaNmedia start times for any element without an explicitdata-playback-rate.Why
All three are correctness bugs found during code review of the R1 stack. They exist independently of R1 and are safe to merge at any time.
Test plan
sourceMutation.test.tssplit tests coversetElementDurationbehavior