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([issue-3168]): add concept/style editor to Music Video projects
[._.]/ Adam Eivyc744a8b416b8
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 2936b06b76..7db539626e 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -1,5 +1,9 @@# Unreleased Changes+## Music Video++- **[issue-3168] Music Video projects now have a Concept and Visual style field.** Set them before clicking "AI Plan" to steer the proposed scenes toward a story or theme, and every generated frame and shot prompt now carries your chosen visual style automatically.+## Usage cost reporting- **[issue-3156] Historical usage estimates can now be reconciled against provider transcripts.** The Usage page offers an explicit, progress-reporting repair that matches transcripts only to PortOS run windows, preserves configured provider IDs, replaces each old estimate once, and rebuilds corrected totals without inventing legacy cost.diff --git a/client/src/pages/MusicVideo.jsx b/client/src/pages/MusicVideo.jsxindex c8f36eda5b..a08fb18759 100644--- a/client/src/pages/MusicVideo.jsx+++ b/client/src/pages/MusicVideo.jsx@@ -461,6 +461,17 @@ export default function MusicVideo() {updateMusicVideoScene(selected.id, sceneId, patch, { silent: true }).catch((err) => toast.error(err?.message || 'Failed to save scene'));};++ // Project-level concept/style (issue #3168) — same optimistic-local + silent-PATCH+ // blur pattern as scene fields. Consumed by buildScenePlanPrompt (AI Plan) and by+ // buildFramePrompt/buildShotPrompt's style suffix, both already reading concept.+ const editConceptLocal = (patch) => {+ replaceProject({ ...selected, concept: { ...selected.concept, ...patch } });+ };+ const saveConcept = (patch) => {+ updateMusicVideoProject(selected.id, { concept: { ...selected.concept, ...patch } }, { silent: true })+ .catch((err) => toast.error(err?.message || 'Failed to save concept'));+ };// BeatTimeline drag commit — same optimistic-local + silent-PATCH pattern as// the other scene field editors (#1854).const commitSceneTiming = (sceneId, patch) => {@@ -705,6 +716,38 @@ export default function MusicVideo() {</button></div></div>+ {/* Concept & style — optional global direction for the whole video,+ set before "AI Plan" so buildScenePlanPrompt (server) can build on+ it, and reused by buildFramePrompt/buildShotPrompt's style suffix+ (issue #3168). Local-edit + blur-save, same pattern as scene fields. */}+ <div className="mt-2 grid grid-cols-1 sm:grid-cols-2 gap-2">+ <div>+ <label htmlFor="mv-concept" className="block text-xs text-port-text-muted mb-1">Concept</label>+ <textarea+ id="mv-concept"+ value={selected.concept?.prompt || ''}+ rows={2}+ maxLength={8000}+ onChange={(e) => editConceptLocal({ prompt: e.target.value })}+ onBlur={(e) => saveConcept({ prompt: e.target.value })}+ placeholder="What is this video about — story, theme, or narrative thread for the AI plan to build on."+ className="w-full bg-port-bg border border-port-border rounded px-2 py-1.5 text-sm"+ />+ </div>+ <div>+ <label htmlFor="mv-style" className="block text-xs text-port-text-muted mb-1">Visual style</label>+ <textarea+ id="mv-style"+ value={selected.concept?.style || ''}+ rows={2}+ maxLength={2000}+ onChange={(e) => editConceptLocal({ style: e.target.value })}+ onBlur={(e) => saveConcept({ style: e.target.value })}+ placeholder="Art style, references, palette, mood — appended to every generated frame and shot prompt."+ className="w-full bg-port-bg border border-port-border rounded px-2 py-1.5 text-sm"+ />+ </div>+ </div>{/* Track picker — pick an existing library track or import fresh audiofrom YouTube. Re-selecting either PATCHes the project's trackId. */}<div className="mt-2 flex flex-wrap items-center gap-2 text-xs">diff --git a/client/src/pages/MusicVideo.test.jsx b/client/src/pages/MusicVideo.test.jsxindex 3567947542..b2d65a261b 100644--- a/client/src/pages/MusicVideo.test.jsx+++ b/client/src/pages/MusicVideo.test.jsx@@ -248,6 +248,48 @@ describe('MusicVideo autonomous shot planner (#1855)', () => {});});+describe('MusicVideo concept & style editor (#3168)', () => {+ it('seeds the fields from the project and persists each on blur', async () => {+ const withConcept = { ...PROJECT_NO_CLIP, concept: { prompt: 'A road trip through neon ruins', style: 'Cyberpunk anime' } };+ await openProject(withConcept);++ const conceptField = await screen.findByLabelText('Concept');+ const styleField = screen.getByLabelText('Visual style');+ expect(conceptField).toHaveValue('A road trip through neon ruins');+ expect(styleField).toHaveValue('Cyberpunk anime');++ fireEvent.change(conceptField, { target: { value: 'A heist across a dying star' } });+ fireEvent.blur(conceptField);+ await waitFor(() => expect(updateMusicVideoProject).toHaveBeenCalledWith(+ 'mv-2',+ { concept: { prompt: 'A heist across a dying star', style: 'Cyberpunk anime' } },+ { silent: true },+ ));++ fireEvent.change(styleField, { target: { value: 'Watercolor noir' } });+ fireEvent.blur(styleField);+ await waitFor(() => expect(updateMusicVideoProject).toHaveBeenCalledWith(+ 'mv-2',+ { concept: { prompt: 'A heist across a dying star', style: 'Watercolor noir' } },+ { silent: true },+ ));+ });++ it('starts empty and enables AI Plan to use them once set', async () => {+ await openProject(PROJECT_ANALYZED);+ const conceptField = await screen.findByLabelText('Concept');+ expect(conceptField).toHaveValue('');++ fireEvent.change(conceptField, { target: { value: 'Underwater festival' } });+ fireEvent.blur(conceptField);+ await waitFor(() => expect(updateMusicVideoProject).toHaveBeenCalledWith(+ 'mv-3',+ { concept: { prompt: 'Underwater festival' } },+ { silent: true },+ ));+ });+});+describe('MusicVideo YouTube audio import (#1945)', () => {it('starts an import from the detail view and attaches the finished track to the project', async () => {await openProject(PROJECT_NO_CLIP);