Skip to content

@remotion/studio: Add timeline duplicate shortcut#7852

Merged
JonnyBurger merged 2 commits into
remotion-dev:mainfrom
Arunsiva003:issue-7849-duplicate-sequence-shortcut
May 31, 2026
Merged

@remotion/studio: Add timeline duplicate shortcut#7852
JonnyBurger merged 2 commits into
remotion-dev:mainfrom
Arunsiva003:issue-7849-duplicate-sequence-shortcut

Conversation

@Arunsiva003
Copy link
Copy Markdown
Contributor

What changed

  • Added Cmd/Ctrl+D handling for selected timeline sequence rows.
  • Reused the existing duplicate JSX node API and notification behavior for source-file duplication.
  • Added coverage to ensure Cmd+D only targets sequence rows, not keyframes or nested effect/property rows.

Why it changed

This adds the requested keyboard path for duplicating a sequence from the timeline, matching the existing source-level duplicate action.

Fixes #7849

Tests run

  • bun test packages/studio/src/test/timeline-selection.test.ts
  • bun run formatting in packages/studio
  • bun run lint -- src/components/Timeline/TimelineDeleteKeybindings.tsx src/components/Timeline/duplicate-selected-timeline-item.ts src/test/timeline-selection.test.ts in packages/studio (passes with existing warnings elsewhere in src)
  • bun run make in packages/studio

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bugs Ready Ready Preview, Comment May 31, 2026 12:39pm
remotion Ready Ready Preview, Comment May 31, 2026 12:39pm

Request Review

Copy link
Copy Markdown
Contributor

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — Added a Cmd/Ctrl+D keyboard shortcut for duplicating selected timeline sequence rows, mirroring the existing Backspace delete shortcut and reusing the same /api/duplicate-jsx-node API and notification patterns.

  • Register Cmd/Ctrl+D keybinding in TimelineDeleteKeybindings.tsx that calls duplicateSelectedTimelineItems with the current selection.
  • Add duplicate-selected-timeline-item.ts with confirmation dialogs for programmatically duplicated sequences, type guard isDuplicatableSequenceRowSelection to restrict duplication to top-level sequence rows, and parallel API calls to duplicate each selected sequence.
  • Add test coverage in timeline-selection.test.ts verifying that only sequence rows (not keyframes or effect rows) are considered duplicatable.

Pullfrog  | View workflow run | Using Kimi K2𝕏

…rtcut

The new Cmd/Ctrl+D shortcut had its own copy of the confirm + duplicate +
notification flow that already existed inline in TimelineListItem. Route
the context-menu Duplicate action through duplicateSequencesFromSource()
so both entry points share the same implementation.

Also fix the all-or-nothing cancel: when a multi-selection mixes regular
and programmatically duplicated sequences, declining the confirm dialog
now only skips the duplicated subset instead of aborting the entire batch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JonnyBurger JonnyBurger merged commit 5b75715 into remotion-dev:main May 31, 2026
17 checks passed
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.

Allow duplicating a sequence using Cmd+D

3 participants