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
Show a finished step as done, and mark the treatment optional (#11219)
[._.]/b0d78ea816c2
diff --git a/client/src/components/musicVideo/CreativeSetupPanel.jsx b/client/src/components/musicVideo/CreativeSetupPanel.jsxindex 6d1a80eb97..9926e71605 100644--- a/client/src/components/musicVideo/CreativeSetupPanel.jsx+++ b/client/src/components/musicVideo/CreativeSetupPanel.jsx@@ -96,7 +96,7 @@ export default function CreativeSetupPanel({ project, onSave, onPendingChange })return <section className="bg-port-card border border-port-border rounded-lg p-3 space-y-3 min-w-0 break-words" aria-label="Creative setup"><div className="flex flex-wrap items-center justify-between gap-2"><h3 className="text-sm font-medium">Character style, universe, cast, places & objects</h3>- {!editing && <button type="button" onClick={begin} className="text-sm text-port-accent min-h-[44px]">Set up creative direction</button>}+ {!editing && <button type="button" onClick={begin} aria-label={subjects.length || project.concept?.characterStyleId ? 'Edit creative direction' : undefined} className="text-sm text-port-accent min-h-[44px]">{subjects.length || project.concept?.characterStyleId ? 'Edit' : 'Set up creative direction'}</button>}</div>{!editing && project.concept?.characterStyleId && <p className="text-xs">Character style: {project.concept.characterStyle?.split(':')[0] || project.concept.characterStyleId}</p>}{!editing ? <p className="text-xs text-port-text-muted">{subjects.length ? subjects.map((s) => `${s.name}${s.role === 'protagonist' ? ' (protagonist)' : s.role === 'band' ? ' (band)' : ''}`).join(' · ') : 'Create the band or protagonist, choose a universe, and select the places and objects that anchor the story.'}</p> : <fieldset disabled={saving} className="space-y-3 min-w-0">diff --git a/client/src/components/musicVideo/CreativeSetupPanel.test.jsx b/client/src/components/musicVideo/CreativeSetupPanel.test.jsxindex a2b2bd1496..033cf6d0a8 100644--- a/client/src/components/musicVideo/CreativeSetupPanel.test.jsx+++ b/client/src/components/musicVideo/CreativeSetupPanel.test.jsx@@ -137,3 +137,12 @@ describe('tools / policy conflict', () => {expect(onSave.mock.calls[0][0].concept).toMatchObject({ characterStyleId: 'claudia-slopcore' });});});++describe('creative setup already made', () => {+ it('offers Edit, not Set up, once the cast exists', () => {+ const made = { id: 'mv2', concept: { subjects: [{ id: 's1', kind: 'character', name: 'Example lead', role: 'protagonist' }] }, visualSpec: {} };+ render(<MemoryRouter><CreativeSetupPanel project={made} onSave={vi.fn()} onPendingChange={vi.fn()} /></MemoryRouter>);+ expect(screen.getByRole('button', { name: 'Edit creative direction' })).toBeTruthy();+ expect(screen.queryByText('Set up creative direction')).toBeNull();+ });+});diff --git a/client/src/components/musicVideo/StageChecklist.jsx b/client/src/components/musicVideo/StageChecklist.jsxindex 4162774d80..6f79476f39 100644--- a/client/src/components/musicVideo/StageChecklist.jsx+++ b/client/src/components/musicVideo/StageChecklist.jsx@@ -27,8 +27,16 @@ export default function StageChecklist({ items, onAction, onRevert, headerAnchor{allDone ? 'All done' : `${done} of ${required.length} done`}</span></div>- {/* A finished step needs no rows: one line names what was done, so the step's own work comes up sooner. */}- {allDone ? <p className="mt-1 text-xs text-port-text-muted">{items.map((item) => item.label).join(' · ')}</p> : (+ {/* A finished step needs no rows: one wrapped line names what was done, each with its check, so the step's own work comes up sooner. */}+ {allDone ? (+ <ul aria-label="Done" className="mt-1 flex flex-wrap gap-x-3 gap-y-1 text-xs text-port-text-muted">+ {items.filter((item) => item.done).map((item) => (+ <li key={item.id} className="flex min-w-0 items-start gap-1 break-words">+ <CheckCircle2 size={12} className="mt-0.5 shrink-0 text-port-success" aria-hidden="true" />{item.label}+ </li>+ ))}+ </ul>+ ) : (<ul className="mt-2 space-y-1.5">{items.map((item) => (// The action wraps under the text on a phone instead of squeezing it into a narrow column.diff --git a/client/src/components/musicVideo/StageChecklist.test.jsx b/client/src/components/musicVideo/StageChecklist.test.jsxindex 051e55609a..533ec601e9 100644--- a/client/src/components/musicVideo/StageChecklist.test.jsx+++ b/client/src/components/musicVideo/StageChecklist.test.jsx@@ -23,11 +23,16 @@ describe('StageChecklist Revert buttons (#10241)', () => {});describe('StageChecklist on a finished step', () => {- it('folds the done rows into one line so the step content comes up sooner', () => {- render(<StageChecklist items={[{ id: 'a', label: 'Track attached', done: true }, { id: 'b', label: 'Lyric timing verified', done: true }]} />);+ // Uniquely catches a done step reading as a to-do list (labels with no done marks, or an open optional item among them).+ it('folds the done rows into one checked line so the step content comes up sooner', () => {+ render(<StageChecklist items={[{ id: 'a', label: 'Track attached', done: true }, { id: 'b', label: 'Lyric timing verified', done: true },+ { id: 'c', label: 'Song style read', done: false, optional: true }]} />);expect(screen.getByText('All done')).toBeTruthy();- expect(screen.getByText('Track attached · Lyric timing verified')).toBeTruthy();- expect(screen.queryByRole('list')).toBeNull();+ const done = screen.getByRole('list', { name: 'Done' });+ expect([...done.querySelectorAll('li')].map((li) => [li.textContent, !!li.querySelector('svg')]))+ .toEqual([['Track attached', true], ['Lyric timing verified', true]]);+ expect(screen.queryByText(/Song style read/)).toBeNull();+ expect(screen.queryByRole('button')).toBeNull();});it('keeps one row per item while anything is left', () => {diff --git a/client/src/components/musicVideo/StageSection.jsx b/client/src/components/musicVideo/StageSection.jsxindex dd933d40cf..796a7dbaee 100644--- a/client/src/components/musicVideo/StageSection.jsx+++ b/client/src/components/musicVideo/StageSection.jsx@@ -3,7 +3,7 @@ import { ChevronRight } from 'lucide-react';/*** A stage panel group that folds away: a native `<details>` (so it works- * without script and reads as a disclosure to assistive tech) with a one-line+ * without script and reads as a disclosure to assistive tech) with a short (two-line at most)* summary beside the title, collapsed unless `defaultOpen`. The summary row is* the 44px tap target on a phone. `defaultOpen` sets the first state; a later* false → true change unfolds it (something now needs the director), but props@@ -22,7 +22,7 @@ export default function StageSection({ id, title, summary = null, defaultOpen =<summary className="flex min-h-[44px] cursor-pointer select-none items-center gap-2 px-3 py-2 marker:content-none [&::-webkit-details-marker]:hidden"><ChevronRight size={14} aria-hidden="true" className="shrink-0 text-port-text-muted transition-transform group-open:rotate-90" /><span className="shrink-0 text-sm font-medium">{title}</span>- {summary && <span className="min-w-0 truncate text-xs text-port-text-muted">{summary}</span>}+ {summary && <span className="min-w-0 line-clamp-2 break-words text-xs text-port-text-muted">{summary}</span>}</summary><div className="min-w-0 space-y-2 px-3 pb-3">{children}</div></details>diff --git a/client/src/components/musicVideo/TreatmentPanel.jsx b/client/src/components/musicVideo/TreatmentPanel.jsxindex d302e8c36d..4acbd89a57 100644--- a/client/src/components/musicVideo/TreatmentPanel.jsx+++ b/client/src/components/musicVideo/TreatmentPanel.jsx@@ -47,7 +47,7 @@ function BeatObjective({ beat, idFor, onSave }) {/** One-line state for the section header: revision, applied state and capability gaps. */export function treatmentSummary(project) {const t = project.treatment;- if (!t) return 'Not started';+ if (!t) return 'Optional · not used';const parts = [`rev ${t.revision}`];if (t.arc) {parts.push(`${t.shotDirections.length} directed ${t.shotDirections.length === 1 ? 'shot' : 'shots'}`);@@ -109,6 +109,9 @@ export default function TreatmentPanel({ project, treatment: api, storyboardApprreturn (<div className="space-y-3">+ <p className="text-xs text-port-text-muted">+ Optional. The brief steers the shot planner, and a compiled arc adds per-shot direction. A board planned without one is complete.+ </p>{storyboardApproved && (<p role="note" className="rounded border border-port-warning/40 bg-port-warning/5 p-2 text-xs text-port-warning">The storyboard is approved. Editing the treatment will need re-approval of the storyboard.diff --git a/client/src/components/musicVideo/TreatmentPanel.test.jsx b/client/src/components/musicVideo/TreatmentPanel.test.jsxindex 284f80ba6a..bda35dc1a5 100644--- a/client/src/components/musicVideo/TreatmentPanel.test.jsx+++ b/client/src/components/musicVideo/TreatmentPanel.test.jsx@@ -264,7 +264,7 @@ describe('TreatmentPanel brief and direction', () => {expect(screen.queryByRole('note')).toBeNull();});it('summarizes revision, applied state and gaps for the section header', () => {- expect(treatmentSummary({})).toBe('Not started');+ expect(treatmentSummary({})).toBe('Optional · not used');expect(treatmentSummary(PROJECT)).toBe('rev 3 · 0 directed shots · not applied · 1 capability gap');});});diff --git a/client/src/components/musicVideo/stages/CastSetsStage.jsx b/client/src/components/musicVideo/stages/CastSetsStage.jsxindex 8da2968037..45307df93c 100644--- a/client/src/components/musicVideo/stages/CastSetsStage.jsx+++ b/client/src/components/musicVideo/stages/CastSetsStage.jsx@@ -12,13 +12,15 @@ import { CAST_CHECKIN_ANCHOR, LOOK_GUIDES_ANCHOR } from '../../../lib/musicVideo// Below the sticky project header when a checklist row scrolls here.const ANCHOR_STYLE = { scrollMarginTop: 'calc(var(--mv-header-h, 9rem) + 1rem)' };-const directionSummary = (project) => {+export const directionSummary = (project) => {const specRefs = (project.visualSpec?.references || []).length;const styleImages = (project.styleReferences || []).length;const characterStyle = project.concept?.characterStyleId? (project.concept.characterStyle?.split(':')[0] || project.concept.characterStyleId) : '';+ // A character style is an optional preset; without one, the cast's own lead is the character.+ const lead = (project.concept?.subjects || []).find((s) => s.role === 'protagonist')?.name;return [- characterStyle ? `Character style: ${characterStyle}` : 'No character style',+ characterStyle ? `Character style: ${characterStyle}` : lead ? `Original character: ${lead}` : null,project.concept?.prompt?.trim() ? 'Concept written' : 'No concept yet',// "Visual", so an empty frame style never reads as a missing song style.project.concept?.style?.trim() ? 'Visual style set' : 'No visual style yet',@@ -27,7 +29,7 @@ const directionSummary = (project) => {...(specRefs ? [`${formatCount(specRefs)} ${specRefs === 1 ? 'reference' : 'references'}`] : []),...(styleImages ? [`${formatCount(styleImages)} style ${styleImages === 1 ? 'image' : 'images'}`] : []),...(specRefs || styleImages ? [] : ['No look references']),- ].join(' · ');+ ].filter(Boolean).join(' · ');};/** Re-read the song style from its Suno link, for a song imported before excluded styles were kept. */diff --git a/client/src/components/musicVideo/stages/CastSetsStage.test.jsx b/client/src/components/musicVideo/stages/CastSetsStage.test.jsxnew file mode 100644index 0000000000..7ab7a1f468--- /dev/null+++ b/client/src/components/musicVideo/stages/CastSetsStage.test.jsx@@ -0,0 +1,12 @@+import { describe, it, expect } from 'vitest';+import { directionSummary } from './CastSetsStage.jsx';++describe('Creative direction summary', () => {+ // Uniquely catches an original cast lead reading as missing data ("No character style").+ it('names the original lead when no character style preset is chosen', () => {+ const concept = { prompt: 'A film editor', style: 'Analog', subjects: [{ name: 'Example lead', role: 'protagonist' }] };+ expect(directionSummary({ concept })).toBe('Original character: Example lead · Concept written · Visual style set · No look references');+ expect(directionSummary({ concept: { ...concept, characterStyleId: 'preset', characterStyle: 'Preset name: details' } })).toMatch(/^Character style: Preset name ·/);+ expect(directionSummary({ concept: { prompt: 'x', style: 'y' } })).toBe('Concept written · Visual style set · No look references');+ });+});