Add basic visual editing features to the Remotion Studio timeline. The project already has a working Remotion composition that reads timeline.json and renders video/audio/overlay tracks. Now we need to add interactive editing directly in the browser UI. Five features: (1) DRAG clips to reposition them on the timeline (change clip.at), (2) SPEED control - zoom/speed up/slow down clips (change clip.speed), (3) CROP/TRIM the ends of clips (change clip.from and clip.to), (4) SPLIT clips at the playhead into two separate clips, (5) MUTE clips (toggle clip.volume to 0 or back). All edits must write back to timeline.json so they persist and are picked up by Python tools. The existing viewer/ has a working drag-drop timeline using @xzdarcy/react-timeline-editor that can inform the approach. The current Remotion project is at remotion/ with compositions in remotion/src/timeline/. KEY CONSTRAINTS: (1) Edits write to timeline.json - the shared config that Python tools also read/write. (2) The UI runs inside or alongside Remotion Studio (npx remotion studio). (3) Keep it simple - these are basic NLE controls, not a full editor rebuild. (4) Project is open source.
code
Plan:
# Implementation Plan: Interactive Timeline Editing in Remotion Studio
Overview
The Remotion project at remotion/ has a read-only Timeline composition that fetches timeline.json + asset-registry.json via static files and renders video/audio/overlay tracks. There is no write path from the browser back to disk — setup-public.shcopies (not symlinks) the JSON files into public/, and load-config.ts only reads.
The legacy viewer/ (Vite + @xzdarcy/react-timeline-editor) already solves drag/trim/save for YAML, including a full API server in vite.config.ts with POST /api/save-timeline. That architecture is the reference but targets timeline.yaml, not timeline.json.
Constraints:
All edits write to the roottimeline.json (shared with Python tools).
UI runs inside Remotion Studio (npx remotion studio).
Keep it simple — basic NLE controls, not a full editor.
Assistant
User
Assistant
Reviewing the revised plan against the code now. I’m checking the new assumptions directly in the Remotion install and current repo so I can separate genuinely fixed issues from claims the repo still does not support.
Assistant
The revised plan fixed the easy schema and scope issues. I’m now checking the remaining behavioral claims, especially whether Studio will actually recompute composition metadata after timeline.json changes, because that part still has to line up with the current code path rather than the plan narrative.
Assistant
I found one prior flag that still doesn’t hold up: the revised plan claims public-file changes will make Studio recompute calculateMetadata(), but the installed Studio code only updates the static-file list on those events. I’m checking one more pass for any remaining core edit-path bugs before I finalize the flag set.
Assistant
Remotion Studio is not designed for custom panels; we must inject UI via an overlay component rendered inside the composition or a separate floating panel using a React portal.
Key architectural challenge: Remotion Studio serves static files from public/ but has no built-in write API. We need a sidecar server or Remotion Studio middleware to write timeline.json back to disk.
Phase 1: Write Path (Backend)
Step 1: Sidecar API server for timeline persistence
Scope: Medium Files:remotion/server.mjs (new), remotion/package.json
Remotion Studio doesn't expose middleware hooks. The simplest approach is a lightweight sidecar Express/Hono server on a separate port (e.g., 3111) that the browser UI calls.
Createremotion/server.mjs — a minimal Node.js server with two endpoints:
GET /api/timeline → reads and returns ../timeline.json
POST /api/timeline → writes request body to ../timeline.json, then copies to public/timeline.json so Remotion's static server picks up the change on next poll
CORS headers allowing Remotion Studio origin
Add a "server" script to package.json: node server.mjs
Update"dev" script to launch both: npm run setup-public && concurrently \"npx remotion studio\" \"node server.mjs\" (add concurrently as a dev dependency, or use a simple & background approach in a shell script)
Validate: Start the server, POST a modified timeline, confirm timeline.json on disk updates and Remotion Studio's 1.5s poll picks up the change.
Step 2: Client-side save utility
Scope: Small Files:remotion/src/save-config.ts (new)
Add a debounced wrapper (300ms) so rapid drag events don't spam writes.
Validate: Import in Timeline.tsx temporarily, trigger a save, confirm disk file updates.
Phase 2: Editing UI Shell
Step 3: Editor overlay component
Scope: Medium Files:remotion/src/timeline/EditorOverlay.tsx (new), remotion/src/timeline/Timeline.tsx
Remotion compositions render inside an <AbsoluteFill>. We add a transparent overlay on top that captures editing interactions and renders controls. This overlay is only active in Studio (detected via typeof window !== 'undefined' + not in render mode).
CreateEditorOverlay.tsx:
Receives current config and an onConfigChange(config) callback
Renders a floating toolbar (bottom of viewport) with: track labels, clip bars, and action buttons
Uses useCurrentFrame() from Remotion to know playhead position
Maintains local editing state; calls onConfigChange which triggers debounced save
Add <EditorOverlay> as the topmost layer inside <AbsoluteFill>
Pass config and a handleConfigChange that calls saveTimeline() and updates local state
Only render the overlay when process.env.NODE_ENV !== 'production' (skip during render)
Validate: Overlay appears in Studio, doesn't appear during npx remotion render.
Step 4: Clip selection and property panel
Scope: Small Files:remotion/src/timeline/EditorOverlay.tsx, remotion/src/timeline/ClipPanel.tsx (new)
CreateClipPanel.tsx — a floating side panel showing selected clip properties:
id, asset, track, at, from, to, speed, volume
Numeric inputs for direct editing
This panel is the foundation that all five features write through
Wire clip selection: clicking a clip bar in the overlay sets selectedClipId
Validate: Select a clip, see its properties, change at via input, confirm save to disk.
Phase 3: The Five Editing Features
Step 5: DRAG — reposition clips on the timeline
Scope: Medium Files:remotion/src/timeline/EditorOverlay.tsx
Implement horizontal drag on clip bars in the overlay:
onPointerDown → capture initial clip.at and pointer X
onPointerMove → compute delta in seconds from pixel delta (using timeline scale)
onPointerUp → commit new clip.at, trigger save
Snap to 0.1s increments (shift key for frame-level precision)
Validate: Drag a clip, release, confirm timeline.json updated at value. Preview reflects new position after 1.5s reload.
Step 6: CROP/TRIM — adjust clip start and end
Scope: Medium Files:remotion/src/timeline/EditorOverlay.tsx
Add left/right resize handles on clip bars:
Left handle: adjusts clip.from (source start) and clip.at (keeps playback position correct)
Right handle: adjusts clip.to (source end)
Clamp values: from >= 0, to <= asset duration (from assetEntry.duration), from < to
Validate: Trim a clip, confirm from/to in timeline.json, preview shows trimmed result.
Step 7: SPEED control
Scope: Small Files:remotion/src/timeline/ClipPanel.tsx
Add a speed slider/input to the clip panel (range 0.25–4.0, step 0.25, default 1)
On change: update clip.speed, save. The clip bar width in the overlay should reflect the speed-adjusted duration ((to - from) / speed).
Validate: Change speed to 2x, confirm speed in JSON, clip plays at double speed in preview.
Step 8: SPLIT clip at playhead
Scope: Medium Files:remotion/src/timeline/EditorOverlay.tsx, remotion/src/timeline/ClipPanel.tsx
Add a "Split" button in the clip panel (enabled when playhead is within selected clip)
On click:
Calculate split point in source time: splitSource = clip.from + (playheadSeconds - clip.at) * clip.speed
Create two clips:
Clip A: same id, same at, from unchanged, to = splitSource
Clip B: new id (e.g., {originalId}-b), at = playheadSeconds, from = splitSource, to = originalTo
Both inherit speed, volume, track, asset, overlay position
Replace original clip with the two new clips in config.clips
Save
Validate: Split a clip, confirm two clips in timeline.json, preview shows seamless playback at the split point.
Step 9: MUTE toggle
Scope: Small Files:remotion/src/timeline/ClipPanel.tsx
Add a mute toggle button in the clip panel
On click: set clip.volume = 0 if currently > 0, or clip.volume = 1 if currently 0
Visual indicator: muted clips show a muted icon on their bar in the overlay
Validate: Mute an audio clip, confirm volume: 0 in JSON, no audio in preview.
Phase 4: Polish and Integration
Step 10: Keyboard shortcuts
Scope: Small Files:remotion/src/timeline/EditorOverlay.tsx
Add keyboard handlers:
M — mute/unmute selected clip
S — split selected clip at playhead
Delete/Backspace — remove selected clip
Escape — deselect
Validate: Keyboard shortcuts work in Studio without conflicting with Remotion's built-in shortcuts.
Step 11: setup-public.sh update for live editing
Scope: Small Files:remotion/setup-public.sh
Change the JSON file copy to symlinks or document that the sidecar server handles the copy-back:
bash
# Instead of cp, create hard links or let the sidecar handle sync
Actually, since the sidecar writes to both ../timeline.json and public/timeline.json, the existing copy approach is fine. But we should ensure setup-public.sh doesn't overwrite an edit on restart. Add a --no-copy-json flag or simply note this in comments.
Validate:npm run dev starts both Studio and sidecar, edits persist across restarts.
Steps 5–9 (five features) — can be done in any order, but DRAG (5) and TRIM (6) are the most valuable and should come first
Step 10 (shortcuts) → Step 11 (polish) — after features work
Validation Order
After Step 2: manually POST to sidecar, confirm disk write + Studio hot-reload
After Step 4: select a clip in overlay, edit at via panel, confirm round-trip
After each of Steps 5–9: test the feature in isolation, confirm JSON output matches expectation
Final: edit a clip with each feature, render with python3 tools/render.py --dry-run, confirm Python tools read the edited timeline.json correctly
code
Plan metadata:
{
"version": 1,
"timestamp": "2026-03-23T20:42:00Z",
"hash": "sha256:ffa21e5203f2df9c407037f261287f2961a0d61299df969d71fc415ed4987acf",
"questions": [
"Should the editing UI be a miniature timeline strip (like the viewer's @xzdarcy/react-timeline-editor approach) or a simpler overlay on top of the video preview area? The timeline-strip approach is richer but heavier; the overlay approach is simpler but less conventional for NLE editing.",
"The sidecar server approach (separate port) is the simplest way to get a write path since Remotion Studio doesn't expose middleware. An alternative is to use a Remotion Studio custom server \u2014 Remotion v4 supports remotion.config.tsConfig.overrideWebpackConfig() but not custom API routes. Are you OK with a sidecar on port 3111, or do you have a preference for how the write-back works?",
"For SPLIT, how should new clip IDs be generated? The current convention is clip-0, clip-1, etc. Splitting clip-5 could produce clip-5 (left half) + clip-5-b (right half), or we could renumber. Renumbering is cleaner but changes existing IDs that Python tools or manual references might depend on.",
"Should DRAG be constrained within a clip's own track, or should clips be draggable across tracks (e.g., moving a video clip to the overlay track)? Cross-track drag adds complexity.",
"Do you want undo/redo support in this phase, or is 'edit timeline.json, git diff to see changes' sufficient for now?"
],
"success_criteria": [
"All five editing features (drag, speed, crop/trim, split, mute) are functional in the browser when running npm run dev from remotion/",
"Every edit writes back to the root timeline.json (not just public/timeline.json) so Python tools like python3 tools/view.py reflect changes",
"The Remotion preview updates within ~2 seconds of any edit (leveraging the existing 1.5s poll in Timeline.tsx)",
"Splitting a clip produces two valid clips that play back seamlessly with no gap or overlap at the split point",
"The editing overlay does NOT appear during npx remotion render (production renders are clean)",
"python3 tools/render.py --dry-run succeeds after edits \u2014 the JSON schema remains compatible with Python tools",
"The sidecar server starts automatically as part of the dev workflow (single npm run dev command)"
],
"assumptions": [
"Remotion Studio v4.0.434 does not support custom API middleware or server-side routes \u2014 a sidecar server is required for the write path",
"The editing overlay will be rendered as a React component inside the Remotion composition, positioned above the video with pointer-events \u2014 this is the lowest-friction approach since Remotion doesn't support custom panels outside the composition",
"DRAG is horizontal only (repositioning on the timeline axis) \u2014 not vertical cross-track dragging, unless you say otherwise",
"No undo/redo in this phase \u2014 the file is version-controlled with git and the 1.5s poll means external edits (including git checkout) are picked up automatically",
"The sidecar server runs on localhost:3111 with CORS allowing the Remotion Studio origin (typically localhost:3000)",
"Clip IDs are stable across edits \u2014 SPLIT keeps the original ID for the left portion and appends '-b' for the right portion, avoiding renumbering",
"Speed range is 0.25x\u20134.0x which covers practical NLE use cases without needing reverse playback",
"setup-public.sh's copy behavior is acceptable \u2014 the sidecar server writes to both locations (root and public/) to keep them in sync"
],
"structure_warnings": []
}
code
Plan structure warnings from validator:
[]
Existing flags:
[]
Requirements:
- Consider whether the plan is at the right level of abstraction.
- Reuse existing flag IDs when the same concern is still open.
- `verified_flag_ids` should list previously addressed flags that now appear resolved.
- Focus on concrete issues that would cause real problems.
- Robustness level: standard. Use balanced judgment. Flag significant risks, but do not spend flags on minor polish or executor-obvious boilerplate.
- Verify that the plan remains aligned with the user's original intent.
- Verify that the plan follows the expected structure: one H1 title, `## Overview`, numbered `## Step N:` sections with file references and numbered substeps, plus `## Execution Order` or `## Validation Order`. Missing structure should be flagged as category `completeness` with severity_hint `likely-significant`.
- Flag scope creep explicitly when the plan grows beyond the original idea or recorded user notes. Use the phrase "Scope creep:" in the concern.
- Assign severity_hint carefully. Implementation details the executor will naturally resolve should usually be `likely-minor`.
{"flags":[{"id":"duration-metadata-stale","concern":"The plan assumes the existing 1.5s poll is enough, but edits that change total timeline length will leave Studio's composition metadata stale.","category":"correctness","severity_hint":"likely-significant","evidence":"Root.tsx computes durationInFrames inside calculateMetadata, while Timeline.tsx only reloads local component state on a timer. Split/trim/speed edits can change the composition end time without re-running metadata, so Studio scrubbing and render bounds can stay wrong."},{"id":"render-overlay-gating","concern":"The proposed process.env.NODE_ENV !== 'production' gate is the wrong control point for hiding editor UI during renders.","category":"correctness","severity_hint":"likely-significant","evidence":"This repo already passes composition props through Root.tsx and defines preview-related props in load-config.ts. NODE_ENV is not how the current composition distinguishes Studio preview from npx remotion render, so the overlay could leak into output."},{"id":"save-resolved-config-schema","concern":"The save path is underspecified and currently points at the wrong object shape.","category":"correctness","severity_hint":"likely-significant","evidence":"Timeline.tsx stores ResolvedTimelineConfig, but load-config.ts adds per-clip assetEntry data and a top-level registry that are not part of root timeline.json (load-config.ts). The plan needs an explicit serializer back to bare TimelineConfig before POST/write."},{"id":"overlay-hold-semantics-missing","concern":"The plan does not account for overlay clips using hold duration semantics instead of normal from/to media trimming.","category":"completeness","severity_hint":"likely-significant","evidence":"load-config.ts treats hold as a first-class clip duration, and the legacy converter special-cases overlays in timeline-data.ts and timeline-data.ts. Generic trim/speed/split rules against from/to will not map cleanly to overlay clips."},{"id":"scope-creep-delete-shortcuts","concern":"Scope creep: Step 10 adds clip deletion and a keyboard-shortcut layer that are outside the five requested editing features.","category":"other","severity_hint":"likely-minor","evidence":"The idea asks for drag, speed, trim, split, and mute only. Delete/Backspace removal in Plan Step 10 introduces a sixth destructive edit path and extra persistence/testing surface."},{"id":"plan-structure-step-headings","concern":"The plan misses the required section format.","category":"completeness","severity_hint":"likely-significant","evidence":"You asked for numbered ## Step N: sections. The document uses ### Step 1, ### Step 2, and so on, so it does not satisfy the stated structure contract even though the content is otherwise organized."}],"verified_flag_ids":[],"disputed_flag_ids":[]}
You are an independent reviewer. Critique the plan against the actual repository.
Add basic visual editing features to the Remotion Studio timeline. The project already has a working Remotion composition that reads timeline.json and renders video/audio/overlay tracks. Now we need to add interactive editing directly in the browser UI. Five features: (1) DRAG clips to reposition them on the timeline (change clip.at), (2) SPEED control - zoom/speed up/slow down clips (change clip.speed), (3) CROP/TRIM the ends of clips (change clip.from and clip.to), (4) SPLIT clips at the playhead into two separate clips, (5) MUTE clips (toggle clip.volume to 0 or back). All edits must write back to timeline.json so they persist and are picked up by Python tools. The existing viewer/ has a working drag-drop timeline using @xzdarcy/react-timeline-editor that can inform the approach. The current Remotion project is at remotion/ with compositions in remotion/src/timeline/. KEY CONSTRAINTS: (1) Edits write to timeline.json - the shared config that Python tools also read/write. (2) The UI runs inside or alongside Remotion Studio (npx remotion studio). (3) Keep it simple - these are basic NLE controls, not a full editor rebuild. (4) Project is open source.
code
Plan:
# Implementation Plan: Interactive Timeline Editing in Remotion Studio
Overview
The Remotion project at remotion/ has a read-only Timeline composition that fetches timeline.json + asset-registry.json via static files and renders video/audio/overlay tracks. There is no write path from the browser back to disk — setup-public.sh copies the JSON files into public/, and load-config.ts only reads.
The composition uses a ResolvedTimelineConfig type (load-config.ts:61) that enriches clips with assetEntry data and adds a top-level registry — these are runtime-only fields that must be stripped before writing back to timeline.json.
Constraints:
All edits write to the roottimeline.json (shared with Python tools).
UI runs inside Remotion Studio (npx remotion studio).
Keep it simple — basic NLE controls, not a full editor.
Remotion Studio has no built-in write API — a sidecar server is needed.
Overlay clips may use hold (static duration) instead of from/to — editing features must handle both semantics.
Clip duration semantics: Clips use either from/to (media range) or hold (static display duration). getClipSourceDuration in load-config.ts:148 already handles this. Trim and split operations apply only to from/to clips; for hold clips, trim adjusts hold directly and split divides hold into two portions.
Step 1: Sidecar API server for timeline persistence
Scope: Medium Files:remotion/server.mjs (new), remotion/package.json
Createremotion/server.mjs — a minimal Node.js HTTP server (no framework, use node:http) with two endpoints:
GET /api/timeline → reads and returns ../timeline.json
POST /api/timeline → validates the body has output and clips keys (basic schema check), writes to ../timeline.json, then copies to public/timeline.json
CORS headers allowing http://localhost:3000 (Remotion Studio default)
Add a "server" script to package.json: node server.mjs
Update"dev" script: npm run setup-public && node server.mjs & npx remotion studio (background the sidecar with &, no extra dependency needed)
Validate: Start the server, POST a modified timeline, confirm ../timeline.json on disk updates and Remotion Studio's 1.5s poll picks up the change.
Step 2: Client-side save utility with serializer
Scope: Small Files:remotion/src/save-config.ts (new)
The key challenge here is that the component state is ResolvedTimelineConfig (with assetEntry on each clip and a top-level registry), but timeline.json stores bare TimelineConfig (just output + clips with no resolved asset data). We must strip the resolved fields before saving.
Createremotion/src/save-config.ts exporting:
serializeForDisk(resolved: ResolvedTimelineConfig): TimelineConfig — strips assetEntry from each clip and removes the top-level registry, returning a clean { output, clips } object. For each clip, only the properties defined in TimelineClip (load-config.ts:10-26) are kept: id, at, track, asset, from, to, speed, hold, volume, x, y, width, height, opacity, effects.
saveTimeline(config: ResolvedTimelineConfig): Promise<void> — calls serializeForDisk, then POSTs to http://localhost:3111/api/timeline.
A debounced wrapper (300ms) so rapid drag events don't spam writes.
Validate: Import in Timeline.tsx temporarily, serialize the current config, confirm the output matches the shape in timeline.json exactly (no assetEntry, no registry, no src). POST it and confirm disk file round-trips correctly.
Step 3: Editor overlay component
Scope: Medium Files:remotion/src/timeline/EditorOverlay.tsx (new), remotion/src/timeline/Timeline.tsx
Remotion compositions render inside an <AbsoluteFill>. We add a transparent overlay on top that captures editing interactions and renders controls.
Render-gating: The overlay must NOT appear during npx remotion render. The current composition already receives a preview prop via TimelineCompositionProps (load-config.ts:67), and Root.tsx:28 sets defaultProps={{ preview: false }}. However, calculateMetadata does not currently forward a render-vs-studio signal. The correct approach: use Remotion's getRemotionEnvironment() API which returns { isStudio, isRendering, isPlayer }. Gate the overlay on getRemotionEnvironment().isStudio === true.
CreateEditorOverlay.tsx:
Receives current config (ResolvedTimelineConfig) and an onConfigChange(config: ResolvedTimelineConfig) callback
Gates rendering on getRemotionEnvironment().isStudio — returns null if not in Studio
Renders a floating toolbar (bottom of viewport, outside the composition's visual area using a React portal to document.body) with: track labels, clip bars, and action buttons
Uses useCurrentFrame() and config's fps to compute playhead position in seconds
Maintains local editing state (selectedClipId); calls onConfigChange on edits
Pass config and a handleConfigChange that: (a) updates local state via setConfig, (b) calls the debounced saveTimeline() from Step 2
Validate: Overlay appears in Studio, does NOT appear during npx remotion render. Confirm by running a test render.
Step 4: Clip selection and property panel
Scope: Small Files:remotion/src/timeline/EditorOverlay.tsx, remotion/src/timeline/ClipPanel.tsx (new)
CreateClipPanel.tsx — a floating side panel showing selected clip properties:
Shows: id, asset, track, at
For from/to clips: shows from, to, speed
For hold clips: shows hold (duration in seconds)
Shows volume for all clips
Numeric inputs for direct editing of any displayed field
This panel is the foundation that all five features write through
Wire clip selection: clicking a clip bar in the overlay sets selectedClipId
Validate: Select a clip, see its properties, change at via input, confirm save to disk with correct schema.
Step 5: DRAG — reposition clips on the timeline
Scope: Medium Files:remotion/src/timeline/EditorOverlay.tsx
Implement horizontal drag on clip bars in the overlay:
onPointerDown → capture initial clip.at and pointer X
onPointerMove → compute delta in seconds from pixel delta (using timeline scale: pixels per second)
onPointerUp → commit new clip.at, trigger save
Drag is horizontal only (within same track), not cross-track
Snap to 0.1s increments (hold Shift for frame-level precision at 1/fps)
Clampat >= 0
Validate: Drag a clip, release, confirm timeline.json updated at value. Preview reflects new position after poll reload.
Step 6: CROP/TRIM — adjust clip start and end
Scope: Medium Files:remotion/src/timeline/EditorOverlay.tsx
Two behaviors depending on clip type:
For from/to clips (video, audio):
Add left/right resize handles on clip bars:
Left handle: adjusts clip.from (source start). Also adjusts clip.at by the same delta to keep the clip's visual start in sync with the source trim.
Right handle: adjusts clip.to (source end)
Clamp values: from >= 0, to <= assetEntry.duration (from resolved asset), from < to
For hold clips (overlays):
Right handle adjusts clip.hold directly (minimum 0.1s)
Left handle adjusts clip.at and clip.hold together (moving start while keeping end position fixed)
Validate: Trim a from/to clip, confirm from/to in timeline.json. Trim a hold clip (if any exist), confirm hold updates. Preview shows trimmed result.
Step 7: SPEED control
Scope: Small Files:remotion/src/timeline/ClipPanel.tsx
Add a speed slider/input to the clip panel (range 0.25–4.0, step 0.25, default 1)
Disable for hold clips (speed is meaningless for static images)
On change: update clip.speed, save. The clip bar width in the overlay should reflect the speed-adjusted duration ((to - from) / speed) using getClipTimelineDuration from load-config.ts:156.
Validate: Change speed to 2x, confirm speed in JSON, clip plays at double speed in preview.
Step 8: SPLIT clip at playhead
Scope: Medium Files:remotion/src/timeline/EditorOverlay.tsx, remotion/src/timeline/ClipPanel.tsx
Add a "Split" button in the clip panel (enabled when playhead is within selected clip's time range)
On click — for from/to clips:
Calculate split point in source time: splitSource = clip.from + (playheadSeconds - clip.at) * (clip.speed ?? 1)
Clip A: keep original id, same at, from unchanged, to = splitSource
Clip B: new id = {originalId}-b, at = playheadSeconds, from = splitSource, to = originalTo
Both inherit speed, volume, track, asset, position props
On click — for hold clips:
elapsed = playheadSeconds - clip.at
Clip A: keep original id, hold = elapsed
Clip B: new id = {originalId}-b, at = playheadSeconds, hold = originalHold - elapsed
Both inherit position/visual props
Replace original clip with the two new clips in config.clips, save
Validate: Split a clip, confirm two clips in timeline.json, preview shows seamless playback at the split point.
Step 9: MUTE toggle
Scope: Small Files:remotion/src/timeline/ClipPanel.tsx
Add a mute toggle button in the clip panel
On click: set clip.volume = 0 if currently > 0, or clip.volume = 1 if currently 0 (or undefined)
Visual indicator: muted clips show a muted icon/strikethrough on their bar in the overlay
Validate: Mute an audio clip, confirm volume: 0 in JSON, no audio in preview.
Step 10: Keyboard shortcuts
Scope: Small Files:remotion/src/timeline/EditorOverlay.tsx
Add keyboard handlers (only when overlay is focused / a clip is selected):
M — mute/unmute selected clip
S — split selected clip at playhead
Escape — deselect
Note: No Delete/Backspace shortcut — clip deletion was not in the original five features.
Validate: Keyboard shortcuts work in Studio without conflicting with Remotion's built-in shortcuts (Space for play/pause, arrow keys for frame navigation).
Step 11: Dev workflow polish
Scope: Small Files:remotion/setup-public.sh
Add a comment in setup-public.sh noting that the sidecar server handles write-back to both ../timeline.json and public/timeline.json, so the initial copy is just for bootstrapping.
Validate:npm run dev starts both Studio and sidecar, edits persist across restarts. python3 tools/view.py reflects edits made in the browser.
Execution Order
Step 1 → Step 2 — establish the write path with correct serialization, validate round-trip
Step 3 → Step 4 — build the UI shell with proper render-gating
Steps 5–9 — the five editing features. DRAG (5) and TRIM (6) first as highest-value; order of 7/8/9 is flexible
Step 10 → Step 11 — polish after features work
Validation Order
After Step 2: serialize a ResolvedTimelineConfig, confirm output matches TimelineConfig schema exactly. POST to sidecar, confirm disk write + Studio hot-reload.
After Step 3: confirm overlay appears in Studio, run npx remotion render and confirm overlay is absent from output.
After Step 4: select a clip, edit at via panel, confirm round-trip to disk with no schema corruption.
After each of Steps 5–9: test the feature in isolation, confirm JSON output. For trim/split, test both from/to clips and hold clips (create a test overlay clip if needed).
Final: edit a clip with each feature, run python3 tools/render.py --dry-run, confirm Python tools read the edited timeline.json correctly.
code
Plan metadata:
{
"version": 2,
"timestamp": "2026-03-23T19:48:00Z",
"hash": "sha256:37f68411087c5a4a616e1bc13053b601f3750fa58d96aa30e96c40eb6c88f646",
"changes_summary": "Revised the plan to address all 5 flags:\n\n1. save-resolved-config-schema: Added explicit serializeForDisk() function in Step 2 that strips assetEntry from clips and removes registry before writing. Listed the exact TimelineClip properties to preserve. Added validation that serialized output matches timeline.json schema.\n\n2. render-overlay-gating: Replaced process.env.NODE_ENV !== 'production' with getRemotionEnvironment().isStudio \u2014 Remotion's own API for detecting Studio vs render context. Added explicit render validation step.\n\n3. duration-metadata-stale: This flag noted that calculateMetadata in Root.tsx won't re-run when clips change via the 1.5s poll. However, this is actually handled correctly \u2014 calculateMetadata runs on each Studio refresh/navigation, and the 1.5s poll updates the component's local state for visual preview. The composition metadata (scrub bounds) updates when Studio detects the static file change. No plan change needed beyond acknowledging this in the architecture. The sidecar writes to public/timeline.json which triggers Remotion's file watcher.\n\n4. overlay-hold-semantics-missing: Added explicit hold vs from/to handling throughout Steps 4, 6, 7, and 8. Trim adjusts hold directly for hold clips. Speed is disabled for hold clips. Split divides hold proportionally. ClipPanel shows different fields based on clip type.\n\n5. plan-structure-step-headings: Restructured from ### Step N under phase headers to ## Step N: at the top level with proper H1 title, ## Overview, and ordering sections.\n\nScope creep removed: Deleted the Delete/Backspace shortcut from Step 10 \u2014 clip deletion was not in the original five features (drag, speed, trim, split, mute).",
"flags_addressed": [
"duration-metadata-stale",
"render-overlay-gating",
"save-resolved-config-schema",
"overlay-hold-semantics-missing",
"plan-structure-step-headings"
],
"questions": [
"Should the editing UI be a miniature timeline strip (like the viewer's @xzdarcy/react-timeline-editor approach) or a simpler overlay on top of the video preview area? The timeline-strip approach is richer but heavier; the overlay approach is simpler but less conventional for NLE editing.",
"The sidecar server approach (separate port) is the simplest way to get a write path since Remotion Studio doesn't expose middleware. Are you OK with a sidecar on port 3111, or do you have a preference for how the write-back works?",
"For SPLIT, the plan keeps the original ID for the left half and appends '-b' for the right half (e.g., clip-5 becomes clip-5 + clip-5-b). Is that acceptable, or would you prefer a different naming scheme?",
"Should DRAG be constrained within a clip's own track (current plan), or should clips be draggable across tracks?",
"Do you want undo/redo support in this phase, or is git diff sufficient for now?"
],
"success_criteria": [
"All five editing features (drag, speed, crop/trim, split, mute) are functional in the browser when running npm run dev from remotion/",
"Every edit writes back to the root timeline.json (not just public/timeline.json) so Python tools like python3 tools/view.py reflect changes",
"The save path correctly serializes ResolvedTimelineConfig back to bare TimelineConfig \u2014 no assetEntry, registry, or src fields leak into timeline.json",
"The Remotion preview updates within ~2 seconds of any edit (leveraging the existing 1.5s poll in Timeline.tsx)",
"Splitting a clip produces two valid clips that play back seamlessly with no gap or overlap at the split point",
"The editing overlay does NOT appear during npx remotion render \u2014 gated on getRemotionEnvironment().isStudio",
"python3 tools/render.py --dry-run succeeds after edits \u2014 the JSON schema remains compatible with Python tools",
"The sidecar server starts automatically as part of the dev workflow (single npm run dev command)",
"Trim and split operations handle hold clips correctly \u2014 adjusting hold duration rather than from/to",
"Speed control is disabled for hold clips (static images)"
],
"assumptions": [
"Remotion Studio v4 provides getRemotionEnvironment() API that reliably distinguishes Studio from render context",
"Remotion Studio's file watcher detects changes to public/timeline.json written by the sidecar server, triggering calculateMetadata to re-run",
"The sidecar server runs on localhost:3111 with CORS allowing localhost:3000 (Remotion Studio default)",
"No hold clips exist in the current timeline.json, but the code supports them \u2014 editing features must handle both semantics for future-proofing",
"Clip IDs are stable across edits \u2014 SPLIT keeps original ID for left portion and appends '-b' for right",
"DRAG is horizontal only (within same track), not cross-track",
"No undo/redo in this phase \u2014 git provides version history",
"Speed range 0.25x\u20134.0x covers practical NLE use cases",
"A bare node:http server (no Express/Hono) is sufficient for the sidecar \u2014 only 2 endpoints needed"
],
"structure_warnings": [],
"delta_from_previous_percent": 57.13
}
code
Plan structure warnings from validator:
[]
Existing flags:
[
{
"id": "duration-metadata-stale",
"concern": "The plan assumes the existing 1.5s poll is enough, but edits that change total timeline length will leave Studio's composition metadata stale.",
"status": "addressed",
"severity": "significant"
},
{
"id": "render-overlay-gating",
"concern": "The proposed process.env.NODE_ENV !== 'production' gate is the wrong control point for hiding editor UI during renders.",
"status": "addressed",
"severity": "significant"
},
{
"id": "save-resolved-config-schema",
"concern": "The save path is underspecified and currently points at the wrong object shape.",
"status": "addressed",
"severity": "significant"
},
{
"id": "overlay-hold-semantics-missing",
"concern": "The plan does not account for overlay clips using hold duration semantics instead of normal from/to media trimming.",
"status": "addressed",
"severity": "significant"
},
{
"id": "scope-creep-delete-shortcuts",
"concern": "Scope creep: Step 10 adds clip deletion and a keyboard-shortcut layer that are outside the five requested editing features.",
"status": "open",
"severity": "minor"
},
{
"id": "plan-structure-step-headings",
"concern": "The plan misses the required section format.",
"status": "addressed",
"severity": "significant"
}
]
code
Requirements:
- Consider whether the plan is at the right level of abstraction.
- Reuse existing flag IDs when the same concern is still open.
- `verified_flag_ids` should list previously addressed flags that now appear resolved.
- Focus on concrete issues that would cause real problems.
- Robustness level: standard. Use balanced judgment. Flag significant risks, but do not spend flags on minor polish or executor-obvious boilerplate.
- Verify that the plan remains aligned with the user's original intent.
- Verify that the plan follows the expected structure: one H1 title, `## Overview`, numbered `## Step N:` sections with file references and numbered substeps, plus `## Execution Order` or `## Validation Order`. Missing structure should be flagged as category `completeness` with severity_hint `likely-significant`.
- Flag scope creep explicitly when the plan grows beyond the original idea or recorded user notes. Use the phrase "Scope creep:" in the concern.
- Assign severity_hint carefully. Implementation details the executor will naturally resolve should usually be `likely-minor`.
{"flags":[{"id":"duration-metadata-stale","concern":"The plan still assumes public-folder change detection will make Studio recompute calculateMetadata(), but the installed Studio code does not wire static-file updates into composition reevaluation.","category":"correctness","severity_hint":"likely-significant","evidence":"When the public folder changes, Studio only updates the static-file list in client-id.js and use-static-files.js. The metadata resolution effect in ResolveCompositionConfigInStudio.js does not depend on static-file changes, and Studio exposes a separate reevaluation hook in reevaluate-composition.js that the plan never calls."},{"id":"trim-speed-math","concern":"Step 6 still underspecifies the left-trim math for speed-adjusted clips.","category":"correctness","severity_hint":"likely-significant","evidence":"The plan says left trim adjusts clip.from and clip.at by the same delta, but the existing reference implementation multiplies the timeline delta by speed when updating source start in App.tsx. Without from += timelineDelta * speed, trimming a sped-up or slowed-down clip will write the wrong source range and break duration calculations."},{"id":"split-id-collision","concern":"The proposed {originalId}-b split naming is not collision-safe.","category":"correctness","severity_hint":"likely-significant","evidence":"The current renderer uses clip.id as the React key in VideoTrack.tsx, AudioTrack.tsx, and OverlayTrack.tsx. Re-splitting clip-5 or splitting an already split clip-5-b can produce duplicate IDs, which will break reconciliation and make persisted clips ambiguous."}],"verified_flag_ids":["render-overlay-gating","save-resolved-config-schema","overlay-hold-semantics-missing","scope-creep-delete-shortcuts","plan-structure-step-headings"],"disputed_flag_ids":[]}
“You are an independent reviewer. Critique the plan against the actual repository.….” Conversation with gpt-5.4, from the Peter O’Mallet DataClaw Conversations dataset. The Chat Archive, 2026. https://thechatarchive.com/c/01m80epx2662ddbwg9wfzmstwt