Skip to content

Revert "feat: bundle cursor motion and temporal blur updates"#415

Merged
webadderall merged 1 commit intomainfrom
revert-414-codex/behavior-3-13
May 4, 2026
Merged

Revert "feat: bundle cursor motion and temporal blur updates"#415
webadderall merged 1 commit intomainfrom
revert-414-codex/behavior-3-13

Conversation

@webadderall
Copy link
Copy Markdown
Collaborator

@webadderall webadderall commented May 4, 2026

Reverts #414

Summary by CodeRabbit

Release Notes

  • New Features

    • Added editor presets to save and restore your editing settings
    • Introduced trim and speed regions as selectable timeline elements with delete support
    • Added in-place caption editing capability
    • New keyboard shortcuts: T to add trims, S to add speed regions
  • Improvements

    • Simplified cursor and zoom motion controls with streamlined options
    • Enhanced cursor follow-camera behavior for better tracking
    • Refined video playback synchronization during edits
  • UI Updates

    • Updated settings panel with trim and speed management controls
    • Removed motion preset selector for cleaner interface

@webadderall webadderall merged commit 42c6cf4 into main May 4, 2026
1 of 2 checks passed
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 4, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 920907a5-dc96-444f-9014-499716d11967

📥 Commits

Reviewing files that changed from the base of the PR and between dedf437 and be01bcc.

📒 Files selected for processing (40)
  • electron/electron-env.d.ts
  • electron/ipc/cursor/telemetry.test.ts
  • electron/ipc/cursor/telemetry.ts
  • electron/ipc/register/project.ts
  • electron/ipc/register/recording.ts
  • electron/ipc/types.ts
  • electron/preload.ts
  • src/components/video-editor/SettingsPanel.tsx
  • src/components/video-editor/SliderControl.tsx
  • src/components/video-editor/VideoEditor.tsx
  • src/components/video-editor/VideoPlayback.tsx
  • src/components/video-editor/cursorMotionPresets.ts
  • src/components/video-editor/editorPreferences.ts
  • src/components/video-editor/projectPersistence.ts
  • src/components/video-editor/timeline/TimelineEditor.tsx
  • src/components/video-editor/types.test.ts
  • src/components/video-editor/types.ts
  • src/components/video-editor/videoPlayback/cursorFollowCamera.test.ts
  • src/components/video-editor/videoPlayback/cursorFollowCamera.ts
  • src/components/video-editor/videoPlayback/cursorRenderer.ts
  • src/components/video-editor/videoPlayback/motionSmoothing.ts
  • src/components/video-editor/videoPlayback/videoEventHandlers.test.ts
  • src/components/video-editor/videoPlayback/videoEventHandlers.ts
  • src/components/video-editor/videoPlayback/zoomAnimation.test.ts
  • src/components/video-editor/videoPlayback/zoomRegionUtils.ts
  • src/components/video-editor/videoPlayback/zoomTransform.ts
  • src/hooks/useScreenRecorder.ts
  • src/i18n/locales/en/settings.json
  • src/i18n/locales/zh-CN/settings.json
  • src/lib/exporter/forwardFrameSource.ts
  • src/lib/exporter/frameRenderer.test.ts
  • src/lib/exporter/frameRenderer.ts
  • src/lib/exporter/gifExporter.ts
  • src/lib/exporter/modernFrameRenderer.test.ts
  • src/lib/exporter/modernFrameRenderer.ts
  • src/lib/exporter/modernVideoExporter.ts
  • src/lib/exporter/temporalMotionBlur.test.ts
  • src/lib/exporter/temporalMotionBlur.ts
  • src/lib/exporter/videoExporter.ts
  • src/lib/shortcuts.ts

📝 Walkthrough

Walkthrough

This PR removes temporal motion blur capabilities, simplifies cursor-capture pause/resume with boundary timestamps, refactors motion-blur rendering from supersampled to velocity-based, eliminates cursor-motion-preset and cursor-spring-tuning UI, introduces trim and speed regions as first-class selectable entities with keyboard shortcuts, adds editor-preset persistence and auto-caption in-place editing, and removes clip-timing helper utilities.

Changes

Cursor Capture & Telemetry Refactoring

