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 locked still and image-effect shots as done in the Footage strip (#11402)
[._.]/f909a2ca4647
diff --git a/client/src/components/musicVideo/ShotStatusStrip.jsx b/client/src/components/musicVideo/ShotStatusStrip.jsxindex 3d5ed6c3d7..85e37eab84 100644--- a/client/src/components/musicVideo/ShotStatusStrip.jsx+++ b/client/src/components/musicVideo/ShotStatusStrip.jsx@@ -1,14 +1,20 @@+import { useContext } from 'react';import { Link } from 'react-router';+import { ShotLockContext, overallShotLock } from './ShotLock.jsx';import { SCENE_ATTENTION_LABELS, sceneAttention } from '../../lib/musicVideoSceneAttention.js';/*** One compact cell per shot, from the same `sceneAttention` answer the Board's* scene rows use: green when nothing needs doing, amber otherwise, with the- * reasons in the tooltip. Each cell opens that scene on the Storyboard.+ * reasons in the tooltip. Each cell opens that scene on the Storyboard. A+ * locked shot is settled, as on the Board: its other takes are not waiting.*/export default function ShotStatusStrip({ projectId, scenes, ctx }) {+ const lockValue = useContext(ShotLockContext);if (!scenes?.length) return null;- const cells = scenes.map((scene) => ({ scene, codes: sceneAttention(scene, ctx) }));+ const locked = (scene) => !!lockValue?.locks?.[scene.sceneId]+ && overallShotLock(lockValue.locks[scene.sceneId], lockValue.clips?.[scene.sceneId]) === 'locked';+ const cells = scenes.map((scene) => ({ scene, codes: sceneAttention(scene, { ...ctx, locked: locked(scene) }) }));return (<ul aria-label="Shot status" className="flex flex-wrap gap-1">{cells.map(({ scene, codes }) => {diff --git a/client/src/components/musicVideo/ShotStatusStrip.test.jsx b/client/src/components/musicVideo/ShotStatusStrip.test.jsxnew file mode 100644index 0000000000..ef81ff33d0--- /dev/null+++ b/client/src/components/musicVideo/ShotStatusStrip.test.jsx@@ -0,0 +1,24 @@+import { describe, expect, it } from 'vitest';+import { render, screen } from '@testing-library/react';+import { MemoryRouter } from 'react-router';+import ShotStatusStrip from './ShotStatusStrip.jsx';+import { ShotLockContext } from './ShotLock.jsx';++// Uniquely catches the Footage strip flagging a locked shot's leftover takes, which the Board treats as settled.+describe('ShotStatusStrip', () => {+ it('shows a locked shot as ready though its other takes were never decided', () => {+ const scene = { sceneId: 's1', order: 12, referenceImageId: 'f.png', visualLayer: 'still', imageEffect: 'flash-develop', startSec: 0, endSec: 3,+ takes: [{ takeId: 'i2', kind: 'image', assetId: 'g.png', status: 'candidate' }] };+ const strip = (locks) => (+ <MemoryRouter>+ <ShotLockContext.Provider value={{ locks, clips: { s1: null }, toggle: () => {} }}>+ <ShotStatusStrip projectId="mv-1" scenes={[scene]} ctx={{ layered: true }} />+ </ShotLockContext.Provider>+ </MemoryRouter>+ );+ const { rerender } = render(strip({ s1: 'open' }));+ expect(screen.getByRole('link', { name: /Scene 13/ }).dataset.status).toBe('attention');+ rerender(strip({ s1: 'locked' }));+ expect(screen.getByRole('link', { name: /Scene 13/ }).dataset.status).toBe('ready');+ });+});diff --git a/client/src/lib/musicVideoSceneAttention.js b/client/src/lib/musicVideoSceneAttention.jsindex 959aab48d3..61fd132074 100644--- a/client/src/lib/musicVideoSceneAttention.js+++ b/client/src/lib/musicVideoSceneAttention.js@@ -8,6 +8,7 @@*/import { shotActionContractProblem } from '../../../server/lib/musicVideoActionContract.js';import { currentPlateEvidence } from '../../../server/lib/musicVideoPlateEvidence.js';+import { isEndFrameImageEffect } from './musicVideoImageEffects.js';import { isSelfDrawnLayer, sceneVisualLayer, sceneHasAuthoredSpan } from './musicVideoLayers.js';import { performanceBlockedReason, performanceCapability, planPerformanceWindow, isPerformanceScene } from './musicVideoShotTiming.js';import { sceneHasPendingDecision, sceneTakeList } from './musicVideoTakes.js';@@ -38,6 +39,17 @@ export const SCENE_MISSING_CODES = Object.freeze(['missing-frame', 'missing-clipexport const SCENE_FILTERS = Object.freeze(['all', 'attention', 'missing']);+/**+ * The take slots a shot's picture uses: footage all of them, a still its frame+ * (and its end frame for an image effect that plays into it), a card or code+ * shot none. Takes left in a slot the shot does not use are not waiting on review.+ */+function takeKindsInUse(scene, layer) {+ if (layer === 'footage') return undefined;+ if (layer !== 'still') return [];+ return isEndFrameImageEffect(scene.imageEffect) ? ['image', 'endImage'] : ['image'];+}+/** The `?scenes=` value as a filter id; anything unknown is `all`. */export const parseSceneFilter = (value) => (SCENE_FILTERS.includes(value) ? value : 'all');@@ -76,7 +88,7 @@ export function sceneAttention(scene, ctx = {}) {const contract = scene.direction?.actionContract;if (contract && shotActionContractProblem(contract, scene)) codes.push('contract-problem');if (layer === 'footage' && isPerformanceScene(scene) && performanceBlocked(scene, { lipSyncBackend, songDurationSec, videoSettings })) codes.push('perf-blocked');- if (!locked && sceneHasPendingDecision(scene)) codes.push('candidates-pending');+ if (!locked && sceneHasPendingDecision(scene, { kinds: takeKindsInUse(scene, layer) })) codes.push('candidates-pending');if (contract && scene.referenceImageId) {const selected = sceneTakeList(scene, 'image').find((take) => take.assetId === scene.referenceImageId);if (currentPlateEvidence(scene, selected)?.verdict !== 'pass') codes.push('plate-unverified');diff --git a/client/src/lib/musicVideoSceneAttention.test.js b/client/src/lib/musicVideoSceneAttention.test.jsindex 6c3583c32d..2d77da9c57 100644--- a/client/src/lib/musicVideoSceneAttention.test.js+++ b/client/src/lib/musicVideoSceneAttention.test.js@@ -42,6 +42,16 @@ describe('sceneAttention', () => {takes: [{ takeId: 't1', kind: 'image', assetId: 'f.png', status: 'selected' }] };expect(sceneAttention(withIntent)).toContain('plate-unverified');});++ // Uniquely catches a still or image-effect shot waiting on clip takes it no longer uses.+ it('only reviews the takes a still shot uses', () => {+ const still = { ...ready, videoHistoryId: null, visualLayer: 'still', imageEffect: 'flash-develop',+ takes: [{ takeId: 'v2', kind: 'video', assetId: 'old', status: 'candidate' }, { takeId: 'e1', kind: 'endImage', assetId: 'e.png', status: 'candidate' }] };+ expect(sceneAttention(still, { layered: true })).toEqual([]);+ expect(sceneAttention({ ...still, imageEffect: 'end-fade' }, { layered: true })).toEqual(['candidates-pending']);+ expect(sceneAttention({ ...still, takes: [...still.takes, { takeId: 'i2', kind: 'image', assetId: 'g.png', status: 'candidate' }] }, { layered: true }))+ .toEqual(['candidates-pending']);+ });});describe('scene filters', () => {diff --git a/client/src/lib/musicVideoTakes.js b/client/src/lib/musicVideoTakes.jsindex e9c7aff6d3..858ff2b1ba 100644--- a/client/src/lib/musicVideoTakes.js+++ b/client/src/lib/musicVideoTakes.js@@ -32,9 +32,12 @@ export const takeThumbUrl = (take) => (take.kind !== 'video'/** Playable clip URL for a video take (hover/focus preview). */export const takeClipUrl = (take) => `/data/videos/${encodeURIComponent(take.assetId)}.mp4`;-/** Scenes whose slot still has an undecided candidate (a candidate that is not the selection). */-export function sceneHasPendingDecision(scene) {- return Object.keys(TAKE_SLOT).some((kind) => {+/**+ * Scenes whose slot still has an undecided candidate (a candidate that is not+ * the selection). `kinds` limits it to the slots the shot uses.+ */+export function sceneHasPendingDecision(scene, { kinds = Object.keys(TAKE_SLOT) } = {}) {+ return kinds.some((kind) => {const selected = scene?.[TAKE_SLOT[kind]] || null;return sceneTakeList(scene, kind).some((t) => t.takeId && t.status === 'candidate' && t.assetId !== selected);});