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(music-video): clearer project page — standard margins, a status line, folded panels and a preview on every tab
Claudecc42790b3c61
diff --git a/client/src/components/Layout.test.jsx b/client/src/components/Layout.test.jsxindex 5bc661339d..179b787f8d 100644--- a/client/src/components/Layout.test.jsx+++ b/client/src/components/Layout.test.jsx@@ -620,9 +620,9 @@ describe('Layout — isFullWidthRoute classification', () => {['/ai', true], ['/ai/presets', true], ['/ai/presets/codex', true], ['/ai/harnesses', true], ['/ai/services/ollama', true], ['/ai/edit/codex', true], ['/airlock', false],['/pipeline', false], ['/pipeline/series/s1', true],['/local-llm', false], ['/local-llm/m', true],- // Music owns the same full-bleed title/tab/body shell as Media Gen, but- // its similarly named Music Video route is classified independently.- ['/music', true], ['/music/generate', true], ['/music-video', false],+ // Music owns the same full-bleed title/tab/body shell as Media Gen; Music+ // Video has its own full-width rule, which a sibling prefix must not hit.+ ['/music', true], ['/music/generate', true], ['/music-video', true], ['/music-video/p1/board', true], ['/music-videos', false],// Video workspace index owns its own scroll; Generate Video uses the// Media Gen tab shell and must stay full-width with it. `/video-gen` is// a legacy redirect, not a page with an internal scroller.diff --git a/client/src/components/musicVideo/AutonomousRunPanel.jsx b/client/src/components/musicVideo/AutonomousRunPanel.jsxindex 323a73bd03..6ed68dc734 100644--- a/client/src/components/musicVideo/AutonomousRunPanel.jsx+++ b/client/src/components/musicVideo/AutonomousRunPanel.jsx@@ -54,8 +54,9 @@ function StageOutput({ run, row, editableBelow }) {* read-only from its checklist row; the open row is the caller's URL state* (`selectedStage` / `onSelectStage`). Progress arrives over `music-video:autonomous` through* `useAutonomousMusicVideo`; this panel only renders the run it is given.+ * `framed={false}` drops the card chrome and title for a host that supplies them.*/-export default function AutonomousRunPanel({ project, auto, selectedStage = null, onSelectStage }) {+export default function AutonomousRunPanel({ project, auto, selectedStage = null, onSelectStage, framed = true }) {const run = project?.autonomousRun;const [edit, setEdit] = useState(null); // { for: stage, value } — the director's edit at a checkpointif (!run) return null;@@ -75,9 +76,9 @@ export default function AutonomousRunPanel({ project, auto, selectedStage = nullconst selected = selectedRow?.id || null;return (- <section className="bg-port-card border border-port-border rounded-lg p-3 space-y-3 min-w-0" aria-label="Autonomous run">+ <section className={`${framed ? 'bg-port-card border border-port-border rounded-lg p-3 ' : ''}space-y-3 min-w-0`} aria-label="Autonomous run"><div className="flex flex-wrap items-center gap-x-3 gap-y-1">- <span className="flex items-center gap-1 text-sm font-medium"><Wand2 size={15} className="text-port-accent" aria-hidden="true" /> Autonomous run</span>+ {framed && <span className="flex items-center gap-1 text-sm font-medium"><Wand2 size={15} className="text-port-accent" aria-hidden="true" /> Autonomous run</span>}<span className={`text-sm ${tone}`}>{run.interrupted ? 'Interrupted — resume to continue' : AUTONOMOUS_STATUS_LABELS[run.status] || run.status}</span>{run.brief?.origin?.kind === 'schedule' && (<span className="text-xs text-port-text-muted">Scheduled{run.brief.origin.ideaTitle ? ` · from “${run.brief.origin.ideaTitle}”` : ''}</span>diff --git a/client/src/components/musicVideo/CastAndSetsCheckin.jsx b/client/src/components/musicVideo/CastAndSetsCheckin.jsxindex 489b68a05b..b3f4b522a7 100644--- a/client/src/components/musicVideo/CastAndSetsCheckin.jsx+++ b/client/src/components/musicVideo/CastAndSetsCheckin.jsx@@ -41,7 +41,7 @@ export default function CastAndSetsCheckin({ project, busy, onOpenSheet, onApproconst openNotes = (sheet?.notes || []).filter((n) => !n.resolvedAt).length;const tone = stage.status === 'review' ? 'warning' : stage.status === 'approved' ? 'success' : stage.status === 'failed' ? 'error' : 'muted';return (- <div className={`rounded border p-2 space-y-2 ${stage.status === 'review' ? 'border-port-warning/60' : 'border-port-border'}`} aria-label="Cast & Sets check-in">+ <div className={`rounded-lg border bg-port-card p-3 space-y-2 ${stage.status === 'review' ? 'border-port-warning/60' : 'border-port-border'}`} aria-label="Cast & Sets check-in"><div className="flex flex-wrap items-center gap-2"><Users size={14} className="text-port-accent shrink-0" aria-hidden="true" /><span className="text-sm font-medium">Cast & Sets check-in</span>diff --git a/client/src/components/musicVideo/MusicVideoLayout.jsx b/client/src/components/musicVideo/MusicVideoLayout.jsxindex ff171a6eae..e06564d780 100644--- a/client/src/components/musicVideo/MusicVideoLayout.jsx+++ b/client/src/components/musicVideo/MusicVideoLayout.jsx@@ -1,11 +1,10 @@-import { useEffect, useRef, useState } from 'react';+import { useEffect, useRef } from 'react';import {AlertTriangle, ArrowRight, CheckCircle2, CircleDot, Clapperboard, Film, Layers, LayoutGrid, Music, Play,Send, SlidersHorizontal, Users,} from 'lucide-react';import TabPills from '../ui/TabPills.jsx';import Pill from '../ui/Pill.jsx';-import { PREVIEW_STAGES } from '../../lib/musicVideoStages.js';import { formatUsd } from '../../utils/formatters.js';// One icon per stage: the bottom tab bar collapses to icons on a phone, and a@@ -23,6 +22,12 @@ const STAGE_TRAILING = {blocked: <AlertTriangle size={12} className="shrink-0 text-port-warning" aria-label="needs you" />,};+// The page's scroll body (the route is full-width, so the page owns its+// scroll): a new tab scrolls it back to the top.+export const MUSIC_VIDEO_SCROLL_ID = 'mv-scroll';++const STATUS_TONES = { warn: 'text-port-warning', ok: 'text-port-success', muted: 'text-port-text-muted' };+// Below `lg` the preview is a mini-player pinned above the bottom tab bar (or// the viewport edge once the tab bar is in the header); from `lg` it is a// sticky right column that clears the header (the -0.75rem cancels the@@ -34,23 +39,20 @@ const DOCK_CLASSES = 'max-lg:fixed max-lg:inset-x-0 max-lg:bottom-0 max-lg:z-30* one next action for the project's stage), the stage tabs — the single stage* row, each tab marking its stage done / in progress / needs you — on top from* `md` up, a bottom tab bar on a phone — the active stage's- * content, and the docked preview player beside it on the Board, Compose and- * Review tabs.+ * content, and the docked preview player beside it on every tab.*- * `progress` is `deriveStages(project)`; `nextAction` is `deriveNextAction(…)`.- * `dock` is the `PreviewDock` element (or null when there is nothing to preview).+ * `progress` is `deriveStages(project)`; `nextAction` is `deriveNextAction(…)`;+ * `status` is `describeProjectStatus(…)`, the one "where it stands" line under+ * the name. `dock` is the `PreviewDock` element (or null when there is nothing+ * to preview).*/export default function MusicVideoLayout({- project, trackLabel, stage, onStageChange, progress, nextAction, onNextAction, spend,+ project, trackLabel, stage, onStageChange, progress, nextAction, onNextAction, spend, status = null,dock, projectPanels, children,}) {const headerRef = useRef(null);const rootRef = useRef(null);- const dockVisible = !!dock && PREVIEW_STAGES.has(stage);- // The preview loads media, so it mounts the first time a stage shows it and- // then stays mounted — hidden on the other tabs — to keep its playhead.- const [dockMounted, setDockMounted] = useState(false);- useEffect(() => { if (dockVisible) setDockMounted(true); }, [dockVisible]);+ const dockVisible = !!dock;// The dock sticks just under the header, whose height depends on wrapping.useEffect(() => {@@ -69,7 +71,7 @@ export default function MusicVideoLayout({useEffect(() => {if (shownStage.current === stage) return;shownStage.current = stage;- document.getElementById('main-content')?.scrollTo?.({ top: 0 });+ document.getElementById(MUSIC_VIDEO_SCROLL_ID)?.scrollTo?.({ top: 0 });}, [stage]);const tabs = progress.stages.map((entry) => ({@@ -113,6 +115,16 @@ export default function MusicVideoLayout({</button>)}</div>+ {status && (+ <p role="status" aria-label="Project status" className="flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-xs">+ <span className={`font-medium ${STATUS_TONES[status.tone] || ''}`}>{status.headline}</span>+ {status.facts.map((fact) => (+ <span key={fact.id} className={`flex items-center gap-2 ${STATUS_TONES[fact.tone] || ''}`}>+ <span aria-hidden="true" className="text-port-text-muted">·</span>{fact.label}+ </span>+ ))}+ </p>+ )}<navaria-label="Stages"className="max-md:fixed max-md:inset-x-0 max-md:bottom-0 max-md:z-40 max-md:border-t max-md:border-port-border max-md:bg-port-bg max-md:pb-[env(safe-area-inset-bottom)]"@@ -141,7 +153,7 @@ export default function MusicVideoLayout({<h3 className="text-base font-semibold">{stageEntry?.title || stageEntry?.label}</h3>{children}</div>- {dockMounted && dock ? <div className={dockVisible ? DOCK_CLASSES : 'hidden'}>{dock}</div> : null}+ {dockVisible ? <div className={DOCK_CLASSES}>{dock}</div> : null}</div>{/* Shared run/review forms stay mounted, but never obscure the stageselected from the phone's bottom navigation. */}diff --git a/client/src/components/musicVideo/MusicVideoLayout.test.jsx b/client/src/components/musicVideo/MusicVideoLayout.test.jsxindex aa9d9b3d25..007856c3d3 100644--- a/client/src/components/musicVideo/MusicVideoLayout.test.jsx+++ b/client/src/components/musicVideo/MusicVideoLayout.test.jsx@@ -20,6 +20,16 @@ describe('music-video stage navigation', () => {expect(screen.getByText(/\$3\.00 \/ \$10\.00/)).toBeInTheDocument();});+ it('says where the project stands under its name', () => {+ render(<MusicVideoLayout project={{ id: 'example-project', name: 'Example Project' }} stage="cast-sets"+ onStageChange={() => {}} progress={{ current: 'cast-sets', stages: MUSIC_VIDEO_STAGES.map((stage) => ({ ...stage, state: 'todo' })) }}+ spend={{ spentUsd: 0 }}+ status={{ headline: 'Stage 2 of 7: Cast & Sets · needs you', tone: 'warn', facts: [{ id: 'render', label: 'Nothing rendered yet', tone: 'muted' }] }} />);+ const status = screen.getByRole('status', { name: 'Project status' });+ expect(status).toHaveTextContent('Stage 2 of 7: Cast & Sets · needs you');+ expect(status).toHaveTextContent('Nothing rendered yet');+ });+it('keeps every fixed stage in the compact icon row after adding Publish', () => {render(<MusicVideoLayout project={{ id: 'example-project', name: 'Example Project' }} stage="publish"onStageChange={() => {}} progress={{ current: 'publish', stages: MUSIC_VIDEO_STAGES.map((stage) => ({ ...stage, state: 'todo' })) }}diff --git a/client/src/components/musicVideo/PreviewDock.jsx b/client/src/components/musicVideo/PreviewDock.jsxindex 509709b64f..6f119036ba 100644--- a/client/src/components/musicVideo/PreviewDock.jsx+++ b/client/src/components/musicVideo/PreviewDock.jsx@@ -1,13 +1,12 @@import { useEffect, useRef } from 'react';+import { useSearchParams } from 'react-router';import { ChevronDown, ChevronUp, MonitorPlay } from 'lucide-react';import CompositionPreviewPlayer from './CompositionPreviewPlayer.jsx';-import { resolvePreviewSource } from '../../lib/musicVideoStages.js';-import { formatTimecode } from '../../utils/formatters.js';-// The fallback when the project has no composition document: the newest-// finished draft excerpt. Its clock starts at the excerpt's own start, so a-// seek to song time `t` lands at `t - startSec` and is ignored outside it.-function ExcerptPreview({ excerpt, seekRequest, collapsed }) {+// A rendered file (the final render or a draft excerpt). Its clock starts at+// the clip's own start, so a seek to song time `t` lands at `t - startSec` and+// is ignored outside it.+function VideoPreview({ source, seekRequest, collapsed }) {const videoRef = useRef(null);const pending = useRef(null);const applied = useRef(null);@@ -20,18 +19,18 @@ function ExcerptPreview({ excerpt, seekRequest, collapsed }) {useEffect(() => {if (!seekRequest || applied.current === seekRequest.n) return;applied.current = seekRequest.n;- const t = seekRequest.t - excerpt.startSec;- if (t >= 0 && t <= excerpt.endSec - excerpt.startSec) seekTo(t);- }, [seekRequest, excerpt.startSec, excerpt.endSec]);+ const t = seekRequest.t - source.startSec;+ if (t >= 0 && (source.endSec == null || t <= source.endSec - source.startSec)) seekTo(t);+ }, [seekRequest, source.startSec, source.endSec]);return (<videoref={videoRef}- src={`/data/videos/${excerpt.filename}`}+ src={source.src}controlsplaysInlinepreload="metadata"onLoadedMetadata={() => { if (pending.current != null) { seekTo(pending.current); pending.current = null; } }}- aria-label="Latest draft excerpt preview"+ aria-label={source.id === 'final' ? 'Final render preview' : 'Draft excerpt preview'}className={`aspect-video max-h-[50vh] w-full rounded border border-port-border bg-black object-contain ${collapsed ? 'max-lg:hidden' : ''}`}/>);@@ -39,37 +38,58 @@ function ExcerptPreview({ excerpt, seekRequest, collapsed }) {/*** The docked preview card. `MusicVideoLayout` places it: a right-hand column- * beside the Board, Compose and Review tabs from `lg` up, a collapsible- * mini-player pinned above the bottom tab bar below it. Plays the composition- * document when there is one, else the latest draft excerpt; renders nothing- * when there is neither. `seekRequest` (`{ t, n }`) is the scene-card seek.+ * beside every stage from `lg` up, a collapsible mini-player pinned above the+ * bottom tab bar below it. `sources` is `listPreviewSources(…)` (never empty —+ * the page passes no dock when there is nothing to play); the picked one is+ * the `?play=` param, defaulting to the first (final render, then the live+ * composition, then the newest draft). `seekRequest` (`{ t, n }`) is the+ * scene-card seek.*/-export default function PreviewDock({ project, audioUrl, seekRequest, collapsed, onToggleCollapsed }) {- const source = resolvePreviewSource(project);- if (!source) return null;- const subtitle = source.kind === 'document'- ? 'Composition document'- : `Draft ${formatTimecode(source.excerpt.startSec)}–${formatTimecode(source.excerpt.endSec)}`;+export default function PreviewDock({ project, sources, audioUrl, seekRequest, collapsed, onToggleCollapsed }) {+ const [searchParams, setSearchParams] = useSearchParams();+ const requested = searchParams.get('play');+ const source = sources.find((entry) => entry.id === requested) || sources[0];+ const pick = (id) => setSearchParams((prev) => {+ const next = new URLSearchParams(prev);+ if (id === sources[0].id) next.delete('play');+ else next.set('play', id);+ return next;+ }, { replace: true });const Chevron = collapsed ? ChevronUp : ChevronDown;+ const pickerId = `mv-preview-source-${project.id}`;return (<aside aria-label="Preview" className="space-y-2 rounded-lg border border-port-border bg-port-card p-2 max-lg:rounded-b-none">- <div className="flex items-center gap-2 text-xs text-port-text-muted">+ <div className="flex min-w-0 items-center gap-2 text-xs text-port-text-muted"><MonitorPlay size={14} className="shrink-0 text-port-accent" aria-hidden="true" /><span className="text-sm font-medium text-port-text">Preview</span>- <span className="min-w-0 truncate">{subtitle}</span>+ {sources.length > 1 ? (+ <>+ <label htmlFor={pickerId} className="sr-only">Preview source</label>+ <select+ id={pickerId}+ value={source.id}+ onChange={(e) => pick(e.target.value)}+ className="min-h-[44px] min-w-0 flex-1 truncate rounded border border-port-border bg-port-bg px-1.5 py-1 text-xs text-port-text sm:min-h-0"+ >+ {sources.map((entry) => <option key={entry.id} value={entry.id}>{entry.label}</option>)}+ </select>+ </>+ ) : (+ <span className="min-w-0 truncate">{source.label}</span>+ )}<buttontype="button"onClick={onToggleCollapsed}aria-expanded={!collapsed}aria-label={collapsed ? 'Expand preview' : 'Collapse preview'}- className="ml-auto flex min-h-[44px] min-w-[44px] items-center justify-center rounded lg:hidden"+ className="ml-auto flex min-h-[44px] min-w-[44px] shrink-0 items-center justify-center rounded lg:hidden"><Chevron size={16} aria-hidden="true" /></button></div>{source.kind === 'document'? <CompositionPreviewPlayer project={project} audioUrl={audioUrl} seekRequest={seekRequest} collapsed={collapsed} />- : <ExcerptPreview excerpt={source.excerpt} seekRequest={seekRequest} collapsed={collapsed} />}+ : <VideoPreview key={source.id} source={source} seekRequest={seekRequest} collapsed={collapsed} />}</aside>);}diff --git a/client/src/components/musicVideo/ProductionReviewPanel.jsx b/client/src/components/musicVideo/ProductionReviewPanel.jsxindex c0b1d6b400..a681573b75 100644--- a/client/src/components/musicVideo/ProductionReviewPanel.jsx+++ b/client/src/components/musicVideo/ProductionReviewPanel.jsx@@ -8,7 +8,8 @@ const buttonClass = 'min-h-[44px] rounded border border-port-border px-3 py-2 teconst labels = { art: 'Art direction', storyboard: 'Lyric-timed storyboard', proof: 'Animated proof' };/** Editable planning content and explicit operator decisions for every render mode. */-export default function ProductionReviewPanel({ project, review, onOpenArtifact }) {+// `framed={false}` drops the card chrome and heading for a host that supplies them (the page's collapsible section).+export default function ProductionReviewPanel({ project, review, onOpenArtifact, framed = true }) {const fieldId = key => `mv-review-${project.id}-${key}`;const saved = project.productionReview?.draft || EMPTY;const [local, setLocal] = useState(null);@@ -50,8 +51,8 @@ export default function ProductionReviewPanel({ project, review, onOpenArtifactexcerptId: excerpt.id, filename: excerpt.filename } : undefined);};- return <section id="mv-production-review" aria-label="Production review" className="rounded-lg border border-port-border bg-port-card p-3 space-y-3">- <h3 className="font-medium">Production review</h3>+ return <section id="mv-production-review" aria-label="Production review" className={framed ? 'rounded-lg border border-port-border bg-port-card p-3 space-y-3' : 'space-y-3'}>+ {framed && <h3 className="font-medium">Production review</h3>}<p className="text-sm text-port-text-muted">Every medium needs visual direction, a timed storyboard and a watched animated proof. Drafts and technical renders do not count as approval.</p>{review.error && <p role="alert" className="text-port-error">{review.error}</p>}<ol className="grid gap-2 sm:grid-cols-3">diff --git a/client/src/components/musicVideo/stages/CastSetsStage.jsx b/client/src/components/musicVideo/stages/CastSetsStage.jsxindex 772c67234d..42aa934da9 100644--- a/client/src/components/musicVideo/stages/CastSetsStage.jsx+++ b/client/src/components/musicVideo/stages/CastSetsStage.jsx@@ -10,18 +10,16 @@ export default function CastSetsStage({ board }) {return (<div className="min-w-0 space-y-3">{project.castAndSets ? (- <div className="rounded-lg border border-port-border bg-port-card p-3">- <CastAndSetsCheckin- project={project}- busy={locked || castSets.busy || kickoff.running}- onOpenSheet={board.openArtifact}- onApprove={board.approveCastAndSets}- onRegenerate={() => castSets.regenerate()}- onEditDirection={castSets.editDirection}- onResume={() => castSets.resume()}- onSkip={board.skipCastAndSets}- />- </div>+ <CastAndSetsCheckin+ project={project}+ busy={locked || castSets.busy || kickoff.running}+ onOpenSheet={board.openArtifact}+ onApprove={board.approveCastAndSets}+ onRegenerate={() => castSets.regenerate()}+ onEditDirection={castSets.editDirection}+ onResume={() => castSets.resume()}+ onSkip={board.skipCastAndSets}+ />) : (<p className="rounded-lg border border-port-border bg-port-card p-3 text-sm text-port-text-muted">The autopilot builds the cast and sets — and stops for your check-in — before it plans the shots.diff --git a/client/src/lib/layoutRoutes.js b/client/src/lib/layoutRoutes.jsindex 1510eb31ea..49afbb5bb8 100644--- a/client/src/lib/layoutRoutes.js+++ b/client/src/lib/layoutRoutes.js@@ -107,6 +107,10 @@ const FULL_WIDTH_PATH_REGEXES = [// scrolling body. Keep this boundary-specific so `/music-video` retains its// own route classification./^\/music(?:\/|$)/,+ // Music Video is a full-width PageHeader over its own scroll body (which+ // holds the sticky project header and stage tabs) — in the padded main its+ // bordered title bar sat indented inside the page padding.+ /^\/music-video(?:\/|$)/,// Video workspace (`/video`) owns its own header+scroll shell. Generate// Video (`/video/generate`) uses the MediaGen tab shell (header + tabs +// overflow-auto body), so it must stay full-width with that shell — takingdiff --git a/client/src/lib/musicVideoStages.js b/client/src/lib/musicVideoStages.jsindex 24509a0c8c..9098aa1b7d 100644--- a/client/src/lib/musicVideoStages.js+++ b/client/src/lib/musicVideoStages.js@@ -5,6 +5,8 @@* strip and the tests all read the same answer.*/import { isLayeredComposition, sceneRenderReady } from './musicVideoLayers.js';+import { AUTONOMOUS_STATUS_LABELS } from './musicVideoAutonomous.js';+import { formatTimecode } from '../utils/formatters.js';export const MUSIC_VIDEO_STAGES = [{ id: 'setup', label: 'Setup', title: 'Setup' },@@ -16,8 +18,6 @@ export const MUSIC_VIDEO_STAGES = [{ id: 'publish', label: 'Publish', title: 'Publish' },];-// Stages whose tab keeps the preview player docked beside the content.-export const PREVIEW_STAGES = new Set(['board', 'compose', 'review']);export const isStageId = (value) => MUSIC_VIDEO_STAGES.some((stage) => stage.id === value);@@ -54,14 +54,76 @@ export function projectSpend(project) {}/**- * What the docked preview plays: the composition document when the project- * renders as one, otherwise the newest finished draft excerpt, otherwise- * nothing (the dock stays out of the way).+ * Everything the docked preview can play, in the order it picks a default:+ * the final render (its resolved `finalVideoSrc`), the composition document,+ * then each finished draft excerpt, newest first. Each entry has a stable `id`+ * (the `?play=` value) and a `label` for the source picker.*/-export function resolvePreviewSource(project) {- if (project?.composition?.mode === 'document' && project.composition.document) return { kind: 'document' };- const excerpt = [...(project?.excerpts || [])].reverse().find((e) => e.status === 'complete' && e.filename);- return excerpt ? { kind: 'excerpt', excerpt } : null;+export function listPreviewSources(project, { finalVideoSrc = null } = {}) {+ const sources = [];+ if (project?.renderHistoryId && finalVideoSrc) {+ sources.push({ id: 'final', kind: 'video', label: 'Final render', src: finalVideoSrc, startSec: 0, endSec: null });+ }+ if (project?.composition?.mode === 'document' && project.composition.document) {+ sources.push({ id: 'document', kind: 'document', label: 'Composition (live)' });+ }+ const excerpts = (project?.excerpts || []).filter((e) => e.status === 'complete' && e.filename).reverse();+ for (const excerpt of excerpts) {+ sources.push({+ id: `excerpt:${excerpt.id}`, kind: 'video', src: `/data/videos/${excerpt.filename}`,+ startSec: excerpt.startSec, endSec: excerpt.endSec,+ label: `Draft ${formatTimecode(excerpt.startSec)}–${formatTimecode(excerpt.endSec)}`,+ });+ }+ return sources;+}++const APPROVAL_LABELS = { art: 'art', storyboard: 'storyboard', proof: 'proof' };++/** One line for the production-approval gate: which of the three approvals the current revision holds. */+export function approvalSummary(readiness) {+ if (!readiness) return null;+ const keys = Object.keys(APPROVAL_LABELS);+ const approved = keys.filter((key) => readiness[key]?.approved).length;+ const missing = keys.filter((key) => !readiness[key]?.approved).map((key) => APPROVAL_LABELS[key]);+ return approved === keys.length ? 'All 3 approved' : `${approved} of 3 approved · needs ${missing.join(', ')}`;+}++/**+ * The project's "where does it stand" line for the sticky header: the stage it+ * is in (and whether that stage is waiting on the director), plus short facts+ * for the autopilot run, the production run, the approvals and what there is to+ * watch. `progress` is `deriveStages(…)`; `nextAction` is `deriveNextAction(…)`.+ * Fact tones are `ok`, `warn` or `muted`.+ */+export function describeProjectStatus(project, { progress, nextAction = null, readiness = project?.productionReadiness } = {}) {+ if (!project || !progress) return null;+ const index = MUSIC_VIDEO_STAGES.findIndex((stage) => stage.id === progress.current);+ const entry = progress.stages.find((stage) => stage.id === progress.current);+ const allDone = progress.stages.every((stage) => stage.state === 'done');+ // A goto into Production review is a human approval, not something the app does by itself.+ const needsYou = entry?.state === 'blocked' || nextAction?.id === 'review-production' || nextAction?.id === 'approve-cast-sets';+ const headline = allDone+ ? 'Published'+ : `Stage ${index + 1} of ${MUSIC_VIDEO_STAGES.length}: ${entry?.label || ''}${needsYou ? ' · needs you' : ''}`;+ const facts = [];+ const auto = project.autonomousRun;+ if (auto) {+ const label = auto.interrupted ? 'interrupted' : (AUTONOMOUS_STATUS_LABELS[auto.status] || auto.status).toLowerCase();+ const tone = auto.status === 'completed' ? 'ok' : auto.status === 'running' && !auto.interrupted ? 'muted' : 'warn';+ facts.push({ id: 'autopilot', label: `Autopilot ${label}`, tone });+ }+ const run = currentProductionRun(project);+ if (run && RESUMABLE_RUN_STATUSES.has(run.status)) {+ facts.push({ id: 'production', label: run.status === 'running' ? 'Production running' : 'Production paused', tone: run.status === 'running' ? 'muted' : 'warn' });+ }+ const approvals = approvalSummary(readiness);+ if (approvals) facts.push({ id: 'approvals', label: `Approvals: ${approvals}`, tone: readiness.readyForProduction ? 'ok' : 'warn' });+ const drafts = (project.excerpts || []).filter((e) => e.status === 'complete' && e.filename).length;+ if (project.renderHistoryId) facts.push({ id: 'render', label: 'Final render ready', tone: 'ok' });+ else if (drafts) facts.push({ id: 'render', label: `${drafts} draft ${drafts === 1 ? 'excerpt' : 'excerpts'}, no final render`, tone: 'muted' });+ else facts.push({ id: 'render', label: 'Nothing rendered yet', tone: 'muted' });+ return { headline, tone: allDone ? 'ok' : needsYou ? 'warn' : 'muted', facts };}/** Resolve the `:stage` route param; an unknown or missing value is null. */diff --git a/client/src/lib/musicVideoStages.test.js b/client/src/lib/musicVideoStages.test.jsindex 4441beff21..e32a7aa0ce 100644--- a/client/src/lib/musicVideoStages.test.js+++ b/client/src/lib/musicVideoStages.test.js@@ -1,6 +1,6 @@import { describe, it, expect } from 'vitest';import {- MUSIC_VIDEO_STAGES, currentProductionRun, deriveNextAction, deriveStages, projectSpend, resolvePreviewSource, resolveStageParam,+ MUSIC_VIDEO_STAGES, currentProductionRun, deriveNextAction, deriveStages, projectSpend, listPreviewSources, describeProjectStatus, resolveStageParam,} from './musicVideoStages.js';const APPROVED = { art: { approved: true }, storyboard: { approved: true }, proof: { approved: true }, readyForProduction: true };@@ -125,16 +125,53 @@ describe('stage route param', () => {});});-describe('resolvePreviewSource', () => {- it('prefers the composition document, then the newest finished excerpt, then nothing', () => {+describe('listPreviewSources', () => {+ it('orders the final render, the composition document, then finished excerpts newest first', () => {const excerpts = [{ id: 'a', status: 'complete', filename: 'a.mp4', startSec: 0, endSec: 10 },{ id: 'b', status: 'complete', filename: 'b.mp4', startSec: 10, endSec: 20 },{ id: 'c', status: 'rendering', filename: null },];- expect(resolvePreviewSource({ composition: { mode: 'document', document: { directory: 'd' } }, excerpts })).toEqual({ kind: 'document' });- expect(resolvePreviewSource({ composition: { mode: 'document' }, excerpts }).excerpt.id).toBe('b');- expect(resolvePreviewSource({ composition: { mode: 'concat', document: { directory: 'd' } }, excerpts }).kind).toBe('excerpt');- expect(resolvePreviewSource({ excerpts: [{ id: 'c', status: 'error' }] })).toBeNull();+ const ids = (project, opts) => listPreviewSources(project, opts).map((source) => source.id);+ expect(ids({ renderHistoryId: 'r1', composition: { mode: 'document', document: { directory: 'd' } }, excerpts }, { finalVideoSrc: '/data/videos/final.mp4' }))+ .toEqual(['final', 'document', 'excerpt:b', 'excerpt:a']);+ // The final render plays only once its file has resolved; a non-document mode has no live composition.+ expect(ids({ renderHistoryId: 'r1', composition: { mode: 'concat', document: { directory: 'd' } }, excerpts })).toEqual(['excerpt:b', 'excerpt:a']);+ expect(listPreviewSources({ excerpts: [{ id: 'c', status: 'error' }] })).toEqual([]);+ expect(listPreviewSources({ excerpts })[0]).toMatchObject({ kind: 'video', src: '/data/videos/b.mp4', startSec: 10, endSec: 20 });+ });+});++describe('describeProjectStatus', () => {+ const stages = (current, overrides = {}) => ({+ current,+ stages: MUSIC_VIDEO_STAGES.map((stage) => ({ ...stage, state: overrides[stage.id] || (stage.id === current ? 'active' : 'todo') })),+ });+ const readiness = (art, storyboard, proof) => ({+ art: { approved: art }, storyboard: { approved: storyboard }, proof: { approved: proof }, readyForProduction: proof,+ });++ it('names the stage, flags a pending approval and says nothing has been rendered', () => {+ const status = describeProjectStatus(+ { autonomousRun: { status: 'stopped' }, excerpts: [] },+ { progress: stages('cast-sets', { setup: 'done' }), nextAction: { id: 'review-production' }, readiness: readiness(false, false, false) },+ );+ expect(status.headline).toBe('Stage 2 of 7: Cast & Sets · needs you');+ expect(status.tone).toBe('warn');+ expect(status.facts.map((fact) => fact.label)).toEqual([+ 'Autopilot paused', 'Approvals: 0 of 3 approved · needs art, storyboard, proof', 'Nothing rendered yet',+ ]);+ });++ it('reports drafts and the final render', () => {+ const drafts = describeProjectStatus({ excerpts: [{ id: 'a', status: 'complete', filename: 'a.mp4' }] }, { progress: stages('review') });+ expect(drafts.headline).toBe('Stage 6 of 7: Review');+ expect(drafts.facts.at(-1).label).toBe('1 draft excerpt, no final render');+ const done = describeProjectStatus({ renderHistoryId: 'r1' }, {+ progress: { current: 'publish', stages: MUSIC_VIDEO_STAGES.map((stage) => ({ ...stage, state: 'done' })) },+ readiness: readiness(true, true, true),+ });+ expect(done.headline).toBe('Published');+ expect(done.facts.map((fact) => fact.label)).toEqual(['Approvals: All 3 approved', 'Final render ready']);});});diff --git a/client/src/pages/MusicVideo.jsx b/client/src/pages/MusicVideo.jsxindex 536fbbfa3e..2944a23422 100644--- a/client/src/pages/MusicVideo.jsx+++ b/client/src/pages/MusicVideo.jsx@@ -41,7 +41,6 @@ import useMusicVideoAutoReview from '../hooks/useMusicVideoAutoReview.js';import useMusicVideoProduction from '../hooks/useMusicVideoProduction.js';import useAutonomousMusicVideo from '../hooks/useAutonomousMusicVideo.js';import useDrawerTab from '../hooks/useDrawerTab.js';-import { AUTONOMOUS_VIEWABLE_STAGES } from '../lib/musicVideoAutonomous.js';import useMusicVideoModelSettings from '../hooks/useMusicVideoModelSettings.js';import useMusicVideoManualTempo from '../hooks/useMusicVideoManualTempo.js';import useMusicVideoSceneMedia from '../hooks/useMusicVideoSceneMedia.js';@@ -59,7 +58,8 @@ import AutonomousStartDrawer from '../components/musicVideo/AutonomousStartDraweimport AutonomousRunPanel from '../components/musicVideo/AutonomousRunPanel.jsx';import { automationDraftFrom, automationFromDraft } from '../lib/musicVideoAutomation.js';import { listUniverseNames } from '../services/apiUniverseBuilder.js';-import MusicVideoLayout from '../components/musicVideo/MusicVideoLayout.jsx';+import MusicVideoLayout, { MUSIC_VIDEO_SCROLL_ID } from '../components/musicVideo/MusicVideoLayout.jsx';+import StageSection from '../components/musicVideo/StageSection.jsx';import MusicVideoProjectCard from '../components/musicVideo/MusicVideoProjectCard.jsx';import PreviewDock from '../components/musicVideo/PreviewDock.jsx';import SetupStage from '../components/musicVideo/stages/SetupStage.jsx';@@ -79,8 +79,9 @@ import { isLtx2FamilyRuntime } from '../lib/runnerFamilies';import { videoPosterForJob } from '../lib/creativeDirectorPreview.js';import { sceneTakeList } from '../lib/musicVideoTakes.js';import {- deriveNextAction, deriveStages, projectSpend, resolvePreviewSource, resolveStageParam,+ approvalSummary, deriveNextAction, deriveStages, describeProjectStatus, listPreviewSources, projectSpend, resolveStageParam,} from '../lib/musicVideoStages.js';+import { AUTONOMOUS_STATUS_LABELS, AUTONOMOUS_VIEWABLE_STAGES } from '../lib/musicVideoAutonomous.js';// Automation first: a new project defaults to autopilot with the free tools.const emptyCreateForm = () => ({@@ -100,6 +101,14 @@ const STAGE_VIEWS = {setup: SetupStage, 'cast-sets': CastSetsStage, board: BoardStage, produce: ProduceStage, compose: ComposeStage, review: ReviewStage, publish: PublishStage,};+// The shared autopilot section stays unfolded only while the run is working or+// waiting on the director; a paused, finished or cancelled run folds to its summary line.+const AUTOPILOT_OPEN_STATUSES = new Set(['running', 'awaiting-approval', 'needs-human', 'failed']);+const autopilotSummary = (run) => {+ const label = run.interrupted ? 'Interrupted — resume to continue' : AUTONOMOUS_STATUS_LABELS[run.status] || run.status;+ return run.error ? `${label} — ${run.error}` : label;+};+const STATUS_COLORS = {draft: 'bg-port-border text-port-text',analyzed: 'bg-port-accent/30 text-port-accent',@@ -769,6 +778,9 @@ export default function MusicVideo() {useEffect(() => {if (!pendingAnchor || pendingAnchor.stage !== activeStage) return;const el = document.getElementById(pendingAnchor.id);+ // An anchor inside a folded section (Production review) unfolds it first.+ const fold = el?.closest?.('details');+ if (fold) fold.open = true;el?.scrollIntoView?.({ block: 'center', behavior: 'smooth' });const focusable = el?.matches?.('button, input, select, textarea, a') ? el : el?.querySelector?.('button, input, select, textarea, a');focusable?.focus?.({ preventScroll: true });@@ -908,8 +920,11 @@ export default function MusicVideo() {} : null;const StageView = STAGE_VIEWS[activeStage];+ const previewSources = selected ? listPreviewSources(selected, { finalVideoSrc: finalVideo.src }) : [];+ const autopilotRun = selected?.autonomousRun || null;+return (- <div className="space-y-4">+ <div className="flex h-full flex-col"><MidiInstallModal {...midi.installGate} /><MidiGatedModal {...midi.gatedGate} /><MediaPreview preview={preview} setPreview={setPreview} items={previewItems} />@@ -1066,7 +1081,7 @@ export default function MusicVideo() {}}/>- <div>+ <div id={MUSIC_VIDEO_SCROLL_ID} className="min-h-0 flex-1 overflow-auto p-4 md:p-6">{projectsError && (<Banner tone="error" size="md" title="Music video projects unavailable" className="mb-4" actions={(<button@@ -1137,9 +1152,11 @@ export default function MusicVideo() {nextAction={compositionSavePending > 0 && nextAction ? { ...nextAction, disabled: true, reason: 'Saving composition…' } : nextAction}onNextAction={runNextAction}spend={projectSpend(selected)}- dock={resolvePreviewSource(selected) ? (+ status={describeProjectStatus(selected, { progress, nextAction, readiness: productionReview.readiness })}+ dock={previewSources.length ? (<PreviewDockproject={selected}+ sources={previewSources}audioUrl={audioUrl}seekRequest={seekRequest}collapsed={dockCollapsed}@@ -1147,8 +1164,24 @@ export default function MusicVideo() {/>) : null}projectPanels={<div className="space-y-3 min-w-0">- <AutonomousRunPanel key={`autonomous-${selected.id}`} project={selected} auto={autonomous} selectedStage={runStage} onSelectStage={setRunStage} />- <ProductionReviewPanel key={`production-review-${selected.id}`} project={selected} review={productionReview} onOpenArtifact={openArtifact} />+ {autopilotRun && (+ <StageSection+ key={`autonomous-${selected.id}`}+ title="Autopilot run"+ summary={autopilotSummary(autopilotRun)}+ defaultOpen={!!runStage || autopilotRun.interrupted || AUTOPILOT_OPEN_STATUSES.has(autopilotRun.status)}+ >+ <AutonomousRunPanel project={selected} auto={autonomous} selectedStage={runStage} onSelectStage={setRunStage} framed={false} />+ </StageSection>+ )}+ <StageSection+ key={`production-review-${selected.id}`}+ title="Production approvals"+ summary={approvalSummary(productionReview.readiness) || 'Visual direction, timed storyboard and a watched proof'}+ defaultOpen={nextAction?.id === 'review-production' && nextAction.stage === activeStage}+ >+ <ProductionReviewPanel project={selected} review={productionReview} onOpenArtifact={openArtifact} framed={false} />+ </StageSection></div>}><StageView key={selected.id} board={board} />diff --git a/client/src/pages/MusicVideo.test.jsx b/client/src/pages/MusicVideo.test.jsxindex a851751d5e..9daf2a1eb0 100644--- a/client/src/pages/MusicVideo.test.jsx+++ b/client/src/pages/MusicVideo.test.jsx@@ -2307,13 +2307,13 @@ describe('MusicVideo stage tabs (#9243)', () => {],};- it('seeks the player to a scene\'s start when its card is opened, and mounts only once a preview stage is visited', async () => {+ it('docks the preview on every stage and seeks it to a scene\'s start when its card is opened', async () => {listTracks.mockResolvedValue([{ id: 't1', title: 'Neon Song', audioFilename: 'neon.mp3' }]);await openProject(docProject, 'setup');- expect(screen.queryByTitle('Composition document preview')).toBeNull();+ expect(await screen.findByTitle('Composition document preview')).toBeTruthy();await openStage('board');- expect(await screen.findByTitle('Composition document preview')).toBeTruthy();+ expect(screen.getByTitle('Composition document preview')).toBeTruthy();await waitFor(() => expect(screen.getByText('0.00s / 60.0s')).toBeTruthy());fireEvent.click(screen.getByText('Scene 2'));await waitFor(() => expect(screen.getByText('4.00s / 60.0s')).toBeTruthy());@@ -2330,9 +2330,12 @@ describe('MusicVideo stage tabs (#9243)', () => {],};await openProject(project, 'board');- const player = await screen.findByLabelText('Latest draft excerpt preview');+ const player = await screen.findByLabelText('Draft excerpt preview');expect(player.getAttribute('src')).toBe('/data/videos/excerpt-new.mp4');expect(screen.queryByTitle('Composition document preview')).toBeNull();+ // Every finished draft stays reachable from the dock's source picker.+ fireEvent.change(screen.getByLabelText('Preview source'), { target: { value: 'excerpt:mve-1' } });+ await waitFor(() => expect(screen.getByLabelText('Draft excerpt preview').getAttribute('src')).toBe('/data/videos/excerpt-old.mp4'));});it('offers no preview when the project has neither a document nor a finished excerpt', async () => {diff --git a/docs/features/product-surfaces.md b/docs/features/product-surfaces.mdindex d4972c749d..e51b4f13e0 100644--- a/docs/features/product-surfaces.md+++ b/docs/features/product-surfaces.md@@ -110,7 +110,7 @@ An end-to-end creative production suite for authors, worldbuilders, filmmakers,| **SongBook** | `/songbook` | Interactive chord charts, guitar tablature, lyric repertoire, and auto-scrolling practice sheet music. | — || **Creative Director** | `/creative-director` | Multi-scene episodic video production orchestrator: turn briefs into treatments, storyboards, render plans, and completed episodes. | — || **Creative Commissions** | `/creative-commission` | Standing briefs and scheduled/nightly autonomous media generation aligning with personal taste profiles and feedback. A universe and/or mood board can be picked as the style source: each run loads its style tags and reference images as the Creative Director's art-direction base, attaches those images to vision scene evaluation, and conditions local image renders on them. | — |-| **Music Video Studio** | `/music-video` | A project opens on seven deep-linked stage tabs (`/music-video/:projectId/:stage` — `setup`, `cast-sets`, `board`, `produce`, `compose`, `review`, `publish`; a bottom tab bar on a phone) under a sticky header showing its progress, paid-generation spend against the cap, and the one next action for the stage it is in; the composition preview (or, without a composition document, the latest draft excerpt) is docked beside the Board, Compose and Review tabs, and scene cards seek it. Audio-reactive video creation, beat-detection synchronization, scene choreography, tempo alignment, and audience-driven pre-production treatments that direct each shot. Scenes are cutaways or lip-synced performance shots; a performance shot renders only on a verified source-audio provider (fal.ai MiniMax H3 lip-sync, 5–14.8s song slices placed at an exact edit in-point, cut from an optional full-length vocal stem when one is attached — uploaded, or separated from the song with a locally installed demucs) — Grok video is cutaway-only. The autopilot kickoff analyzes the song, imports the linked track's lyric sheet (its `[Verse]`/`[Chorus]` headers and stage directions kept as lyric markers that name the analysis sections and steer shot framing), separates the vocal, aligns every word with local whisper.cpp (large-v3-turbo, downloaded on first use), builds a Cast & Sets check-in (one creative-direction call that interprets the song, then a canonical character sheet, expression and looks sheets, one empty plate per set and in-set tests on the image queue, each later image conditioned on the character sheet; assembled into a self-contained sheet saved as a development artifact), stops for the director's review unless the brief auto-approves it, then plans against the approved references. Development artifacts (check-in sheets, animatics, treatments, storyboards; HTML/Markdown/MP4/PNG/JPG) are versioned per project, reviewed with notes and approve/request-changes, and viewed in a sandboxed viewer at `/music-video/:projectId/:stage/dev/:artifactId` (the stage-less `/music-video/:projectId/dev/:artifactId` still opens it). Draft excerpts are reviewed and selectively revised by hand, or by an opt-in auto-review run bounded by director-set review and paid-generation limits (a frame-only look never passes motion or audio sync). A server-owned production run (`/api/music-video/:id/production-runs`, #9066) plans an empty board, generates missing frames and clips only on a director-allowed image/video provider+model pool, hands the continuous draft to auto-review and dispatches its revisions — within explicit generation, review and (priced routes only) dollar limits, without the browser open, and never resuming on its own after a restart; the song is the sole audio unless a sound-design bed is explicitly chosen to mix under it. A footage or composed render can intercut (#9290): shots are re-cut on the song's section energy (every 2 beats in the loudest quarter, up to every 8 in the quietest) and on sung word onsets, alternating the host shot — a lip-synced take stays in sync — with unshown footage from a cutaway in the same section, so the edit gets faster without generating more clips; an autopilot production run defaults to it unless the director chose one cut per shot. Lyric lines sung two or more times are hooks: the treatment's text cues give them a word-by-word build (#9291) — each word lands on its sung onset in heavy caps, the newest in the accent color. Draft excerpts can be re-framed as vertical or square social cuts with faded audio edges, from suggested hook windows (#9280). The **Autonomous** entry point (`docs/features/music-video-autonomous.md`) starts from one prompt instead of a chosen track: it writes the brief, lyrics and a mood board, makes the song in Suno through the PortOS Browser, and runs the production — with optional approval checkpoints, and a `music-video-autopilot` scheduled task that turns unused Brain ideas into videos. The Publish stage (#9281) builds a release kit from the final render: an X-sized 1080p, a 720p preview, a hook teaser, thumbnail candidates, lyric captions (SRT) and YouTube chapters. It also drafts every platform's copy in one director-triggered provider call from their own making-of notes, and every field stays editable. Posting (#9282) fills each platform's post (YouTube, Suno, an X thread, Shorts, TikTok, Instagram Reels, Reddit, Stacker News) in a new PortOS Browser tab with the director's signed-in sessions, shows a screenshot and summary of the filled draft, and posts only when the director presses Post for that draft; the posted links are kept on the project. Reddit defaults to a native video post in r/aivideo — title and flair, no body — through the new composer's own Video button (#9307). Platforms are opt-in (#9287): a "Where you post" list turns each one on (all start off) and optionally names the account posted as — X and Reddit drafts filled while signed in as someone else are refused. Copy is drafted and posts are offered only for enabled platforms. Each post (including one recorded by hand) can be rated good, mixed or poor with notes; ratings roll up per platform across projects and are passed to later copy drafts. | — |+| **Music Video Studio** | `/music-video` | A project opens on seven deep-linked stage tabs (`/music-video/:projectId/:stage` — `setup`, `cast-sets`, `board`, `produce`, `compose`, `review`, `publish`; a bottom tab bar on a phone) under a sticky header showing its progress, a one-line status (the stage it is in and whether it needs the director, the autopilot and production runs, the three production approvals, and what has been rendered), paid-generation spend against the cap, and the one next action for the stage it is in; a preview player is docked beside every tab whenever anything is playable — the final render, the live composition document and each finished draft excerpt, picked from the dock (`?play=`) — and scene cards seek it. The autopilot run and production approvals fold to a summary line below the stage unless they need the director. Audio-reactive video creation, beat-detection synchronization, scene choreography, tempo alignment, and audience-driven pre-production treatments that direct each shot. Scenes are cutaways or lip-synced performance shots; a performance shot renders only on a verified source-audio provider (fal.ai MiniMax H3 lip-sync, 5–14.8s song slices placed at an exact edit in-point, cut from an optional full-length vocal stem when one is attached — uploaded, or separated from the song with a locally installed demucs) — Grok video is cutaway-only. The autopilot kickoff analyzes the song, imports the linked track's lyric sheet (its `[Verse]`/`[Chorus]` headers and stage directions kept as lyric markers that name the analysis sections and steer shot framing), separates the vocal, aligns every word with local whisper.cpp (large-v3-turbo, downloaded on first use), builds a Cast & Sets check-in (one creative-direction call that interprets the song, then a canonical character sheet, expression and looks sheets, one empty plate per set and in-set tests on the image queue, each later image conditioned on the character sheet; assembled into a self-contained sheet saved as a development artifact), stops for the director's review unless the brief auto-approves it, then plans against the approved references. Development artifacts (check-in sheets, animatics, treatments, storyboards; HTML/Markdown/MP4/PNG/JPG) are versioned per project, reviewed with notes and approve/request-changes, and viewed in a sandboxed viewer at `/music-video/:projectId/:stage/dev/:artifactId` (the stage-less `/music-video/:projectId/dev/:artifactId` still opens it). Draft excerpts are reviewed and selectively revised by hand, or by an opt-in auto-review run bounded by director-set review and paid-generation limits (a frame-only look never passes motion or audio sync). A server-owned production run (`/api/music-video/:id/production-runs`, #9066) plans an empty board, generates missing frames and clips only on a director-allowed image/video provider+model pool, hands the continuous draft to auto-review and dispatches its revisions — within explicit generation, review and (priced routes only) dollar limits, without the browser open, and never resuming on its own after a restart; the song is the sole audio unless a sound-design bed is explicitly chosen to mix under it. A footage or composed render can intercut (#9290): shots are re-cut on the song's section energy (every 2 beats in the loudest quarter, up to every 8 in the quietest) and on sung word onsets, alternating the host shot — a lip-synced take stays in sync — with unshown footage from a cutaway in the same section, so the edit gets faster without generating more clips; an autopilot production run defaults to it unless the director chose one cut per shot. Lyric lines sung two or more times are hooks: the treatment's text cues give them a word-by-word build (#9291) — each word lands on its sung onset in heavy caps, the newest in the accent color. Draft excerpts can be re-framed as vertical or square social cuts with faded audio edges, from suggested hook windows (#9280). The **Autonomous** entry point (`docs/features/music-video-autonomous.md`) starts from one prompt instead of a chosen track: it writes the brief, lyrics and a mood board, makes the song in Suno through the PortOS Browser, and runs the production — with optional approval checkpoints, and a `music-video-autopilot` scheduled task that turns unused Brain ideas into videos. The Publish stage (#9281) builds a release kit from the final render: an X-sized 1080p, a 720p preview, a hook teaser, thumbnail candidates, lyric captions (SRT) and YouTube chapters. It also drafts every platform's copy in one director-triggered provider call from their own making-of notes, and every field stays editable. Posting (#9282) fills each platform's post (YouTube, Suno, an X thread, Shorts, TikTok, Instagram Reels, Reddit, Stacker News) in a new PortOS Browser tab with the director's signed-in sessions, shows a screenshot and summary of the filled draft, and posts only when the director presses Post for that draft; the posted links are kept on the project. Reddit defaults to a native video post in r/aivideo — title and flair, no body — through the new composer's own Video button (#9307). Platforms are opt-in (#9287): a "Where you post" list turns each one on (all start off) and optionally names the account posted as — X and Reddit drafts filled while signed in as someone else are refused. Copy is drafted and posts are offered only for enabled platforms. Each post (including one recorded by hand) can be rated good, mixed or poor with notes; ratings roll up per platform across projects and are passed to later copy drafts. | — || **Sharing & Conflict Resolution** | `/sharing`, `/sharing/duplicates`, `/sharing/conflicts` | Collaborative asset exchange via cloud storage buckets (Google Drive, Dropbox, iCloud, Syncthing) with duplicate reconciliation and conflict recovery journals. | — |---