Layer / File(s) Summary
API & IPC Signature Updates
electron/electron-env.d.ts, electron/preload.ts
pauseCursorCapture and resumeCursorCapture now accept optional boundaryMs?: number. Removed setCursorTelemetry method and hideOverlayCursorByDefault option from video/session APIs. Removed getLinuxWindowSystem from renderer API.
Telemetry Module Refactoring
electron/ipc/cursor/telemetry.ts
Removed exported normalization/writing helpers (normalizeCursorTelemetrySamples, writeCursorTelemetry). Updated sampleCursorPoint to accept optional sampledAtMs parameter passed to elapsed-time calculations.
IPC Handler Updates
electron/ipc/register/recording.ts
Pause/resume handlers now accept and use boundaryMs for cursor sampling timestamps. Refactored telemetry loading to inline normalization (clamping time to non-negative, bounding cx/cy to [0,1], restricting interaction/cursor types) instead of calling removed helpers. Removed set-cursor-telemetry handler.
Session Payload Simplification
electron/ipc/types.ts, electron/ipc/register/project.ts
Removed hideOverlayCursorByDefault from RecordingSessionData type and recording-session handlers. Added numeric time-offset normalizer.
Recording Hook Updates
src/hooks/useScreenRecorder.ts
Removed hideOverlayCursorByDefault persistence. Updated native pause/resume to call cursor-capture methods with boundaryMs. Refactored Linux-portal stream acquisition with explicit try/catch and fallback to getUserMedia desktop constraints.
Tests
electron/ipc/cursor/telemetry.test.ts
Removed test cases for telemetry sample normalization and sidecar file removal; retained pause-clock elapsed-time assertions.

Motion Blur & Export Pipeline Simplification

Layer / File(s) Summary
Temporal Motion Blur Module Removal
src/lib/exporter/temporalMotionBlur.ts, src/lib/exporter/temporalMotionBlur.test.ts
Entirely removed temporal motion-blur configuration, offset computation, and weighted-sample-plan generation module and its test suite.
Frame Renderer Blur Pipeline
src/lib/exporter/frameRenderer.ts, src/lib/exporter/modernFrameRenderer.ts
Removed ZoomBlurFilter usage and temporal accumulation/supersampling. Simplified to a single BlurFilter + conditional MotionBlurFilter using fixed constants. Direct velocity-based blur computation replaces smoothed pan/log-scale velocity smoothing. Removed renderTemporalMotionBlurFrame and temporal snapshot path.
Background Wallpaper Sync Simplification
src/lib/exporter/frameRenderer.ts, src/lib/exporter/modernFrameRenderer.ts
Removed decoder looping/duration tracking and EOF restart logic. Direct frame fetching at clamped time via getFrameAtTime replaces normalized/looping behavior.
Exporter Config & Wiring
src/lib/exporter/videoExporter.ts, src/lib/exporter/gifExporter.ts, src/lib/exporter/modernVideoExporter.ts
Removed zoomTemporalMotionBlur, sample/shutter fraction, and cursor-spring multiplier fields from exporter configs. Updated frame rendering calls to remove temporal duration/timestamp offsets. Refactored native write scheduling from single chained promise to per-frame tracking.
Export Tests
src/lib/exporter/frameRenderer.test.ts, src/lib/exporter/modernFrameRenderer.test.ts
Removed canvas fillRect mock and video element creation mocking; simplified context setup.

Video Editor UI & Settings Refactoring

