fix: show full slow-speed clips on timeline#454
Conversation
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughVideoEditor now derives a memoized ChangesTimeline Duration from Clip Regions
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
541e236 to
b5bb128
Compare
Description
Fixes slow-speed clips becoming partially unreachable on the timeline by deriving the editor timeline duration from both the source duration and the furthest clip end.
Motivation
When a clip is slowed down, the editor extends that clip's timeline end so playback/export can represent the longer effective duration. The timeline ruler still used only the raw source duration, so the extended tail of the slow clip could be clipped out of view.
Type
Bug fix
Related Issue(s)
Closes #434
Changes Made
getTimelineDurationMsto keep the source duration as the floor while allowing slow clips to extend the visible timeline.TimelineEditor.Scope Note
This intentionally does not reflow later clips or timeline items after speed edits. It only fixes the visible/reachable timeline range for slow clips.
Testing Guide
Validation
npm test -- src/components/video-editor/types.test.ts src/components/video-editor/timeline/timelineLayout.test.tsnpm exec -- tsc --noEmitnpx biome check --formatter-enabled=false src/components/video-editor/types.ts src/components/video-editor/types.test.ts src/components/video-editor/VideoEditor.tsxnpx vite build --config vite.config.tsChecklist
Summary by CodeRabbit