fix(editor): patch HUD passthrough and timeline clip drag#616
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughHUD passthrough reassert timing is parameterized and HUD interaction detection is centralized; timeline DnD adds clip-row-aware clamping and insertion resolution, TimelineWrapper uses resolved preview spans during drag-move, autoScroll is enabled, and tests are expanded. ChangesHUD Mouse Interaction Timing & Passthrough
Timeline Drag & Drop Engine Clip-Row Clamping
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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
🤖 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.
Inline comments:
In `@src/components/video-editor/timeline/components/wrapper/TimelineWrapper.tsx`:
- Around line 129-150: resolveDragPreviewSpan currently falls back to the raw
span when resolveDragEnd returns null, causing previews that will be rejected on
drop; change resolveDragPreviewSpan to return null when resolveDragEnd returns
null (i.e., update its return type to Span | null and return null instead of
span), update any callers to handle a nullable preview (skip rendering the
preview when null), and apply the same change to the other similar handler (the
function around lines 161-173 that also calls resolveDragEnd) so both preview
paths avoid showing invalid placements.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 632966e5-04e3-4896-b8bd-3c6fdd2cf27d
📒 Files selected for processing (6)
electron/main.tselectron/windows.tssrc/components/launch/hooks/useLaunchHudInteractionState.tssrc/components/video-editor/timeline/components/wrapper/TimelineWrapper.tsxsrc/components/video-editor/timeline/dnd/engine.test.tssrc/components/video-editor/timeline/dnd/engine.ts
|
Actionable comments posted: 0 |
Summary
Root cause
The HUD could remain in click-through mode after webcam preview restore because the interactive mouse state was reasserted too briefly. Timeline clip dragging was also bounded to the current timeline duration and only resolved overlap at drop time, which made clips hard to reorder when there was no visible space.
Validation
npx vitest run src\components\video-editor\timeline\dnd\engine.test.tsnpx biome check electron\main.ts electron\windows.ts src\components\launch\hooks\useLaunchHudInteractionState.ts src\components\video-editor\timeline\components\wrapper\TimelineWrapper.tsx src\components\video-editor\timeline\dnd\engine.ts src\components\video-editor\timeline\dnd\engine.test.tsnpx tsc --noEmitnpm run smoke:electron-main-cjsSummary by CodeRabbit
Improvements
Tests