Layer / File(s) Summary
Zoom & Cursor Motion Preset Removal
src/components/video-editor/cursorMotionPresets.ts
Entirely removed cursor-motion-preset type definitions and lookup table (CursorMotionPresetId, CursorMotionPreset, CURSOR_MOTION_PRESETS).
Settings Panel Prop & UI Updates
src/components/video-editor/SettingsPanel.tsx
Removed cursor motion preset cards UI and spring-multiplier props. Added trim/speed region selection/deletion props. Changed zoom motion blur from temporal (sample/shutter) to direct zoomSmoothness/zoomMotionBlur parameters. Updated reset logic and slider rendering (including "off" label for cursor smoothing).
Slider Control Simplification
src/components/video-editor/SliderControl.tsx
Removed custom pointer/keyboard interaction logic and replaced with native <input type="range"> overlay driving onChange callbacks.
Timeline Editing State Expansion
src/components/video-editor/timeline/TimelineEditor.tsx
Added trim and speed regions as first-class selectable entities with dedicated handlers (handleAddTrim, handleAddSpeed, handleSelectTrim/Speed, deleteSelectedTrim/Speed). Updated keyboard shortcut support for addTrim (t) and addSpeed (s). Simplified canPlaceZoomAtMs to check only zoom overlap (removed clip-boundary constraints).
Clip Timing Utilities Removal
src/components/video-editor/types.ts, src/components/video-editor/types.test.ts
Removed DEFAULT_ZOOM_SMOOTHNESS constant and clip-timing helper exports (sortClipRegions, mapTimelineTimeToSourceTime, mapSourceTimeToTimelineTime, findClipAtTimelineTime). Removed associated test cases.
Cursor Rendering Simplification
src/components/video-editor/videoPlayback/cursorRenderer.ts
Removed cursor spring-tuning configuration and setSpringTuning method. Sway spring stepping now uses smoothingFactor-only spring config.
Cursor Spring Config Refactoring
src/components/video-editor/videoPlayback/motionSmoothing.ts
Removed CursorSpringTuning interface and tuning multiplier application. getCursorSpringConfig now accepts only smoothingFactor, with adjusted mass ranges and stiffness formulas.
Cursor Follow Camera Simplification
src/components/video-editor/videoPlayback/cursorFollowCamera.ts, src/components/video-editor/videoPlayback/cursorFollowCamera.test.ts
Removed safe-zone recentering logic and time-backwards check. Replaced with edge-snap-first focus pipeline. Simplified reset to clear zoom flags and frozen focus. Removed entire test suite.
Zoom Region Strength Computation
src/components/video-editor/videoPlayback/zoomRegionUtils.ts
Removed zoomInDurationMs/zoomOutDurationMs options from DominantRegionOptions. computeRegionStrength now uses fixed constants instead of option-driven duration logic.
Zoom Transform Motion Blur
src/components/video-editor/videoPlayback/zoomTransform.ts
Removed smoothed velocity/blur state fields from MotionBlurState. Replaced with direct velocity-based approach using blurFilter + motionBlurFilter. Removed ZoomBlurFilter and helper functions.
Video Playback Enhancements
src/components/video-editor/VideoPlayback.tsx
Added caption edit-session state, in-place editing UI with textarea, and onEditAutoCaption callback. Extended props with zoomMotionBlur. Simplified filter attachment logic for motion blur (conditional attach based on movement threshold).
Main Editor Wiring
src/components/video-editor/VideoEditor.tsx
Added editor-preset loading/saving/apply/delete handlers and popover UI. Extended history snapshots to include selectedTrimId/selectedSpeedId. Implemented trim/speed region CRUD handlers and selection-clearing effects. Reimplemented mapSourceTimeToTimelineTime inline using clipRegions (removed prior resolver). Added onEditAutoCaption callback wiring to VideoPlayback. Updated audio-sync to derive active playback rate directly from speedRegions.
Preferences & Project Persistence
src/components/video-editor/editorPreferences.ts, src/components/video-editor/projectPersistence.ts
Removed temporal zoom motion blur and cursor spring multipliers from persisted controls. Updated defaults to use dedicated DEFAULT_CURSOR_* and zoom duration constants instead of preset-derived values. Added normalizeEditorPresets helper and changed saveEditorPresets to return boolean.
Forward Frame Source Simplification
src/lib/exporter/forwardFrameSource.ts
Removed lastFrameIntervalSec/resolvedDecodedDurationSec state tracking. Removed public getResolvedDurationSec() and hasReachedEndOfStream() methods. Simplified frame handoff to rely on heldFrame/heldFrameSec only.
Seek Behavior Update
src/components/video-editor/videoPlayback/videoEventHandlers.ts, src/components/video-editor/videoPlayback/videoEventHandlers.test.ts
Made trim-region skip conditional on play state (isPlayingRef.current). Added test case for paused seek behavior.
i18n Updates
src/i18n/locales/en/settings.json, src/i18n/locales/zh-CN/settings.json
Removed motion-preset and cursor-spring i18n keys. Updated zoom mode description. Added caption-editing keys (captions.editCurrent, captions.editSaved).
Shortcuts
src/lib/shortcuts.ts
Added addTrim and addSpeed to SHORTCUT_ACTIONS with defaults (t, s), labels, and updated ShortcutAction type derivation.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

  • Cursor capture pause/resume boundary timestamp addition and telemetry refactoring—modifies the same pauseCursorCapture/resumeCursorCapture APIs, cursor capture clock, and IPC handlers.
  • Editor preset persistence and caption-editing feature addition—both add editor-preset UI/state and auto-caption in-place editing to VideoEditor and editorPreferences.
  • Linux Wayland portal stream acquisition refactoring—both modify useScreenRecorder to wrap portal capture in try/catch and add getUserMedia desktop-constraint fallback.

Suggested labels

checked, editor, export, settings, simplification, ui


🐰 A rabbit hops through the code with glee,
Presets saved, trims cut wild and free,
Spring tuning's gone, blur's now so bright,
Caption editing shines in the night,
One hoppy refactor, what a sight!

✨ 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 revert-414-codex/behavior-3-13

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