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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: finish Produce and Compose for Eidoverse and code music videos (#10139)
Adam Eivyf065d9d80238
diff --git a/client/src/lib/musicVideoStages.js b/client/src/lib/musicVideoStages.jsindex 332fef4dfa..db387ac1cf 100644--- a/client/src/lib/musicVideoStages.js+++ b/client/src/lib/musicVideoStages.js@@ -179,10 +179,21 @@ export function describeProjectStatus(project, { progress, nextAction = null, re/** Resolve the `:stage` route param; an unknown or missing value is null. */export const resolveStageParam = (value) => (isStageId(value) ? value : null);+// Footage-optional modes draw their own picture, so scene footage never gates Produce.+const FOOTAGE_OPTIONAL_MODES = new Set(['code', 'document', 'eidoverse']);++// A code video is composed once it was generated or the director holds sections to render.+const codeComposed = (project) => {+ const code = project.composition?.codeVideo;+ return !!code?.generatedAt || (code?.sections || []).length > 0;+};+const composeDone = (project, mode) => {if (mode === 'composed') return (project.composition?.textCues || []).length > 0;if (mode === 'document') return !!project.composition?.document;- // Footage has nothing to compose; a code-rendered video is composed by its own panel on demand.+ if (mode === 'eidoverse') return !!project.composition?.eidoverseScene?.inlineScript;+ if (mode === 'code') return codeComposed(project);+ // Footage has nothing to compose.return true;};@@ -200,7 +211,7 @@ export function deriveStages(project, readiness = project?.productionReadiness)const liveRun = !!run && RESUMABLE_RUN_STATUSES.has(run.status);const layered = isLayeredComposition(project);// Code and document renders draw the picture themselves; scene footage is optional there.- const footageOptional = mode === 'code' || mode === 'document';+ const footageOptional = FOOTAGE_OPTIONAL_MODES.has(mode);const planned = !!readiness?.storyboard.approved;const castStopped = !!cast && (cast.interrupted || cast.status === 'failed');const castDone = !!readiness?.art.approved;@@ -314,7 +325,7 @@ export function deriveNextAction(project, {case 'compose':return {id: 'goto-compose', kind: 'goto', stage: 'compose',- label: (project.composition?.mode === 'document') ? 'Attach a composition' : 'Add typography',+ label: { document: 'Attach a composition', eidoverse: 'Save the Eidoverse scene', code: 'Generate the code video' }[project.composition?.mode] || 'Add typography',};case 'publish':return project.publishKit?.builtAt@@ -387,7 +398,7 @@ export function stageChecklist(stageId, project, readiness = project?.production}case 'produce': {const items = [];- if (mode !== 'code' && mode !== 'document') {+ if (!FOOTAGE_OPTIONAL_MODES.has(mode)) {const layered = isLayeredComposition(project);const ready = scenes.filter((scene) => sceneRenderReady(scene, { layered })).length;items.push({ id: 'footage', label: `Footage for every shot (${formatCount(ready)} of ${formatCount(scenes.length)})`, done: scenes.length > 0 && ready === scenes.length });@@ -400,6 +411,15 @@ export function stageChecklist(stageId, project, readiness = project?.productionconst proof = { id: 'proof', label: 'Animated proof approved (Produce)', done: !!readiness?.proof?.approved };if (mode === 'composed') return [proof, { id: 'composition', label: 'Timed typography added', done: (project.composition?.textCues || []).length > 0 }];if (mode === 'document') return [proof, { id: 'composition', label: 'Composition document attached', done: !!project.composition?.document }];+ if (mode === 'eidoverse') {+ const saved = !!project.composition?.eidoverseScene?.inlineScript;+ return [proof, { id: 'composition', label: 'Save the Eidoverse scene', done: saved, action: saved ? null : { label: 'Save the scene', anchor: 'mv-eidoverse-scene' } }];+ }+ if (mode === 'code') {+ const generated = !!project.composition?.codeVideo?.generatedAt;+ return [proof, { id: 'composition', label: generated ? 'Code video generated' : 'Code video sections ready', done: codeComposed(project),+ detail: codeComposed(project) ? null : 'Generate the code video from the Code Video panel.' }];+ }return [proof, { id: 'composition', label: 'Nothing to compose for this render style', done: true }];}case 'review':diff --git a/client/src/lib/musicVideoStages.test.js b/client/src/lib/musicVideoStages.test.jsindex bb53c409fb..1c5da85b3e 100644--- a/client/src/lib/musicVideoStages.test.js+++ b/client/src/lib/musicVideoStages.test.js@@ -92,6 +92,29 @@ describe('deriveStages / deriveNextAction', () => {expect(stateOf({ ...finished, publishKit: { posts: { youtube: { url: 'https://example.com/v' } } } }).publish).toBe('done');});+ it('derives Produce and Compose for all five render styles (#10139)', () => {+ const bare = { productionReadiness: APPROVED, id: 'p', trackId: 't1', audioAnalysis: ANALYSIS, scenes: [scene({ referenceImageId: null, videoHistoryId: null })] };+ const withMode = (composition) => ({ ...bare, composition });+ // Footage styles still need footage; composed also needs cues.+ expect(deriveStages(withMode({ mode: 'concat' })).current).toBe('produce');+ expect(deriveStages(withMode({ mode: 'composed', textCues: [] })).current).toBe('produce');+ // Eidoverse: Produce done without footage; Compose waits on a saved scene.+ expect(stateOf(withMode({ mode: 'eidoverse' })).produce).toBe('done');+ expect(deriveStages(withMode({ mode: 'eidoverse' })).current).toBe('compose');+ expect(stageChecklist('produce', withMode({ mode: 'eidoverse' }), APPROVED).map((i) => i.id)).toEqual(['approve-proof']);+ expect(stageChecklist('compose', withMode({ mode: 'eidoverse' }), APPROVED)[1])+ .toMatchObject({ label: 'Save the Eidoverse scene', done: false, action: { anchor: 'mv-eidoverse-scene' } });+ const saved = withMode({ mode: 'eidoverse', eidoverseScene: { inlineScript: 'scene()' } });+ expect(deriveStages(saved).current).toBe('review');+ expect(stageChecklist('compose', saved, APPROVED)[1].done).toBe(true);+ // Code: composed only once generated (or sections exist).+ expect(deriveStages(withMode({ mode: 'code' })).current).toBe('compose');+ expect(stageChecklist('compose', withMode({ mode: 'code' }), APPROVED)[1].done).toBe(false);+ expect(deriveStages(withMode({ mode: 'code', codeVideo: { generatedAt: '2026-01-01T00:00:00.000Z', sections: [] } })).current).toBe('review');+ // Document: composed once the document is attached.+ expect(deriveStages(withMode({ mode: 'document' })).current).toBe('compose');+ });+it('does not require scene footage for code-rendered or document projects', () => {const bare = { productionReadiness: APPROVED, id: 'p', trackId: 't1', audioAnalysis: ANALYSIS, scenes: [scene({ referenceImageId: null, videoHistoryId: null })] };expect(stateOf({ ...bare, composition: { mode: 'code' } }).produce).toBe('done');