feat(studio): route timeline trim/move through SDK setTiming (§3.2)#1466
Open
Conversation
Co-authored-by: Miguel Ángel <miguel07alm@protonmail.com>
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Jun 15, 2026
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.

Summary
Routes
handleTimelineElementMoveandhandleTimelineElementResizethroughsdkSession.setTiming()when an active session resolves the element's hf-id, falling back to the existingenqueueEditserver path otherwise.Stage 7 §3.2 — Timing/trim →
setTimingChanges
sdkCutover.ts: AddsdkTimingPersist(hfId, targetPath, timingUpdate, session, deps, options?). Capturesbefore = session.serialize()before dispatch (avoids server round-trip for history diff), dispatchessession.setTiming(hfId, {...}), then callspersistSdkSerialize.useTimelineEditing.ts: Add optionalsdkSession?: Composition | nullparam. Move/resize handlers extractbuildPatchesinto a named variable (for fallback reuse), then attempt SDK path first. Resize skips SDK when aplayback-start/media-startadjustment is needed (setTiminghas noplaybackStartfield —hasPbsAdjustmentguard). Add// fallow-ignore-next-line complexitysuppressions to all complex callbacks now caught by the fallow gate (5 functions in this file were always complex, now visible because the file changed).App.tsx: PasssdkSessiontouseTimelineEditing. Removed one blank line to stay at 600-line gate.sdkCutover.test.ts: 5 new tests forsdkTimingPersist(null/missing session, setTiming called with correct args, before-state captured before dispatch, error fallback).Open decisions (§7)
playbackStart != nullOR start-trim on an element with aplayback-startattribute falls back to server path.setTiminghas noplaybackStartfield. Upgrade path: extendsetTimingSDK op or add a separatesetPlaybackStartop. Documented viahasPbsAdjustmentguard comment.beforecontent: Usessession.serialize()pre-dispatch (not a server fetch). Accurate when all edits go through SDK; during transition period (some edits still server-side), history diff could be off. Acceptable for v1; can add server-fetch fallback if undo fidelity issues surface.def54622 feat(sdk): file-backed fs adapter + setTiming GSAP-script sync) confirmed present in SDK before relying on it. GSAP-animated clip trims are safe.Verification
bun run build✅bunx vitest run sdkCutover.test.ts✅ (31 tests pass)bunx oxlint/bunx oxfmt --check✅✓ dead code: 2 issues · complexity: 4 findings)🤖 Generated with Claude Code