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
Count unfinished storyboard shots instead of listing each one (#10624)
[._.]/0ad3419dad5a
diff --git a/client/src/components/musicVideo/ProductionReviewPanel.jsx b/client/src/components/musicVideo/ProductionReviewPanel.jsxindex ac3e1005d6..5ffb365451 100644--- a/client/src/components/musicVideo/ProductionReviewPanel.jsx+++ b/client/src/components/musicVideo/ProductionReviewPanel.jsx@@ -1,6 +1,7 @@import { useEffect, useState } from 'react';import ProductionReviewContext from './ProductionReviewContext.jsx';import { formatTimecode } from '../../utils/formatters.js';+import { summarizeStoryboardProblems } from '../../lib/musicVideoStages.js';const EMPTY = { cast: '', environments: '', visualLanguage: '', motionLanguage: '', guideArtifactId: null,lyricsMode: 'vocal', timingStatus: 'provisional', timingNotes: '', storyboard: [] };@@ -89,13 +90,15 @@ export default function ProductionReviewPanel({ project, review, onOpenArtifact,excerptId: excerpt.id, filename: excerpt.filename } : undefined);};+ // Per-shot storyboard problems arrive one sentence per shot; the card counts them instead (the preview is the review).+ const shownProblems = stage => stage === 'storyboard' ? summarizeStoryboardProblems(ready[stage].problems) : ready[stage].problems || [];// One line under the action buttons saying what approval still needs, or nothing when it can be given.const approvalHelp = stage => {if (!ready) return 'Loading…';if (ready[stage].approved) return null;if (dirty) return 'Save your planning edits first.';if (review.busy) return 'Working…';- const problems = ready[stage].problems;+ const problems = shownProblems(stage);// With no current proof, the Render button already says what to do; repeating it as a warning reads as required.if (stage === 'proof' && proofNeedsRender) return null;if (problems.length) return problems.length > 1 ? `${problems[0]} (+${problems.length - 1} more below)` : problems[0];@@ -110,7 +113,7 @@ export default function ProductionReviewPanel({ project, review, onOpenArtifact,// (it isn't while edits are unsaved or an action is running). A proof with nothing rendered lists none.const listedProblems = stage => {if (!ready || ready[stage].approved || (stage === 'proof' && proofNeedsRender)) return [];- const problems = ready[stage].problems || [];+ const problems = shownProblems(stage);return dirty || review.busy ? problems : problems.slice(1);};// A link to another step's section crosses steps through the page; within this step it just unfolds the target.diff --git a/client/src/lib/README.md b/client/src/lib/README.mdindex 5366fda69a..686c8f9c8d 100644--- a/client/src/lib/README.md+++ b/client/src/lib/README.md@@ -67,7 +67,7 @@ grep -i "what you want to do" client/src/lib/README.md| `musicVideoSceneAttention.js` | Music Video per-scene attention model (#10152): `sceneAttention(scene, ctx)` returns the codes (`missing-frame`, `missing-clip`, `under-covered`, `contract-problem`, `perf-blocked`, `candidates-pending`, `plate-unverified`, `no-span`, `last-failure`) behind the collapsed scene-row chips, the Board `?scenes=attention\|missing\|all` filter (`parseSceneFilter`, `sceneMatchesFilter`) and the Produce per-shot strip; `SCENE_ATTENTION_LABELS`. Used by `components/musicVideo/SceneCard.jsx`, `stages/BoardStage.jsx` and `stages/ProduceStage.jsx`. || `musicVideoCoverOverlay.js` | Cover-art lettering preview (#10345): re-export of `server/lib/musicVideoCoverOverlay.js` (the design vocabulary, `normalizeCoverDesign`, `coverOverlaySvg`) plus `canvasCoverWidths(design, texts, fonts)`, which measures text with a canvas so the live preview wraps and sizes the title the way the server's measured render does. || `musicVideoShotTiming.js` | Re-export of `server/lib/musicVideoShotTiming.js` (#8977) — shot modes, the verified source-audio lip-sync capability table, `performanceBlockedReason`, `planPerformanceRepair` (measured accepted-prefix boundary, suffix interval and next spend), `planPerformanceWindow`, `grokCoverage`, `approximateMotionCues`, `shotSplitLimit` (when a scene offers a lyric-boundary split), `falSceneTake` (a fal take's model, length, resolution and estimated cost). Used by `hooks/useMusicVideoSceneMedia.js` and `components/musicVideo/SceneCard.jsx`. |-| `musicVideoStages.js` | Music Video page stage model: `MUSIC_VIDEO_STAGES` (six steps: Song `setup` → Look `cast-sets` → Storyboard `board` → Make `produce` → Final render `review` → Publish; a retired `compose` link resolves to Make), `resolveStageParam(value)` for the `:stage` route param, `deriveStages(project)` (per-stage `done`/`active`/`blocked`/`todo` + `current`, the first incomplete step; a live production run pins Make), `deriveNextAction(project, ctx)` (the one primary action the sticky header offers — approve Cast & Sets, verify lyric timing, stop/resume production, render final, …), `describeProjectStatus` (the header line and the step that needs the director), `autopilotStatus` (the header Autopilot button), `projectSpend(project)` (paid generation used vs. cap), `projectShotSummary(project)` (document shots or scene counts), `stageChecklist(stageId, project, readiness)` (what one step still needs, with the open approval's reason and a scroll anchor; an `optional` item, such as Make's animated proof, is listed but not counted), `stepNotes(project, readiness, publish)` (one fact per step for the step list), `listPreviewSources` (final, live composition, drafts, then the storyboard animatic), `projectServicesSummary(project)` (the saved image/video render services), `compareMusicVideoProjectsNewestFirst(a, b)` (sort projects newest created / updated first for project cards and pickers), and `currentProductionRun`; `productionReviewStopGuidance` separates current approval blockers from historical run stops. Used by `components/musicVideo/MusicVideoLayout.jsx` and `pages/MusicVideo.jsx`. |+| `musicVideoStages.js` | Music Video page stage model: `MUSIC_VIDEO_STAGES` (six steps: Song `setup` → Look `cast-sets` → Storyboard `board` → Make `produce` → Final render `review` → Publish; a retired `compose` link resolves to Make), `resolveStageParam(value)` for the `:stage` route param, `deriveStages(project)` (per-stage `done`/`active`/`blocked`/`todo` + `current`, the first incomplete step; a live production run pins Make), `deriveNextAction(project, ctx)` (the one primary action the sticky header offers — approve Cast & Sets, verify lyric timing, stop/resume production, render final, …), `describeProjectStatus` (the header line and the step that needs the director), `autopilotStatus` (the header Autopilot button), `projectSpend(project)` (paid generation used vs. cap), `projectShotSummary(project)` (document shots or scene counts), `stageChecklist(stageId, project, readiness)` (what one step still needs, with the open approval's reason and a scroll anchor; an `optional` item, such as Make's animated proof, is listed but not counted), `summarizeStoryboardProblems(problems)` (folds the server's one-sentence-per-shot storyboard problems into one count line per kind), `stepNotes(project, readiness, publish)` (one fact per step for the step list), `listPreviewSources` (final, live composition, drafts, then the storyboard animatic), `projectServicesSummary(project)` (the saved image/video render services), `compareMusicVideoProjectsNewestFirst(a, b)` (sort projects newest created / updated first for project cards and pickers), and `currentProductionRun`; `productionReviewStopGuidance` separates current approval blockers from historical run stops. Used by `components/musicVideo/MusicVideoLayout.jsx` and `pages/MusicVideo.jsx`. || `musicVideoAttention.js` | Music Video "Needs attention" model (#9940): `deriveAttentionItems(project, live)` returns the banner rows for server-held states a client-orchestrated workflow can strand — an open/rendering revision, an interrupted Cast & Sets stage, a running auto-review waiting on its revised sections, a final render nobody is watching — derived from the persisted record so they survive a reload (healthy work this tab can see progressing is not flagged); `openRevisionOf(project)`; `ATTENTION_ANCHOR_ID` + `revealAttention()` scroll a refusal toast to the banner. Used by `components/musicVideo/NeedsAttentionBanner.jsx` and `pages/MusicVideo.jsx`. || `musicVideoProjectList.js` | Music Video project index model (#10167): `projectRunPill(project)` (Running / Needs you / Interrupted / Done, from the same next-action and attention logic as the header), `groupMusicVideoProjects(projects, query)` (collapse forks under their root, newest version first, name filter, groups ordered by last touch), and `compareMusicVideoProjectsRecentlyTouched`. Used by `pages/MusicVideo.jsx` and `components/musicVideo/MusicVideoProjectCard.jsx`. || `musicVideoPreview.js` | Pick the representative produced asset for a Music Video project card (`selectMusicVideoPreview`: final video → latest excerpt → latest rendered scene clip → latest scene reference frame → visual spec reference) for the main project grid. Pure, computed off the project record, with image path and fallback helpers (`musicVideoImageSrc`, `musicVideoImageFallback`). |diff --git a/client/src/lib/musicVideoStages.js b/client/src/lib/musicVideoStages.jsindex e5a34b783e..3926d1dfa9 100644--- a/client/src/lib/musicVideoStages.js+++ b/client/src/lib/musicVideoStages.js@@ -516,6 +516,28 @@ const PUBLISH_ANCHOR = 'mv-publish-kit';/** The anchor of one platform's row in the posting panel. */export const publishRowAnchor = (target) => `mv-post-${target}`;+// The server names every unfinished shot in its own sentence; on a long song+// that is dozens of near-identical lines. The director judges shots by+// watching the preview, so each per-shot problem kind collapses into one count.+const PER_SHOT_PROBLEMS = [+ { test: /^Complete timing, action, staging, camera and transition for /, text: (n) => `${n} shot${n === 1 ? '' : 's'} missing timing, action, staging, camera or transition.` },+ { test: /^Review lyric anchors for /, text: (n) => `${n} shot${n === 1 ? '' : 's'} need${n === 1 ? 's' : ''} lyric anchors reviewed.` },+];+/** Storyboard readiness problems with each per-shot kind folded into one count line, in first-seen order. */+export function summarizeStoryboardProblems(problems = []) {+ const kindOf = (text) => PER_SHOT_PROBLEMS.find((k) => k.test.test(text));+ const counts = new Map();+ for (const text of problems) { const kind = kindOf(text); if (kind) counts.set(kind, (counts.get(kind) || 0) + 1); }+ return problems.flatMap((text) => {+ const kind = kindOf(text);+ if (!kind) return [text];+ if (!counts.has(kind)) return [];+ const line = kind.text(counts.get(kind));+ counts.delete(kind); // only the first of its kind carries the count line+ return [line];+ });+}+// Storyboard readiness problems, grouped by what the user has to go fix. The// server returns plain sentences; the first matching rule picks the group.const STORYBOARD_PROBLEM_GROUPS = [@@ -523,14 +545,15 @@ const STORYBOARD_PROBLEM_GROUPS = [// A document storyboard needs a manifest from its current build; its message mentions timing, so it is matched first.{ id: 'manifest', label: 'Document shot manifest', test: /shot manifest/i, action: { label: 'Import the shot manifest', anchor: 'mv-review-planning' } },{ id: 'lyrics', label: 'Lyrics', test: /lyrics|instrumental/i, action: { label: 'Import lyrics', stage: 'setup', anchor: 'mv-lyrics-import' } },- { id: 'timing', label: 'Lyric timing', test: /alignment|timing|vocal|master song/i, action: { label: 'Verify timing', stage: 'setup', anchor: 'mv-lyric-timing' } },+ // The per-shot count lines ("3 shots missing timing, …") mention timing too; they belong to Shot details.+ { id: 'timing', label: 'Lyric timing', test: /^(?!\d+ shots? ).*(alignment|timing|vocal|master song)/i, action: { label: 'Verify timing', stage: 'setup', anchor: 'mv-lyric-timing' } },{ id: 'coverage', label: 'Shot coverage', test: /cover the master|gaps or overlaps|create a timed/i, action: { label: 'Open the treatment', anchor: 'mv-board-treatment' } },{ id: 'shots', label: 'Shot details', test: /./, action: { label: 'Edit the storyboard', anchor: APPROVAL_ANCHORS.storyboard } },];-/** One open checklist item per group of storyboard readiness problems, listing every problem in it. */+/** One open checklist item per group of storyboard readiness problems, per-shot problems counted rather than listed. */function storyboardProblemItems(readiness) {- const problems = readiness?.storyboard?.problems || [];+ const problems = summarizeStoryboardProblems(readiness?.storyboard?.problems);if (readiness?.storyboard?.approved || !problems.length) return [];return STORYBOARD_PROBLEM_GROUPS.flatMap((group, index) => {const earlier = STORYBOARD_PROBLEM_GROUPS.slice(0, index);diff --git a/client/src/lib/musicVideoStages.test.js b/client/src/lib/musicVideoStages.test.jsindex 6a36061993..59bf64a6e6 100644--- a/client/src/lib/musicVideoStages.test.js+++ b/client/src/lib/musicVideoStages.test.js@@ -495,11 +495,18 @@ describe('stageChecklist', () => {'Storyboard shots must cover the master without unintended gaps or overlaps.','Complete timing, action, staging, camera and transition for Shot 1.','Review lyric anchors for Shot 1.',+ 'Complete timing, action, staging, camera and transition for Shot 2.',+ 'Review lyric anchors for Shot 2.',+ 'Complete timing, action, staging, camera and transition for Shot 3.',] } };const items = stageChecklist('board', castProject({ scenes: [scene()] }), readiness).filter((i) => i.details);expect(items.map((i) => i.id)).toEqual(['board-lyrics', 'board-timing', 'board-coverage', 'board-shots']);- expect(items.flatMap((i) => i.details)).toHaveLength(5);expect(items.every((i) => i.action?.anchor)).toBe(true);+ // Per-shot problems are counted, never listed one per shot: the preview is where shots get reviewed.+ expect(items.find((i) => i.id === 'board-shots').details).toEqual([+ '3 shots missing timing, action, staging, camera or transition.',+ '2 shots need lyric anchors reviewed.',+ ]);});it('gives every open checklist item an action so none is a dead end', () => {