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 shot card's out-of-span action contract as a Render refusal instead of crashing the Board
Claudeea9a5d346f72
diff --git a/client/src/components/musicVideo/SceneRenderInputs.jsx b/client/src/components/musicVideo/SceneRenderInputs.jsxindex d430fce969..54640becd9 100644--- a/client/src/components/musicVideo/SceneRenderInputs.jsx+++ b/client/src/components/musicVideo/SceneRenderInputs.jsx@@ -1,7 +1,7 @@import { getFalVideoModel } from '../../lib/falVideoModels.js';import { AUDIO_REACTIVE_PERFORMANCE_GUARD, silentMotionPrompt } from '../../lib/musicVideoMotion.js';import { approximateMotionCues, falSceneTake } from '../../lib/musicVideoShotTiming.js';-import { shotActionPrompt } from '../../../../server/lib/musicVideoActionContract.js';+import { shotActionContractProblem, shotActionPrompt } from '../../../../server/lib/musicVideoActionContract.js';import { shotCameraPrompt } from '../../../../server/lib/cameraMovements.js';import { localModelTakesSongAudio } from '../../../../server/lib/musicVideoLocalModels.js';import { formatCount } from '../../utils/formatters.js';@@ -23,7 +23,7 @@ const clock = (sec) => {* `settings` is the renderer this render uses (the project's, or the card's* Render on pick merged over it); `inputs` holds the card's toggles,* `{ endFrame, songAudio }`, each undefined until the director flips it.- * Returns `{ prompt, promptUsed, maxChars, endFrame, songAudio }`, where each+ * Returns `{ prompt, promptUsed, maxChars, endFrame, songAudio, contractProblem }`, where each* input is `{ state: 'on' | 'off' | 'required' | 'unavailable', note }`.*/export function shotCardRenderRequest({@@ -46,7 +46,10 @@ export function shotCardRenderRequest({// A take that hears nothing gets its shot actions without the lyric and beat lines it cannot hear.const hears = songAudio.state === 'on' || songAudio.state === 'required';- const actions = project && scene?.direction?.actionContract != null ? shotActionPrompt(project, scene) : '';+ // A saved contract can outgrow its scene (a split piece, a retimed shot); the card shows the problem rather than throwing.+ const contract = scene?.direction?.actionContract;+ const contractProblem = contract != null ? shotActionContractProblem(contract, scene) : null;+ const actions = project && contract != null && !contractProblem ? shotActionPrompt(project, scene) : '';const motionCues = settings.backend === 'grok' ? approximateMotionCues(project?.phrases, scene?.startSec, scene?.endSec) : '';const base = [(scene?.prompt?.trim() || scene?.framePrompt?.trim() || ''), shotCameraPrompt(scene?.camera),hears ? actions : silentMotionPrompt(actions)].filter(Boolean).join('\n');@@ -66,6 +69,7 @@ export function shotCardRenderRequest({maxChars: falModel?.promptMaxChars ?? null,endFrame,songAudio,+ contractProblem,};}@@ -106,5 +110,5 @@ export default function SceneRenderInputs({ id, request, onChange }) {}/** Why the card's Render cannot send this request, or null. */-export const shotCardRequestProblem = (request) => (request.promptUsed && request.maxChars != null && request.prompt.length > request.maxChars+export const shotCardRequestProblem = (request) => request.contractProblem || (request.promptUsed && request.maxChars != null && request.prompt.length > request.maxChars? `The prompt is ${formatCount(request.prompt.length)} characters; this model takes ${formatCount(request.maxChars)}` : null);diff --git a/client/src/components/musicVideo/SceneRenderInputs.test.jsx b/client/src/components/musicVideo/SceneRenderInputs.test.jsxindex cfe10da7b9..f4f268673d 100644--- a/client/src/components/musicVideo/SceneRenderInputs.test.jsx+++ b/client/src/components/musicVideo/SceneRenderInputs.test.jsx@@ -32,6 +32,14 @@ describe('shotCardRenderRequest', () => {expect(request.prompt).toMatch(/No singing, lip-sync/);});+ // Review on #11280: a split piece keeps its parent's longer contract, which must refuse Render, not crash the Board.+ it('reports a contract that outlasts its scene instead of throwing', () => {+ const request = shotCardRenderRequest({ project: { phrases: [] }, settings: { backend: 'grok' }, scene: scene({ startSec: 10, endSec: 12, prompt: 'p',+ direction: { actionContract: { version: 1, purpose: 'x', actions: [{ startSec: 0, endSec: 3, subject: 'A', description: 'walks' }] } } }) });+ expect(request.prompt).toBe('p');+ expect(shotCardRequestProblem(request)).toMatch(/must fit inside its 2.000s scene/);+ });+it('requires the song for a performance shot and flags a prompt over the fal model limit', () => {expect(shotCardRenderRequest({ scene: scene(), performance: true, settings: { backend: 'local' }, models }).songAudio.state).toBe('required');const long = shotCardRenderRequest({ scene: scene({ prompt: 'x'.repeat(2100) }), settings: { backend: 'fal' } });