Skip to content

fix(editor): include clip regions in export callback deps#549

Merged
meiiie merged 1 commit into
mainfrom
fix/editor-export-clip-regions-dependency
May 21, 2026
Merged

fix(editor): include clip regions in export callback deps#549
meiiie merged 1 commit into
mainfrom
fix/editor-export-clip-regions-dependency

Conversation

@meiiie
Copy link
Copy Markdown
Collaborator

@meiiie meiiie commented May 21, 2026

Description

Adds clipRegions to the handleExport useCallback dependency list in VideoEditor.tsx.

Motivation

handleExport passes clipRegions into the MP4 exporter config. Without clipRegions in the dependency list, React can keep an older callback closure after clip edits, which risks exporting with stale clip timeline regions.

Type of Change

  • Bug fix
  • Refactor
  • Feature
  • Documentation

Related Issues

None.

Scope

This is a one-line dependency fix only. No export pipeline behavior, rendering logic, or state model changes.

Testing Guide

  1. Edit clip regions in the editor.
  2. Open export settings and export MP4.
  3. Confirm the export callback sees the latest clip regions instead of a stale closure.

Verification

  • npx biome lint src/components/video-editor/VideoEditor.tsx
  • npx tsc --noEmit --pretty false
  • git diff --check

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

📝 Walkthrough

Walkthrough

A one-line dependency array fix in the VideoEditor component's handleExport hook to include clipRegions, ensuring the export callback closure always reflects the latest clip timeline region state.

Changes

Export Hook Dependency

Layer / File(s) Summary
Export callback dependency fix
src/components/video-editor/VideoEditor.tsx
handleExport useCallback dependency array now includes clipRegions so the export callback recalculates when clip regions change.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested labels

Checked

Poem

🐰 A closure needs its latest friend,
clipRegions now won't offend,
The export hook remembers true,
Each clip speed change shines through! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding clipRegions to the export callback dependency list, which is exactly what the changeset implements.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description follows the template structure and includes all critical sections: clear description, motivation explaining the bug, type of change (bug fix), scope clarification, and testing guide.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/editor-export-clip-regions-dependency

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@meiiie meiiie merged commit 7b3eaaa into main May 21, 2026
4 checks passed
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