Skip to content

Slip Edit in UI#301

Merged
htin1 merged 9 commits into
palmier-io:mainfrom
s00500:slip-edit
Jul 20, 2026
Merged

Slip Edit in UI#301
htin1 merged 9 commits into
palmier-io:mainfrom
s00500:slip-edit

Conversation

@s00500

@s00500 s00500 commented Jul 12, 2026

Copy link
Copy Markdown
Contributor
  • Slip Edit: First working version
  • Slip Edit: Preview start and end frame

(Closes #300)


Note

Medium Risk
Touches core trim/slip timeline logic and clip mutation paths; behavior is well-tested but mistakes could corrupt clip trims or A/V sync when linked.

Overview
Adds slip editing so users can shift which source frames play inside a clip without moving it on the timeline. The new Trim (T) tool mode keeps edge trims on the handles and starts a slip drag from the clip body; Escape cancels an in-progress slip without committing.

commitSlip and related helpers move trimStart/trimEnd in opposite directions with clamps for speed, linked partners, nested sequences (effectiveTrimEnd), and exclusions for multicam, image, and text clips. The timeline shows a live source-range overlay while dragging, and the viewer shows an FCP-style two-up (SlipTwoUpView) of start/end source frames during the drag.

Toolbar and T shortcut select the tool; unit tests cover slip behavior, propagation, and undo.

Reviewed by Cursor Bugbot for commit 0a58e34. Bugbot is set up for automated code reviews on this repo. Configure here.

@s00500

s00500 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Usage: Press T or select the double arrow next to the cut tool to enter slip mode :-)

@s00500
s00500 marked this pull request as ready for review July 13, 2026 19:47
Comment thread Sources/PalmierPro/Editor/EditorWindowController.swift
Comment thread Sources/PalmierPro/Timeline/TimelineView.swift
Comment thread Sources/PalmierPro/Editor/ViewModel/EditorViewModel+Linking.swift
Comment thread Sources/PalmierPro/Editor/ViewModel/EditorViewModel+Linking.swift
Comment thread Sources/PalmierPro/Timeline/TimelineInputController.swift
Comment thread Sources/PalmierPro/Editor/EditorWindowController.swift
Comment thread Sources/PalmierPro/Timeline/TimelineView.swift
@htin1

htin1 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

tested it out. looks pretty good! i think something I'd want in terms of UX(similar to Davinci):

when dragging, I wasn't sure where I can go. In Davinci, it shows you a "ghost" frame that tells you the position of the current trim part. It also shows you which direction you can go with the green and red. ref: https://www.youtube.com/watch?v=WLOaont2TCs

I can also add a follow up PR, if that's too much for this PR (I'll let you decide if you want to include it)

Screenshot 2026-07-15 at 10 22 05 PM


struct SlipDrag {
let clipId: String
let trackIndex: Int

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we double check if trackIndex is used at all?

from ai review:
trackIndex is never read: mouse-drag uses grabFrame and the delta caps, mouse-up and the draw
path use clipId/deltaFrames/propagateToLinked. Can be dropped from the struct and the init call
site.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will check

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

So... checking on the lsp, references that us it are in TimelineInputController.swift ;-)

So removing it gives a compile issues...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

maybe I was a bit fast on that call, checked again and removed it :-)

@s00500

s00500 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

I will get back to this in the next 2 days :-)

Comment thread Sources/PalmierPro/Timeline/DragState.swift
Comment thread Sources/PalmierPro/Timeline/TimelineInputController.swift
@htin1

htin1 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@s00500 it should be good once ci is fixed (just need to rebase i think)

s00500 added 7 commits July 20, 2026 08:28
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
…stay active

Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
@s00500

s00500 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Rebased on main :-)

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 76b9fa4. Configure here.

Comment thread Sources/PalmierPro/Preview/SlipTwoUpView.swift Outdated
s00500 added 2 commits July 20, 2026 20:50
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>

@htin1 htin1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm, thank you!

@htin1
htin1 merged commit 5d1d8a5 into palmier-io:main Jul 20, 2026
2 checks passed
@s00500

s00500 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Awesome!!! Thanks!

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.

Slip Edit function (like FCPX)

2 participants