Add adjustment layer / effect layer clips to the timeline. Users can drag a continuous effect from the effect creator onto a visual track, creating an 'effect clip' that applies its effect to all clips on tracks below it for its duration. Key concepts: (1) New clip type 'effect-layer' — a clip on a visual track that has no media content, just an effect applied to everything beneath it. (2) Can be created by dragging from the effect creator panel or from a new 'Add Effect Layer' button. (3) The effect layer clip is resizable and movable like any other clip. (4) Rendering: the Remotion composition needs to identify effect-layer clips and wrap all lower-track content within that time range with the effect component. (5) Effect layers show in the timeline with a distinctive visual style (e.g. semi-transparent, different color) so users can tell them apart from media clips. (6) Effect layers can use any continuous effect (built-in or custom) with tuneable parameters. (7) Multiple effect layers can stack — they compose in track order (top affects everything below it).
Add a new 'effect-layer' clip type to the video editor timeline. These clips live on visual tracks, carry no media asset, and apply a continuous effect to all visual content on tracks below them for their duration. The timeline stores everything as JSONB in a single config column — no DB migration is needed.
Effects are applied per-clip via wrapWithClipEffects() in effects/index.tsx:109
Clip duration for static content uses hold (seconds) — effect-layer clips will use the same mechanism
No drag-from-effect-creator or effect-layer concept exists yet
Key constraint: The hardest part is rendering. Currently each track is independent. Effect layers must wrap with an effect component. This requires restructuring to detect effect-layer clips and group lower tracks into wrapable segments.
Assistant
User
Assistant
I’ve checked the revised plan against the same renderer and editor paths. The earlier drag-surface and overlay issues are fixed; I’m verifying the remaining rendering and properties gaps now.
Assistant
{"flags":[{"id":"FLAG-003","concern":"Timeline compositing order: The plan now relies on same-track effect-layer overlap being forbidden, but it still treats that as an existing invariant rather than something that must be enforced. In this repo, same-track clip overlap is not consistently prevented on creation, so the ordering problem is not actually closed unless the effect-layer drop/create path explicitly resolves or rejects overlaps.","category":"correctness","severity_hint":"likely-significant","evidence":"The overview says effect layers can forbid same-track overlap by following the editor's existing overlap rules, but shows a current clip-creation path that appends actions directly with no call. The new Step 8 describes creating effect-layer clips through , but it does not say to run or reject occupied ranges, so the plan still lacks the enforcement mechanism its FLAG-003 resolution depends on."},{"id":"FLAG-004","concern":"Properties panel timing: Step 10 still narrows effect-layer clips to and without replacing the current media-oriented timing controls. As written, effect-layer clips would continue to show / / inputs instead of a hold-duration control, which still misses the stated success criterion about showing only relevant controls.","category":"completeness","severity_hint":"likely-minor","evidence":" still hard-codes the timing tab to , , , and . The revised Step 10 only changes which tabs appear and the effects-tab contents; it does not add an effect-layer-specific timing UI."}],"verified_flag_ids":["FLAG-001","FLAG-002"],"disputed_flag_ids":[]}
all lower-track content within a time range
TimelineRenderer
Phase 1: Types, Data Model, and Clip Creation
Step 1: Extend ClipType and add effect-layer fields (src/tools/video-editor/types/index.ts)
Scope: Small
Add'effect-layer' to the ClipType union (line 38):
Add an effectLayerEffect field to TimelineClip (around line 108) to store the continuous effect config for the layer. Alternatively, reuse the existing continuous field — this is simpler since it already has type, intensity, and params. Decision: reuse continuous — no new fields needed on TimelineClip.
UpdateClipMeta in timeline-data.ts:26 — no changes needed since clipType and continuous already exist there.
VerifygetClipSourceDuration (config-utils.ts:17) handles effect-layer clips correctly — they will use hold for duration (like hold clips), so existing logic works.
UpdaterowsToConfig in timeline-data.ts:190 — the hold branch (line 255) already strips from/to/speed, which is correct for effect-layer clips.
VerifygetClipDurationInFrames path works for effect-layer clips (it does, via the hold path).
Step 3: Add effect-layer clip creation helper (src/tools/video-editor/hooks/useTimelineData.ts or lib/timeline-data.ts)
Scope: Medium
Add a function createEffectLayerClip(trackId, time, duration, effectType, params?) that returns a properly shaped ClipMeta + TimelineAction pair:
ts
{
clipType: 'effect-layer',
track: trackId,
hold: duration, // default 5 seconds
continuous: { type: effectType, intensity: 0.5, params },
opacity: 0.5, // visual hint that it's a layer
}
Wire this into the existing applyTimelineEdit flow so it creates a clip on the timeline.
Step 4: Add "Add Effect Layer" UI entry point (src/tools/video-editor/components/)
Scope: Medium
Add an "Add Effect Layer" button to the timeline toolbar or track header area. When clicked:
Open a popover/dropdown to select an effect (continuous effects + custom continuous effects)
Create an effect-layer clip at the playhead position on the topmost visual track (or create a new track)
Add drag source to the EffectCreatorPanel (EffectCreatorPanel.tsx) for continuous effects:
Set dataTransfer with a new type 'effect-layer' containing the effect slug and params
This integrates with the existing useExternalDrop hook
Step 5: Handle effect-layer drops in useExternalDrop (src/tools/video-editor/hooks/useExternalDrop.ts)
Scope: Medium
ExtendonTimelineDragOver (line 79) to recognize the 'effect-layer' drag type
ExtendonTimelineDrop (line 133) to handle effect-layer drops:
Parse effect data from dataTransfer
Call the creation helper from Step 3
Force track kind to 'visual'
Default duration: 5 seconds (resizable after placement)
Phase 2: Rendering — Remotion Composition
Step 6: Restructure TimelineRenderer to support effect layers (src/tools/video-editor/compositions/TimelineRenderer.tsx)
Scope: Large — this is the critical change
Separate effect-layer clips from regular clips in the clipsByTrack grouping (line 81).
Build a render plan that identifies effect-layer time ranges:
For each visual track (rendered bottom-to-top), check if any clip is clipType === 'effect-layer'
For each effect-layer clip, determine its frame range (at to at + hold)
All content from tracks below it within that frame range must be wrapped with the effect
Implement the wrapping strategy:
Render lower tracks into an AbsoluteFill group
Wrap that group with the continuous effect component using the existing lookupEffect + effect registry
Use Remotion's Sequence to scope the effect to the correct time range
// Pseudocode for the new render flow:
// 1. Sort visual tracks bottom-to-top (already done via .reverse())
// 2. Start with the bottommost track's content
// 3. For each track going up:
// a. If track has effect-layer clips, for each time range:
// wrap all accumulated content in that range with the effect
// b. If track has regular clips, render them on top
// This requires splitting the flat track-by-track render into a
// recursive/accumulative approach.
Create an EffectLayerSequence component that:
Takes continuous effect config + time range + children
Looks up the effect component from the registry
Wraps children with <Sequence> + effect component
Step 7: Handle effect-layer clips in VisualClip rendering (src/tools/video-editor/compositions/VisualClip.tsx)
Scope: Small
Skip rendering VisualAsset for effect-layer clips (they have no media)
Return null or a transparent fill — the actual rendering happens in the wrapping logic from Step 6
Phase 3: Timeline UI
Step 8: Distinctive visual style for effect-layer clips (src/tools/video-editor/components/TimelineEditor/ClipAction.tsx)
Scope: Medium
Add a branch for clipType === 'effect-layer' in the icon logic (line 76):
Use a Layers or Sparkles icon from lucide
Add distinctive styling:
Semi-transparent background with a gradient or hatched pattern
Different border color (e.g., purple/violet theme)
Show the effect name as the label instead of an asset name
Update the effect badges to show the continuous effect prominently
Step 9: Properties panel for effect-layer clips (src/tools/video-editor/components/PropertiesPanel/ClipPanel.tsx)
Scope: Medium
Add a new branch in getVisibleClipTabs (line 40) for effect-layer clips:
ts
if (clip?.clipType === 'effect-layer') {
return ['effects', 'timing'];
}
Adjust the effects tab to show only the continuous effect selector when editing an effect-layer clip (entrance/exit don't apply)
Add parameter controls for the selected continuous effect (reuse existing ParameterControls component)
Add an intensity slider (already exists for continuous effects)
Step 10: Prevent invalid operations on effect-layer clips
Scope: Small
Skip asset-related operations (double-click to open asset, thumbnail generation) for effect-layer clips in ClipAction.tsx (line 101-105)
Hide audio/position tabs in properties panel (handled by Step 9)
Ensure effect-layer clips can only be placed on visual tracks — add guard in drop handler and clip move logic
Steps 12-13 (clip operations + stacking): Edge case validation
Validation Order
After Steps 1-2: Manually create an effect-layer clip in the config JSON and verify it loads without errors
After Steps 6-7: Verify the Remotion preview shows the effect applied to lower tracks
After Steps 3-5: Verify drag-and-drop creation and the "Add Effect Layer" button work
After Steps 8-9: Verify the timeline shows distinctive styling and the properties panel works
After Steps 10-13: Full round-trip: create → edit params → resize → split → save → reload
code
Plan metadata:
{
"version": 1,
"timestamp": "2026-03-27T03:04:43Z",
"hash": "sha256:6ed7ce6ee17bd1c5c2df6ce065dbd4d8eb78ab9c1a82188f1bfe6a1d868bc81a",
"questions": [
"Rendering approach: Effect layers need to wrap all lower-track content. Two options: (A) Flatten all lower tracks into a single offscreen composition per time range, then wrap with effect \u2014 simpler but may have performance implications with many tracks. (B) Apply CSS/WebGL effects at the track level without re-compositing \u2014 faster but limits effect types to CSS-compatible ones. Which approach do you prefer, or should we start with (A) as the general solution?",
"Should effect-layer clips support entrance/exit effects on themselves (e.g., the effect fades in/out), or should they only apply the continuous effect with hard cut boundaries?",
"Should effect-layer clips be allowed on any visual track, or should there be a dedicated 'effect track' type? A dedicated type would simplify the UI but reduce flexibility.",
"For the 'Add Effect Layer' button \u2014 where should it live? Options: (A) Timeline toolbar alongside existing buttons, (B) A '+' button on track headers, (C) Only via drag from the effect creator panel, (D) Right-click context menu on the timeline.",
"Should effect layers affect text clips on lower tracks, or only media/hold clips? Text clips are often used as overlays and users might not want effects applied to their text."
],
"success_criteria": [
"New 'effect-layer' ClipType is recognized throughout the system without errors",
"Effect-layer clips can be created via UI (button or drag) and placed on visual tracks",
"Effect-layer clips render correctly in Remotion preview \u2014 the continuous effect visually applies to all clips on tracks below the effect layer for its duration",
"Multiple stacked effect layers compose correctly (top layer's effect wraps everything below including other effect layers' output)",
"Effect-layer clips have distinctive visual appearance in the timeline (different icon, semi-transparent/colored background)",
"Properties panel shows only relevant controls for effect-layer clips (continuous effect selector, intensity, params, timing)",
"Effect-layer clips can be resized, moved, and split like other clips",
"Save \u2192 reload round-trip preserves effect-layer clips with all their settings",
"Effect-layer clips on audio tracks are rejected/prevented",
"Partial time overlaps work correctly \u2014 the effect only applies during the effect-layer clip's duration, not before or after"
],
"assumptions": [
"Reuse the existing continuous field on TimelineClip for the effect-layer's effect config rather than adding new fields \u2014 this minimizes type changes and leverages existing parameter/intensity infrastructure",
"Effect-layer clips use hold for duration (same as static image clips) since they have no source media with from/to",
"Only continuous effects are applicable to effect layers (not entrance/exit, which are per-clip animations)",
"The Remotion rendering approach will use React composition (wrapping lower tracks in effect components) rather than offscreen canvas or WebGL \u2014 this keeps the implementation within the existing Remotion pattern",
"No database migration is needed \u2014 the config JSONB column already stores whatever shape TimelineConfig has, and the effects table doesn't need changes",
"Default effect-layer clip duration is 5 seconds (same as other default clip durations in the codebase)",
"Custom effects created in the EffectCreatorPanel with category 'continuous' are eligible for use in effect layers"
],
"structure_warnings": [
"Each step section should reference at least one file in backticks."
]
}
code
Plan structure warnings from validator:
[
"Each step section should reference at least one file in backticks."
]
code
Existing flags:
[]
Known accepted debt grouped by subsystem:
{
"agent-chat-rendering": [
{
"id": "DEBT-007",
"concern": "removing the duplicate assistant turn may hide message_user text if the frontend only renders assistant-role turns as chat bubbles.",
"occurrence_count": 1,
"plan_ids": [
"refactor-ai-timeline-agent-20260326-0157"
]
}
],
"agent-chat-undo-integration": [
{
"id": "DEBT-018",
"concern": "agent chat edits arrive via query invalidation/realtime polling and will bypass the undo stack because those paths are marked skiphistory.",
"occurrence_count": 1,
"plan_ids": [
"implement-undo-redo-history-20260326-2240"
]
}
],
"bulk-panel-tabs": [
{
"id": "DEBT-010",
"concern": "text clip multi-selections would miss the position tab under the plan's stated rule.",
"occurrence_count": 1,
"plan_ids": [
"multi-select-feature-parity-20260326-0548"
]
}
],
"bulk-properties-panel": [
{
"id": "DEBT-016",
"concern": "bulkclippanel still imports customeffecteditor; removing it without updating bulk mode would break the build.",
"occurrence_count": 1,
"plan_ids": [
"build-an-llm-powered-custom-20260326-2230"
]
}
],
"clip-drag-scroll-sync": [
{
"id": "DEBT-015",
"concern": "the plan's step 3 ontick callback only shows coordinator.update() but the full clip-drag state path (snap, lateststart, ghost positions) also needs re-running during stationary-pointer scroll.",
"occurrence_count": 1,
"plan_ids": [
"add-auto-scroll-to-the-20260326-2119"
]
}
],
"clip-param-schema-evolution": [
{
"id": "DEBT-019",
"concern": "clips with stale or partial params from a previous schema version will not be automatically normalized/backfilled when the effect schema changes.",
"occurrence_count": 1,
"plan_ids": [
"add-tuneable-parameters-to-20260326-2332"
]
}
],
"conflict-resolution": [
{
"id": "DEBT-004",
"concern": "silently reloading agent-originated timeline updates would discard dirty local edits.",
"occurrence_count": 1,
"plan_ids": [
"build-a-turn-based-timeline-20260326-0005"
]
},
{
"id": "DEBT-021",
"concern": "if all 3 conflict retries fail, the fallback path risks discarding dirty local edits unless the executor wires it into the existing conflict dialog.",
"occurrence_count": 1,
"plan_ids": [
"light-megaplan-fix-the-20260327-0056"
]
}
],
"context-menu-scope": [
{
"id": "DEBT-012",
"concern": "multi-clip copy is not included despite being mentioned in the original idea.",
"occurrence_count": 1,
"plan_ids": [
"multi-select-feature-parity-20260326-0548"
]
}
],
"issue-detection": [
{
"id": "DEBT-006",
"concern": "mid-sentence-cut detection is not implementable without transcript/profile data that the current provider doesn't expose.",
"occurrence_count": 1,
"plan_ids": [
"build-a-turn-based-timeline-20260326-0005"
]
}
],
"legacy-effect-lifecycle": [
{
"id": "DEBT-017",
"concern": "removing customeffecteditor makes effects-table entries read-only \u2014 users can no longer edit legacy custom effects.",
"occurrence_count": 1,
"plan_ids": [
"build-an-llm-powered-custom-20260326-2230"
]
}
],
"optimistic-locking": [
{
"id": "DEBT-002",
"concern": "plan only specifies version checking at the db write layer; the ui load/state/save path doesn't carry config_version yet.",
"occurrence_count": 1,
"plan_ids": [
"build-a-turn-based-timeline-20260326-0005"
]
}
],
"properties-panel-scope": [
{
"id": "DEBT-011",
"concern": "crop and transition controls are not included in the bulk panel, narrowing the original idea's scope.",
"occurrence_count": 1,
"plan_ids": [
"multi-select-feature-parity-20260326-0548"
]
}
],
"realtime-subscriptions": [
{
"id": "DEBT-003",
"concern": "the shared realtime system doesn't know about timeline_agent_sessions; step 7 hooks need their own channel subscription.",
"occurrence_count": 1,
"plan_ids": [
"build-a-turn-based-timeline-20260326-0005"
]
}
],
"registry-patch-testing": [
{
"id": "DEBT-020",
"concern": "patchregistry() lacks automated regression tests \u2014 the duplicate-id bug's most likely reproduction path is covered only by pure-function tests on the assembler it delegates to, plus manual smoke testing.",
"occurrence_count": 1,
"plan_ids": [
"light-megaplan-consolidate-20260327-0022"
]
}
],
"selection-save-bridge": [
{
"id": "DEBT-009",
"concern": "the plan specifies passing pruneselection into usetimelinesave but doesn't detail the hook-layer bridge needed because usetimelinesave is instantiated inside usetimelinedata before usetimelinestate runs.",
"occurrence_count": 1,
"plan_ids": [
"multi-select-timeline-clips-20260326-0415"
]
}
],
"task-deduplication": [
{
"id": "DEBT-001",
"concern": "server-generated idempotency keys would break retry deduplication because retried requests get fresh keys.",
"occurrence_count": 1,
"plan_ids": [
"migrate-all-task-creation-20260325-2354"
]
}
],
"task-system-integration": [
{
"id": "DEBT-005",
"concern": "create_generation_task is underspecified against the actual task family system.",
"occurrence_count": 1,
"plan_ids": [
"build-a-turn-based-timeline-20260326-0005"
]
}
],
"tool-error-propagation": [
{
"id": "DEBT-008",
"concern": "a blanket catch in executetool would silently downgrade db/persistence failures into ordinary tool results, changing the session error/http 500 behavior.",
"occurrence_count": 1,
"plan_ids": [
"refactor-ai-timeline-agent-20260326-0157"
]
}
],
"track-reorder-accessibility": [
{
"id": "DEBT-013",
"concern": "replacing arrow buttons with drag-only handle removes keyboard-accessible reorder; plan only specifies pointersensor.",
"occurrence_count": 1,
"plan_ids": [
"fix-track-reordering-bugs-and-20260326-1856"
]
}
],
"track-reorder-testing": [
{
"id": "DEBT-014",
"concern": "no automated tests specified for same-kind boundary rules or save/load persistence of reordered tracks.",
"occurrence_count": 1,
"plan_ids": [
"fix-track-reordering-bugs-and-20260326-1856"
]
}
]
}
code
Escalated debt subsystems:
[]
Debt guidance:
- These are known accepted limitations. Do not re-flag them unless the current plan makes them worse, broadens them, or fails to contain them.
- Prefix every new concern with a subsystem tag followed by a colon, for example `Timeout recovery: retry backoff remains brittle`.
- When a concern is recurring debt that still needs to be flagged, prefix it with `Recurring debt:` after the subsystem tag, for example `Timeout recovery: Recurring debt: retry backoff remains brittle`.
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 sections (`### Step N:` under `## Phase` headers, or flat `## Step N:`) with file references and numbered substeps, plus `## Execution Order` or `## Validation Order`.
- Missing required sections or step coverage (for example: no H1, no `## Overview`, or no step sections at all) should be flagged as category `completeness` with severity_hint `likely-significant`.
- Structural formatting within steps (for example: prose instead of numbered substeps, or a missing file reference inside an otherwise actionable step) should usually be category `completeness` with severity_hint `likely-minor` because the executor can still follow the instructions.
- Ask whether the plan is the simplest approach that solves the stated problem, whether it could use fewer steps or less machinery, and whether it introduces unnecessary complexity.
- Over-engineering concerns should use category `maintainability`, should usually prefix the concern with "Over-engineering:", and should scale severity_hint to the practical impact.
- 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":"FLAG-001","concern":"Effect drag UX: Step 4 targets the wrong surface for drag creation. In this repo, the named EffectCreatorPanel is a modal effect editor, not a persistent palette users can drag from, so that step does not actually implement the requested drag-from-effect-creator workflow.","category":"correctness","severity_hint":"likely-significant","evidence":"/Users/user_c042661f/Documents/reigh-workspace/reigh-app/src/tools/video-editor/components/PropertiesPanel/ClipPanel.tsx:391-407 is the only mount of EffectCreatorPanel, and /Users/user_c042661f/Documents/reigh-workspace/reigh-app/src/tools/video-editor/components/EffectCreatorPanel.tsx:6-12,41-49,166-172 shows it is a Dialog-based editor opened from clip properties. The existing drag-source pattern is instead the footer tool in /Users/user_c042661f/Documents/reigh-workspace/reigh-app/src/tools/video-editor/components/TimelineEditor/TimelineCanvas.tsx:560-601."},{"id":"FLAG-002","concern":"Preview overlay editing: The plan misses the preview overlay path. If an effect-layer clip can be selected, the current overlay editor will treat it like a visual clip and show a full-frame move/crop box, allowing invalid geometry edits on a clip that should have no spatial bounds.","category":"correctness","severity_hint":"likely-significant","evidence":"/Users/user_c042661f/Documents/reigh-workspace/reigh-app/src/tools/video-editor/components/PreviewPanel/OverlayEditor.tsx:167-200 falls back to track-sized bounds for any non-text clip without explicit geometry, and /Users/user_c042661f/Documents/reigh-workspace/reigh-app/src/tools/video-editor/components/PreviewPanel/OverlayEditor.tsx:220-244 includes the selected clip even when it has no position overrides. Step 9 only narrows tabs in ClipPanel; it does not cover this editor."},{"id":"FLAG-003","concern":"Timeline compositing order: The plan claims overlapping effect layers on the same track should work, but the current preview renderer has no deterministic within-track z-order beyond start time. Without carrying clip order into rendering or forbidding same-track overlap, stacked same-track effect layers will compose incidentally rather than by a defined rule.","category":"correctness","severity_hint":"likely-significant","evidence":"/Users/user_c042661f/Documents/reigh-workspace/reigh-app/src/tools/video-editor/lib/timeline-data.ts:58-72,146-175 maintains clipOrder in editor state, but /Users/user_c042661f/Documents/reigh-workspace/reigh-app/src/tools/video-editor/compositions/TimelineRenderer.tsx:9-10,18,27-32,81-96 groups clips only from config.clips and sorts them only by at. The render path never receives or uses clipOrder."},{"id":"FLAG-004","concern":"Properties panel timing: Step 9 narrows effect-layer clips to effects and timing, but it does not replace the current media-oriented timing controls. As written, effect-layer clips would still show speed / from / to inputs instead of a hold-duration control, which misses the plan's own success criterion about showing only relevant controls.","category":"completeness","severity_hint":"likely-minor","evidence":"/Users/user_c042661f/Documents/reigh-workspace/reigh-app/src/tools/video-editor/components/PropertiesPanel/ClipPanel.tsx:40-50 only changes which tabs appear, while /Users/user_c042661f/Documents/reigh-workspace/reigh-app/src/tools/video-editor/components/PropertiesPanel/ClipPanel.tsx:411-429 hard-codes the timing tab to Start, Speed, Source In, and Source Out."}],"verified_flag_ids":[],"disputed_flag_ids":[]}
You are an independent reviewer. Critique the plan against the actual repository.
Add adjustment layer / effect layer clips to the timeline. Users can drag a continuous effect from the effect creator onto a visual track, creating an 'effect clip' that applies its effect to all clips on tracks below it for its duration. Key concepts: (1) New clip type 'effect-layer' — a clip on a visual track that has no media content, just an effect applied to everything beneath it. (2) Can be created by dragging from the effect creator panel or from a new 'Add Effect Layer' button. (3) The effect layer clip is resizable and movable like any other clip. (4) Rendering: the Remotion composition needs to identify effect-layer clips and wrap all lower-track content within that time range with the effect component. (5) Effect layers show in the timeline with a distinctive visual style (e.g. semi-transparent, different color) so users can tell them apart from media clips. (6) Effect layers can use any continuous effect (built-in or custom) with tuneable parameters. (7) Multiple effect layers can stack — they compose in track order (top affects everything below it).
User notes and answers:
User wants a draggable effect-layer button in the TimelineCanvas footer (next to the existing text tool drag circle). Same drag-to-drop pattern: drag it onto the timeline to create an effect-layer clip at that position. Then click to configure the effect in the properties panel.
Add a new 'effect-layer' clip type to the video editor timeline. These clips live on visual tracks, carry no media asset, and apply a continuous effect to all visual content on tracks below them for their duration. The timeline stores everything as JSONB in a single config column — no DB migration is needed.
Effects are applied per-clip via wrapWithClipEffects() in src/tools/video-editor/effects/index.tsx:109
Clip duration for static content uses hold (seconds) — effect-layer clips will use the same mechanism
The footer of TimelineCanvas.tsx:560-601 has a draggable text-tool circle — the effect-layer drag source follows this same pattern
No effect-layer concept exists yet
Settled decisions (from prior iteration):
Reuse existing continuous field on TimelineClip for the effect-layer's effect config (DECISION-001)
Effect-layer clips use hold for duration (DECISION-002)
Rendering uses React composition within Remotion (DECISION-003)
Design decision — same-track overlap (FLAG-003 resolution):
Effect-layer clips on the same track are forbidden from overlapping. The timeline already prevents media clip overlap on a track; effect layers follow the same rule. Stacking requires placing effect layers on different visual tracks — the higher track's effect wraps everything below, giving deterministic composition order via the existing track z-order. This avoids introducing a secondary ordering mechanism and matches user mental model (track stack = layer order).
VerifygetClipSourceDuration (src/tools/video-editor/lib/config-utils.ts:17) — effect-layer clips use hold, so the existing if (typeof clip.hold === 'number') path works.
VerifyrowsToConfig (src/tools/video-editor/lib/timeline-data.ts:255) — the hold branch already strips from/to/speed, correct for effect-layer clips.
VerifygetClipDurationInFrames (src/tools/video-editor/lib/config-utils.ts:34) — works via the hold path.
Create a new component that wraps children with a continuous effect for a given time range:
tsx
// EffectLayerSequence: wraps `children` in a <Sequence> scoped to the
// effect-layer clip's time range, applying the continuous effect component.
const EffectLayerSequence: FC<{
clip: ResolvedTimelineClip;
fps: number;
children: ReactNode;
}>
Look up the effect component using lookupEffect(continuousEffects, clip.continuous.type) from src/tools/video-editor/effects/index.tsx:97-107.
Wrap children in a <Sequence from={startFrame} durationInFrames={dur}> containing the resolved effect component with intensity and params from the clip's continuous field.
Render a duplicate of children outside the Sequence for the time range not covered by the effect (before and after), so lower-track content still appears unaffected outside the effect window.
Step 4: Restructure TimelineRenderer for effect layers (src/tools/video-editor/compositions/TimelineRenderer.tsx)
Scope: Large — critical change
Partition clips in clipsByTrack into regular clips and effect-layer clips (src/tools/video-editor/compositions/TimelineRenderer.tsx:81-87).
Change the visual track rendering loop (src/tools/video-editor/compositions/TimelineRenderer.tsx:93-96) from flat iteration to an accumulative approach:
Start from the bottommost visual track (already reversed at line 79)
Accumulate rendered content track-by-track
When a track contains effect-layer clips, wrap the accumulated content below with EffectLayerSequence for each effect-layer clip's time range
Regular clips on the same track as effect-layer clips render normally on top (though in practice users will likely dedicate tracks to effect layers)
Skip effect-layer clips in renderVisualTrack (src/tools/video-editor/compositions/TimelineRenderer.tsx:27-31) — add an early if (clip.clipType === 'effect-layer') return null guard alongside the existing if (clip.clipType === 'text') branch.
Handle multiple effect layers on different tracks: since we accumulate bottom-to-top, a higher-track effect layer naturally wraps everything below including lower effect layers' output.
Step 5: Guard VisualClip for effect-layer clips (src/tools/video-editor/compositions/VisualClip.tsx)
Scope: Small
Add early return in VisualClip (src/tools/video-editor/compositions/VisualClip.tsx:199) for clip.clipType === 'effect-layer' — return null since these clips have no visual asset. The rendering happens via the wrapping logic in Step 4.
Add a function near getNextClipId (src/tools/video-editor/lib/timeline-data.ts:441):
ts
export function createEffectLayerClipMeta(trackId: string): ClipMeta {
return {
clipType: 'effect-layer',
track: trackId,
hold: 5, // default 5 seconds, resizable
};
// continuous effect is unset initially — user configures via properties panel
}
The clip starts with no effect selected. User clicks the clip to open the properties panel and picks a continuous effect there.
Step 7: Add draggable effect-layer button in TimelineCanvas footer (src/tools/video-editor/components/TimelineEditor/TimelineCanvas.tsx)
Scope: Medium
Add a new draggable circle next to the existing text-tool drag circle (src/tools/video-editor/components/TimelineEditor/TimelineCanvas.tsx:589-601). Follow the identical pattern:
Place it adjacent to the text-tool circle with a small gap. Both should appear when no drag-over label is active (inside the onAddTextAt branch at line 589, since effect layers share the same precondition).
Step 8: Handle effect-layer drops in useExternalDrop (src/tools/video-editor/hooks/useExternalDrop.ts)
Scope: Medium
Extend the drag type check (src/tools/video-editor/hooks/useExternalDrop.ts:82) to include 'effect-layer':
Resolve target track (must be visual; create new visual track if needed)
Call createEffectLayerClipMeta from Step 6
Create the clip via applyTimelineEdit
Add a new callback prop handleAddEffectLayerAt?: (trackId: string, time: number) => void to UseExternalDropArgs (src/tools/video-editor/hooks/useExternalDrop.ts:29), mirroring the existing handleAddTextAt pattern.
Phase 4: Timeline UI and Properties
Step 9: Distinctive visual style for effect-layer clips (src/tools/video-editor/components/TimelineEditor/ClipAction.tsx)
Scope: Medium
Add a branch for clipType === 'effect-layer' in the icon logic (src/tools/video-editor/components/TimelineEditor/ClipAction.tsx:76-80):
Update the label (src/tools/video-editor/components/TimelineEditor/ClipAction.tsx:123) to show clipMeta.continuous?.type || 'Effect Layer' instead of clipMeta.asset.
Skip the double-click-to-open-asset handler for effect-layer clips (src/tools/video-editor/components/TimelineEditor/ClipAction.tsx:101-105).
Step 10: Properties panel for effect-layer clips (src/tools/video-editor/components/PropertiesPanel/ClipPanel.tsx)
Scope: Medium
Add a new branch in getVisibleClipTabs (src/tools/video-editor/components/PropertiesPanel/ClipPanel.tsx:40):
ts
if (clip?.clipType === 'effect-layer') {
return ['effects', 'timing'];
}
Adjust the effects tab rendering: when clipType === 'effect-layer', show only the continuous effect selector (hide entrance/exit/transition selectors). The existing ParameterControls component and intensity slider already work for continuous effects.
Step 11: Guard OverlayEditor for effect-layer clips (src/tools/video-editor/components/PreviewPanel/OverlayEditor.tsx)
Scope: Small
Skip effect-layer clips in the activeOverlays loop (src/tools/video-editor/components/PreviewPanel/OverlayEditor.tsx:210-218). Add a guard after the clipMeta null check:
ts
if (clipMeta.clipType === 'effect-layer') {
continue;
}
This prevents the overlay editor from showing move/crop handles for effect-layer clips, which have no spatial bounds.
Phase 5: Guards and Edge Cases
Step 12: Prevent effect-layer clips on audio tracks (src/tools/video-editor/hooks/useExternalDrop.ts, src/tools/video-editor/lib/coordinate-utils.ts)
Scope: Small
Ensure the drop handler from Step 8 only allows effect-layer clips on visual tracks — use getCompatibleTrackId with kind 'visual'.
Verify clip move/drag operations respect this constraint — if the existing track-kind compatibility check in the drag coordinator is track-based, this should work automatically.
Verify split-at-playhead works for effect-layer clips — splitting should produce two effect-layer clips with the same continuous config. The existing split logic copies ClipMeta; confirm it preserves continuous.
Verify resize (drag edges) works — effect-layer uses hold, so the existing hold-resize branch in rowsToConfig (src/tools/video-editor/lib/timeline-data.ts:255-259) applies.
Verify track move rejects dropping effect-layer clips on audio tracks.
Steps 3-5 (rendering): Highest-risk change — validate the approach before investing in UI. Manually inject an effect-layer clip into config JSON to test.
Steps 6-8 (creation + drop): Wire up clip creation once rendering works.
After Steps 1-2: Manually create an effect-layer clip in the config JSON (clipType: 'effect-layer', hold: 5, continuous: { type: 'glitch', intensity: 0.5 }) and verify the timeline loads without errors.
After Steps 3-5: Verify the Remotion preview shows the effect (e.g., glitch) applied to all clips on tracks below the effect layer for its duration, and that content outside the time range is unaffected.
After Steps 6-8: Drag the effect-layer circle from the footer onto the timeline; verify a clip is created on a visual track.
After Steps 9-11: Verify distinctive styling in timeline, properties panel shows only effects+timing tabs, and no overlay handles appear on the preview for effect-layer clips.
After Steps 12-14: Full round-trip: create → configure effect → resize → split → save → reload. Verify stacking with two effect layers on different tracks.
code
Plan metadata:
{
"version": 2,
"timestamp": "2026-03-27T03:14:22Z",
"hash": "sha256:2ffb5b5b64d7fca71025e1b35c49fc805ed63c6f83997cb67b5e284b09315d4d",
"changes_summary": "Revised plan to address all three flags:\n\nFLAG-001 (wrong drag surface): Completely rewrote Step 4\u2192Step 7 to add the draggable effect-layer button in the TimelineCanvas footer (TimelineCanvas.tsx:560-601) next to the existing text-tool drag circle, following the identical draggable + onDragStart + dataTransfer.setData pattern. Removed all references to adding drag sources to EffectCreatorPanel (which is a Dialog, not a persistent palette). The clip starts with no effect selected \u2014 user configures via properties panel after drop.\n\nFLAG-002 (OverlayEditor showing handles): Added new Step 11 that guards OverlayEditor.tsx:210-218 to skip effect-layer clips in the activeOverlays loop, preventing spurious move/crop handles on clips with no spatial bounds.\n\nFLAG-003 (same-track overlap ordering): Added explicit design decision in Overview: same-track overlap of effect layers is forbidden (follows existing media clip behavior). Stacking requires different tracks, which gives deterministic composition order via the existing track z-order. Removed Step 13's claim about same-track overlap working; the new Step 14 focuses on valid operations only.",
"flags_addressed": [
"FLAG-001",
"FLAG-002",
"FLAG-003"
],
"questions": [
"Should effect-layer clips support entrance/exit effects on themselves (e.g., the effect fades in/out at its boundaries), or should they only apply the continuous effect with hard cut boundaries?",
"Should effect layers affect text clips on lower tracks, or only media/hold clips? Text clips are often used as overlays and users might not want effects applied to their text."
],
"success_criteria": [
"New 'effect-layer' ClipType is recognized throughout the system without errors",
"Effect-layer clips can be created by dragging the effect-layer button from the TimelineCanvas footer onto a visual track",
"Effect-layer clips render correctly in Remotion preview \u2014 the continuous effect visually applies to all clips on tracks below the effect layer for its duration",
"Multiple stacked effect layers on different tracks compose correctly (higher track's effect wraps everything below)",
"Effect-layer clips have distinctive visual appearance in the timeline (Layers icon, violet/purple color scheme, effect name as label)",
"Properties panel shows only effects and timing tabs for effect-layer clips, with only the continuous effect selector visible",
"Effect-layer clips can be resized, moved, and split like other clips",
"Save \u2192 reload round-trip preserves effect-layer clips with all their settings",
"Effect-layer clips on audio tracks are rejected/prevented",
"Partial time overlaps work correctly \u2014 the effect only applies during the effect-layer clip's duration, not before or after",
"OverlayEditor does not show move/crop handles when an effect-layer clip is selected",
"Content outside the effect-layer's time range on lower tracks renders normally without the effect"
],
"assumptions": [
"Reuse the existing field on TimelineClip for the effect-layer's effect config rather than adding new fields \u2014 this minimizes type changes and leverages existing parameter/intensity infrastructure",
"Effect-layer clips use for duration (same as static image clips) since they have no source media with from/to",
"Only continuous effects are applicable to effect layers (not entrance/exit, which are per-clip animations)",
"The Remotion rendering approach will use React composition (wrapping lower tracks in effect components) rather than offscreen canvas or WebGL \u2014 this keeps the implementation within the existing Remotion pattern",
"No database migration is needed \u2014 the config JSONB column already stores whatever shape TimelineConfig has, and the effects table doesn't need changes",
"Default effect-layer clip duration is 5 seconds (same as other default clip durations in the codebase)",
"Custom effects created in the EffectCreatorPanel with category 'continuous' are eligible for use in effect layers",
"Effect-layer clips are created with no effect selected initially \u2014 user configures via properties panel after placement (simpler drag UX, avoids needing an effect picker during drag)",
"Same-track overlap of effect-layer clips is forbidden, matching existing media clip overlap prevention \u2014 stacking requires different visual tracks"
],
"structure_warnings": [],
"delta_from_previous_percent": 76.59
}
code
Plan structure warnings from validator:
[]
Existing flags:
[
{
"id": "FLAG-001",
"concern": "Effect drag UX: Step 4 targets the wrong surface for drag creation. In this repo, the named EffectCreatorPanel is a modal effect editor, not a persistent palette users can drag from, so that step does not actually implement the requested drag-from-effect-creator workflow.",
"status": "addressed",
"severity": "significant"
},
{
"id": "FLAG-002",
"concern": "Preview overlay editing: The plan misses the preview overlay path. If an effect-layer clip can be selected, the current overlay editor will treat it like a visual clip and show a full-frame move/crop box, allowing invalid geometry edits on a clip that should have no spatial bounds.",
"status": "addressed",
"severity": "significant"
},
{
"id": "FLAG-003",
"concern": "Timeline compositing order: The plan claims overlapping effect layers on the same track should work, but the current preview renderer has no deterministic within-track z-order beyond start time. Without carrying clip order into rendering or forbidding same-track overlap, stacked same-track effect layers will compose incidentally rather than by a defined rule.",
"status": "addressed",
"severity": "significant"
},
{
"id": "FLAG-004",
"concern": "Properties panel timing: Step 9 narrows effect-layer clips to effects and timing, but it does not replace the current media-oriented timing controls. As written, effect-layer clips would still show speed / from / to inputs instead of a hold-duration control, which misses the plan's own success criterion about showing only relevant controls.",
"status": "open",
"severity": "minor"
}
]
code
Known accepted debt grouped by subsystem:
{
"agent-chat-rendering": [
{
"id": "DEBT-007",
"concern": "removing the duplicate assistant turn may hide message_user text if the frontend only renders assistant-role turns as chat bubbles.",
"occurrence_count": 1,
"plan_ids": [
"refactor-ai-timeline-agent-20260326-0157"
]
}
],
"agent-chat-undo-integration": [
{
"id": "DEBT-018",
"concern": "agent chat edits arrive via query invalidation/realtime polling and will bypass the undo stack because those paths are marked skiphistory.",
"occurrence_count": 1,
"plan_ids": [
"implement-undo-redo-history-20260326-2240"
]
}
],
"bulk-panel-tabs": [
{
"id": "DEBT-010",
"concern": "text clip multi-selections would miss the position tab under the plan's stated rule.",
"occurrence_count": 1,
"plan_ids": [
"multi-select-feature-parity-20260326-0548"
]
}
],
"bulk-properties-panel": [
{
"id": "DEBT-016",
"concern": "bulkclippanel still imports customeffecteditor; removing it without updating bulk mode would break the build.",
"occurrence_count": 1,
"plan_ids": [
"build-an-llm-powered-custom-20260326-2230"
]
}
],
"clip-drag-scroll-sync": [
{
"id": "DEBT-015",
"concern": "the plan's step 3 ontick callback only shows coordinator.update() but the full clip-drag state path (snap, lateststart, ghost positions) also needs re-running during stationary-pointer scroll.",
"occurrence_count": 1,
"plan_ids": [
"add-auto-scroll-to-the-20260326-2119"
]
}
],
"clip-param-schema-evolution": [
{
"id": "DEBT-019",
"concern": "clips with stale or partial params from a previous schema version will not be automatically normalized/backfilled when the effect schema changes.",
"occurrence_count": 1,
"plan_ids": [
"add-tuneable-parameters-to-20260326-2332"
]
}
],
"conflict-resolution": [
{
"id": "DEBT-004",
"concern": "silently reloading agent-originated timeline updates would discard dirty local edits.",
"occurrence_count": 1,
"plan_ids": [
"build-a-turn-based-timeline-20260326-0005"
]
},
{
"id": "DEBT-021",
"concern": "if all 3 conflict retries fail, the fallback path risks discarding dirty local edits unless the executor wires it into the existing conflict dialog.",
"occurrence_count": 1,
"plan_ids": [
"light-megaplan-fix-the-20260327-0056"
]
}
],
"context-menu-scope": [
{
"id": "DEBT-012",
"concern": "multi-clip copy is not included despite being mentioned in the original idea.",
"occurrence_count": 1,
"plan_ids": [
"multi-select-feature-parity-20260326-0548"
]
}
],
"issue-detection": [
{
"id": "DEBT-006",
"concern": "mid-sentence-cut detection is not implementable without transcript/profile data that the current provider doesn't expose.",
"occurrence_count": 1,
"plan_ids": [
"build-a-turn-based-timeline-20260326-0005"
]
}
],
"legacy-effect-lifecycle": [
{
"id": "DEBT-017",
"concern": "removing customeffecteditor makes effects-table entries read-only \u2014 users can no longer edit legacy custom effects.",
"occurrence_count": 1,
"plan_ids": [
"build-an-llm-powered-custom-20260326-2230"
]
}
],
"optimistic-locking": [
{
"id": "DEBT-002",
"concern": "plan only specifies version checking at the db write layer; the ui load/state/save path doesn't carry config_version yet.",
"occurrence_count": 1,
"plan_ids": [
"build-a-turn-based-timeline-20260326-0005"
]
}
],
"properties-panel-scope": [
{
"id": "DEBT-011",
"concern": "crop and transition controls are not included in the bulk panel, narrowing the original idea's scope.",
"occurrence_count": 1,
"plan_ids": [
"multi-select-feature-parity-20260326-0548"
]
}
],
"realtime-subscriptions": [
{
"id": "DEBT-003",
"concern": "the shared realtime system doesn't know about timeline_agent_sessions; step 7 hooks need their own channel subscription.",
"occurrence_count": 1,
"plan_ids": [
"build-a-turn-based-timeline-20260326-0005"
]
}
],
"registry-patch-testing": [
{
"id": "DEBT-020",
"concern": "patchregistry() lacks automated regression tests \u2014 the duplicate-id bug's most likely reproduction path is covered only by pure-function tests on the assembler it delegates to, plus manual smoke testing.",
"occurrence_count": 1,
"plan_ids": [
"light-megaplan-consolidate-20260327-0022"
]
}
],
"selection-save-bridge": [
{
"id": "DEBT-009",
"concern": "the plan specifies passing pruneselection into usetimelinesave but doesn't detail the hook-layer bridge needed because usetimelinesave is instantiated inside usetimelinedata before usetimelinestate runs.",
"occurrence_count": 1,
"plan_ids": [
"multi-select-timeline-clips-20260326-0415"
]
}
],
"task-deduplication": [
{
"id": "DEBT-001",
"concern": "server-generated idempotency keys would break retry deduplication because retried requests get fresh keys.",
"occurrence_count": 1,
"plan_ids": [
"migrate-all-task-creation-20260325-2354"
]
}
],
"task-system-integration": [
{
"id": "DEBT-005",
"concern": "create_generation_task is underspecified against the actual task family system.",
"occurrence_count": 1,
"plan_ids": [
"build-a-turn-based-timeline-20260326-0005"
]
}
],
"tool-error-propagation": [
{
"id": "DEBT-008",
"concern": "a blanket catch in executetool would silently downgrade db/persistence failures into ordinary tool results, changing the session error/http 500 behavior.",
"occurrence_count": 1,
"plan_ids": [
"refactor-ai-timeline-agent-20260326-0157"
]
}
],
"track-reorder-accessibility": [
{
"id": "DEBT-013",
"concern": "replacing arrow buttons with drag-only handle removes keyboard-accessible reorder; plan only specifies pointersensor.",
"occurrence_count": 1,
"plan_ids": [
"fix-track-reordering-bugs-and-20260326-1856"
]
}
],
"track-reorder-testing": [
{
"id": "DEBT-014",
"concern": "no automated tests specified for same-kind boundary rules or save/load persistence of reordered tracks.",
"occurrence_count": 1,
"plan_ids": [
"fix-track-reordering-bugs-and-20260326-1856"
]
}
]
}
code
Escalated debt subsystems:
[]
Debt guidance:
- These are known accepted limitations. Do not re-flag them unless the current plan makes them worse, broadens them, or fails to contain them.
- Prefix every new concern with a subsystem tag followed by a colon, for example `Timeout recovery: retry backoff remains brittle`.
- When a concern is recurring debt that still needs to be flagged, prefix it with `Recurring debt:` after the subsystem tag, for example `Timeout recovery: Recurring debt: retry backoff remains brittle`.
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 sections (`### Step N:` under `## Phase` headers, or flat `## Step N:`) with file references and numbered substeps, plus `## Execution Order` or `## Validation Order`.
- Missing required sections or step coverage (for example: no H1, no `## Overview`, or no step sections at all) should be flagged as category `completeness` with severity_hint `likely-significant`.
- Structural formatting within steps (for example: prose instead of numbered substeps, or a missing file reference inside an otherwise actionable step) should usually be category `completeness` with severity_hint `likely-minor` because the executor can still follow the instructions.
- Ask whether the plan is the simplest approach that solves the stated problem, whether it could use fewer steps or less machinery, and whether it introduces unnecessary complexity.
- Over-engineering concerns should use category `maintainability`, should usually prefix the concern with "Over-engineering:", and should scale severity_hint to the practical impact.
- 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`.