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

feat: one home for render style, media mode and production strategy in Music Video Setup (#10160)

Adam Eivy92cd6b706047
diff --git a/client/src/components/musicVideo/CreativeSetupPanel.jsx b/client/src/components/musicVideo/CreativeSetupPanel.jsx
index dba00d55a1..903ec0bc99 100644
--- a/client/src/components/musicVideo/CreativeSetupPanel.jsx
+++ b/client/src/components/musicVideo/CreativeSetupPanel.jsx
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react';
-import { musicVideoToolPolicyConflict, normalizeMusicVideoProductionPolicy } from '../../../../server/lib/musicVideoMediumPlan.js';
+import { musicVideoToolPolicyConflict } from '../../../../server/lib/musicVideoMediumPlan.js';
import { formatCount } from '../../utils/formatters.js';
import { Link } from 'react-router';
import { listUniverseNames, getUniverse } from '../../services/apiUniverseBuilder.js';
@@ -60,7 +60,7 @@ export default function CreativeSetupPanel({ project, onSave, onPendingChange })
}, [editing, universeId]);
const begin = () => {
- setDraft({ universeId: project.concept?.universeId || '', subjects: project.concept?.subjects || [], moodBoardId: project.visualSpec?.moodBoardId || '', productionPolicy: normalizeMusicVideoProductionPolicy(project.productionPolicy) });
+ setDraft({ universeId: project.concept?.universeId || '', subjects: project.concept?.subjects || [], moodBoardId: project.visualSpec?.moodBoardId || '' });
setSelectedCanon([]);
setNewName('');
setNewDescription('');
@@ -82,11 +82,6 @@ export default function CreativeSetupPanel({ project, onSave, onPendingChange })
};
const save = async () => {
if (!universeReady) { setError('Wait for the selected universe to load before saving.'); return; }
- const percent = draft.productionPolicy.maxGeneratedVideoPercent;
- if (percent === '' || !Number.isFinite(Number(percent)) || Number(percent) < 0 || Number(percent) > 100) {
- setError('Choose a generated-video allowance from 0 to 100%.');
- return;
- }
setSaving(true);
setError('');
const concept = { subjects: draft.subjects, universeId: draft.universeId || null };
@@ -97,7 +92,7 @@ export default function CreativeSetupPanel({ project, onSave, onPendingChange })
}
const pulled = pullUniverseCanonReferences(canon, project.visualSpec?.references || []);
if (pulled.added) visualSpec.references = pulled.next;
- return onSave({ concept, visualSpec, productionPolicy: { ...draft.productionPolicy, maxGeneratedVideoPercent: Number(percent) } }).then(() => setEditing(false)).catch((err) => setError(err.message || 'Could not save creative setup')).finally(() => setSaving(false));
+ return onSave({ concept, visualSpec }).then(() => setEditing(false)).catch((err) => setError(err.message || 'Could not save creative setup')).finally(() => setSaving(false));
};
return <section className="bg-port-card border border-port-border rounded-lg p-3 space-y-3 min-w-0 break-words" aria-label="Creative setup">
@@ -128,22 +123,6 @@ export default function CreativeSetupPanel({ project, onSave, onPendingChange })
<p className="text-xs text-port-text-muted">Copies captions, notes and analyzed styles. Add images in Visual spec to condition frames.</p>
</div>
</div>
- <div className="space-y-2">
- <label htmlFor={idFor('strategy')} className="block text-xs">Production strategy</label>
- <select id={idFor('strategy')} className={inputClass} value={draft.productionPolicy.strategy} onChange={(e) => setDraft((d) => ({ ...d, productionPolicy: normalizeMusicVideoProductionPolicy({ strategy: e.target.value }, d.productionPolicy) }))}>
- <option value="legacy">Legacy / manual workflow</option>
- <option value="code-first">Code-first medium planning</option>
- </select>
- {draft.productionPolicy.strategy === 'code-first' && <>
- <label htmlFor={idFor('selective-video')} className="flex items-center gap-2 text-xs min-h-[44px]">
- <input id={idFor('selective-video')} type="checkbox" checked={Number(draft.productionPolicy.maxGeneratedVideoPercent) > 0} onChange={(e) => setDraft((d) => ({ ...d, productionPolicy: { ...d.productionPolicy, maxGeneratedVideoPercent: e.target.checked ? 20 : 0 } }))} />
- Allow selective generated footage
- </label>
- <label htmlFor={idFor('video-allowance')} className="block text-xs">Maximum generated video (% of final song time)</label>
- <input id={idFor('video-allowance')} type="number" min="0" max="100" step="any" className={inputClass} value={draft.productionPolicy.maxGeneratedVideoPercent} onChange={(e) => setDraft((d) => ({ ...d, productionPolicy: { ...d.productionPolicy, maxGeneratedVideoPercent: e.target.value } }))} />
- <p className="text-xs text-port-text-muted">Start with code and images. This policy plans final-edit seconds; it does not change the renderer or enforce generation budgets in manual controls.</p>
- </>}
- </div>
{loading && <p className="text-xs">Loading canon…</p>}
{universeReady && universe && <div className="grid grid-cols-1 sm:grid-cols-3 gap-2">{kinds.map(([kind, label]) => <div key={kind}>
<label htmlFor={idFor(`pick-${kind}`)} className="text-xs">Select {label.toLowerCase()}</label>
diff --git a/client/src/components/musicVideo/CreativeSetupPanel.test.jsx b/client/src/components/musicVideo/CreativeSetupPanel.test.jsx
index 39cb1fbfaf..5d9d06f030 100644
--- a/client/src/components/musicVideo/CreativeSetupPanel.test.jsx
+++ b/client/src/components/musicVideo/CreativeSetupPanel.test.jsx
@@ -89,20 +89,6 @@ describe('creative setup', () => {
});
});
-it('defaults code-first to zero, offers 20% selective footage, and saves the explicit allowance', async () => {
- const onSave = open();
- fireEvent.change(screen.getByLabelText('Production strategy'), { target: { value: 'code-first' } });
- const allowance = screen.getByLabelText('Maximum generated video (% of final song time)');
- expect(allowance.value).toBe('0');
- fireEvent.click(screen.getByLabelText('Allow selective generated footage'));
- expect(allowance.value).toBe('20');
- fireEvent.change(allowance, { target: { value: '12.5' } });
- fireEvent.click(screen.getByText('Save creative setup'));
- await waitFor(() => expect(onSave).toHaveBeenCalledWith(expect.objectContaining({
- productionPolicy: { strategy: 'code-first', maxGeneratedVideoPercent: 12.5 },
- })));
-});
-
describe('tools / policy conflict', () => {
const render_ = (extra, onSave = vi.fn(async () => {})) => {
render(<MemoryRouter><CreativeSetupPanel project={{ ...project, ...extra }} onSave={onSave} onPendingChange={vi.fn()} /></MemoryRouter>);
diff --git a/client/src/components/musicVideo/DocumentCompositionPanel.jsx b/client/src/components/musicVideo/DocumentCompositionPanel.jsx
index 166d3d4fe4..9cbef2d987 100644
--- a/client/src/components/musicVideo/DocumentCompositionPanel.jsx
+++ b/client/src/components/musicVideo/DocumentCompositionPanel.jsx
@@ -1,6 +1,5 @@
import { supportsToolFreeOneShot, toolFreeOneShotSelectionPolicy } from '../../utils/providerSelection.js';
-import MediaModePicker from './MediaModePicker.jsx';
-import { musicVideoMediaMode, musicVideoDocumentRenderer } from '../../../../server/lib/musicVideoMediaPolicy.js';
+import { musicVideoDocumentRenderer } from '../../../../server/lib/musicVideoMediaPolicy.js';
import { useEffect, useState, useRef } from 'react';
import ConfirmButtonPair from '../ui/ConfirmButtonPair.jsx';
import { useTimeTick } from '../../hooks/useTimeTick.js';
@@ -261,7 +260,6 @@ export default function DocumentCompositionPanel({ project, audioUrl, onProject,
<Unlink size={14} /> {confirming === 'detach' ? 'Click again to detach' : 'Detach'}
</button>
</div>
- <MediaModePicker value={musicVideoMediaMode(project)} disabled={!!busy} onChange={(mediaMode) => run('policy', () => updateMusicVideoProject(project.id, { mediaMode }, { silent: true }).then((project) => ({ project })), 'Media mode saved')} />
<label htmlFor="mv-doc-renderer" className="block text-xs text-port-text-muted">Authoring renderer</label>
<select id="mv-doc-renderer" disabled={!!busy} value={musicVideoDocumentRenderer(project)} className={inputCls}
onChange={(event) => run('renderer', () => updateMusicVideoProject(project.id, { composition: { ...compositionDraft(project), authoringRenderer: event.target.value } }, { silent: true }).then((project) => ({ project })), 'Renderer saved')}>
diff --git a/client/src/components/musicVideo/DocumentCompositionPanel.test.jsx b/client/src/components/musicVideo/DocumentCompositionPanel.test.jsx
index 7aafcc4030..4dccb8f446 100644
--- a/client/src/components/musicVideo/DocumentCompositionPanel.test.jsx
+++ b/client/src/components/musicVideo/DocumentCompositionPanel.test.jsx
@@ -66,17 +66,15 @@ describe('DocumentCompositionPanel', () => {
await waitFor(() => expect(api.generateMusicVideoMixedMediaDocument).toHaveBeenCalledWith('mv-1', { providerId: 'stub-provider', model: 'fixture-model' }, { silent: true }));
});
- it('selects code-only and authors, previews and accepts a Three.js scene candidate', async () => {
+ it('authors a code-only project and previews and accepts a Three.js scene candidate', async () => {
const saved = { ...bare, mediaMode: 'code-only' };
api.updateMusicVideoProject.mockResolvedValue(saved);
api.generateMusicVideoMixedMediaDocument.mockResolvedValue({ project: { ...saved, composition: { ...saved.composition, documentDraft: generated } } });
api.getMusicVideoMixedMediaCandidate.mockResolvedValue({ candidate: generated, source: generated, stale: false, sections: [{ id: 'world', label: 'World' }] });
api.acceptMusicVideoMixedMediaDocument.mockResolvedValue({ project: { ...saved, composition: { ...saved.composition, document: generated } } });
const onProject = vi.fn();
- const view = render(<DocumentCompositionPanel project={bare} onProject={onProject} onSave={vi.fn()} />);
- fireEvent.change(screen.getByLabelText('Design and composition media'), { target: { value: 'code-only' } });
- await waitFor(() => expect(onProject).toHaveBeenCalledWith(saved));
- view.rerender(<DocumentCompositionPanel project={saved} onProject={onProject} onSave={vi.fn()} />);
+ const view = render(<DocumentCompositionPanel project={saved} onProject={onProject} onSave={vi.fn()} />);
+ expect(screen.queryByLabelText('Design and composition media')).toBeNull(); // media mode is chosen in Setup only
expect(screen.getByLabelText('Authoring renderer').value).toBe('three');
fireEvent.click(screen.getByRole('button', { name: 'Generate authored 3D composition' }));
await waitFor(() => expect(api.generateMusicVideoMixedMediaDocument).toHaveBeenCalledWith('mv-1', { providerId: 'stub-provider', model: 'fixture-model' }, { silent: true }));
diff --git a/client/src/components/musicVideo/ProjectOptionsPanel.jsx b/client/src/components/musicVideo/ProjectOptionsPanel.jsx
index dc540422a3..4f009fe874 100644
--- a/client/src/components/musicVideo/ProjectOptionsPanel.jsx
+++ b/client/src/components/musicVideo/ProjectOptionsPanel.jsx
@@ -5,7 +5,8 @@ import RecordRenderPinRow from '../imageGen/RecordRenderPinRow.jsx';
import ToggleChip from '../ui/ToggleChip.jsx';
import Pill from '../ui/Pill.jsx';
import { RenderStyleSelect } from './ProjectActionGroups.jsx';
-import { renderStyleLabel } from './compositionDraft.js';
+import { renderStyleLabel, compositionDraft, RENDER_STYLE_HELP } from './compositionDraft.js';
+import { normalizeMusicVideoProductionPolicy } from '../../../../server/lib/musicVideoMediumPlan.js';
import { MUSIC_VIDEO_AUTOMATION_TOOLS, automationDraftFrom, automationFromDraft } from '../../lib/musicVideoAutomation.js';
import { MUSIC_VIDEO_MEDIA_MODE_LABELS, musicVideoMediaMode } from '../../../../server/lib/musicVideoMediaPolicy.js';
import { projectServicesSummary } from '../../lib/musicVideoStages.js';
@@ -34,8 +35,24 @@ export function projectOptionsSummary(project) {
* project through the same paths the Produce and Compose controls use.
*/
export default function ProjectOptionsPanel({
- project, videoSettings, generatingVideos = false, onMediaMode, onRenderStyle, onSaveAutomation,
+ project, videoSettings, generatingVideos = false, onMediaMode, onRenderStyle, onSaveAutomation, onSavePolicy,
}) {
+ const [policyError, setPolicyError] = useState('');
+ const [allowanceText, setAllowanceText] = useState(null);
+ const policy = normalizeMusicVideoProductionPolicy(project.productionPolicy);
+ const savePolicy = (next) => {
+ setPolicyError('');
+ return Promise.resolve(onSavePolicy(next)).catch((err) => setPolicyError(err?.message || 'Could not save the production strategy'));
+ };
+ const commitAllowance = (text) => {
+ setAllowanceText(null);
+ const percent = Number(text);
+ if (text === '' || !Number.isFinite(percent) || percent < 0 || percent > 100) {
+ setPolicyError('Choose a generated-video allowance from 0 to 100%.');
+ return;
+ }
+ if (percent !== Number(policy.maxGeneratedVideoPercent)) savePolicy({ ...policy, maxGeneratedVideoPercent: percent });
+ };
const [briefSaving, setBriefSaving] = useState(false);
const automation = project.automation || null;
const draft = automation ? automationDraftFrom(automation) : null;
@@ -69,6 +86,30 @@ export default function ProjectOptionsPanel({
<div className="flex min-w-0 flex-wrap items-center gap-2">
<RenderStyleSelect project={project} onRenderStyle={onRenderStyle} />
<span className="text-xs text-port-text-muted">How the final video is put together; Compose holds its details.</span>
+ <p className="w-full text-xs text-port-text-muted" id="mv-setup-render-style-help">{RENDER_STYLE_HELP[compositionDraft(project).mode] || RENDER_STYLE_HELP.concat}</p>
+ </div>
+ </div>
+ <div className={rowCls}>
+ <label htmlFor="mv-setup-strategy" className={headCls}>Production strategy</label>
+ <div className="flex min-w-0 flex-wrap items-center gap-2">
+ <select id="mv-setup-strategy" value={policy.strategy}
+ onChange={(e) => savePolicy(normalizeMusicVideoProductionPolicy({ strategy: e.target.value }, policy))}
+ className="min-h-[44px] rounded border border-port-border bg-port-bg px-2 py-1.5 text-sm sm:min-h-0">
+ <option value="legacy">Legacy / manual workflow</option>
+ <option value="code-first">Code-first medium planning</option>
+ </select>
+ {policy.strategy === 'code-first' && (
+ <>
+ <label htmlFor="mv-setup-video-allowance" className="text-xs text-port-text-muted">Maximum generated video (% of final song time)</label>
+ <input id="mv-setup-video-allowance" type="number" min="0" max="100" step="any"
+ value={allowanceText ?? policy.maxGeneratedVideoPercent}
+ onChange={(e) => setAllowanceText(e.target.value)}
+ onBlur={(e) => commitAllowance(e.target.value)}
+ className="min-h-[44px] w-24 rounded border border-port-border bg-port-bg px-2 py-1.5 text-sm sm:min-h-0" />
+ <p className="w-full text-xs text-port-text-muted">Start with code and images. This plans final-edit seconds; it does not change the renderer or enforce generation budgets in manual controls.</p>
+ </>
+ )}
+ {policyError && <p role="alert" className="w-full text-xs text-port-error">{policyError}</p>}
</div>
</div>
<div className={rowCls}>
diff --git a/client/src/components/musicVideo/ProjectOptionsPanel.test.jsx b/client/src/components/musicVideo/ProjectOptionsPanel.test.jsx
new file mode 100644
index 0000000000..ac240ca39a
--- /dev/null
+++ b/client/src/components/musicVideo/ProjectOptionsPanel.test.jsx
@@ -0,0 +1,38 @@
+import { describe, it, expect, vi } from 'vitest';
+import { render, screen, fireEvent, waitFor } from '@testing-library/react';
+import ProjectOptionsPanel from './ProjectOptionsPanel.jsx';
+
+vi.mock('./VideoRenderSettings.jsx', () => ({ default: () => null }));
+vi.mock('../imageGen/RecordRenderPinRow.jsx', () => ({ default: () => null }));
+
+const open = (project = {}, onSavePolicy = vi.fn(async () => {})) => {
+ render(<ProjectOptionsPanel project={{ id: 'mv1', ...project }} videoSettings={{ changeFramePin: vi.fn() }}
+ onMediaMode={vi.fn()} onRenderStyle={vi.fn()} onSaveAutomation={vi.fn()} onSavePolicy={onSavePolicy} />);
+ return onSavePolicy;
+};
+
+describe('ProjectOptionsPanel', () => {
+ it('states what the chosen render style means, including that footage mode drops typography', () => {
+ open({ composition: { mode: 'concat' } });
+ expect(screen.getByText(/Typography cues do not render/)).toBeInTheDocument();
+ });
+
+ it('saves the production strategy and generated-video allowance in place', async () => {
+ const onSavePolicy = open();
+ expect(screen.queryByLabelText(/Maximum generated video/)).toBeNull();
+ fireEvent.change(screen.getByLabelText('Production strategy'), { target: { value: 'code-first' } });
+ await waitFor(() => expect(onSavePolicy).toHaveBeenCalledWith(expect.objectContaining({ strategy: 'code-first' })));
+ });
+
+ it('commits a valid allowance on blur and rejects an out-of-range one', async () => {
+ const onSavePolicy = open({ productionPolicy: { strategy: 'code-first', maxGeneratedVideoPercent: 0 } });
+ const allowance = screen.getByLabelText('Maximum generated video (% of final song time)');
+ fireEvent.change(allowance, { target: { value: '12.5' } });
+ fireEvent.blur(allowance);
+ await waitFor(() => expect(onSavePolicy).toHaveBeenCalledWith({ strategy: 'code-first', maxGeneratedVideoPercent: 12.5 }));
+ fireEvent.change(allowance, { target: { value: '150' } });
+ fireEvent.blur(allowance);
+ expect(await screen.findByRole('alert')).toHaveTextContent('0 to 100%');
+ expect(onSavePolicy).toHaveBeenCalledTimes(1);
+ });
+});
diff --git a/client/src/components/musicVideo/TypographyPanel.jsx b/client/src/components/musicVideo/TypographyPanel.jsx
index 3bc2ca5ade..0dea977a3f 100644
--- a/client/src/components/musicVideo/TypographyPanel.jsx
+++ b/client/src/components/musicVideo/TypographyPanel.jsx
@@ -1,5 +1,5 @@
import { Copy, Plus, Trash2 } from 'lucide-react';
-import { compositionDraft, RENDER_STYLES, renderStyleLabel } from './compositionDraft.js';
+import { compositionDraft, renderStyleLabel } from './compositionDraft.js';
// Client-minted ids keep a freshly added row addressable across saves (see LyricsPanel).
const mintId = () => `mtc-${Date.now().toString(36)}${Math.random().toString(36).slice(2, 8)}`;
@@ -27,6 +27,7 @@ export default function TypographyPanel({ project, onEditLocal, onSave }) {
const cues = composition.textCues || [];
const composed = composition.mode === 'composed';
const codeMode = composition.mode === 'code';
+ const footage = composition.mode === 'concat';
const timedLyrics = (project.lyricCues || []).filter((c) => typeof c.startSec === 'number' && typeof c.endSec === 'number');
const edit = (patch) => onEditLocal({ composition: { ...composition, ...patch } });
@@ -48,12 +49,6 @@ export default function TypographyPanel({ project, onEditLocal, onSave }) {
</summary>
<div className="mt-2 flex flex-wrap items-end gap-2">
- <div>
- <label htmlFor="mv-typo-mode" className="block text-port-text-muted mb-0.5">Render style</label>
- <select id="mv-typo-mode" value={composition.mode} onChange={(e) => replace({ mode: e.target.value })} className={inputCls}>
- {RENDER_STYLES.map(([value, label]) => <option key={value} value={value}>{label}</option>)}
- </select>
- </div>
<div>
<label htmlFor="mv-typo-cutting" className="block text-port-text-muted mb-0.5" title="Intercut re-cuts each shot on the song's energy and sung words, reusing cutaway footage — no extra generation.">Cutting</label>
<select id="mv-typo-cutting" value={composition.cutting || 'scene'} onChange={(e) => replace({ cutting: e.target.value })} className={inputCls}>
@@ -89,6 +84,7 @@ export default function TypographyPanel({ project, onEditLocal, onSave }) {
</div>
{composed && cues.length === 0 && <p className="mt-2 text-port-text-muted">No text cues yet — a composed render with none renders as plain cuts.</p>}
+ {footage && cues.length > 0 && <p className="mt-2 text-port-warning" role="status">Footage renders plain cuts, so these text cues will not appear. Choose Composed in Setup to lay them over the footage.</p>}
{codeMode && <p className="mt-2 text-port-text-muted">Code-rendered draws the song in code. Text cues stay stored and come back if you switch to Composed.</p>}
{composition.mode === 'document' && <p className="mt-2 text-port-text-muted">The composition document reads these cues from <code>PORTOS_MV.textCues</code>: the layered template draws Hero cues as kinetic words on their sung times and uses Subtitle cues (or, with none, the timed lyrics) as subtitles.</p>}
<div className="mt-2 max-h-72 overflow-y-auto space-y-1 pr-1">
diff --git a/client/src/components/musicVideo/compositionDraft.js b/client/src/components/musicVideo/compositionDraft.js
index 95e30d2101..0d05f478e9 100644
--- a/client/src/components/musicVideo/compositionDraft.js
+++ b/client/src/components/musicVideo/compositionDraft.js
@@ -13,6 +13,16 @@ export const RENDER_STYLES = [
['eidoverse', 'Eidoverse Video'],
];
+// One line per render style: what it is made from, whether Compose previews it live,
+// whether it needs generated footage, and what it outputs. Shown beside the Setup picker.
+export const RENDER_STYLE_HELP = {
+ concat: 'Cuts the generated footage as is: needs footage generation, no live preview, output follows the clips. Typography cues do not render.',
+ composed: 'Lays timed text over the generated footage: needs footage generation, no live preview, output follows the clips.',
+ code: 'Draws the song in code with no footage: no generation needed, no live preview, limited 720p Canvas output.',
+ document: 'Renders your composition document (Three.js or Canvas): no footage required, live preview in Compose, 1080p at 24 fps by default.',
+ eidoverse: 'Renders an Eidoverse scene from a saved script: no footage required, no live preview, needs a track analyzed first.',
+};
+
export function compositionDraft(project, patch = {}) {
const current = project?.composition || {};
const style = { ...EMPTY_COMPOSITION.style, ...(current.style || {}), ...(patch.style || {}) };
diff --git a/client/src/components/musicVideo/stages/ComposeStage.jsx b/client/src/components/musicVideo/stages/ComposeStage.jsx
index 90af86f51a..1c14cfcd5f 100644
--- a/client/src/components/musicVideo/stages/ComposeStage.jsx
+++ b/client/src/components/musicVideo/stages/ComposeStage.jsx
@@ -5,6 +5,7 @@ import EidoverseVideoPanel from '../EidoverseVideoPanel.jsx';
import CodeVideoPanel from '../CodeVideoPanel.jsx';
import DocumentCompositionPanel from '../DocumentCompositionPanel.jsx';
import { renderStyleLabel } from '../compositionDraft.js';
+import { MUSIC_VIDEO_MEDIA_MODE_LABELS, musicVideoMediaMode } from '../../../../../server/lib/musicVideoMediaPolicy.js';
/**
* Compose: how the final render is put together — the timed typography and
@@ -20,6 +21,7 @@ export default function ComposeStage({ board }) {
<div className="space-y-2 rounded-lg border border-port-border bg-port-card p-3">
<div className="flex flex-wrap items-center gap-2 text-xs text-port-text-muted">
<span>Render style: <span className="text-port-text">{renderStyleLabel(mode)}</span></span>
+ <span>Media: <span className="text-port-text">{MUSIC_VIDEO_MEDIA_MODE_LABELS[musicVideoMediaMode(project)]}</span></span>
<button type="button" onClick={() => board.goToStage('setup', 'mv-setup-options')} className="min-h-[44px] px-1 text-port-accent sm:min-h-0">
Change in Setup
</button>
diff --git a/client/src/components/musicVideo/stages/SetupStage.jsx b/client/src/components/musicVideo/stages/SetupStage.jsx
index 47d4e0b5e9..760db0781e 100644
--- a/client/src/components/musicVideo/stages/SetupStage.jsx
+++ b/client/src/components/musicVideo/stages/SetupStage.jsx
@@ -116,6 +116,7 @@ export default function SetupStage({ board }) {
onMediaMode={board.saveMediaMode}
onRenderStyle={board.onRenderStyle}
onSaveAutomation={board.saveAutomation}
+ onSavePolicy={(productionPolicy) => board.saveCreativeSetup({ productionPolicy })}
/>
</StageSection>
<StageSection id="mv-setup-song" title="Song & lyrics" summary={songSummary(project, trackLabel)} defaultOpen={songOpen}>
diff --git a/client/src/pages/MusicVideo.test.jsx b/client/src/pages/MusicVideo.test.jsx
index 34c59f708c..4592508803 100644
--- a/client/src/pages/MusicVideo.test.jsx
+++ b/client/src/pages/MusicVideo.test.jsx
@@ -1533,13 +1533,13 @@ describe('MusicVideo typography composition (#8984)', () => {
composition: expect.objectContaining({ mode: 'concat', textCues: [expect.objectContaining({ text: 'first line', startSec: 1, endSec: 3, template: 'fade' })] }),
}, { silent: true }));
- fireEvent.change(document.getElementById('mv-typo-mode'), { target: { value: 'composed' } });
+ expect(document.getElementById('mv-typo-mode')).toBeNull(); // render style is chosen in Setup only
fireEvent.change(screen.getByLabelText('Text cue 1 motion'), { target: { value: 'typewriter' } });
fireEvent.change(text, { target: { value: 'first line, typed' } });
fireEvent.blur(text);
await waitFor(() => expect(updateMusicVideoProject).toHaveBeenLastCalledWith('mv-3', {
composition: expect.objectContaining({
- mode: 'composed',
+ mode: 'concat',
textCues: [expect.objectContaining({ text: 'first line, typed', template: 'typewriter' })],
}),
}, { silent: true }));