Skip to content

feat: add 'slip into the tail' feature - #51

Open
PlkMarudny wants to merge 3 commits into
ronak-create:mainfrom
PlkMarudny:slide
Open

feat: add 'slip into the tail' feature#51
PlkMarudny wants to merge 3 commits into
ronak-create:mainfrom
PlkMarudny:slide

Conversation

@PlkMarudny

@PlkMarudny PlkMarudny commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Simple implementaion of sliding the clip being edited within in/out points (only to the left)

When a clip is selected and has in/out points set, 'slide' allows to move in/out markers of the clip simultaneously
sliding the trimmed part of the clip to the right by playhead time timelline - clip in point on the timeline. A button labelled slide has been added. It the operation is not possible, the toast is displayed.

Type of change

  • Bug fix
  • New feature (editing tool/GUI)
  • Docs
  • Refactor / internal

How was it verified?

  • node --check server.js && node --check app.js && node --check mcp-server.js passes
  • Opened the editor and confirmed the change in preview
  • Confirmed the change in an export (fast or realtime), if it affects rendering
  • Updated CLAUDE.md / README.md if the schema, props, or API changed

Checklist

  • No new runtime dependencies added
  • Preview and export render identically (single compositor)
  • Commits are focused and messages are descriptive

Summary by CodeRabbit

  • New Features

    • Added a Slip editing tool that shifts a selected clip’s source under the playhead while preserving its timeline position and duration.
    • Linked audio and video clips remain synchronized during Slip edits.
    • Added a Slip toolbar button, tooltip, and keyboard shortcut help entry.
    • Displays a notification when insufficient source media prevents further slipping.
  • Documentation

    • Updated editing feature and usage documentation to include Slip.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b558d825-052a-4314-9992-82e66dd85c90

📥 Commits

Reviewing files that changed from the base of the PR and between 3dd1d55 and 7a1e362.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • CLAUDE.md
  • README.md
  • app.js
  • index.html
🚧 Files skipped from review as they are similar to previous changes (5)
  • README.md
  • index.html
  • CLAUDE.md
  • CHANGELOG.md
  • app.js

📝 Walkthrough

Walkthrough

Adds a Slip timeline operation that shifts a selected clip’s source window to the playhead while preserving timeline placement and duration. It validates media bounds, synchronizes linked AV clips, updates preview state, and documents the operation.

Changes

Slide clip editing

Layer / File(s) Summary
Slide semantics and documentation
CLAUDE.md, README.md, CHANGELOG.md
Documents source slipping, media-tail constraints, linked AV synchronization, and Slip support among editing operations.
Playhead-based slide operation
app.js
Adds validation, source-window adjustment, undo support, linked-clip synchronization, persistence, inspector refresh, and paused-preview seeking.
Slide toolbar integration
index.html, app.js
Adds the Slip toolbar button, tooltip, keyboard-help entry, and click-handler wiring.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant SlideToolbar
  participant slideClipAtPlayhead
  participant syncLinkedTiming
  participant PreviewMedia
  User->>SlideToolbar: Click Slip
  SlideToolbar->>slideClipAtPlayhead: Invoke selected-clip operation
  slideClipAtPlayhead->>syncLinkedTiming: Synchronize linked AV timing
  slideClipAtPlayhead->>PreviewMedia: Seek while paused
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding a clip slip feature that uses available source tail.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 `@CLAUDE.md`:
- Around line 432-435: Update the Slide (slip) source documentation to describe
tail availability using the integrated source window returned by mediaTimeAt(),
rather than the constant-speed calculation in + duration×speed. Preserve the
guidance that start and duration remain unchanged and that the UI notifies when
no unused source tail remains.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e3d4c270-cec4-4dbf-93df-69c5d7dd39a4

📥 Commits

Reviewing files that changed from the base of the PR and between 4b7d8f5 and 863e55e.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • CLAUDE.md
  • README.md
  • app.js
  • index.html

Comment thread CLAUDE.md Outdated

@ronak-create ronak-create left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

The implementation is correct — mediaTimeAt() already integrates static speed and speed ramps, so preserving mediaTimeAt(c, clipEnd(c)) - c.in as the source window and re-checking it against media.duration is the right test. syncLinkedTiming() does copy in to linked partners (app.js:1239), so the linked-AV claim in the docs holds. Guards run before pushUndo(), so a rejected slip leaves no undo entry. Good.

One thing to change before merge: the name.

What this does — move the source in/out window while keeping start and duration fixed — is a slip edit. A slide edit is the opposite: it keeps the source window and moves the clip along the timeline, absorbing the difference into the neighbouring clips. Premiere, Resolve and Avid all use those two terms that way, so shipping this as "Slide" will actively mislead anyone coming from another NLE. The PR title says "slip into the tail" and CLAUDE.md hedges with "A slide (UI toolbar)" / "Slide (slip) source", so the ambiguity is already visible in the PR itself.

Could you rename to Slip — button label, #btnSlide#btnSlip, slideClipAtPlayhead(), and the CHANGELOG/README/CLAUDE.md wording? Happy to merge right after.

Two smaller notes, neither blocking:

  • It is forward-only. t >= c.start means mediaTimeAt(c, t) >= c.in always, so the srcIn - c.in > 1e-4 guard makes it impossible to slip backwards into unused head material. That matches the PR title, just worth documenting as a limitation — a real slip goes both ways.
  • It acts on state.selId only, so with a multi-selection it slips the primary clip and silently ignores the rest, unlike splitAtPlayhead(). Fine for a first pass.

Also: trivial CHANGELOG conflict with #50 and #41 (all three add a bullet under ### Added).

@ronak-create

Copy link
Copy Markdown
Owner

Heads up — I merged #47 and #50 just now, so this branch needs a rebase on main.

For this one it is only CHANGELOG.md: your bullet and the FPS-select bullet both land under ### Added. Keep both lines.

= added 3 commits August 5, 2026 12:05
simple implementaion of sliding the clip being edited within in/out points (only to the left)
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

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