Added Sift+Arrow right/left for faster timeline peaking#417
Added Sift+Arrow right/left for faster timeline peaking#417qubydev wants to merge 2 commits intosiddharthvaddem:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (5)
📝 WalkthroughWalkthroughShift+Arrow now triggers a larger (10-frame) step: added Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/lib/__tests__/frameStepNavigation.test.ts (1)
47-55: Add fast-mode boundary clamp tests too (nit: cleaner coverage).These two tests validate the delta math, but we still don’t explicitly assert clamping with
isFast=truenear 0/duration. small gap, easy win.Suggested extra tests
+ it("clamps to 0 when fast-stepping backward near the beginning", () => { + const result = computeFrameStepTime(LARGE_FRAME_DURATION_SEC / 2, duration, "backward", true); + expect(result).toBe(0); + }); + + it("clamps to duration when fast-stepping forward near the end", () => { + const result = computeFrameStepTime( + duration - LARGE_FRAME_DURATION_SEC / 2, + duration, + "forward", + true, + ); + expect(result).toBe(duration); + });🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/lib/__tests__/frameStepNavigation.test.ts` around lines 47 - 55, Tests for computeFrameStepTime with isFast=true are missing boundary-clamp assertions; add two additional unit tests that call computeFrameStepTime near the lower and upper boundaries (e.g., time = 0 + small epsilon and time = duration - small epsilon) with direction "backward"/"forward" and isFast=true and assert the result is clamped to 0 and duration respectively (use LARGE_FRAME_DURATION_SEC and the existing duration test variable to compute expected clamped values and toBeCloseTo for numeric comparison). Ensure test names mention fast-mode boundary clamping and reuse the same helpers/variables as the existing tests.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/lib/shortcuts.ts`:
- Around line 74-85: Add missing translation entries for the new shortcut i18n
keys: fixedActions.largeFrameBack and fixedActions.largeFrameForward (these
correspond to the i18nKey values "largeFrameBack" and "largeFrameForward" in the
shortcuts list) to the English locale JSON used for shortcuts (so they don't
fall back to default). Update the shortcuts locale object (e.g., the shortcut
keys section in the shortcuts.json locale file) with human-readable strings for
both keys, keeping the wording consistent with the other entries such as "Large
Frame Back" and "Large Frame Forward".
---
Nitpick comments:
In `@src/lib/__tests__/frameStepNavigation.test.ts`:
- Around line 47-55: Tests for computeFrameStepTime with isFast=true are missing
boundary-clamp assertions; add two additional unit tests that call
computeFrameStepTime near the lower and upper boundaries (e.g., time = 0 + small
epsilon and time = duration - small epsilon) with direction "backward"/"forward"
and isFast=true and assert the result is clamped to 0 and duration respectively
(use LARGE_FRAME_DURATION_SEC and the existing duration test variable to compute
expected clamped values and toBeCloseTo for numeric comparison). Ensure test
names mention fast-mode boundary clamping and reuse the same helpers/variables
as the existing tests.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b5ca909a-a0a3-46c8-91cd-841af2d1c8e3
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
src/components/video-editor/VideoEditor.tsxsrc/lib/__tests__/frameStepNavigation.test.tssrc/lib/frameStep.tssrc/lib/shortcuts.ts
Pull Request Template
Description
Added
Shift + ArrowLeftandShift + ArrowRightkeyboard shortcuts to allow jumping through the video timeline in larger 10-frame increments.Motivation
Makes scrubbing through the timeline significantly faster, as regular arrow keys only move one frame at a time.
Type of Change
Related Issue(s)
#416
Screenshots / Video
Recording.2026-04-11.034313.mp4
Testing
Shiftand press→or←.npx vitest run.Checklist
Summary by CodeRabbit