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
feat: make the music video contact sheet reachable from Board and Produce with a pending-decisions filter (#10161)
Adam Eivy841ad262ce12
diff --git a/client/src/components/musicVideo/ContactSheetButton.jsx b/client/src/components/musicVideo/ContactSheetButton.jsxnew file mode 100644index 0000000000..49455d9f06--- /dev/null+++ b/client/src/components/musicVideo/ContactSheetButton.jsx@@ -0,0 +1,12 @@+import { LayoutGrid } from 'lucide-react';++/** Opens the project contact sheet (whole-video take review) from a stage toolbar. */+export default function ContactSheetButton({ onOpen }) {+ return (+ <button type="button" onClick={onOpen}+ className="flex min-h-[44px] items-center gap-1 rounded border border-port-border bg-port-bg px-2 py-1.5 text-sm hover:bg-port-border/40 sm:min-h-0"+ title="Review every scene's takes side by side">+ <LayoutGrid size={14} /> Contact sheet+ </button>+ );+}diff --git a/client/src/components/musicVideo/ContactSheetDrawer.jsx b/client/src/components/musicVideo/ContactSheetDrawer.jsxindex 67006fd8d3..492130ec1f 100644--- a/client/src/components/musicVideo/ContactSheetDrawer.jsx+++ b/client/src/components/musicVideo/ContactSheetDrawer.jsx@@ -1,34 +1,88 @@+import { useMemo, useRef } from 'react';+import { RefreshCw } from 'lucide-react';import Drawer from '../Drawer.jsx';import SceneTakeStrip from './SceneTakeStrip.jsx';+import { sceneHasPendingDecision } from '../../lib/musicVideoTakes.js';++const FOCUS = '[data-take-focus]';/*** Project contact sheet (#8965): every scene's frame and clip takes side by* side, so the director can compare candidates across the whole video, pick* the ones the render uses, and reject the misses in one pass. Opened from the- * board's handoff row; its open state lives in the URL (`?sheet=contact`).+ * Board and Produce toolbars; its open state lives in the URL (`?sheet=contact`)+ * as does the "Pending decisions" filter (`pending`, driven by the page).+ *+ * Arrow keys move focus between take thumbnails: Left/Right within the sheet,+ * Up/Down to the first take of the previous/next scene.*/-export default function ContactSheetDrawer({ open, onClose, project, busy, onSelectTake, onReviewTake, onOpenPreview }) {- const scenes = project?.scenes || [];+export default function ContactSheetDrawer({+ open, onClose, project, busy, onSelectTake, onReviewTake, onOpenPreview,+ pendingOnly = false, onPendingOnlyChange, onRegenerateFrame, generatingScenes = {},+}) {+ const listRef = useRef(null);+ const allScenes = project?.scenes || [];+ const scenes = useMemo(+ () => (pendingOnly ? allScenes.filter(sceneHasPendingDecision) : allScenes),+ [allScenes, pendingOnly],+ );++ const onKeyDown = (e) => {+ if (!e.key.startsWith('Arrow') || e.target.closest('input, textarea, select')) return;+ const all = [...listRef.current.querySelectorAll(FOCUS)];+ const at = all.indexOf(e.target.closest(FOCUS));+ if (at === -1) return;+ let next = null;+ if (e.key === 'ArrowRight') next = all[at + 1];+ else if (e.key === 'ArrowLeft') next = all[at - 1];+ else {+ const items = [...listRef.current.querySelectorAll('[data-sheet-scene]')];+ const sceneAt = items.findIndex((li) => li.contains(e.target));+ next = items[sceneAt + (e.key === 'ArrowDown' ? 1 : -1)]?.querySelector(FOCUS);+ }+ if (next) { e.preventDefault(); next.focus(); }+ };+return (<Drawer open={open} onClose={onClose} title="Contact sheet" subtitle={project?.name} size="xl" closeLabel="Close contact sheet">- {scenes.length === 0 && <p className="text-sm text-port-text-muted">No scenes yet.</p>}- <ol className="space-y-3">- {scenes.map((scene, index) => (- <li key={scene.sceneId} className="rounded border border-port-border p-2 space-y-2">- <div className="text-sm font-medium truncate">- {index + 1}. {scene.sectionLabel || scene.label || `Scene ${index + 1}`}- </div>- {!(scene.takes?.length || scene.referenceImageId || scene.videoHistoryId) && (- <p className="text-[11px] text-port-text-muted">No takes yet.</p>- )}- {['image', 'video'].map((kind) => (- <SceneTakeStrip key={kind} scene={scene} kind={kind} busy={busy} large- onSelect={(take) => onSelectTake(scene, take)}- onReview={(take, review) => onReviewTake(scene, take, review)}- onOpenPreview={onOpenPreview} />- ))}- </li>- ))}+ <div className="mb-3 flex items-center justify-between gap-2">+ <label className="flex items-center gap-2 text-xs min-h-[44px] sm:min-h-0">+ <input type="checkbox" checked={pendingOnly} onChange={(e) => onPendingOnlyChange?.(e.target.checked)} />+ Pending decisions+ </label>+ <span className="text-[11px] text-port-text-muted">{scenes.length} of {allScenes.length} scenes</span>+ </div>+ {allScenes.length === 0 && <p className="text-sm text-port-text-muted">No scenes yet.</p>}+ {allScenes.length > 0 && scenes.length === 0 && <p className="text-sm text-port-text-muted">No scenes have undecided candidates.</p>}+ <ol ref={listRef} onKeyDown={onKeyDown} className="space-y-3">+ {scenes.map((scene) => {+ const index = allScenes.indexOf(scene);+ return (+ <li key={scene.sceneId} data-sheet-scene="" className="rounded border border-port-border p-2 space-y-2">+ <div className="flex items-center justify-between gap-2">+ <div className="text-sm font-medium truncate">+ {index + 1}. {scene.sectionLabel || scene.label || `Scene ${index + 1}`}+ </div>+ {onRegenerateFrame && (+ <button type="button" disabled={busy || !!generatingScenes[scene.sceneId]} onClick={() => onRegenerateFrame(scene)}+ className="inline-flex shrink-0 items-center gap-1 rounded bg-port-border px-2 py-1 text-[11px] min-h-[44px] sm:min-h-0 disabled:opacity-50"+ title="Generate another frame take for this scene">+ <RefreshCw size={12} className={generatingScenes[scene.sceneId] ? 'animate-spin' : ''} /> Regenerate frame+ </button>+ )}+ </div>+ {!(scene.takes?.length || scene.referenceImageId || scene.videoHistoryId) && (+ <p className="text-[11px] text-port-text-muted">No takes yet.</p>+ )}+ {['image', 'video'].map((kind) => (+ <SceneTakeStrip key={kind} scene={scene} kind={kind} busy={busy} large+ onSelect={(take) => onSelectTake(scene, take)}+ onReview={(take, review) => onReviewTake(scene, take, review)}+ onOpenPreview={onOpenPreview} />+ ))}+ </li>+ );+ })}</ol></Drawer>);diff --git a/client/src/components/musicVideo/ContactSheetDrawer.test.jsx b/client/src/components/musicVideo/ContactSheetDrawer.test.jsxnew file mode 100644index 0000000000..a90b95337e--- /dev/null+++ b/client/src/components/musicVideo/ContactSheetDrawer.test.jsx@@ -0,0 +1,31 @@+import { act, render, screen, fireEvent } from '@testing-library/react';+import { expect, it, vi } from 'vitest';+import ContactSheetDrawer from './ContactSheetDrawer.jsx';++const take = (id, kind, status = 'candidate') => ({ takeId: `t-${id}`, kind, assetId: id, source: 'generated', status });+const scenes = [+ { sceneId: 's1', order: 0, label: 'Decided', referenceImageId: 'a.png', takes: [take('a.png', 'image')] },+ { sceneId: 's2', order: 1, label: 'Undecided', referenceImageId: 'b.png', takes: [take('b.png', 'image'), take('c.png', 'image')] },+];+const props = { open: true, onClose: () => {}, project: { name: 'Example', scenes }, busy: false, onSelectTake: vi.fn(), onReviewTake: vi.fn(), onOpenPreview: vi.fn() };++it('Pending decisions shows only scenes with an undecided candidate', () => {+ const { rerender } = render(<ContactSheetDrawer {...props} />);+ expect(screen.getByText(/Decided/)).toBeInTheDocument();+ rerender(<ContactSheetDrawer {...props} pendingOnly />);+ expect(screen.queryByText(/1\. Decided/)).not.toBeInTheDocument();+ expect(screen.getByText(/2\. Undecided/)).toBeInTheDocument();+});++it('regenerates a scene frame and moves focus with the arrow keys', () => {+ const onRegenerateFrame = vi.fn();+ render(<ContactSheetDrawer {...props} onRegenerateFrame={onRegenerateFrame} />);+ fireEvent.click(screen.getAllByRole('button', { name: /Regenerate frame/ })[1]);+ expect(onRegenerateFrame).toHaveBeenCalledWith(scenes[1]);+ const thumbs = screen.getAllByRole('button', { name: /View frame take full size/ });+ act(() => thumbs[1].focus());+ fireEvent.keyDown(thumbs[1], { key: 'ArrowRight' });+ expect(document.activeElement).toBe(thumbs[2]);+ fireEvent.keyDown(thumbs[2], { key: 'ArrowUp' });+ expect(document.activeElement).toBe(thumbs[0]);+});diff --git a/client/src/components/musicVideo/HandoffControls.jsx b/client/src/components/musicVideo/HandoffControls.jsxindex 3f5f480fe0..8462102295 100644--- a/client/src/components/musicVideo/HandoffControls.jsx+++ b/client/src/components/musicVideo/HandoffControls.jsx@@ -1,5 +1,5 @@import { useState } from 'react';-import { Download, FileArchive, Upload, Activity, LayoutGrid } from 'lucide-react';+import { Download, FileArchive, Upload, Activity } from 'lucide-react';import FilePickerButton from '../ui/FilePickerButton';const PROVIDERS = [['midjourney', 'Midjourney'], ['external', 'Other tool']];@@ -12,7 +12,7 @@ const HANDOFF_ACCEPT = 'image/png,image/jpeg,image/webp,image/gif,video/mp4,vide* scene's tag (e.g. `S03-1a2b3c4d`) land on that exact scene as imported takes* with the chosen provider recorded. PortOS never contacts the external tool.*/-export default function HandoffControls({ projectId, busy, onExport, onExportBundle, onImport, onOpenContactSheet }) {+export default function HandoffControls({ projectId, busy, onExport, onExportBundle, onImport }) {const [provider, setProvider] = useState('midjourney');const selectId = `mv-handoff-provider-${projectId}`;return (@@ -41,11 +41,6 @@ export default function HandoffControls({ projectId, busy, onExport, onExportBunclassName="flex items-center gap-1 bg-port-border hover:bg-port-border/70 rounded px-2 py-1 min-h-[44px] sm:min-h-0 cursor-pointer">{busy ? <Activity size={13} className="animate-spin" /> : <Upload size={13} />} Import generated files</FilePickerButton>- <button type="button" onClick={onOpenContactSheet}- className="flex items-center gap-1 bg-port-bg border border-port-border hover:bg-port-border/40 rounded px-2 py-1 min-h-[44px] sm:min-h-0"- title="Review every scene's takes side by side">- <LayoutGrid size={13} /> Contact sheet- </button></div>);}diff --git a/client/src/components/musicVideo/PlateComparison.jsx b/client/src/components/musicVideo/PlateComparison.jsxindex e08c4d5de7..ea4a53813e 100644--- a/client/src/components/musicVideo/PlateComparison.jsx+++ b/client/src/components/musicVideo/PlateComparison.jsx@@ -1,8 +1,21 @@import { currentPlateEvidence } from '../../../../server/lib/musicVideoPlateEvidence.js';import { sceneTakeList, takeThumbUrl } from '../../lib/musicVideoTakes.js';-/** Selected and candidate plates share the same asset/intent evidence boundary. */-export default function PlateComparison({ scene }) {+/** Short plate verdict for a frame take, or null when the shot has no action contract. */+export function plateVerdict(scene, take) {+ if (!scene?.direction?.actionContract) return null;+ const evidence = currentPlateEvidence(scene, take);+ if (evidence?.verdict === 'pass') return { label: 'Ready', tone: 'pass' };+ if (evidence?.verdict === 'fail') return { label: 'Requirements unmet', tone: 'fail' };+ return { label: 'Unverified', tone: 'unverified' };+}++/**+ * Selected and candidate plates share the same asset/intent evidence boundary.+ * `frames={false}` omits the thumbnails for a card whose take strip already+ * shows each frame once with a verdict badge; only the evidence notes remain.+ */+export default function PlateComparison({ scene, frames = true }) {if (!scene?.direction?.actionContract) return null;const takes = sceneTakeList(scene, 'image');return (@@ -14,10 +27,9 @@ export default function PlateComparison({ scene }) {const evidence = currentPlateEvidence(scene, take);const selected = take.assetId === scene.referenceImageId;return (- <li key={take.assetId} className="w-48 shrink-0 space-y-1">- <img src={takeThumbUrl(take)} alt={`${selected ? 'Selected' : 'Candidate'} plate`} className="aspect-video w-full rounded object-cover" loading="lazy" />+ <li key={take.assetId} className={`${frames ? 'w-48' : 'w-56'} shrink-0 space-y-1`}>+ {frames && <img src={takeThumbUrl(take)} alt={`${selected ? 'Selected' : 'Candidate'} plate`} className="aspect-video w-full rounded object-cover" loading="lazy" />}<p className="text-xs font-medium break-words">{selected ? 'Selected' : 'Candidate'} · {evidence?.verdict === 'pass' ? 'Ready' : evidence?.verdict === 'fail' ? 'Requirements unmet' : 'Unverified'}</p>- <p className="text-[10px] text-port-text-muted break-all">{take.assetId}</p>{!evidence && <p className="text-xs text-port-warning">{take.plateEvidence ? 'Shot requirements changed. Review this plate again.' : 'Production has not reviewed this plate.'}</p>}{evidence && <ul className="space-y-1 text-[11px]">{evidence.checks.filter((check) => check.status !== 'pass').map((check) => <li key={check.id} className="text-port-warning break-words">{check.requirement}: {check.note}</li>)}diff --git a/client/src/components/musicVideo/SceneCard.jsx b/client/src/components/musicVideo/SceneCard.jsxindex 3668dc2915..d80e96cf9b 100644--- a/client/src/components/musicVideo/SceneCard.jsx+++ b/client/src/components/musicVideo/SceneCard.jsx@@ -203,7 +203,7 @@ export default function SceneCard({</div>)}<ShotActionInspector contract={scene.direction?.actionContract} scene={scene} />- <PlateComparison scene={scene} />+ <PlateComparison scene={scene} frames={false} /><div className="flex flex-wrap gap-2 items-center text-xs">{SCENE_TIME_FIELDS.map(([labelText, key]) => {const toValue = (v) => (v === '' ? null : Number(v));diff --git a/client/src/components/musicVideo/SceneTakeStrip.jsx b/client/src/components/musicVideo/SceneTakeStrip.jsxindex 19f6d69240..5658addec0 100644--- a/client/src/components/musicVideo/SceneTakeStrip.jsx+++ b/client/src/components/musicVideo/SceneTakeStrip.jsx@@ -1,7 +1,9 @@import { useState } from 'react';import { Check, RotateCcw, X, MessageSquare } from 'lucide-react';-import { sceneTakeList, takePreviewKey, takeThumbUrl, takeProvenance, TAKE_SLOT } from '../../lib/musicVideoTakes.js';+import { sceneTakeList, takePreviewKey, takeThumbUrl, takeClipUrl, takeProvenance, TAKE_SLOT } from '../../lib/musicVideoTakes.js';+import { plateVerdict } from './PlateComparison.jsx';+const VERDICT_TONE = { pass: 'bg-port-success/20 text-port-success', fail: 'bg-port-error/20 text-port-error', unverified: 'bg-port-warning/20 text-port-warning' };const KIND_LABEL = { image: 'Frame takes', video: 'Clip takes' };/**@@ -19,6 +21,7 @@ export default function SceneTakeStrip({}) {const [noteFor, setNoteFor] = useState(null);const [noteDraft, setNoteDraft] = useState('');+ const [playingId, setPlayingId] = useState(null);const takes = sceneTakeList(scene, kind);const selected = scene[TAKE_SLOT[kind]] || null;if (takes.length === 0) return null;@@ -40,17 +43,27 @@ export default function SceneTakeStrip({{takes.map((take) => {const isSelected = take.assetId === selected;const rejected = take.status === 'rejected';+ const verdict = kind === 'image' ? plateVerdict(scene, take) : null;+ const playKey = take.takeId || take.assetId;+ const playing = kind === 'video' && playingId === playKey;return (<li key={take.takeId || `legacy-${take.assetId}`} className={`${thumbClass} shrink-0 space-y-1`}><buttontype="button"+ data-take-focus=""onClick={() => onOpenPreview?.(takePreviewKey(take))}+ onMouseEnter={() => setPlayingId(playKey)}+ onMouseLeave={() => setPlayingId(null)}+ onFocus={() => setPlayingId(playKey)}+ onBlur={() => setPlayingId(null)}aria-label={`View ${kind === 'image' ? 'frame' : 'clip'} take full size`}- className={`block w-full rounded overflow-hidden border focus:outline-none focus:ring-2 focus:ring-port-accent ${isSelected ? 'border-port-accent ring-2 ring-port-accent' : 'border-port-border'} ${rejected ? 'opacity-40' : ''}`}+ className={`relative block w-full rounded overflow-hidden border focus:outline-none focus:ring-2 focus:ring-port-accent ${isSelected ? 'border-port-accent ring-2 ring-port-accent' : 'border-port-border'} ${rejected ? 'opacity-40' : ''}`}><img src={takeThumbUrl(take)} alt="" loading="lazy" className="w-full aspect-video object-cover block bg-black" />+ {playing && <video src={takeClipUrl(take)} autoPlay muted loop playsInline aria-hidden="true" className="absolute inset-0 w-full h-full object-cover bg-black" />}</button><div className="text-[10px] text-port-text-muted truncate" title={take.originalName || take.prompt || takeProvenance(take)}>+ {verdict && <span className={`mr-1 rounded px-1 ${VERDICT_TONE[verdict.tone]}`} title="Plate preflight verdict">{verdict.label}</span>}{isSelected ? <span className="text-port-accent">Selected · </span> : null}{rejected ? 'rejected · ' : ''}{takeProvenance(take)}</div>diff --git a/client/src/components/musicVideo/stages/BoardStage.jsx b/client/src/components/musicVideo/stages/BoardStage.jsxindex f92056a35a..8a111853e5 100644--- a/client/src/components/musicVideo/stages/BoardStage.jsx+++ b/client/src/components/musicVideo/stages/BoardStage.jsx@@ -1,5 +1,6 @@import { Plus } from 'lucide-react';import BeatTimeline from '../BeatTimeline.jsx';+import ContactSheetButton from '../ContactSheetButton.jsx';import SceneCard from '../SceneCard.jsx';import { PlanActions } from '../ProjectActionGroups.jsx';import { isLayeredComposition } from '../../../lib/musicVideoLayers.js';@@ -39,9 +40,12 @@ export default function BoardStage({ board }) {<div className="flex items-center justify-between"><h3 className="text-sm font-medium">Scene board</h3>- <button onClick={board.onAddScene} className="flex min-h-[44px] items-center gap-1 rounded bg-port-accent px-2 py-1.5 text-sm text-white sm:min-h-0">- <Plus size={15} /> Add scene- </button>+ <div className="flex items-center gap-2">+ <ContactSheetButton onOpen={board.openContactSheet} />+ <button onClick={board.onAddScene} className="flex min-h-[44px] items-center gap-1 rounded bg-port-accent px-2 py-1.5 text-sm text-white sm:min-h-0">+ <Plus size={15} /> Add scene+ </button>+ </div></div>{scenes.length === 0 && <p className="text-sm text-port-text-muted">No scenes yet — add one to start the board.</p>}diff --git a/client/src/components/musicVideo/stages/ProduceStage.jsx b/client/src/components/musicVideo/stages/ProduceStage.jsxindex e77fee59e8..9e35b67ee9 100644--- a/client/src/components/musicVideo/stages/ProduceStage.jsx+++ b/client/src/components/musicVideo/stages/ProduceStage.jsx@@ -1,4 +1,6 @@import AutopilotPanel from '../AutopilotPanel.jsx';+import ContactSheetButton from '../ContactSheetButton.jsx';+import HandoffControls from '../HandoffControls.jsx';import StageSection from '../StageSection.jsx';import { GenerationActions } from '../ProjectActionGroups.jsx';@@ -9,7 +11,7 @@ import { GenerationActions } from '../ProjectActionGroups.jsx';* option, set in Setup.*/export default function ProduceStage({ board }) {- const { project, locked, production, videoSettings, sceneMedia, kickoff } = board;+ const { project, locked, production, videoSettings, sceneMedia, kickoff, takes } = board;return (<fieldset disabled={locked} className="min-w-0 space-y-3"><AutopilotPanel@@ -25,8 +27,18 @@ export default function ProduceStage({ board }) {kickoffBlockedReason={board.autopilotBlockedReason}/><StageSection title="Generation" defaultOpen summary="Generate the frames and clips that are missing">+ <div className="mb-2 flex justify-end"><ContactSheetButton onOpen={board.openContactSheet} /></div><GenerationActions project={project} videoSettings={videoSettings} sceneMedia={sceneMedia} onEditServices={() => board.goToStage('setup', 'mv-setup-options')} /></StageSection>+ <StageSection title="External handoff" summary="Export prompts, import files made in other tools">+ <HandoffControls+ projectId={project.id}+ busy={takes.busy}+ onExport={takes.exportHandoff}+ onExportBundle={takes.exportHandoffBundle}+ onImport={takes.importHandoffFiles}+ />+ </StageSection></fieldset>);}diff --git a/client/src/components/musicVideo/stages/ReviewStage.jsx b/client/src/components/musicVideo/stages/ReviewStage.jsxindex 63b4f7b538..195b02c7ca 100644--- a/client/src/components/musicVideo/stages/ReviewStage.jsx+++ b/client/src/components/musicVideo/stages/ReviewStage.jsx@@ -2,7 +2,6 @@ import DependencyImpactPanel from '../DependencyImpactPanel.jsx';import RenderStatusPanel, { RenderFailure } from '../RenderStatusPanel.jsx';import ExcerptPanel from '../ExcerptPanel.jsx';import DevArtifactsPanel from '../DevArtifactsPanel.jsx';-import HandoffControls from '../HandoffControls.jsx';import StageSection from '../StageSection.jsx';import { isFinalRenderStale } from '../../../lib/musicVideoStages.js';import { RenderFinalButton } from '../ProjectActionGroups.jsx';@@ -10,11 +9,11 @@ import { RenderFinalButton } from '../ProjectActionGroups.jsx';/*** Review & Export: the final render and its player, draft excerpts with review* notes, section revision and auto-review (they act on the excerpt window, so- * they live beside it), every development file, and the external-tool handoff.+ * they live beside it), and every development file. The external-tool handoff lives on Produce.*/export default function ReviewStage({ board }) {const {- project, locked, renderJob, renderBound, finalVideo, excerpts, revisions, autoReview, sceneMedia, devArtifacts, takes,+ project, locked, renderJob, renderBound, finalVideo, excerpts, revisions, autoReview, sceneMedia, devArtifacts,} = board;return (<fieldset disabled={locked} className="min-w-0 space-y-3">@@ -66,16 +65,6 @@ export default function ReviewStage({ board }) {/></StageSection>- <StageSection title="External handoff" summary="Export prompts, import files made in other tools">- <HandoffControls- projectId={project.id}- busy={takes.busy}- onExport={takes.exportHandoff}- onExportBundle={takes.exportHandoffBundle}- onImport={takes.importHandoffFiles}- onOpenContactSheet={board.openContactSheet}- />- </StageSection></fieldset>);}diff --git a/client/src/lib/README.md b/client/src/lib/README.mdindex 918cb8d2f6..477cf83066 100644--- a/client/src/lib/README.md+++ b/client/src/lib/README.md@@ -62,7 +62,7 @@ grep -i "what you want to do" client/src/lib/README.md| `musicVideoAspect.js` | Re-export of `server/lib/musicVideoAspect.js`: `musicVideoAspect`, `musicVideoFrameGenSize`. Used by `hooks/useMusicVideoSceneMedia.js` so board frames match the project aspect. || `musicVideoMotion.js` | Re-export of `server/lib/musicVideoMotion.js` (`MOTION_CONTINUITY_CLAUSE`) for board motion prompts. || `musicVideoLayers.js` | Music-video per-scene visual layers (#8985), re-exported from `server/lib/musicVideoLayers.js`: `MUSIC_VIDEO_VISUAL_LAYERS`, `MUSIC_VIDEO_STILL_MOVES`, `sceneVisualLayer(scene, { layered })`, `sceneHasAuthoredSpan`, `sceneRenderReady(scene, { layered })`. Used by `components/musicVideo/SceneCard.jsx`, `ProjectActionGroups.jsx` and `hooks/useMusicVideoSceneMedia.js`. |-| `musicVideoTakes.js` | Music-video scene takes view helpers (#8965): `sceneTakeList(scene, kind)` lists a scene's image/video takes with an un-materialized pre-takes selection appended as a read-only `legacy` take; `takePreviewKey`, `takeThumbUrl`, `takeProvenance`; `TAKE_SLOT` maps a take kind to its selection field. Used by `components/musicVideo/SceneTakeStrip.jsx` and `pages/MusicVideo.jsx`. |+| `musicVideoTakes.js` | Music-video scene takes view helpers (#8965): `sceneTakeList(scene, kind)` lists a scene's image/video takes with an un-materialized pre-takes selection appended as a read-only `legacy` take; `takePreviewKey`, `takeThumbUrl`, `takeClipUrl` (hover-preview clip), `sceneHasPendingDecision` (contact-sheet filter), `takeProvenance`; `TAKE_SLOT` maps a take kind to its selection field. Used by `components/musicVideo/SceneTakeStrip.jsx` and `pages/MusicVideo.jsx`. || `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` (setup → cast-sets → board → produce → compose → review), `resolveStageParam(value)` for the `:stage` route param, `deriveStages(project)` (per-stage `done`/`active`/`blocked`/`todo` + `current`, the first incomplete stage; a live production run pins Produce), `deriveNextAction(project, ctx)` (the one primary action the sticky header offers — approve Cast & Sets, stop/resume production, render final, …), `projectSpend(project)` (paid generation used vs. cap), `projectShotSummary(project)` (document shots or scene counts), `stageChecklist(stageId, project, readiness)` (what one stage tab still needs, with the open approval's reason and a scroll anchor), `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`. |diff --git a/client/src/lib/musicVideoTakes.js b/client/src/lib/musicVideoTakes.jsindex f2fcd084ac..1e8cd2019f 100644--- a/client/src/lib/musicVideoTakes.js+++ b/client/src/lib/musicVideoTakes.js@@ -28,6 +28,17 @@ export const takeThumbUrl = (take) => (take.kind === 'image'? `/data/images/${encodeURIComponent(take.assetId)}`: `/data/video-thumbnails/${encodeURIComponent(take.assetId)}.jpg`);+/** Playable clip URL for a video take (hover/focus preview). */+export const takeClipUrl = (take) => `/data/videos/${encodeURIComponent(take.assetId)}.mp4`;++/** Scenes whose slot still has an undecided candidate (a candidate that is not the selection). */+export function sceneHasPendingDecision(scene) {+ return ['image', 'video'].some((kind) => {+ const selected = scene?.[TAKE_SLOT[kind]] || null;+ return sceneTakeList(scene, kind).some((t) => t.takeId && t.status === 'candidate' && t.assetId !== selected);+ });+}+/** Short provenance label: the external provider for an import, else the source. */export function takeProvenance(take) {if (take.source === 'imported') return take.provider ? `imported · ${take.provider}` : 'imported';diff --git a/client/src/pages/MusicVideo.jsx b/client/src/pages/MusicVideo.jsxindex a74ecb945c..4f0944318c 100644--- a/client/src/pages/MusicVideo.jsx+++ b/client/src/pages/MusicVideo.jsx@@ -369,7 +369,13 @@ export default function MusicVideo() {const contactSheetOpen = searchParams.get('sheet') === 'contact';const setContactSheetOpen = (open) => setSearchParams((prev) => {const next = new URLSearchParams(prev);- if (open) next.set('sheet', 'contact'); else next.delete('sheet');+ if (open) next.set('sheet', 'contact'); else { next.delete('sheet'); next.delete('pending'); }+ return next;+ });+ const contactSheetPendingOnly = searchParams.get('pending') === '1';+ const setContactSheetPendingOnly = (on) => setSearchParams((prev) => {+ const next = new URLSearchParams(prev);+ if (on) next.set('pending', '1'); else next.delete('pending');return next;});@@ -1127,6 +1133,10 @@ export default function MusicVideo() {onSelectTake={takes.selectTake}onReviewTake={takes.reviewTake}onOpenPreview={openPreview}+ pendingOnly={contactSheetPendingOnly}+ onPendingOnlyChange={setContactSheetPendingOnly}+ onRegenerateFrame={sceneMedia.generateFrame}+ generatingScenes={sceneMedia.genScenes}/>)}<PageHeader