Skip to content

feat/zoom motion blur refine#436

Merged
webadderall merged 5 commits into
mainfrom
codex/zoom-motion-blur-refine
May 7, 2026
Merged

feat/zoom motion blur refine#436
webadderall merged 5 commits into
mainfrom
codex/zoom-motion-blur-refine

Conversation

@webadderall
Copy link
Copy Markdown
Collaborator

@webadderall webadderall commented May 7, 2026

Pull Request Template

Description

Motivation

Type of Change

  • New Feature
  • Bug Fix
  • Refactor / Code Cleanup
  • Documentation Update
  • Other (please specify)

Related Issue(s)

Screenshots / Video

Screenshot (if applicable):

![Screenshot Description](path/to/screenshot.png)

Video (wherever possible):

<video src="path/to/video.mp4" controls width="600"></video>

Testing Guide

Checklist

  • I have performed a self-review of my code.
  • I have added any necessary screenshots or videos.
  • I have linked related issue(s) and updated the changelog if applicable.

Thank you for contributing!

Summary by CodeRabbit

  • New Features

    • New zoom motion-blur tuning controls and camera spring multipliers for finer zoom behavior (dev-exposed).
    • Warning dialog when animated cursor overlay rendering isn’t available on the platform.
  • Improvements

    • Refined zoom motion-blur and smoothing pipeline for smoother previews and exports.
    • Export pipeline applies zoom motion-blur and spring tuning to GIF/MP4 outputs.
  • Localization

    • Added English and Spanish messages for native-capture unavailable notice.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 7, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: bf4147d2-6151-444b-84cd-a6b0b293db42

📥 Commits

Reviewing files that changed from the base of the PR and between 91a682b and 6ff71e4.

📒 Files selected for processing (2)
  • src/lib/exporter/frameRenderer.ts
  • src/lib/exporter/modernFrameRenderer.ts

📝 Walkthrough

Walkthrough

This PR introduces configurable zoom motion blur tuning and camera spring multipliers, rewrites zoom motion-blur analysis to a quad-based per-step approach, threads tuning/multipliers through editor state, playback, frame renderers, and exporters, updates SettingsPanel/dev UI with a native-capture tester, and adds tests and locale strings.

Changes

Zoom Motion Blur Tuning & Camera Spring Feature

Layer / File(s) Summary
Type Definitions
src/components/video-editor/types.ts, src/components/video-editor/projectPersistence.ts
ZoomMotionBlurTuning interface and DEFAULT_ZOOM_MOTION_BLUR_TUNING added; ProjectEditorState extended with zoomMotionBlurTuning and camera spring multiplier fields.
Preferences & Normalization
src/components/video-editor/editorPreferences.ts, src/components/video-editor/projectPersistence.ts
zoomMotionBlurTuning added to persisted editor controls and preferences; normalization functions validate and clamp tuning and multiplier values.
Editor State & Persistence
src/components/video-editor/VideoEditor.tsx
VideoEditor initializes and persists zoomMotionBlurTuning and camera spring multipliers, includes them in presets/snapshots, and centralizes session presentation handling (native-capture flags/modal).
Settings UI & Dev Panel
src/components/video-editor/SettingsPanel.tsx, src/components/video-editor/VideoEditor.tsx
SettingsPanel props extended with tuning/multiplier fields and callbacks; Dev export blur controls replaced with tuning sliders; native-capture tester and modal added; reset handlers updated for multipliers.
Motion Blur Algorithm
src/components/video-editor/videoPlayback/zoomTransform.ts
Replaces velocity-smoothing logic with quad-based per-step analysis; adds geometry types and helpers to infer zoom centers, classify motion, compute blur channels, and apply motion/zoom blur parameters per step.
Playback Filter Pipeline
src/components/video-editor/VideoPlayback.tsx
Props extended with camera spring multipliers and zoomMotionBlurTuning; refs/effects sync tuning; Pixi filters initialized with maxKernelSize and attached when zoom motion blur enabled; applyZoomTransform receives motionBlurAmount + motionBlurTuning.
Spring Configuration
src/components/video-editor/videoPlayback/motionSmoothing.ts
getZoomSpringConfig accepts optional tuning and applies applyCursorSpringTuning; camera multipliers affect stiffness/damping/mass.
Frame Renderers
src/lib/exporter/frameRenderer.ts, src/lib/exporter/modernFrameRenderer.ts
FrameRenderConfig extended with zoomMotionBlurTuning and camera spring multipliers; render paths updated to pass tuning into applyZoomTransform; temporal-motion-blur eligibility and sampling adjusted.
Export Configuration
src/lib/exporter/videoExporter.ts, src/lib/exporter/gifExporter.ts, src/lib/exporter/modernVideoExporter.ts
Exporter configs extended with zoomMotionBlurTuning and camera spring multiplier fields; exporters forward values into frame renderer constructors.
Tests & Localization
src/components/video-editor/videoPlayback/zoomTransform.test.ts, src/i18n/locales/{en,es}/editor.json
Vitest tests added for blur routing (directional vs radial). English and Spanish locales add nativeCaptureUnavailable strings used by the new modal.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Suggested labels

