chore(cleanup): move pure-math out of components/video-editor/videoPlayback/ into lib/zoomMath - #197
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…ayback/ into lib/zoomMath Pure rename: the misnomer directory src/components/video-editor/videoPlayback/ contained 11 files of pure zoom/spring/focus math (zero React). Moved into a clearer home: src/lib/zoomMath/. Files moved (9 source + 2 co-located unit tests): cameraFullscreenUtils.ts cameraFullscreenUtils.test.ts constants.ts cursorFollowUtils.ts focusUtils.ts mathUtils.ts motionSmoothing.ts zoomRegionUtils.ts zoomRegionUtils.test.ts (does not exist; the 2 tests are co-located above) zoomSpring.ts zoomSpring.test.ts zoomTransform.ts Import sites updated (8 files, ~15 import specifiers): src/native/sceneDescription.test.ts src/lib/exporter/wgsl/evaluate.ts src/lib/exporter/frameRenderer.ts src/lib/cursor/pixiCursorRenderer.ts src/lib/cursor/cursorPathSmoothing.ts src/lib/ai-edition/timeline/zoom-preview.ts src/components/ai-edition/ZoomFocusOverlay.tsx src/components/ai-edition/PreviewCanvas.tsx Internal relative imports of ../types rewritten to @/components/video-editor/types (5 sites: cameraFullscreenUtils, constants, cursorFollowUtils, focusUtils, zoomRegionUtils; plus the moved test). types.ts itself stays in components/video-editor/ — it is still a real shared types module used by src/lib/ai-edition/, and the parent directory src/components/video-editor/ stays in place; only the misnamed videoPlayback/ subfolder moved. Doc references to the moved files (technical-documentation/architecture/cursor.md, crates/compositor/src/cursor.rs) updated to the new paths. Stale comments referencing files outside this move (VideoPlayback.tsx, videoPlayback/overlayUtils.ts, videoPlayback/videoEventHandlers.ts) are left alone — out of scope. No behavior change. Verified with: tsc --noEmit (clean), vitest --run (1144/1144 passing), biome check (0 new warnings vs baseline).
EtienneLescot
force-pushed
the
ponytail/move-zoom-math-to-lib
branch
from
July 29, 2026 07:31
9125f7f to
c9b6629
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Pure-rename cleanup. The folder
src/components/video-editor/videoPlayback/was a misnomer — it contained 11 files of pure zoom/spring/focus math (zero React), but thecomponents/location kept implying they were React components. They aren't. Move them into a clearer home:src/lib/zoomMath/.Why
The directory has been importing across the codebase as if it were React, and types in
components/are being pulled into pure-math modules across thelib/boundary.src/lib/zoomMath/puts the math next to its peers (compositeLayout,cursor,exporter) and out of the components tree, where the contents actually belong.Files moved (9 source + 2 co-located unit tests)
git mvwas used throughout — every change is a true rename, history is preserved.Import sites updated (8 files, ~15 import specifiers)
Plus 5 internal
../types->@/components/video-editor/typesfixes inside the moved files (cameraFullscreenUtils, constants, cursorFollowUtils, focusUtils, zoomRegionUtils) and the one inside the movedcameraFullscreenUtils.test.ts.src/components/video-editor/types.tswas intentionally left in place — it is still a real (if misnamed) shared types module used bysrc/lib/ai-edition/. The directorysrc/components/video-editor/itself stays; only the misnamedvideoPlayback/subfolder moved.types.tsis on the todo list for a future cleanup once theai-editionrename is done.The old
src/components/video-editor/videoPlayback/directory is removed; it was empty after the move.Doc comments
Two prose references to the moved files were updated to the new paths:
technical-documentation/architecture/cursor.md(cursorFollowUtils.tsreference)crates/compositor/src/cursor.rs(constants.tsreference)Stale comments referencing files outside this move (
VideoPlayback.tsx,videoPlayback/overlayUtils.ts,videoPlayback/videoEventHandlers.ts) were left alone — out of scope.Classification
Testing
npx tsc --noEmit— cleannpm run test— 1144/1144 passing (baseline 1144/1144)npm run lint— 0 new warnings vs baseline (baseline has 7 pre-existing warnings inNewProjectModal.test.tsx,rafCoalesce.test.ts, anduseNativeCompositorView.ts— none in files touched here)