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
Name the shots behind the Plan warnings and on the Lock all stills card (#11533)
[._.]/14fdc7677a18
diff --git a/client/src/components/musicVideo/ProductionReviewPanel.jsx b/client/src/components/musicVideo/ProductionReviewPanel.jsxindex 0ebbc9620e..726a038e75 100644--- a/client/src/components/musicVideo/ProductionReviewPanel.jsx+++ b/client/src/components/musicVideo/ProductionReviewPanel.jsx@@ -2,7 +2,7 @@ import { useEffect, useState } from 'react';import ProductionReviewContext from './ProductionReviewContext.jsx';import OverlayTextCheck from './OverlayTextCheck.jsx';import { formatTimecode } from '../../utils/formatters.js';-import { ART_DIRECTION_ANCHOR, artDirectionGaps, changeRequestBlocker, openChangeRequests, summarizeStoryboardProblems } from '../../lib/musicVideoStages.js';+import { ART_DIRECTION_ANCHOR, artDirectionGaps, changeRequestBlocker, openChangeRequests, stageChecklist, summarizeStoryboardProblems } from '../../lib/musicVideoStages.js';const EMPTY = { cast: '', environments: '', visualLanguage: '', motionLanguage: '', guideArtifactId: null,lyricsMode: 'vocal', timingStatus: 'provisional', timingNotes: '', storyboard: [] };@@ -110,10 +110,10 @@ export default function ProductionReviewPanel({ project, review, onOpenArtifact,if (review.busy) return 'Working…';const problems = shownProblems(stage);const requests = openRequests(stage);- // The storyboard step's checklist already lists each open item with its button, so the card only points there.+ // The Plan checklist lists each open item with its button, so the card names them (planItems) and links there.if (stage === 'storyboard' && problems.length) {- const open = problems.length + (requests.length ? 1 : 0);- return open > 1 ? `Finish the ${open} open items above first.` : 'Finish the open item above first.';+ const open = planItems().length || problems.length + (requests.length ? 1 : 0);+ return open > 1 ? `Finish these ${open} items on the Plan step first:` : 'Finish this on the Plan step first:';}if (requests.length) return changeRequestBlocker(requests);// With no current proof, the Render button already says what to do; repeating it as a warning reads as required.@@ -126,6 +126,12 @@ export default function ProductionReviewPanel({ project, review, onOpenArtifact,if (!evidenceComplete) return 'Complete the machine review notes (40+ characters each, plus limitations).';return null;};+ // The Plan checklist's open rows, each with the shots it names, for the storyboard card to list.+ const planItems = () => stageChecklist('board', project, ready).filter(item => !item.done && item.id.startsWith('board-'))+ .map(item => {+ const numbers = (item.shots || []).map(shot => shot.label.replace(/^Shot\s*/, '')).filter(Boolean);+ return { id: item.id, text: numbers.length ? `${item.label} (${numbers.length === 1 ? 'shot' : 'shots'} ${numbers.join(', ')})` : item.label };+ });// The problems listed under the help line: all of them, less the first when the help line is showing it// (it isn't while edits are unsaved or an action is running). A proof with nothing rendered lists none.const listedProblems = stage => {@@ -237,6 +243,10 @@ export default function ProductionReviewPanel({ project, review, onOpenArtifact,}}>Request changes</button></div>{approvalHelp(key) && <p id={fieldId(`${key}-approval-help`)} role="status" className="mt-1 text-sm text-port-warning">{approvalHelp(key)}</p>}+ {key === 'storyboard' && !ready?.storyboard.approved && !!ready?.storyboard.problems.length && planItems().length > 0 && <div className="mt-1 text-sm">+ <ul aria-label="Open Plan items" className="list-disc pl-5 text-port-text-muted">{planItems().map(item => <li key={item.id}>{item.text}</li>)}</ul>+ {onNavigate && <button type="button" onClick={() => onNavigate('board')} className="mt-1 min-h-[44px] rounded border border-port-border px-2 py-1 text-port-accent sm:min-h-0">Open the Plan step</button>}+ </div>}{listedProblems(key).length > 0 && <ul className="mt-1 list-disc pl-5 text-xs text-port-text-muted">{listedProblems(key).map(problem => <li key={problem}>{problem}</li>)}</ul>}{/* Camera variety (#10589) is advice, never a blocker on approval. */}{key === 'storyboard' && ready?.storyboard.camera?.notes?.length > 0 && <div role="note" aria-label="Camera variety notes" className="mt-2 text-xs text-port-text-muted">diff --git a/client/src/components/musicVideo/ProductionReviewPanel.test.jsx b/client/src/components/musicVideo/ProductionReviewPanel.test.jsxindex 744594daaf..623004ecb1 100644--- a/client/src/components/musicVideo/ProductionReviewPanel.test.jsx+++ b/client/src/components/musicVideo/ProductionReviewPanel.test.jsx@@ -348,13 +348,20 @@ describe('Approval problems with unsaved edits', () => {expect(screen.getByText('Second problem.')).toBeTruthy();});- it('points the storyboard card at the step checklist in one line instead of repeating its items', () => {+ // Uniquely catches the lock card pointing at "items above" that live on another step.+ it('names the open Plan items and their shots on the storyboard card, with a link to the Plan step', () => {const review = reviewFixture();- review.readiness.storyboard = { approved: false, problems: ['Cover the master with timed shots.', 'Second problem.'] };- render(<ProductionReviewPanel project={project} review={review} onOpenArtifact={vi.fn()} stage="storyboard" />);- expect(screen.getByText('Finish the 2 open items above first.')).toBeTruthy();- expect(screen.queryByText(/Cover the master with timed shots\./)).toBeNull();- expect(screen.queryByText('Second problem.')).toBeNull();+ const board = { ...project, composition: { mode: 'concat' }, scenes: [{ sceneId: 's-a', label: 'Verse', startSec: 0, endSec: 4 }, { sceneId: 's-b', label: 'Chorus', startSec: 3.5, endSec: 8 }] };+ review.readiness.storyboard = { approved: false,+ problems: ['Storyboard shots must cover the master without unintended gaps or overlaps.', 'Complete timing, action, staging, camera and transition for Chorus.'],+ coverage: [{ sceneId: 's-b', issue: 'overlap', startSec: 3.5, endSec: 4 }], incompleteShots: [{ sceneId: 's-b', missing: ['camera'] }] };+ const onNavigate = vi.fn();+ render(<ProductionReviewPanel project={board} review={review} onOpenArtifact={vi.fn()} stage="storyboard" onNavigate={onNavigate} />);+ expect(screen.getByText('Finish these 2 items on the Plan step first:')).toBeTruthy();+ expect(screen.getByRole('list', { name: 'Open Plan items' }).textContent).toBe('Shot coverage (shot 2)Shot details (shot 2)');+ expect(screen.queryByText(/without unintended gaps/)).toBeNull();+ fireEvent.click(screen.getByRole('button', { name: 'Open the Plan step' }));+ expect(onNavigate).toHaveBeenCalledWith('board');});});diff --git a/client/src/lib/musicVideoStages.js b/client/src/lib/musicVideoStages.jsindex f977c8d27f..c48f41f4c8 100644--- a/client/src/lib/musicVideoStages.js+++ b/client/src/lib/musicVideoStages.js@@ -788,10 +788,45 @@ function storyboardProblemItems(readiness, scenes = []) {// An art approval that went stale says what changed, so the row is not a bare "approve first".const stale = group.id === 'art' && staleApprovalText(readiness?.art?.stale);const details = stale ? mine.map((text) => (ART_APPROVAL_PROBLEM.test(text) ? `${stale} Approve it again on the Look step.` : text)) : mine;- return [{ id: `board-${group.id}`, label: group.label, done: false, details, action: group.action }];+ return [namedShots({ id: `board-${group.id}`, label: group.label, done: false, details, action: group.action }, readiness, scenes)];}), ...(stale ? [stale] : []), ...(anchors ? [anchors] : [])];}+const MISSING_DETAILS_LINE = /^\d+ shots? missing timing, action, staging, camera or transition\.$/;+const spanText = (startSec, endSec) => `${formatTimecode(startSec)}–${formatTimecode(endSec)}`;+const gapSec = ({ startSec, endSec }) => `${(endSec - startSec).toFixed(2)} s`;+const COVERAGE_TEXT = {+ 'late-start': (c) => `Nothing covers the start of the song, ${spanText(c.startSec, c.endSec)}`,+ gap: (c) => `Gap of ${gapSec(c)} before this shot, ${spanText(c.startSec, c.endSec)}`,+ overlap: (c) => `Overlaps the shot before by ${gapSec(c)}, ${spanText(c.startSec, c.endSec)}`,+ 'past-end': (c) => `Runs ${gapSec(c)} past the end of the song, ${spanText(c.startSec, c.endSec)}`,+ 'early-end': (c) => `Ends ${gapSec(c)} before the song does, ${spanText(c.startSec, c.endSec)}`,+};++/**+ * The Shot coverage and Shot details rows name each shot they are about (a+ * button to its card) and say what is wrong with it, in place of the generic+ * sentence or count.+ */+function namedShots(item, readiness, scenes) {+ const number = (sceneId) => scenes.findIndex((scene) => scene.sceneId === sceneId) + 1;+ const label = (sceneId) => (number(sceneId) > 0 ? `Shot ${number(sceneId)}` : 'Shot');+ const byShot = (entries, text) => [...entries.reduce((map, entry) => map.set(entry.sceneId,+ [...(map.get(entry.sceneId) || []), text(entry)]), new Map())].map(([sceneId, lines]) => ({ sceneId, label: label(sceneId), text: lines.join(' · ') }));+ const coverage = readiness?.storyboard?.coverage;+ if (item.id === 'board-coverage' && coverage?.length) {+ return { ...item, details: item.details.filter((text) => !/cover the master/.test(text)),+ detail: 'Move these cuts so every moment of the song has exactly one shot.',+ shots: byShot(coverage, (c) => (COVERAGE_TEXT[c.issue] || (() => c.issue))(c)) };+ }+ const incomplete = readiness?.storyboard?.incompleteShots;+ if (item.id === 'board-shots' && incomplete?.length) {+ return { ...item, details: item.details.filter((text) => !MISSING_DETAILS_LINE.test(text)),+ shots: byShot(incomplete, (shot) => `Missing ${shot.missing.join(', ')}`) };+ }+ return item;+}+const ANCHOR_PROBLEM = /^Review lyric anchors for /;const STALE_ROWS_PROBLEM = /left from deleted shots\.$/;const ROW_ACTION_CHARS = 60;diff --git a/client/src/pages/MusicVideo.test.jsx b/client/src/pages/MusicVideo.test.jsxindex 8a1a9f88c6..c0bd58ac31 100644--- a/client/src/pages/MusicVideo.test.jsx+++ b/client/src/pages/MusicVideo.test.jsx@@ -3454,6 +3454,25 @@ describe('stage checklist and project options', () => {expect(feedbackCalls.removeStaleRows).toHaveBeenCalledWith();});+ // Uniquely catches a coverage or details problem the director cannot trace to a shot.+ it('names the shots behind Shot coverage and Shot details, each opening its card', async () => {+ const project = { ...PROJECT_ANALYZED, scenes: [{ sceneId: 's-a', label: 'Drummer', startSec: 0, endSec: 4 }, { sceneId: 's-b', label: 'Singer', startSec: 4.5, endSec: 8 }],+ productionReview: { draft: { storyboard: [] } },+ productionReadiness: { readyForProduction: false, basis: {}, art: { approved: true, problems: [] },+ storyboard: { approved: false, problems: ['Storyboard shots must cover the master without unintended gaps or overlaps.', 'Complete timing, action, staging, camera and transition for Singer.'],+ coverage: [{ sceneId: 's-b', issue: 'gap', startSec: 4, endSec: 4.5 }],+ incompleteShots: [{ sceneId: 's-b', missing: ['camera'] }] }, proof: { approved: false, problems: [] } } };+ await openProject(project, 'board');+ const checklist = screen.getByRole('region', { name: 'What this step needs' });+ expect(within(checklist).getByRole('list', { name: 'Shot coverage shots' })).toHaveTextContent('Shot 2Gap of 0.50 s before this shot, 0:04.00–0:04.50');+ expect(checklist).not.toHaveTextContent('without unintended gaps');+ const details = within(checklist).getByRole('list', { name: 'Shot details shots' });+ expect(details).toHaveTextContent('Shot 2Missing camera');+ expect(checklist).not.toHaveTextContent('1 shot missing timing');+ fireEvent.click(within(details).getByRole('button', { name: 'Shot 2' }));+ await waitFor(() => expect(document.getElementById('scene-s-b')).toBeTruthy());+ });+it('builds the cast & sets from the Look checklist when nothing is written yet', async () => {const project = { ...PROJECT_ANALYZED, scenes: [], castAndSets: undefined, devArtifacts: [],productionReadiness: { readyForProduction: false, basis: {}, art: { approved: false, problems: ['Cast guide needs editable direction.'] },diff --git a/server/services/musicVideo/productionReview.js b/server/services/musicVideo/productionReview.jsindex 9de3514a9d..b6f37f61b4 100644--- a/server/services/musicVideo/productionReview.js+++ b/server/services/musicVideo/productionReview.js@@ -657,16 +657,31 @@ export function productionReadiness(project) {}if (!scenes.length) boardProblems.push('Create a timed shot storyboard.');const timedScenes = scenes.filter(s => Number.isFinite(s.startSec) && s.endSec > s.startSec).sort((a, b) => a.startSec - b.startSec);- if (timedScenes.length && (timedScenes[0].startSec > 1 / 24- || Math.abs(timedScenes.at(-1).endSec - duration) > 1 / 24- || timedScenes.some((s, i) => i > 0 && Math.abs(s.startSec - timedScenes[i - 1].endSec) > 1 / 24))) {- boardProblems.push('Storyboard shots must cover the master without unintended gaps or overlaps.');+ // Each place the shots leave the song uncovered or covered twice, on the shot where it happens, so the checklist can name it.+ const coverage = [];+ if (timedScenes.length) {+ const [first, last] = [timedScenes[0], timedScenes.at(-1)];+ if (first.startSec > 1 / 24) coverage.push({ sceneId: first.sceneId, issue: 'late-start', startSec: 0, endSec: first.startSec });+ timedScenes.forEach((s, i) => {+ const prev = timedScenes[i - 1];+ if (!prev || Math.abs(s.startSec - prev.endSec) <= 1 / 24) return;+ coverage.push({ sceneId: s.sceneId, issue: s.startSec > prev.endSec ? 'gap' : 'overlap',+ startSec: Math.min(s.startSec, prev.endSec), endSec: Math.max(s.startSec, prev.endSec) });+ });+ if (Math.abs(last.endSec - duration) > 1 / 24) coverage.push({ sceneId: last.sceneId, issue: last.endSec > duration ? 'past-end' : 'early-end',+ startSec: Math.min(last.endSec, duration), endSec: Math.max(last.endSec, duration) });}+ if (coverage.length) boardProblems.push('Storyboard shots must cover the master without unintended gaps or overlaps.');+ // Each shot missing timing or storyboard fields, with what is missing.+ const incompleteShots = [];for (const scene of scenes) {const shot = documentShots ? scene : draft.storyboard?.find(s => s.sceneId === scene.sceneId) || boardShotFromScene(project, scene);- if (!(Number.isFinite(scene.startSec) && scene.endSec > scene.startSec && scene.endSec <= duration)- || !shot || ['action', 'staging', 'camera', 'transition'].some(key => !text(shot[key]))) {+ const missing = !(Number.isFinite(scene.startSec) && scene.endSec > scene.startSec) ? ['timing']+ : scene.endSec > duration ? ['an end inside the song'] : [];+ missing.push(...['action', 'staging', 'camera', 'transition'].filter(key => !text(shot?.[key])));+ if (missing.length) {boardProblems.push(`Complete timing, action, staging, camera and transition for ${scene.label || 'each shot'}.`);+ incompleteShots.push({ sceneId: scene.sceneId, missing });}// A shot anchors every line sung over it, counted from the line's first sung word (lib/musicVideoLyricAnchors.js).const sung = cuesSungWithin(cues, scene.startSec, scene.endSec);@@ -698,7 +713,7 @@ export function productionReadiness(project) {// The overlay text check is advice on the storyboard, like camera variety; it never blocks approval.storyboard: { approved: storyboardApproved, problems: [...new Set(boardProblems)], camera,// Board shots as reviewed, derived rows included, so the editor and approval card show what the gate checked.- shots: documentShots ? null : boardStoryboard(project), lyricAnchors, staleRows, text: overlayTextReport(project, overlayTextBasis), stale: storyboardApproved ? null : staleApproval(project, 'storyboard', basis.storyboard, inputs),+ shots: documentShots ? null : boardStoryboard(project), lyricAnchors, staleRows, coverage, incompleteShots, text: overlayTextReport(project, overlayTextBasis), stale: storyboardApproved ? null : staleApproval(project, 'storyboard', basis.storyboard, inputs),shotLocks: locks, unlocked: byShot ? unlocked : [], clipLocks: clips,// Video shots whose clip is not locked yet: the board is finished when every shot is fully locked.clipsUnlocked: clips ? Object.keys(clips).filter(id => clips[id] && clips[id] !== 'locked') : [] },diff --git a/server/services/musicVideo/productionReview.storyboard.test.js b/server/services/musicVideo/productionReview.storyboard.test.jsindex 92b8d4ec8d..2988158d7c 100644--- a/server/services/musicVideo/productionReview.storyboard.test.js+++ b/server/services/musicVideo/productionReview.storyboard.test.js@@ -304,3 +304,20 @@ describe('storyboard rows stay bound to the shots on the board', () => {expect(replanned.productionReview.draft.storyboard.map((shot) => shot.sceneId)).toEqual(['s1']);});});++describe('naming the shots behind Shot coverage and Shot details', () => {+ // Uniquely catches the coverage and details checks failing a board without saying which shot to fix.+ it('names the shot at each gap, overlap and song-end mismatch, and what each incomplete shot is missing', () => {+ const base = project();+ const scenes = [{ ...base.scenes[0], endSec: 3 }, { ...base.scenes[1], sceneId: 's2', label: 'Insert', startSec: 3.5, endSec: 5 },+ { ...base.scenes[1], sceneId: 's3', label: 'Outro', startSec: 4.8, endSec: 8.5, visualIntent: '' }];+ const { storyboard } = productionReadiness({ ...base, scenes });+ expect(storyboard.coverage).toEqual([+ { sceneId: 's2', issue: 'gap', startSec: 3, endSec: 3.5 },+ { sceneId: 's3', issue: 'overlap', startSec: 4.8, endSec: 5 },+ { sceneId: 's3', issue: 'past-end', startSec: 8, endSec: 8.5 },+ ]);+ expect(storyboard.incompleteShots).toEqual([{ sceneId: 's3', missing: ['an end inside the song', 'action'] }]);+ expect(productionReadiness(base).storyboard).toMatchObject({ coverage: [], incompleteShots: [] });+ });+});