Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: lock the develop length with the shot's video and keep an effect still through a re-plan

Claude84ed7357d811
diff --git a/client/src/components/musicVideo/SceneImageEffect.jsx b/client/src/components/musicVideo/SceneImageEffect.jsx
index 2e6c2cf763..7833ef1510 100644
--- a/client/src/components/musicVideo/SceneImageEffect.jsx
+++ b/client/src/components/musicVideo/SceneImageEffect.jsx
@@ -44,8 +44,8 @@ export default function SceneImageEffect({ fieldId, scene, onChange, disabled =
{effect && (
<span className="flex min-w-0 items-center gap-1">
<label htmlFor={fieldId('develop')} className="text-port-text-muted">Develops in</label>
- <select id={fieldId('develop')} value={developSec} onChange={(e) => pickSec(Number(e.target.value))}
- className="min-w-0 bg-port-bg border border-port-border rounded px-1 py-1 text-xs min-h-[44px] sm:min-h-0">
+ <select id={fieldId('develop')} value={developSec} disabled={disabled} title={disabledReason || undefined} onChange={(e) => pickSec(Number(e.target.value))}
+ className="min-w-0 bg-port-bg border border-port-border rounded px-1 py-1 text-xs min-h-[44px] sm:min-h-0 disabled:opacity-50">
{IMAGE_EFFECT_DEVELOP_SECS.map((sec) => <option key={sec} value={sec}>{sec}s</option>)}
</select>
</span>
diff --git a/server/services/musicVideo/imageEffects.test.js b/server/services/musicVideo/imageEffects.test.js
index 226b2a42c1..ed0bca3783 100644
--- a/server/services/musicVideo/imageEffects.test.js
+++ b/server/services/musicVideo/imageEffects.test.js
@@ -6,7 +6,7 @@ import { join } from 'node:path';
import { findFfmpeg } from '../../lib/ffmpeg.js';
import { imageEffectState, sceneImageEffect } from '../../lib/musicVideoImageEffects.js';
import { buildMusicVideoFfmpegArgs } from './render.js';
-import { applySceneUpdate } from './projectsLogic.js';
+import { applySceneUpdate, replaceScenes } from './projectsLogic.js';
const ffmpeg = await findFfmpeg();
const dir = mkdtempSync(join(tmpdir(), 'portos-mv-image-effects-'));
@@ -99,4 +99,10 @@ describe('a shot\'s image effect on the board', () => {
expect(() => applySceneUpdate(project, 's1', { imageEffect: 'sparkle' })).toThrow();
expect(() => applySceneUpdate(project, 's1', { imageEffectSec: 120 })).toThrow();
});
+
+ it('keeps a shot\'s image effect, and the still it plays on, through a re-plan of the same span', () => {
+ const { project: set } = applySceneUpdate(project, 's1', { visualLayer: 'still', imageEffect: 'flash-develop', imageEffectSec: 4 });
+ const { scenes } = replaceScenes(set, [{ startSec: 0, endSec: 4, prompt: 'Re-planned' }]);
+ expect(scenes[0]).toMatchObject({ sceneId: 's1', visualLayer: 'still', imageEffect: 'flash-develop', imageEffectSec: 4 });
+ });
});
diff --git a/server/services/musicVideo/projectsLogic.js b/server/services/musicVideo/projectsLogic.js
index f68dab0401..dbeb75454b 100644
--- a/server/services/musicVideo/projectsLogic.js
+++ b/server/services/musicVideo/projectsLogic.js
@@ -602,7 +602,9 @@ export function replaceScenes(project, sceneInputs) {
...(prior.frameFit ? { frameFit: prior.frameFit } : {}),
...(prior.transitionIn ? { transitionIn: prior.transitionIn } : {}),
...(prior.transitionOut ? { transitionOut: prior.transitionOut } : {}),
- ...(prior.imageEffect ? { imageEffect: prior.imageEffect, ...(prior.imageEffectSec ? { imageEffectSec: prior.imageEffectSec } : {}) } : {}),
+ // A still playing an image effect stays one: the effect is the shot's picture.
+ ...(prior.imageEffect && prior.visualLayer === 'still' ? { visualLayer: 'still', imageEffect: prior.imageEffect,
+ ...(prior.imageEffectSec ? { imageEffectSec: prior.imageEffectSec } : {}) } : {}),
takes: prior.takes || [],
...(prior.direction ? { direction: prior.direction } : {}),
};