Skip to content

Descript-style word timing, Split, and clip trim on the timeline - #25

Closed
wassgha wants to merge 1 commit into
mainfrom
cursor/flexible-clip-editing-9f32
Closed

wassgha wants to merge 1 commit into
mainfrom
cursor/flexible-clip-editing-9f32

Conversation

@wassgha

@wassgha wassgha commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a more flexible editing paradigm inspired by Descript: transcript stays primary, but the timeline can refine word timing and split/trim clips independently of whole-word deletes.

What’s new

Word timing (fixes ASR bleed)

  • Zoomed wordbar chips with draggable start/end handles
  • Expanding a word steals time from neighbors so deleting uh no longer eats into hello
  • Drag gestures coalesce into a single undo step

Split at playhead

  • Timeline Split button + S shortcut insert a scene boundary
  • Amber markers on the timeline; double-click to join
  • Keep ranges subdivide into selectable clips

Clip trim

  • Hover/select a clip to reveal indigo in/out handles
  • Dragging creates manual cuts merged with word-derived cuts for preview + export
  • Expanding a trim can shrink manual cuts and restore fully covered deleted words

Data model

  • ManualCut[] + SceneBoundary[] alongside Word[]
  • Undo/redo snapshots all three; persisted in IndexedDB projects
  • getCutRanges(words, duration, manualCuts) drives preview and export

Test plan

  • Transcribe (or import) media; zoom timeline until word chips show handles
  • Drag uh’s left edge right so it no longer overlaps hello, then Cut — hello audio remains
  • Press S / Split on a kept region; amber boundary appears; two clips selectable
  • Drag clip trim handles; red cut region updates; playback skips the trim
  • Undo/redo restores a full drag as one step
  • Export includes word cuts + manual trims
  • Reload saved project; splits and manual cuts restore
  • npx tsx scripts/edits-test.ts passes
Open in Web Open in Cursor 

Word-boundary drag lets users fix ASR bleed (e.g. uh overlapping hello).
Split (S) inserts scene boundaries that subdivide keep ranges into clips;
selected clips expose trim handles that create manual cuts merged into
preview and export. Undo coalesces drag gestures into a single step.

Co-authored-by: Wassim Gharbi <wassgha@gmail.com>
@wassgha

wassgha commented Jul 29, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #31

@wassgha wassgha closed this Jul 29, 2026
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