Assess and plan standardization of the effects system. Two concerns: (1) Continuous effects and looping: Currently continuous effects like ken-burns, slow-zoom, drift run linearly from 0→1 over the clip duration — they don't loop. But 'continuous' implies they should run forever/loop. Assess whether all continuous effects should have a looping option (e.g. a 'loop' boolean, defaulting to true for oscillating effects like float/glitch, false for progressive ones like ken-burns). Think about what looping means for each existing continuous effect and the new audio-reactive ones. (2) Entrance/exit/continuous unification: Currently entrance and exit effects are separate components with separate registries, but many are essentially the same animation in reverse (slide-up entrance vs slide-down exit, zoom-in entrance vs zoom-out exit, fade entrance vs fade-out exit). Should we unify them into a single effect definition with a 'reverse' option? From the user's perspective, could we simplify to: one pool of effects, applied as entrance (plays forward over effectFrames), exit (plays reversed over effectFrames), or continuous (loops/runs over full duration)? Think about: what the unified EffectComponentProps would look like, whether this loses any functionality, how it interacts with the dynamic effects pipeline and LLM generation, and whether it simplifies or complicates the ClipPanel UI. Goal: standardize and simplify without losing functionality, ideally gaining it.
The effects system has three registries (entrance, exit, continuous) with 27 total effects across 4 files. The two goals are:
Looping: Continuous effects run linearly 0→1 and don't loop. Some should.
Unification: Many entrance/exit effects are conceptual inverses but are separate implementations. We want one pool of effects usable in any role.
Current state
Entrances (11): Use getNormalizedProgress(frame, effectFrames) → progress 0→1 over effectFrames at clip start
Exits (6): Use getExitProgress(frame, durationInFrames, effectFrames) → progress 0→1 over effectFrames at clip end, then apply inverse transforms
Continuous (10): Run over full clip. 5 non-audio (ken-burns, float, glitch, slow-zoom, drift) + 5 audio-reactive
Assistant
Key insight: Float and glitch are already inherently looping (sin/modulo), but ken-burns, slow-zoom, and drift are linear 0→1 with no loop
Design decision: progress-based unification
The core realization is that entrance and exit effects differ only in when and how progress is calculated, not in what they animate. A fade effect is "opacity goes from 0→1 as progress goes 0→1" regardless of whether it's entrance or exit. The timing wrapper handles direction.
Proposed architecture: A ProgressEffect renders given a progress: number (0→1). A thin timing layer converts this to entrance (progress at start), exit (1-progress at end), or continuous (progress over duration, with optional looping). Effects register once with metadata about supported roles and defaults.
Effects like meteorite that are inherently directional remain entrance-only — they register with roles: ["entrance"] and are filtered in the UI.
Phase 1: Foundation — Types, Progress Abstraction, Loop Config
Step 1: Add loop config to types (shared/types.ts)
Scope: Small
Addloop?: boolean | number to ClipContinuous (line 39). Boolean true = ping-pong loop, number = loop period in seconds. Default behavior: false for progressive effects, inherently looped effects ignore this.
Add unified effect metadata type:
typescript
type EffectRole = "entrance" | "exit" | "continuous";
type EffectMetadata = {
roles: EffectRole[]; // Which roles this effect supports
loop?: "none" | "oscillate" | "inherent"; // Default loop behavior
};
UpdateCustomEffectEntry.category to category?: EffectRole | EffectRole[] for custom effects that work in multiple roles.
loop: number → same but over loopPeriodFrames instead of full duration
Implement spring-based timing variant for entrance effects that want spring physics (e.g., slide-up, bounce) — the wrapper passes spring-computed progress instead of linear.
Step 3: Port simple reversible effects to progress-based (shared/effects/progress-effects.ts)
Scope: Medium
Port effects that are natural entrance/exit pairs into single progress-based definitions:
Unified name
Current entrance
Current exit
Animation
fade
FadeEntrance
FadeOutExit
opacity: progress
zoom
ZoomInEntrance
ZoomOutExit
scale: lerp(small, 1, progress)
flip
FlipEntrance
FlipExit
rotate: lerp(90°, 0, progress) — note: current uses rotateY for entrance, rotateX for exit. Unify to rotateY.
slide-up
SlideUpEntrance
SlideDownExit
translateY: lerp(offset, 0, progress)
shrink
(new)
ShrinkExit
scale: lerp(0.2, 1, progress) — now also available as entrance
dissolve
(new)
DissolveExit
blur + opacity: lerp(blurred, clear, progress) — now also available as entrance
Each progress effect is a simple function: takes progress 0→1, returns a styled AbsoluteFill wrapping children.
Register each with metadata: { roles: ["entrance", "exit"], loop: "none" }.
getEffectComponent(name: string, role: EffectRole, props): ReactNode — handles wrapping progress-based effects with the timing layer
Keep backward compatibility: export entranceEffects, exitEffects, continuousEffects as derived views (computed from the unified registry filtered by role). This ensures existing imports work.
UpdateDynamicEffectRegistry to store UnifiedEffectEntry (with category metadata from CustomEffectEntry).
Updateeffect-prompt-template.ts to teach LLMs about the progress-based pattern. Add a progress-based example alongside the existing wrapped-component examples. Custom effects can use either pattern.
UpdatecompileEffect() to detect whether the exported component is progress-based (receives progress prop) or legacy. In practice, both work — legacy components just won't get the new timing features.
UpdatepromoteDraftToTimeline() to allow category: EffectRole[] for multi-role custom effects.
Simplify the effect dropdowns: instead of three separate lists, show one unified list per slot filtered by role:
Entrance dropdown: shows all effects where metadata.roles.includes("entrance")
Exit dropdown: shows all effects where metadata.roles.includes("exit")
Continuous dropdown: shows all effects where metadata.roles.includes("continuous")
Add loop toggle: when a continuous effect is selected and metadata.loop !== "inherent", show a "Loop" checkbox. When checked, optionally show a "Period (s)" number input.
Result: The user sees more options per slot (e.g., dissolve now appears as both entrance and exit), but the UI structure stays the same three sections. This is simpler than a radical "one pool" redesign while achieving the same effect.
Add progress-based source string examples for the unified effects (fade, zoom, slide-up).
UpdatebuiltInEffectSources map to include the new unified names.
These are used for DB storage and LLM context — keeping them in sync matters for the dynamic pipeline.
Execution Order
Types and abstractions first (Steps 1-2) — no behavioral change yet.
Port effects to progress-based (Steps 3-4) — still behind new registry, old code unaffected.
Wire the unified registry (Steps 5-6) — this is the integration point where behavior changes.
Update dynamic pipeline (Step 7) — extends the new system to custom effects.
UI and tests last (Steps 8-10) — validates everything works end-to-end.
Validation Order
Run existing tests after Step 2 to confirm no regressions from new files.
Run existing tests after Step 6 to confirm backward compatibility of the refactored wrapWithClipEffects.
Run new + updated tests after Step 9.
Manual preview in viewer after Step 8: apply fade as entrance AND exit on same clip, toggle loop on ken-burns, verify audio-reactive effects unchanged.
Key Design Decisions
Why not full "one pool" UI?
The brief suggests one pool with entrance/exit/continuous as application modes. But keeping three dropdowns (filtered from one registry) is better because:
Users still think in terms of "how should it enter" / "how should it exit" — the mental model stays clear
No extra "mode" selector needed — the slot determines the role
More options appear in each dropdown (net gain) without UI restructuring
Why progress-based instead of just "reverse" flag?
A reverse: boolean on the existing components would be simpler, but:
Each effect would need internal branching on reverse
Exit timing calculation would still be duplicated in each component
Looping requires the same timing abstraction — progress-based serves both goals
Looping semantics by effect type
Effect
Default loop
With loop: true
ken-burns
false — progressive pan+zoom
Ping-pong: zoom in then back out
slow-zoom
false — progressive zoom
Ping-pong: zoom in then back out
drift
false — progressive drift
Ping-pong: drift right then left
float
inherent (sin wave)
N/A, already oscillates
glitch
inherent (modulo cycle)
N/A, already cycles
audio-*
inherent (driven by audio)
N/A, driven by audio data
Flip axis discrepancy
Currently FlipEntrance uses rotateY and FlipExit uses rotateX. Unifying to rotateY is the right call — the Y-axis flip (like turning a card) is the more natural "flip" motion. This is a minor visual change for existing exit clips using flip.
code
Plan metadata:
{
"version": 1,
"timestamp": "2026-03-31T21:56:21Z",
"hash": "sha256:a6e594f8b9f06675bff7dccd39ac9388ac7d3c763c17a3d4e97b095735b22ed7",
"questions": [
"The flip entrance uses rotateY(-90\u21920) while flip exit uses rotateX(0\u219290). Unifying means picking one axis. rotateY (card-flip) seems more natural \u2014 is losing the rotateX exit acceptable, or should we keep both as 'flip' and 'flip-x'?",
"For looping with a custom period (e.g. ken-burns loops every 3 seconds), should the loop period be per-effect config in the timeline JSON, or a global setting? The plan assumes per-clip config via ClipContinuous.loop.",
"Should the unified effect names change? E.g., current exit 'fade-out' and entrance 'fade' would both become just 'fade' in the unified system. Old timeline.json files referencing 'fade-out' as exit type would need migration or an alias. How important is backward compatibility with existing timeline.json files?",
"The plan keeps three UI dropdowns (entrance/exit/continuous) filtered from one pool. The brief floats the idea of a single pool with mode selector. Which do you prefer?"
],
"success_criteria": [
{
"criterion": "All existing effects render identically before and after the refactor (visual regression check in viewer)",
"priority": "must"
},
{
"criterion": "All existing tests pass (updated as needed for new registry structure)",
"priority": "must"
},
{
"criterion": "Continuous effects ken-burns, slow-zoom, drift support loop: true that ping-pongs the animation",
"priority": "must"
},
{
"criterion": "At least fade, zoom, flip, and slide-up work as both entrance AND exit from a single definition",
"priority": "must"
},
{
"criterion": "ClipPanel UI shows loop toggle for non-inherently-looping continuous effects",
"priority": "must"
},
{
"criterion": "Backward compatibility: entranceEffectTypes, exitEffectTypes, continuousEffectTypes exports still work",
"priority": "must"
},
{
"criterion": "Existing timeline.json files with old effect names (fade-out, zoom-out, etc.) still render correctly via aliases",
"priority": "must"
},
{
"criterion": "Dynamic/custom effects pipeline still works (compile, register, render)",
"priority": "must"
},
{
"criterion": "Progress-based effects are under ~30 lines each (simple, readable)",
"priority": "should"
},
{
"criterion": "Unified registry file under ~150 lines",
"priority": "should"
},
{
"criterion": "LLM prompt template updated with progress-based effect example",
"priority": "should"
},
{
"criterion": "Effect source strings updated for unified effects",
"priority": "should"
},
{
"criterion": "No increase in total lines of code across effects/ directory (unification should reduce, not grow)",
"priority": "should"
},
{
"criterion": "Manual smoke test: apply same effect as entrance+exit on one clip, verify it looks correct",
"priority": "info"
},
{
"criterion": "Manual smoke test: enable loop on ken-burns, verify ping-pong animation in viewer",
"priority": "info"
}
],
"assumptions": [
"Three-dropdown UI (entrance/exit/continuous) is preferred over single-pool-with-mode-selector, since it preserves the user's mental model while expanding options per slot.",
"Old effect names like 'fade-out' and 'zoom-out' will be supported via aliases in the unified registry, so existing timeline.json files don't need migration.",
"Meteorite and bounce remain entrance-only \u2014 their animations are too directional/complex to reverse meaningfully.",
"Audio-reactive effects don't need loop config since they're inherently driven by audio amplitude/frequency data.",
"The loop field on ClipContinuous defaults to undefined (no loop) for backward compatibility \u2014 existing progressive effects (ken-burns, slow-zoom, drift) continue running linearly unless explicitly set.",
"Spring-based entrance timing (used by slide-up) can be handled as a timing variant in the wrapper rather than requiring a separate component.",
"The flip axis will be unified to rotateY for both entrance and exit, accepting the minor visual change for existing flip exits."
],
"structure_warnings": []
}
code
Plan structure warnings from validator:
[]
Existing flags:
[]
Known accepted debt grouped by subsystem:
{}
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.
code
Review the plan with a broad scope. Consider whether the approach is correct, whether it covers all the places it needs to, whether it would break callers or violate codebase conventions, and whether its verification strategy is adequate.
Return checks: [] and place any concrete concerns in the flags array using the standard format (id, concern, category, severity_hint, evidence). If there are no concerns, flags can be empty.
code
General review only for this robustness level. Return `checks: []` and put every concern in `flags`.
Additional guidelines:
- Robustness level: light. Be pragmatic. Only flag issues that would cause real failures. Ignore style, minor edge cases, and issues the executor will naturally resolve.
- Over-engineering: prefer the simplest approach that fully solves the problem.
- Reuse existing flag IDs when the same concern is still open.
- `verified_flag_ids` should list previously addressed flags that now appear resolved.
- Verify that the plan follows the expected structure when validator warnings or the outline suggest drift.
- Additional flags may use these categories: correctness, security, completeness, performance, maintainability, other.
- Focus on concrete issues, not structural formatting.
{"checks":[],"flags":[{"id":"effects-rendering-reversal-mismatch","concern":"Effects rendering: The plan's 1 - progress unification will not preserve current entrance/exit behavior for several built-ins, so the stated visual-regression goal is not achievable with the proposed model as written.","category":"correctness","severity_hint":"likely-significant","evidence":"Current pairs are not simple reversals: ZoomInEntrance scales 0.75 -> 1 in shared/effects/entrances.tsx:55-59, while ZoomOutExit scales 1 -> 0.6 in shared/effects/exits.tsx:25-30; SlideUpEntrance moves 80 -> 0 with a spring in shared/effects/entrances.tsx:26-31, while SlideDownExit moves 0 -> 120 linearly in shared/effects/exits.tsx:17-22; FlipEntrance uses rotateY in shared/effects/entrances.tsx:83-90, while FlipExit uses rotateX plus a delayed opacity drop in shared/effects/exits.tsx:33-44. A single progress effect plus reversal does not cover those differences."},{"id":"effects-timing-metadata-gap","concern":"Effects timing: The plan introduces a generic timing wrapper but does not define how per-effect timing curves are selected, which risks flattening existing spring-based entrances during the refactor.","category":"correctness","severity_hint":"likely-significant","evidence":"The only metadata proposed is roles and loop, but current effects rely on different timing models. SlideUpEntrance uses spring(...) in shared/effects/entrances.tsx:26-31, while most others use linear interpolate(...) in the same file. Without an explicit per-effect timing contract in the registry, the wrapper has no reliable way to preserve current motion."},{"id":"effects-dynamic-pipeline-detection-gap","concern":"Effects dynamic pipeline: The plan relies on detecting whether a custom effect is progress-based or legacy, but the current compile/registry path does not carry that metadata, so this is not implementable safely as written.","category":"correctness","severity_hint":"likely-significant","evidence":"compileEffect returns only FC<EffectComponentProps> in shared/effects/compile.ts:50-107; DynamicEffectRegistry stores only { component, code } in shared/effects/dynamic-registry.ts:12-36; and Remotion hydration passes only entry.code to registerAsync in remotion/src/load-config.ts:79-88. There is no existing metadata channel for isProgressBased, supported roles, or timing mode, so 'detect whether the exported component is progress-based' is brittle and under-specified."},{"id":"effects-alias-compatibility-gap","concern":"Effects compatibility: The plan promises old effect-name aliases, but no implementation step adds alias resolution, so renaming built-ins to unified names would break existing clips unless this is made explicit.","category":"completeness","severity_hint":"likely-significant","evidence":"Current lookup is exact-name only after stripping custom:: resolveEffectName and lookupEffect in shared/effects/index.tsx:72-96 do not support aliases. Built-ins are keyed by current names such as zoom-in, zoom-out, fade, and fade-out in shared/effects/index.tsx:14-48. The plan's steps cover a unified registry, but not a concrete alias map or migration path, despite listing alias-based backward compatibility as a must-have."}],"verified_flag_ids":[],"disputed_flag_ids":[]}