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
Merge main into end-frame branch
Claudea4f53f93c950
diff --cc client/src/components/musicVideo/SceneCard.jsxindex ecb97280ac,e6a6c3062e..5955a9be01--- a/client/src/components/musicVideo/SceneCard.jsx+++ b/client/src/components/musicVideo/SceneCard.jsx@@@ -177,6 -215,18 +215,18 @@@ export default function SceneCard(else onGenerateVideo?.(scene);};const renderCost = performance ? performanceCost : timing.falCost;+ // A footage shot's start and end frames show as a pair; the end frame is optional.+ const endFrames = Boolean(onGenerateEndFrame) && layer === 'footage';- const endFramePlan = sceneEndFramePlanFor(scene, renderSettings || {});++ const endFramePlan = sceneEndFramePlanFor(scene, renderSettings || {}, { models: videoModels, defaultModel: defaultVideoModel });+ const shotModeValue = performance ? (scene.performanceStyle === 'music' ? 'music' : 'performance') : 'cutaway';+ // The collapsed Shot settings row says what is set, so it rarely needs opening.+ const settingsSummary = [+ layer === 'footage' ? SHOT_MODE_LABELS[shotModeValue] : LAYER_LABELS[layer],+ typeof scene.startSec === 'number' && typeof scene.endSec === 'number' ? `${scene.startSec.toFixed(2)}–${scene.endSec.toFixed(2)}s` : null,+ scene.beatAligned ? 'beat-aligned' : null,+ layer === 'footage' && loops && !performance ? 'loops' : null,+ scene.camera?.move ? `camera ${scene.camera.move}` : null,+ ].filter(Boolean).join(' · ');const promptField = (<textareaaria-label="Shot prompt"diff --cc client/src/components/musicVideo/SceneCard.test.jsxindex 394017aa9b,7151b25b7d..f006dc2c8c--- a/client/src/components/musicVideo/SceneCard.test.jsx+++ b/client/src/components/musicVideo/SceneCard.test.jsx@@@ -340,3 -347,24 +347,24 @@@ describe('Render follows the shot locksexpect(onGenerateVideo).toHaveBeenCalledWith(scene);});});++ describe('start and end frames', () => {+ // Uniquely catches the end frame hiding behind a collapsed row, losing its own actions, or the Render section not saying which renderer ends on it.+ it('shows the start and end frames as a pair, works on the tapped one, and says which renderer ends on the end frame', () => {+ const scene = { sceneId: 's1', prompt: 'She looks into the lens', referenceImageId: 'start.png', endImageId: 'end.png', startSec: 0, endSec: 4,+ takes: [{ takeId: 't1', kind: 'image', assetId: 'start.png', status: 'selected' }, { takeId: 't2', kind: 'endImage', assetId: 'end.png', status: 'selected' }] };+ render(<SceneCard scene={scene} index={0} expanded onEditLocal={() => {}} onSave={() => {}} onGenerateEndFrame={() => {}} onPlacePoolItem={() => {}}+ falVideoSettings={{ backend: 'local' }} />);+ const pair = screen.getByRole('group', { name: 'Start and end frames' });+ expect(within(pair).getByRole('button', { name: 'Start frame' }).getAttribute('aria-pressed')).toBe('true');+ expect(screen.queryByLabelText('End frame prompt')).toBeNull();+ fireEvent.click(within(pair).getByRole('button', { name: 'End frame' }));+ expect(screen.getByLabelText('End frame prompt')).toBeTruthy();+ expect(screen.getByRole('button', { name: 'Clear scene 1 end frame' })).toBeTruthy();- expect(screen.getByTestId('end-frame-plan').textContent).toMatch(/ignores it/);++ expect(screen.getByTestId('end-frame-plan').textContent).toMatch(/animates from the start frame only/);+ const pick = screen.getByLabelText('Render on');+ expect(within(pick).getByRole('option', { name: /Kling v3 Pro.*ends on end frame/ })).toBeTruthy();+ fireEvent.change(pick, { target: { value: 'fal:fal-ai/kling-video/v3/pro/image-to-video' } });+ expect(screen.getByTestId('end-frame-plan').textContent).toBe('The clip ends on the end frame.');+ });+ });diff --cc client/src/components/musicVideo/SceneEndFrame.jsxindex a45d5d11ca,c4d67f7146..efce6a55d4--- a/client/src/components/musicVideo/SceneEndFrame.jsx+++ b/client/src/components/musicVideo/SceneEndFrame.jsx@@@ -1,15 -1,29 +1,34 @@@- import { Activity, Wand2, X } from 'lucide-react';+ import { Activity, Shuffle, Wand2, X } from 'lucide-react';import SceneTakeStrip from './SceneTakeStrip.jsx';import { sceneEndFramePlan } from '../../../../server/lib/musicVideoEndFrame.js';+ import { falSceneTake } from '../../lib/musicVideoShotTiming.js';++ const BUTTON = 'flex items-center gap-1 bg-port-bg border border-port-border hover:bg-port-border/40 disabled:opacity-50 rounded px-2 py-1.5 text-xs min-h-[44px] sm:min-h-0 whitespace-nowrap';++ /**+ * Whether a clip rendered with `settings` (the project's saved renderer, or a+ * scene card's Render on pick merged over it) ends on the scene's end frame:+ * the same model the clip request is built with (useMusicVideoSceneMedia- * generateSceneVideo), so a saved end-frame upgrade model counts.++ * generateSceneVideo), so a saved end-frame upgrade model counts. A local++ * clip's model (the pick, else the install default) decides whether it renders++ * first+last frame (#11258).+ */-export function sceneEndFramePlanFor(scene, settings = {}) {++export function sceneEndFramePlanFor(scene, settings = {}, { models = [], defaultModel = '' } = {}) {+ const mode = settings.generationMode === 'suppliedAudio' || (settings.backend === 'local' && settings.generationMode === 'audioReactive') ? 'a2v' : 'image';+ const falModelId = settings.backend === 'fal' ? falSceneTake({ scene, videoSettings: settings }).modelId : null;- return sceneEndFramePlan(scene, { backend: settings.backend || null, falModelId, mode });++ const localRuntime = settings.backend === 'local'++ ? models.find((model) => model.id === (settings.modelId || defaultModel))?.runtime ?? null++ : null;++ return sceneEndFramePlan(scene, { backend: settings.backend || null, falModelId, mode, localRuntime });+ }/**- * A scene's optional style-break end frame (#11173): a still the clip moves- * into from its photographic start frame, such as a pencil-sketch rotoscope or- * a magazine-cutout collage. The director describes it, renders it from the- * selected start frame, and picks among its takes like any frame. A fal clip on- * a model that takes an end frame ends on it, and so does a local LTX clip- * (`localVideoRuntime`, the local model's runtime); the note says when the- * current renderer will ignore it.+ * A shot's end frame (#11173): the still its clip moves into from the start+ * frame, such as her head thrown back for a possession beat, or a pencil-sketch+ * rotoscope of the same frame. The director describes it and renders it from+ * the start frame, swaps one in from the unused stills, and picks among its+ * takes like any frame. Only renderers that take an end frame use it; the+ * Render section says whether the current pick does.*/export default function SceneEndFrame({scene, index, generating = false, onGenerate, onEditLocal, onSave, onOpenPreview,diff --cc client/src/components/musicVideo/SceneEndFrame.test.jsxindex 68fd5c2049,0000000000..7c8f8a9795mode 100644,000000..100644--- a/client/src/components/musicVideo/SceneEndFrame.test.jsx+++ b/client/src/components/musicVideo/SceneEndFrame.test.jsx@@@ -1,23 -1,0 +1,24 @@@+import { describe, expect, it } from 'vitest';- import { render, screen } from '@testing-library/react';- import SceneEndFrame from './SceneEndFrame.jsx';++import { sceneEndFramePlanFor } from './SceneEndFrame.jsx';++const scene = { sceneId: 's1', referenceImageId: 'start.png', endImageId: 'end.png', endFramePrompt: 'head thrown back' };- const renderFor = (localVideoRuntime) => render(- <SceneEndFrame scene={scene} index={0} onEditLocal={() => {}} onSave={() => {}}- videoSettings={{ backend: 'local' }} localVideoRuntime={localVideoRuntime} />,- );++const models = [{ id: 'ltx25_example', runtime: 'ltx25' }, { id: 'fast_example', runtime: 'fastmetal' }];+- // Uniquely catches the card telling the director a local LTX clip ignores the- // end frame it now renders to (#11258), or promising it on a one-frame model.- describe('SceneEndFrame on the local renderer', () => {- it('says a local LTX clip ends on the end frame', () => {- renderFor('ltx25');- expect(screen.getByText('The clip ends on this frame.')).toBeInTheDocument();++// Uniquely catches the Render section telling the director a local LTX clip++// ignores the end frame it now renders to (#11258), or promising it on a++// one-frame model, for both a card pick and the install default.++describe('sceneEndFramePlanFor on the local renderer', () => {++ it('uses the end frame on a local LTX pick', () => {++ expect(sceneEndFramePlanFor(scene, { backend: 'local', modelId: 'ltx25_example' }, { models }).used).toBe(true);++ });++++ it('falls back to the default local model', () => {++ expect(sceneEndFramePlanFor(scene, { backend: 'local' }, { models, defaultModel: 'ltx25_example' }).used).toBe(true);+ });++ it('warns that a single-frame local model ignores it', () => {- renderFor('fastmetal');- expect(screen.getByText(/animates from the start frame only/)).toBeInTheDocument();++ const plan = sceneEndFramePlanFor(scene, { backend: 'local', modelId: 'fast_example' }, { models });++ expect(plan.used).toBe(false);++ expect(plan.reason).toMatch(/animates from the start frame only/);+ });+});diff --cc client/src/hooks/useMusicVideoSceneMedia.jsindex b263e6ab17,1ade044f77..7b4187dbdf--- a/client/src/hooks/useMusicVideoSceneMedia.js+++ b/client/src/hooks/useMusicVideoSceneMedia.js@@@ -401,11 -403,8 +403,12 @@@ export default function useMusicVideoSc: { grokDuration: settings.grokDuration, disableAudio: true }),mode,sourceImageFile: scene.referenceImageId,- // A style-break end frame (#11173), when this fal model takes one.- ...sceneEndFrameRequestFields(scene, { backend: settings.backend, falModelId: falFields?.falModelId, mode }),+ // A style-break end frame (#11173), when this fal or local model takes one+ // (a local LTX clip then renders first+last frame, #11258).+ ...sceneEndFrameRequestFields(scene, {- backend: settings.backend, falModelId: falFields?.falModelId, mode, localRuntime: videoSettings.activeModel?.runtime ?? null,++ backend: settings.backend, falModelId: falFields?.falModelId, mode, // A card's local pick names its own model; else the active one.++ localRuntime: (target?.modelId ? (videoSettings.models || []).find((m) => m.id === target.modelId)?.runtime : videoSettings.activeModel?.runtime) ?? null,+ }),...(audioReactiveSelected ? {audioStartSec: scene.startSec || 0,loraFilenames: [detectedAudioReactiveLora.filename],