Checked

Poem

A rabbit hops through motion blur,
tuning springs with gentle purr, 🐰
quads collide and centers gleam,
sliders hum and filters dream,
exports glide in softer blur. ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description contains only the template with all sections empty—no actual description, motivation, related issues, screenshots, testing guide, or checklist items were filled in by the author. Complete the description with: purpose and motivation for the refactoring, type of change (appears to be a refactor), related issue(s), any screenshots/videos if UI changed, and a testing guide with steps to validate the motion blur behavior.
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 (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat/zoom motion blur refine' clearly relates to the main changes, which involve refactoring zoom motion blur configuration, tuning, and rendering logic across multiple components.
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.

✏️ 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 codex/zoom-motion-blur-refine

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/video-editor/SettingsPanel.tsx (1)

1481-1495: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Reset should restore the saved classic-mode default too.

Line 1494 still hardcodes false, so the Zoom reset can leave this section only partially restored when the user's stored default has classic zoom enabled.

Suggested fix
 	const resetZoomSection = () => {
 		onZoomMotionBlurTuningChange?.(initialEditorPreferences.zoomMotionBlurTuning);
 		onCameraSpringStiffnessMultiplierChange?.(
 			initialEditorPreferences.cameraSpringStiffnessMultiplier,
 		);
 		onCameraSpringDampingMultiplierChange?.(
 			initialEditorPreferences.cameraSpringDampingMultiplier,
 		);
 		onCameraSpringMassMultiplierChange?.(
 			initialEditorPreferences.cameraSpringMassMultiplier,
 		);
 		onZoomInDurationMsChange?.(initialEditorPreferences.zoomInDurationMs);
 		onZoomOutDurationMsChange?.(initialEditorPreferences.zoomOutDurationMs);
-		onZoomClassicModeChange?.(false);
+		onZoomClassicModeChange?.(initialEditorPreferences.zoomClassicMode);
 	};
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/video-editor/SettingsPanel.tsx` around lines 1481 - 1495,
resetZoomSection currently forces classic zoom off by calling
onZoomClassicModeChange?.(false); replace that hardcoded false with the saved
default from initialEditorPreferences (e.g.
onZoomClassicModeChange?.(initialEditorPreferences.zoomClassicMode) or use the
exact property name that holds the saved classic-mode default) so the reset
restores the user's stored classic-mode setting; keep a safe fallback (false) if
the property might be undefined.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/components/video-editor/SettingsPanel.tsx`:
- Around line 1481-1495: resetZoomSection currently forces classic zoom off by
calling onZoomClassicModeChange?.(false); replace that hardcoded false with the
saved default from initialEditorPreferences (e.g.
onZoomClassicModeChange?.(initialEditorPreferences.zoomClassicMode) or use the
exact property name that holds the saved classic-mode default) so the reset
restores the user's stored classic-mode setting; keep a safe fallback (false) if
the property might be undefined.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: aadd1e1a-d7a7-43d7-9ddf-097419e219ff

📥 Commits

Reviewing files that changed from the base of the PR and between 3f1e30b and 91a682b.

📒 Files selected for processing (16)
  • src/components/video-editor/SettingsPanel.tsx
  • src/components/video-editor/VideoEditor.tsx
  • src/components/video-editor/VideoPlayback.tsx
  • src/components/video-editor/editorPreferences.ts
  • src/components/video-editor/projectPersistence.ts
  • src/components/video-editor/types.ts
  • src/components/video-editor/videoPlayback/motionSmoothing.ts
  • src/components/video-editor/videoPlayback/zoomTransform.test.ts
  • src/components/video-editor/videoPlayback/zoomTransform.ts
  • src/i18n/locales/en/editor.json
  • src/i18n/locales/es/editor.json
  • src/lib/exporter/frameRenderer.ts
  • src/lib/exporter/gifExporter.ts
  • src/lib/exporter/modernFrameRenderer.ts
  • src/lib/exporter/modernVideoExporter.ts
  • src/lib/exporter/videoExporter.ts

@webadderall webadderall merged commit 493c85f into main May 7, 2026
3 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