Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
333 changes: 311 additions & 22 deletions loadlast/load_last_video.py

Large diffs are not rendered by default.

248 changes: 243 additions & 5 deletions src/loadlast/video_preview.ts

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/sidebar/sidebar_docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export const NODE_DOCS: NodeDoc[] = [
"Interactive NLE (Non-Linear Editor) for hands-on video editing directly inside ComfyUI. Full-screen modal with timeline, transport controls, and editing tools — no LLM required.",
tips: [
"Press '?' in the editor to see all keyboard shortcuts.",
"Use the Razor tool (R) to split segments at the playhead.",
"Use 'S' to split segments at the playhead.",
"Speed control supports 0.25x–4x per segment.",
"Text overlays support configurable font size, color, and timing.",
"Transitions (crossfade, dip-to-black) are added between segments.",
Expand Down Expand Up @@ -298,7 +298,7 @@ export const EDITOR_SHORTCUTS: Shortcut[] = [
{ key: "O", action: "Mark Out point" },
{ key: "←", action: "Step back 1 frame" },
{ key: "→", action: "Step forward 1 frame" },
{ key: "R", action: "Razor tool (split at playhead)" },
{ key: "S", action: "Split at playhead" },
{ key: "V", action: "Select tool" },
{ key: "Delete", action: "Delete selected segment" },
{ key: "Ctrl+Z", action: "Undo" },
Expand Down
17 changes: 4 additions & 13 deletions src/videoeditor/EditToolbar.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/**
* EditToolbar — editing tool bar between transport and timeline.
*
* Provides mode-based tool selection (Select, Razor) and action buttons
* Provides mode-based tool selection (Select) and action buttons
* (Split, Delete). All buttons are agent-discoverable via data-tool-id
* and aria-label attributes.
*/

import { iconCursor, iconScissors, iconSplit, iconTrash, iconReset } from './icons';
import { iconCursor, iconSplit, iconTrash, iconReset } from './icons';

export type ToolMode = 'select' | 'razor';
export type ToolMode = 'select';

export interface EditToolbarCallbacks {
onToolChanged: (mode: ToolMode) => void;
Expand Down Expand Up @@ -43,13 +43,7 @@ export class EditToolbar {
selectBtn.classList.add('active');
this.modeButtons.set('select', selectBtn);

const razorBtn = this._makeToolBtn(
iconScissors, 'Razor', 'Razor tool — click on timeline to cut (C)',
'veditor-tool-razor', () => this.setMode('razor'),
);
this.modeButtons.set('razor', razorBtn);

modeGroup.append(selectBtn, razorBtn);
modeGroup.append(selectBtn);

// ── Separator ──
const sep1 = document.createElement('div');
Expand Down Expand Up @@ -109,9 +103,6 @@ export class EditToolbar {
case 'v':
this.setMode('select');
return true;
case 'c':
this.setMode('razor');
return true;
case 's':
this.callbacks.onSplitRequested();
return true;
Expand Down
3 changes: 1 addition & 2 deletions src/videoeditor/EditorModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ export class EditorModal {
'<kbd>Space</kbd> Play',
'<kbd>S</kbd> Split',
'<kbd>V</kbd> Select',
'<kbd>C</kbd> Razor',
'<kbd>1-5</kbd> Tool Tabs',
'<kbd>?</kbd> Shortcuts',
].join(' · ');
Expand Down Expand Up @@ -575,7 +574,7 @@ export class EditorModal {
return;
}

// Toolbar shortcuts (V, C, S, Delete/Backspace)
// Toolbar shortcuts (V, S, Delete/Backspace)
if (this.editToolbar.handleKey(e.key)) {
e.preventDefault();
return;
Expand Down
1 change: 0 additions & 1 deletion src/videoeditor/ShortcutOverlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const CATEGORIES: ShortcutCategory[] = [
title: 'Tools',
shortcuts: [
{ key: 'V', desc: 'Select tool' },
{ key: 'C', desc: 'Razor tool' },
{ key: 'S', desc: 'Split at playhead' },
{ key: 'Del', desc: 'Delete segment' },
{ key: 'R', desc: 'Reset all segments' },
Expand Down
9 changes: 0 additions & 9 deletions src/videoeditor/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,6 @@ export const iconCursor = L(
'<path d="M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.579a.5.5 0 0 0 .063-.947z"/>'
);

/** Scissors / Razor — lucide/scissors */
export const iconScissors = L(
'<circle cx="6" cy="6" r="3"/>' +
'<path d="M8.12 8.12 12 12"/>' +
'<path d="M20 4 8.12 15.88"/>' +
'<circle cx="6" cy="18" r="3"/>' +
'<path d="M14.8 14.8 20 20"/>'
);

/** Split — lucide/split */
export const iconSplit = L(
'<path d="M16 3h5v5"/>' +
Expand Down
Loading
Loading