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: say the final render is current instead of '3 of 116 shots ready' (#12383)
[._.]/ Adam Eivyba250be3f713
diff --git a/client/src/components/musicVideo/ProjectActionGroups.jsx b/client/src/components/musicVideo/ProjectActionGroups.jsxindex d2f52cfd0a..eaf8eb96f8 100644--- a/client/src/components/musicVideo/ProjectActionGroups.jsx+++ b/client/src/components/musicVideo/ProjectActionGroups.jsx@@ -7,7 +7,7 @@ import { Film, Music, Activity, Image as ImageIcon, Video, Wand2, X } from 'luciimport { MUSCRIPTOR_MODELS } from '../../lib/muscriptorModels.js';import { isLayeredComposition, isSelfDrawnLayer, sceneRenderReady, sceneVisualLayer } from '../../lib/musicVideoLayers.js';import { compositionDraft, RENDER_STYLES } from './compositionDraft.js';-import { projectServicesSummary } from '../../lib/musicVideoStages.js';+import { isFinalRenderCurrent, projectServicesSummary } from '../../lib/musicVideoStages.js';import { batchActive, batchSummary, scenesWaitingForFrame, videoBatchPreview, videosButtonLabel } from '../../lib/musicVideoBatchPlan.js';/**@@ -251,6 +251,7 @@ export function RenderStyleSelect({ project, onRenderStyle }) {export function RenderFinalButton({ project, renderJob, readiness }) {// A composed render reuses every shot already rendered and stitches.const { status: shotRenders } = useMusicVideoShotRenders(project);+ const finalCurrent = isFinalRenderCurrent(project);const scenes = project.scenes || [];const sceneCount = scenes.length;const mode = project.composition?.mode || 'concat';@@ -315,10 +316,13 @@ export function RenderFinalButton({ project, renderJob, readiness }) {{isDisabled && blockerReason && (<p className="text-xs text-port-text-muted">{blockerReason}</p>)}- {shotRenders?.total > 0 && (+ {finalCurrent && (+ <p className="text-xs text-port-text-muted" data-testid="final-render-current">Final render is current.</p>+ )}+ {!finalCurrent && shotRenders?.total > 0 && (<p className="text-xs text-port-text-muted" data-testid="shot-renders-ready">{shotRenders.ready === shotRenders.total ? 'Every shot is ready: Render final only stitches them.'- : `${formatCount(shotRenders.ready)} of ${formatCount(shotRenders.total)} shots ready. Render final renders the rest, then stitches.`}+ : `${formatCount(shotRenders.ready)} of ${formatCount(shotRenders.total)} ${shotRenders.outro ? 'shots and the outro card' : 'shots'} ready. Render final renders the rest, then stitches.`}</p>)}</div>diff --git a/client/src/components/musicVideo/ProjectActionGroups.test.jsx b/client/src/components/musicVideo/ProjectActionGroups.test.jsxnew file mode 100644index 0000000000..6e6e8941ab--- /dev/null+++ b/client/src/components/musicVideo/ProjectActionGroups.test.jsx@@ -0,0 +1,31 @@+import { beforeEach, expect, it, vi } from 'vitest';+import { render, screen, cleanup } from '@testing-library/react';++const shotRenders = vi.hoisted(() => ({ status: null }));+vi.mock('../../hooks/useMusicVideoShotRenders.js', () => ({ default: () => ({ status: shotRenders.status }) }));+import { RenderFinalButton } from './ProjectActionGroups.jsx';++const scenes = [{ id: 'a', videoFilename: 'a.mp4' }];+const project = { id: 'example', scenes, renderHistoryId: 'r1', composition: { mode: 'composed' } };+const renderJob = { start: vi.fn(), active: false };+const view = (overrides = {}) => render(<RenderFinalButton project={{ ...project, ...overrides }} renderJob={renderJob} readiness={{ readyForProduction: true }} />);++beforeEach(() => {+ cleanup();+ shotRenders.status = { available: true, ready: 3, total: 116, outro: { state: 'stale' }, shots: [] };+});++it('does not claim shots still need rendering once the final render is current', () => {+ view({ renderDependencyState: { status: 'current' } });+ expect(screen.getByTestId('final-render-current').textContent).toBe('Final render is current.');+ expect(screen.queryByTestId('shot-renders-ready')).toBeNull();+});++it('keeps the per-shot hint for a stale or unrendered project and labels the outro card in the total', () => {+ view({ renderDependencyState: { status: 'stale' } });+ expect(screen.queryByTestId('final-render-current')).toBeNull();+ expect(screen.getByTestId('shot-renders-ready').textContent).toContain('3 of 116 shots and the outro card ready');+ cleanup();+ view({ renderHistoryId: null });+ expect(screen.getByTestId('shot-renders-ready')).toBeTruthy();+});diff --git a/client/src/lib/musicVideoStages.js b/client/src/lib/musicVideoStages.jsindex e31a10fa89..fe7af1ee9c 100644--- a/client/src/lib/musicVideoStages.js+++ b/client/src/lib/musicVideoStages.js@@ -346,6 +346,9 @@ export const STALE_RENDER_MESSAGE = 'Final render is out of date — re-render';/** The server's dependency projection says scenes changed after the final render was made. */export const isFinalRenderStale = (project) => !!project?.renderHistoryId && project.renderDependencyState?.status === 'stale';+/** The server's dependency projection says the final render still matches every scene. */+export const isFinalRenderCurrent = (project) => !!project?.renderHistoryId && project.renderDependencyState?.status === 'current';+/*** Publish progress per enabled platform. `publish.targets` is the director's* enabled `[{ target, label }]` list (machine-level settings, so the caller