Skip to content

Precise cut trimming: draggable edge handles and scroll-to-zoom - #30

Closed
advanivivek wants to merge 1 commit into
wassgha:mainfrom
advanivivek:feat/precise-cut-editing
Closed

advanivivek wants to merge 1 commit into
wassgha:mainfrom
advanivivek:feat/precise-cut-editing

Conversation

@advanivivek

Copy link
Copy Markdown

Two small features for getting cuts exactly right.

Draggable cut edges

Grab either edge of a cut in the timeline and drag to trim, independent of word timestamps. Fixes clipped or half-included words when Whisper timing is slightly off.

  • Drag scrubs the preview to the edge so you can land it precisely
  • Double-click an edge to reset it to the word boundary

Scroll to zoom, side-scroll to pan

  • Vertical wheel and pinch zoom at the cursor
  • Horizontal scroll pans the track

How it works

  • Cuts still derive from deleted words. Each cut gets a stable key plus an optional edge override.
  • One selector, getEffectiveCuts, applies overrides everywhere: timeline, live playback, and export.
  • Overrides are undoable and persisted with the project (IndexedDB).

Notes

  • No new dependencies
  • Default behavior is unchanged when nothing is adjusted
  • lint and build pass

Trim cuts precisely, independent of Whisper word timestamps, and move
around the waveform faster.

- Drag either edge of a cut region to extend or shorten it
- Vertical wheel and pinch zoom at the cursor; horizontal scroll pans
- Drag scrubs the preview to the edge; double-click an edge to reset

Cuts still derive from deleted words. Each cut carries a stable key plus
an optional edge override (cutAdjustments). getEffectiveCuts applies
overrides in one place, so the timeline, playback, and export stay in
sync. Overrides are undoable and saved with the project.
@wassgha

wassgha commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Hey @advanivivek , thank you so much for the PR! This is definitely highly requested, however there's #25 open already, so i'll try to combine both or mix and match features! Appreciate the work!

@wassgha wassgha mentioned this pull request Jul 29, 2026
1 of 10 tasks
wassgha added a commit that referenced this pull request Jul 29, 2026
@wassgha

wassgha commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Merged the changes from both PRs! Now the timeline is a lot more flexible and also supports splitting and recombining clips.

@wassgha wassgha closed this Jul 29, 2026
@advanivivek

Copy link
Copy Markdown
Author

Thank you so much @wassgha ✨ My pleasure. I have actually been using my own version of Descript style editor. And I have plenty of other features like AI auto-edit feature, multi-track handling etc. Would love to contribute anytime if there's any need.

@wassgha

wassgha commented Jul 29, 2026 •

Copy link
Copy Markdown
Owner

Absolutely! Looking forward to the PRs! Right now my priority is to get electron / desktop releases set up ( #26 ) then will focus back on features!

MrDebugger pushed a commit to MrDebugger/rescript that referenced this pull request Aug 25, 2026
Bring together PR wassgha#25 (word timing, Split, clip trim, manual cuts) and
PR wassgha#30 (draggable cut edges, scroll-to-zoom/pan). CutAdjustments override
word-derived cut edges without rewriting ASR timestamps; ManualCut and
SceneBoundary still handle blade/trim and scene splits. Wheel zoom anchors
at the cursor; cut-edge drags scrub preview and double-click resets.

Co-authored-by: Wassim Gharbi <wassgha@gmail.com>
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.

2 participants