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
fix: Music Video offers one Resume for an interrupted run, and stops claiming a parked run is making the song
Adam Eivye960c177ccd8
diff --git a/client/src/lib/musicVideoAttention.js b/client/src/lib/musicVideoAttention.jsindex f44145e85c..fa4df71afc 100644--- a/client/src/lib/musicVideoAttention.js+++ b/client/src/lib/musicVideoAttention.js@@ -42,11 +42,14 @@ function sectionProgress(project, revision) {* - `finalRenderAttached` — this tab already shows the final render's progress* - `readiness` — the server's production readiness, for approvals given on* inputs that have changed since (#10141)+ * - `headerAction` — the header's next action (`{ id, runId }`); a parked run+ * it already resumes drops its own Resume so one screen never offers two+ * controls for the same run** Row shape: `{ id, kind, tone, title, detail, … }` plus the ids the action* needs — `revisionId` + `canResume` (revision), `runId` (auto-review).*/-export function deriveAttentionItems(project, { generatingSceneIds = null, draftRendering = false, finalRenderAttached = false, readiness = project?.productionReadiness } = {}) {+export function deriveAttentionItems(project, { generatingSceneIds = null, draftRendering = false, finalRenderAttached = false, readiness = project?.productionReadiness, headerAction = null } = {}) {if (!project) return [];const items = [];const spinning = (sceneId) => !!generatingSceneIds?.has?.(sceneId);@@ -127,7 +130,7 @@ export function deriveAttentionItems(project, { generatingSceneIds = null, draft});}const stale = staleApprovalItem(project, readiness);- return [...items, ...parkedRunItems(project), ...(stale ? [stale] : [])];+ return [...items, ...parkedRunItems(project, headerAction), ...(stale ? [stale] : [])];}// Approvals in the order they are given, with the tab (and editor) each is re-given on.@@ -164,6 +167,8 @@ function staleApprovalItem(project, readiness) {// review, or a halted run. `running` is live work, not a request for the user.const AUTO_REVIEW_PARKED = new Set(['needs-human', 'limit-reached', 'stopped']);const PRODUCTION_PARKED = new Set(['limit-reached', 'needs-human', 'blocked', 'needs-replan']);+// The header next-action ids that resume the autonomous run (see deriveNextAction).+const RESUME_AUTONOMOUS_IDS = new Set(['resume-autonomous', 'retry-autonomous']);const AUTONOMOUS_PARKED = new Set(['awaiting-approval', 'needs-human', 'stopped', 'failed']);/** The newest board-driven auto-review run, when it is parked on the director. Older stopped runs are superseded. */@@ -178,7 +183,7 @@ export const autoReviewNeedsUser = (project) => asList(project?.autoReviews).som// Rows for runs the server holds that nobody is watching: an autonomous run// parked on the director, a production run stopped on a limit, an auto-review// that halted. Each is derived from the saved record, so it survives a reload.-function parkedRunItems(project) {+function parkedRunItems(project, headerAction) {const items = [];const auto = project.autonomousRun;const autoParked = auto && (AUTONOMOUS_PARKED.has(auto.status) || auto.interrupted);@@ -192,7 +197,7 @@ function parkedRunItems(project) {title: awaiting ? 'An autonomous run is waiting for your approval' : auto.status === 'failed' ? 'An autonomous run failed' : 'An autonomous run needs you',detail: interrupted ? 'A restart interrupted it. Resume to continue from where it left off.' : describeAutonomousWait(project.name || 'This video', auto),projectId: project.id,- canResume: !awaiting,+ canResume: !awaiting && !RESUME_AUTONOMOUS_IDS.has(headerAction?.id),resumeLabel: auto.status === 'failed' ? 'Retry' : 'Resume',// The run's log and its checkpoint editor live in Project settings › Autopilot.openTo: `${auto.stage === 'produce' ? 'produce' : 'setup'}?mvPanel=autopilot${awaiting ? '#mv-auto-edit' : ''}`,@@ -212,7 +217,7 @@ function parkedRunItems(project) {projectId: project.id,runId: production.id,// Same exits as the header's next action; the run's controls are in Project settings › Autopilot.- canResume: RESUMABLE_RUN_STATUSES.has(production.status),+ canResume: RESUMABLE_RUN_STATUSES.has(production.status) && !(headerAction?.id === 'resume-production' && headerAction.runId === production.id),acceptBasis: production.status === 'needs-replan',openTo: 'produce?mvPanel=autopilot',});diff --git a/client/src/lib/musicVideoAttention.test.js b/client/src/lib/musicVideoAttention.test.jsindex 264481a4fd..478b43efb4 100644--- a/client/src/lib/musicVideoAttention.test.js+++ b/client/src/lib/musicVideoAttention.test.js@@ -132,6 +132,19 @@ describe('parked runs (#10156)', () => {expect(failed[0]).toMatchObject({ canResume: true, resumeLabel: 'Retry', openTo: 'produce?mvPanel=autopilot' });});+ it('drops the row\'s Resume when the header\'s next action already resumes that run, keeping Open', () => {+ const interrupted = project({ autonomousRun: { id: 'a', status: 'running', interrupted: true, stage: 'song' } });+ expect(deriveAttentionItems(interrupted)[0]).toMatchObject({ canResume: true });+ expect(deriveAttentionItems(interrupted, { headerAction: { id: 'resume-autonomous' } })[0]).toMatchObject({ kind: 'autonomous', canResume: false, openTo: 'setup?mvPanel=autopilot' });+ const failed = project({ autonomousRun: { id: 'a', status: 'failed', stage: 'produce' } });+ expect(deriveAttentionItems(failed, { headerAction: { id: 'retry-autonomous' } })[0].canResume).toBe(false);+ // A different header action (e.g. reviewing an imported draft) leaves the row's Resume in place.+ expect(deriveAttentionItems(interrupted, { headerAction: { id: 'review-imported' } })[0].canResume).toBe(true);+ const production = project({ productionRuns: [{ id: 'prod-1', status: 'limit-reached' }] });+ expect(deriveAttentionItems(production, { headerAction: { id: 'resume-production', runId: 'prod-1' } })[0].canResume).toBe(false);+ expect(deriveAttentionItems(production, { headerAction: { id: 'resume-production', runId: 'other' } })[0].canResume).toBe(true);+ });+it('lists a stopped or limit-reached auto-review but not older superseded or healthy ones', () => {const limit = deriveAttentionItems(project({ autoReviews: [run({ id: 'ar-1', status: 'limit-reached', stopReason: 'Reached the limit' })] }));expect(limit).toEqual([expect.objectContaining({ kind: 'auto-review-parked', runId: 'ar-1', canResume: false, openTo: 'review', detail: 'Reached the limit' })]);diff --git a/client/src/lib/musicVideoStages.js b/client/src/lib/musicVideoStages.jsindex a50000ef58..e5a34b783e 100644--- a/client/src/lib/musicVideoStages.js+++ b/client/src/lib/musicVideoStages.js@@ -574,11 +574,16 @@ export function stageChecklist(stageId, project, readiness = project?.productionswitch (stageId) {case 'setup': {// An autonomous run that is still going writes the song itself.- const autoSong = !!project.autonomousRun && !['completed', 'canceled', 'failed'].includes(project.autonomousRun.status);+ const auto = project.autonomousRun;+ const autoSong = !!auto && !['completed', 'canceled', 'failed'].includes(auto.status);+ // A parked run is not writing anything; say so instead of claiming it is.+ const autoSongDetail = auto?.status === 'awaiting-approval' ? 'The autonomous run is waiting for your approval.'+ : auto?.interrupted || auto?.status !== 'running' ? 'The autonomous run is paused. Resume it to make the song.'+ : 'The autonomous run is making the song.';const hasAudio = projectHasAudio(project);const lyrics = lyricSetupState(project, readiness);return [- { id: 'track', label: 'Track attached', done: hasAudio, detail: !hasAudio && autoSong ? 'The autonomous run is making the song.' : null,+ { id: 'track', label: 'Track attached', done: hasAudio, detail: !hasAudio && autoSong ? autoSongDetail : null,action: hasAudio || autoSong ? null : { label: 'Attach a track', anchor: 'mv-track' } },{ id: 'analysis', label: 'Song analyzed', done: !!project.audioAnalysis,action: project.audioAnalysis ? null : { label: 'Analyze', anchor: 'mv-analyze' } },diff --git a/client/src/lib/musicVideoStages.test.js b/client/src/lib/musicVideoStages.test.jsindex e7b7760728..6a36061993 100644--- a/client/src/lib/musicVideoStages.test.js+++ b/client/src/lib/musicVideoStages.test.js@@ -435,6 +435,10 @@ describe('stageChecklist', () => {expect(stageChecklist('setup', { id: 'p' })[0].action).toEqual({ label: 'Attach a track', anchor: 'mv-track' });// A running autonomous run writes the song itself, so there is nothing to attach.expect(stageChecklist('setup', { id: 'p', autonomousRun: { status: 'running' } })[0]).toMatchObject({ action: null, detail: 'The autonomous run is making the song.' });+ // A parked run is not making anything; the row says to resume it instead.+ expect(stageChecklist('setup', { id: 'p', autonomousRun: { status: 'running', interrupted: true } })[0]).toMatchObject({ action: null, detail: 'The autonomous run is paused. Resume it to make the song.' });+ expect(stageChecklist('setup', { id: 'p', autonomousRun: { status: 'stopped' } })[0].detail).toBe('The autonomous run is paused. Resume it to make the song.');+ expect(stageChecklist('setup', { id: 'p', autonomousRun: { status: 'awaiting-approval' } })[0].detail).toBe('The autonomous run is waiting for your approval.');expect(stageChecklist('board', castProject({ scenes: [scene()] }), NOT_APPROVED).map((i) => [i.id, i.done])).toEqual([['shots', true], ['board-art', false], ['approve-storyboard', false]]);expect(stageChecklist('produce', castProject({ scenes: [scene(), scene({ sceneId: 's2', videoHistoryId: null })] }), APPROVED)[0])diff --git a/client/src/pages/MusicVideo.jsx b/client/src/pages/MusicVideo.jsxindex fd5f1e1f6c..dac13497a7 100644--- a/client/src/pages/MusicVideo.jsx+++ b/client/src/pages/MusicVideo.jsx@@ -1028,6 +1028,7 @@ export default function MusicVideo() {draftRendering: excerpts.rendering,finalRenderAttached: renderTargetsSelected,readiness: productionReview.readiness,+ headerAction: nextAction,}) : [];const runNextAction = () => {if (!selected || !nextAction || nextAction.disabled || compositionSavePending > 0) return;