Skip to content

Trim ranges video load#35

Merged
kentcdodds merged 1 commit into
mainfrom
cursor/trim-ranges-video-load-1a93
Jan 26, 2026
Merged

Trim ranges video load#35
kentcdodds merged 1 commit into
mainfrom
cursor/trim-ranges-video-load-1a93

Conversation

@kentcdodds
Copy link
Copy Markdown
Member

@kentcdodds kentcdodds commented Jan 26, 2026

Clear trim ranges and selection state when a new video is loaded to prevent invalid ranges from persisting and causing UI/logic inconsistencies.

The resetPreviewState function previously did not clear trimRanges, selectedRangeId, or activeDrag. This allowed trim ranges from a previously loaded video to remain visible in the UI when a new, shorter video was loaded. These invalid ranges would then be silently filtered out during normalization, leading to a confusing "Add at least one trim range" error when the user attempted to process the video, despite seeing ranges in the UI.


Open in Cursor Open in Web


Note

Ensure trim UI state is fully reset on new video load.

  • Extend resetPreviewState to clear trimRanges, selectedRangeId, and activeDrag along with preview flags
  • Prevents stale/invalid ranges from persisting across videos and causing normalization/validation errors

Written by Cursor Bugbot for commit 149ed09. This will update automatically on new commits. Configure here.

Co-authored-by: me <me@kentcdodds.com>
@cursor
Copy link
Copy Markdown

cursor Bot commented Jan 26, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@kentcdodds kentcdodds marked this pull request as ready for review January 26, 2026 23:37
@kentcdodds kentcdodds merged commit ab99e5f into main Jan 26, 2026
6 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.13.1 🎉

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.

2 participants