Skip to content

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

Music video: rejecting a take from a shot no longer marks it bad (#11442)

[._.]/f45782045c31
diff --git a/client/src/components/musicVideo/SceneCard.jsx b/client/src/components/musicVideo/SceneCard.jsx
index a7a5e94802..c5a7b62112 100644
--- a/client/src/components/musicVideo/SceneCard.jsx
+++ b/client/src/components/musicVideo/SceneCard.jsx
@@ -115,7 +115,7 @@ export default function SceneCard({
settingsSaving, videoBlockedReason, videoBlockedReasonFor = null, canContinueShot,
onMove, onDelete, onEditLocal, onSave,
project = null, onGenerateFrame, onGenerateVideo, onContinueVideo, onGenerateEndFrame, generatingEndFrame = false, onContinueFromPrevious, previousHasClip = false,
- onOpenPreview, onSelectTake, onReviewTake, onRejectUnusedTakes = null, onSwapFrames = null, onImportTake, onImportClipTake, onPlacePoolItem, onTrimClip, projectId = null, aspect = '16:9', videoModels = [], defaultVideoModel = '', shotNumbers = undefined, takeBusy = false, layered = false, documentComposition = false,
+ onOpenPreview, onSelectTake, onReviewTake, onRejectUnusedTakes = null, onSwapFrames = null, onMarkTake = null, onImportTake, onImportClipTake, onPlacePoolItem, onTrimClip, projectId = null, aspect = '16:9', videoModels = [], defaultVideoModel = '', shotNumbers = undefined, takeBusy = false, layered = false, documentComposition = false,
lipSyncBackend = '', songDurationSec = null, onSplit, onMergeNext, onMoveStart = null, nextEndSec = null, falVideoSettings = null, onSeek, performanceReview = null, onRepairPerformance, repairBusy = false,
expanded, onToggleExpand, footageOptional = false, failedScenes = null, songReview = null,
}) {
@@ -492,7 +492,7 @@ export default function SceneCard({
onOpenPreview={onOpenPreview} takeBusy={takeBusy} onSelectTake={onSelectTake} onReviewTake={onReviewTake}
onSwap={onPlacePoolItem ? setSwapKind : null} onSwapFrames={onSwapFrames ? () => onSwapFrames(scene) : null} onImportTake={onImportTake}
onContinueFromPrevious={layer === 'footage' && index > 0 ? onContinueFromPrevious : null} previousHasClip={previousHasClip}
- clipLocked={shotLock?.clip === 'locked'} />
+ clipLocked={shotLock?.clip === 'locked'} assetMarks={project?.assetMarks} onMarkTake={onMarkTake} />
{/* Clip: the motion prompt, where this shot renders and what it costs, then its clip (Phase 1). */}
<section aria-label="Render" className="min-w-0 space-y-2">
<h4 className="text-xs font-medium">Clip</h4>
@@ -631,7 +631,7 @@ export default function SceneCard({
<SceneTakeStrip scene={scene} kind="video" busy={takeBusy} grid
onSelect={(take) => onSelectTake?.(scene, take)}
onReview={(take, review) => onReviewTake?.(scene, take, review)}
- onOpenPreview={onOpenPreview} />
+ onOpenPreview={onOpenPreview} marks={project?.assetMarks} onMark={onMarkTake} />
</>
)}
{/* The render's settings sit with the render: what it covers and costs, then timing, shot mode and layer. */}
diff --git a/client/src/components/musicVideo/SceneCard.test.jsx b/client/src/components/musicVideo/SceneCard.test.jsx
index c8306da241..8e0337ba8a 100644
--- a/client/src/components/musicVideo/SceneCard.test.jsx
+++ b/client/src/components/musicVideo/SceneCard.test.jsx
@@ -660,7 +660,7 @@ describe('finalizing a shot\'s takes', () => {
expect(screen.getAllByText('In use').length).toBeGreaterThanOrEqual(2);
fireEvent.click(screen.getByRole('button', { name: 'Reject unused (2)' }));
expect(onRejectUnusedTakes).not.toHaveBeenCalled();
- expect(screen.getByText('Reject 2 unused takes? The files stay.')).toBeTruthy();
+ expect(screen.getByText('Reject 2 unused takes from this shot? Other shots can still use them.')).toBeTruthy();
fireEvent.click(screen.getByRole('button', { name: 'Reject 2' }));
expect(onRejectUnusedTakes).toHaveBeenCalledWith(scene);
expect(screen.queryByRole('button', { name: 'Reject 2' })).toBeNull();
diff --git a/client/src/components/musicVideo/SceneFrames.jsx b/client/src/components/musicVideo/SceneFrames.jsx
index d60d1505c6..e2290554bd 100644
--- a/client/src/components/musicVideo/SceneFrames.jsx
+++ b/client/src/components/musicVideo/SceneFrames.jsx
@@ -63,7 +63,7 @@ const REFERENCE_LABELS = { '': 'Prompt only', start: 'Start frame', end: 'End fr
export default function SceneFrames({
scene, index, endFrames, generatingFrame = false, generatingEndFrame = false, onGenerateFrame, onGenerateEndFrame,
onEditLocal, onSave, onOpenPreview, takeBusy = false, onSelectTake, onReviewTake, onSwap = null, onImportTake = null,
- onContinueFromPrevious = null, previousHasClip = false, clipLocked = false, onSwapFrames = null,
+ onContinueFromPrevious = null, previousHasClip = false, clipLocked = false, onSwapFrames = null, assetMarks = null, onMarkTake = null,
}) {
const [keepStillAsEnd, setKeepStillAsEnd] = useState(false);
// Which frame each render starts from: the start frame renders from its prompt, the end frame from the start frame.
@@ -176,7 +176,7 @@ export default function SceneFrames({
<SceneTakeStrip scene={scene} kind={start ? 'image' : 'endImage'} busy={takeBusy} grid
onSelect={(take) => onSelectTake?.(scene, take)}
onReview={(take, review) => onReviewTake?.(scene, take, review)}
- onOpenPreview={onOpenPreview} />
+ onOpenPreview={onOpenPreview} marks={assetMarks} onMark={onMarkTake} />
</div>
);
};
diff --git a/client/src/components/musicVideo/SceneRejectUnused.jsx b/client/src/components/musicVideo/SceneRejectUnused.jsx
index 17db462518..f9c517be6b 100644
--- a/client/src/components/musicVideo/SceneRejectUnused.jsx
+++ b/client/src/components/musicVideo/SceneRejectUnused.jsx
@@ -10,7 +10,8 @@ export const unusedTakeCount = (scene) => (Array.isArray(scene?.takes) ? scene.t
/**
* Finalize a shot's takes: one tap, then a confirm, rejects every take that is
- * not in use. The files stay and Use or Restore brings any back.
+ * not in use from this shot. That is not a bad mark: the files stay, other
+ * shots can still swap them in, and Use or Restore brings any back.
*/
export default function SceneRejectUnused({ scene, busy = false, onReject }) {
const [confirming, setConfirming] = useState(false);
@@ -21,7 +22,7 @@ export default function SceneRejectUnused({ scene, busy = false, onReject }) {
<div className="flex flex-wrap items-center gap-2 text-xs">
{confirming ? (
<>
- <span className="text-port-text-muted">Reject {takes}? The files stay.</span>
+ <span className="text-port-text-muted">Reject {takes} from this shot? Other shots can still use them.</span>
<button type="button" disabled={busy} onClick={() => { setConfirming(false); onReject(scene); }}
className={`${BTN} bg-port-error/20 text-port-error`}>
<X size={12} aria-hidden="true" /> Reject {count}
@@ -30,7 +31,7 @@ export default function SceneRejectUnused({ scene, busy = false, onReject }) {
</>
) : (
<button type="button" disabled={busy} onClick={() => setConfirming(true)}
- className={`${BTN} border border-port-border`} title="Keep only the frames and clip in use">
+ className={`${BTN} border border-port-border`} title="Keep only the frames and clip in use on this shot; the rest stay available to other shots">
<X size={12} aria-hidden="true" /> Reject unused ({count})
</button>
)}
diff --git a/client/src/components/musicVideo/SceneTakePicker.jsx b/client/src/components/musicVideo/SceneTakePicker.jsx
index 24b4aeaf98..95a0f638be 100644
--- a/client/src/components/musicVideo/SceneTakePicker.jsx
+++ b/client/src/components/musicVideo/SceneTakePicker.jsx
@@ -109,13 +109,12 @@ export default function SceneTakePicker({ open, onClose, projectId, scene, kind,
.then((placed) => { if (placed !== false) onClose?.(); });
const run = (work) => { setWorking(true); setError(null); return work().catch((err) => setError(err?.message || 'That did not work')).finally(() => setWorking(false)); };
- // Tapping the active mark clears it; a rejected take then reads as bad again, as the server sees it.
+ // Tapping the active mark clears it.
const toggleMark = (mark) => run(async () => {
const next = picked.mark === mark ? null : mark;
await markMusicVideoPoolAssets(projectId, [{ kind: picked.kind, assetId: picked.assetId }], next, { silent: true });
- const display = next || (picked.takeStatus === 'rejected' ? 'bad' : null);
- setPool((prev) => prev.map((item) => (poolKey(item) === poolKey(picked) ? { ...item, mark: display } : item)));
- setPicked((prev) => ({ ...prev, mark: display }));
+ setPool((prev) => prev.map((item) => (poolKey(item) === poolKey(picked) ? { ...item, mark: next } : item)));
+ setPicked((prev) => ({ ...prev, mark: next }));
});
const remove = (targets) => run(async () => {
await deleteMusicVideoPoolAssets(projectId, targets.map(({ kind: k, assetId }) => ({ kind: k, assetId })), { silent: true });
diff --git a/client/src/components/musicVideo/SceneTakeStrip.jsx b/client/src/components/musicVideo/SceneTakeStrip.jsx
index 71e2534b56..4254dd2b25 100644
--- a/client/src/components/musicVideo/SceneTakeStrip.jsx
+++ b/client/src/components/musicVideo/SceneTakeStrip.jsx
@@ -1,9 +1,11 @@
import { useState } from 'react';
-import { Check, RotateCcw, X, MessageSquare } from 'lucide-react';
+import { Ban, Check, RotateCcw, X, MessageSquare } from 'lucide-react';
import { sceneTakeList, takePreviewKey, takeThumbUrl, takeClipUrl, takeProvenance, TAKE_SLOT } from '../../lib/musicVideoTakes.js';
import { plateVerdict } from './PlateComparison.jsx';
const VERDICT_TONE = { pass: 'bg-port-success/20 text-port-success', fail: 'bg-port-error/20 text-port-error', unverified: 'bg-port-warning/20 text-port-warning' };
+// The project's asset marks are keyed by media kind: an end frame is a still like any other.
+const takeMarkKey = (take) => `${take.kind === 'video' ? 'video' : 'image'}:${take.assetId}`;
const KIND_LABEL = { image: 'Frame takes', video: 'Clip takes', endImage: 'End frame takes' };
/**
@@ -13,12 +15,16 @@ const KIND_LABEL = { image: 'Frame takes', video: 'Clip takes', endImage: 'End f
* rejected take by selecting it. Used compactly on each SceneCard and at a
* larger size in the project contact sheet.
*
+ * Rejecting a take only says it is not for this shot: it stays available to
+ * other shots in Swap. Bad is a separate mark (`marks`, the project's
+ * assetMarks; `onMark(take, 'bad' | null)`) for files to clean up later.
+ *
* A legacy take (a pre-takes selection the server hasn't materialized yet) is
* shown but has no actions — it has no take id to address. `grid` lays the
* takes out in rows that fit the width instead of one scrolling row.
*/
export default function SceneTakeStrip({
- scene, kind, busy = false, large = false, grid = false, onSelect, onReview, onOpenPreview,
+ scene, kind, busy = false, large = false, grid = false, onSelect, onReview, onOpenPreview, marks = null, onMark = null,
}) {
const [noteFor, setNoteFor] = useState(null);
const [noteDraft, setNoteDraft] = useState('');
@@ -44,6 +50,7 @@ export default function SceneTakeStrip({
{takes.map((take) => {
const isSelected = take.assetId === selected;
const rejected = take.status === 'rejected';
+ const bad = marks?.[takeMarkKey(take)] === 'bad';
const verdict = kind === 'image' ? plateVerdict(scene, take) : null;
const playKey = take.takeId || take.assetId;
const playing = kind === 'video' && playingId === playKey;
@@ -63,17 +70,25 @@ export default function SceneTakeStrip({
<img src={takeThumbUrl(take)} alt="" loading="lazy" className="w-full aspect-video object-cover block bg-black" />
{playing && <video src={takeClipUrl(take)} autoPlay muted loop playsInline className="absolute inset-0 w-full h-full object-cover bg-black" />}
{/* The take the render uses wears a badge, so it reads at a glance among the others. */}
+ {bad && (
+ <span className="port-media-overlay-strong absolute right-1 top-1 inline-flex items-center gap-0.5 rounded px-1 text-[10px] text-port-error">
+ <Ban size={10} aria-hidden="true" /> Bad
+ </span>
+ )}
{isSelected && (
<span className="absolute left-1 top-1 inline-flex items-center gap-0.5 rounded bg-port-accent px-1.5 py-0.5 text-[10px] font-semibold text-white shadow">
<Check size={11} aria-hidden="true" /> In use
</span>
)}
</button>
- <div className="text-[10px] text-port-text-muted truncate" title={take.originalName || take.prompt || takeProvenance(take)}>
- {verdict && <span className={`mr-1 rounded px-1 ${VERDICT_TONE[verdict.tone]}`} title="Plate preflight verdict">{verdict.label}</span>}
- {isSelected ? <span className="font-semibold text-port-accent">In use · </span> : null}
- {rejected ? 'rejected · ' : ''}{takeProvenance(take)}
- </div>
+ {/* Only what the director acts on: how a take was made stays in the hover title. */}
+ {(verdict || isSelected || rejected) && (
+ <div className="text-[10px] text-port-text-muted truncate" title={take.originalName || take.prompt || takeProvenance(take)}>
+ {verdict && <span className={`mr-1 rounded px-1 ${VERDICT_TONE[verdict.tone]}`} title="Plate preflight verdict">{verdict.label}</span>}
+ {isSelected ? <span className="font-semibold text-port-accent">In use</span> : null}
+ {rejected ? 'Not for this shot' : ''}
+ </div>
+ )}
{take.note && noteFor !== take.takeId && (
<p className="text-[10px] text-port-warning break-words">{take.note}</p>
)}
@@ -95,10 +110,17 @@ export default function SceneTakeStrip({
) : (
<button type="button" disabled={busy} onClick={() => { onReview?.(take, { status: 'rejected' }); openNote(take); }}
className="inline-flex items-center gap-0.5 rounded bg-port-border px-1.5 py-0.5 text-[10px] min-h-[32px] sm:min-h-0 disabled:opacity-50"
- title={isSelected ? 'Reject — clears the selection so the next render fills it' : 'Reject this take'}>
+ title={isSelected ? 'Not for this shot: clears the selection so the next render fills it. Other shots can still use it.' : 'Not for this shot. Other shots can still use it.'}>
<X size={11} /> Reject
</button>
)}
+ {onMark && (
+ <button type="button" disabled={busy} onClick={() => onMark(take, bad ? null : 'bad')} aria-pressed={bad}
+ className={`inline-flex items-center gap-0.5 rounded px-1.5 py-0.5 text-[10px] min-h-[32px] sm:min-h-0 disabled:opacity-50 ${bad ? 'bg-port-error/20 text-port-error' : 'bg-port-border'}`}
+ title={bad ? 'Clear the bad mark' : 'Mark this file bad, to clean up when the project is done. It stays counted in the stats.'}>
+ <Ban size={11} /> Bad
+ </button>
+ )}
<button type="button" disabled={busy} onClick={() => openNote(take)}
aria-label="Edit take note"
className="inline-flex items-center rounded bg-port-border px-1.5 py-0.5 text-[10px] min-h-[32px] sm:min-h-0 disabled:opacity-50"
diff --git a/client/src/components/musicVideo/SceneTakeStrip.test.jsx b/client/src/components/musicVideo/SceneTakeStrip.test.jsx
new file mode 100644
index 0000000000..99d556168c
--- /dev/null
+++ b/client/src/components/musicVideo/SceneTakeStrip.test.jsx
@@ -0,0 +1,24 @@
+import { describe, expect, it, vi } from 'vitest';
+import { fireEvent, render, screen } from '@testing-library/react';
+import SceneTakeStrip from './SceneTakeStrip.jsx';
+
+const take = (takeId, assetId, extra = {}) => ({ takeId, kind: 'image', assetId, status: 'candidate', source: 'generated', ...extra });
+const scene = { sceneId: 's1', order: 0, referenceImageId: 'a.png', takes: [take('t1', 'a.png'), take('t2', 'b.png', { status: 'rejected' })] };
+
+describe('rejecting a take versus marking it bad', () => {
+ // Uniquely catches a take rejected from this shot reading as bad, or the Bad toggle not reaching the project-wide mark.
+ it('shows a rejected take as not for this shot, and marks or clears bad on its own', () => {
+ const onMark = vi.fn();
+ const { rerender } = render(<SceneTakeStrip scene={scene} kind="image" marks={{}} onMark={onMark} />);
+ expect(screen.getByText('Not for this shot')).toBeTruthy();
+ expect(screen.queryByText(/generated/)).toBeNull();
+ expect(screen.queryByText('Bad', { selector: 'span' })).toBeNull();
+ fireEvent.click(screen.getAllByRole('button', { name: 'Bad' })[1]);
+ expect(onMark).toHaveBeenCalledWith(scene.takes[1], 'bad');
+ rerender(<SceneTakeStrip scene={scene} kind="image" marks={{ 'image:b.png': 'bad' }} onMark={onMark} />);
+ const toggle = screen.getAllByRole('button', { name: 'Bad' })[1];
+ expect(toggle.getAttribute('aria-pressed')).toBe('true');
+ fireEvent.click(toggle);
+ expect(onMark).toHaveBeenLastCalledWith(scene.takes[1], null);
+ });
+});
diff --git a/client/src/components/musicVideo/stages/BoardStage.jsx b/client/src/components/musicVideo/stages/BoardStage.jsx
index c236ff17ed..64c1e80d2a 100644
--- a/client/src/components/musicVideo/stages/BoardStage.jsx
+++ b/client/src/components/musicVideo/stages/BoardStage.jsx
@@ -231,6 +231,7 @@ export default function BoardStage({ board }) {
onReviewTake={takes.reviewTake}
onRejectUnusedTakes={takes.rejectUnusedTakes}
onSwapFrames={takes.swapFrames}
+ onMarkTake={takes.markTake}
onContinueFromPrevious={takes.continueFromPrevious}
// The server's own neighbor rule: the shot before this one by start time.
previousHasClip={Boolean(shotHandoffSource(project, previousShot(project, scene.sceneId)))}
diff --git a/client/src/hooks/useMusicVideoTakes.js b/client/src/hooks/useMusicVideoTakes.js
index aaff8dde5e..c491d284f3 100644
--- a/client/src/hooks/useMusicVideoTakes.js
+++ b/client/src/hooks/useMusicVideoTakes.js
@@ -8,6 +8,7 @@ import {
reviewMusicVideoSceneTake,
rejectUnusedMusicVideoSceneTakes,
swapMusicVideoSceneFrames,
+ markMusicVideoPoolAssets,
getMusicVideoHandoff,
getMusicVideoHandoffBundle,
importMusicVideoHandoff,
@@ -47,7 +48,7 @@ const handoffBundleFilename = (name) => `${handoffSlug(name)}-handoff.zip`;
* routes (image → data/images, video → video history), then asks the server to
* associate them with scenes by the file tags the exported manifest assigned.
*/
-export default function useMusicVideoTakes({ project, applyScenePatch }) {
+export default function useMusicVideoTakes({ project, applyScenePatch, patchProject = null }) {
const [busy, setBusy] = useState(false);
const chainRef = useRef(Promise.resolve());
@@ -114,6 +115,13 @@ export default function useMusicVideoTakes({ project, applyScenePatch }) {
'Failed to update take',
);
+ // Mark a take's file bad (or clear it): a project-wide mark, separate from rejecting it from this shot.
+ const markTake = (take, mark) => runTakeOp(
+ (projectId) => markMusicVideoPoolAssets(projectId, [{ kind: take.kind === 'video' ? 'video' : 'image', assetId: take.assetId }], mark, { silent: true })
+ .then(({ assetMarks }) => { patchProject?.(projectId, { assetMarks }); return null; }),
+ 'Failed to mark the take',
+ );
+
// Start and end frames trade places, each bringing its prompt along.
const swapFrames = (scene) => runTakeOp(
(projectId) => swapMusicVideoSceneFrames(projectId, scene.sceneId, { silent: true }).then((placed) => {
@@ -202,5 +210,5 @@ export default function useMusicVideoTakes({ project, applyScenePatch }) {
if (failures.length) toast.error(failures.slice(0, 3).join(' · '));
};
- return { busy, selectTake, placePoolItem, trimClipTake, reviewTake, rejectUnusedTakes, swapFrames, continueFromPrevious, importTake, importClipTake, exportHandoff, exportHandoffBundle, importHandoffFiles };
+ return { busy, selectTake, placePoolItem, trimClipTake, reviewTake, rejectUnusedTakes, swapFrames, markTake, continueFromPrevious, importTake, importClipTake, exportHandoff, exportHandoffBundle, importHandoffFiles };
}
diff --git a/client/src/pages/MusicVideo.jsx b/client/src/pages/MusicVideo.jsx
index ff2b09d7d8..3c185b8ce9 100644
--- a/client/src/pages/MusicVideo.jsx
+++ b/client/src/pages/MusicVideo.jsx
@@ -419,7 +419,7 @@ export default function MusicVideo() {
videoSettings,
applyScenePatch: patchScene,
});
- const takes = useMusicVideoTakes({ project: selected, applyScenePatch: patchScene });
+ const takes = useMusicVideoTakes({ project: selected, applyScenePatch: patchScene, patchProject });
// Selective section revision (#8987): regenerate only a draft's flagged
// sections, resumable from the server's checkpoint.
const revisions = useMusicVideoRevisions({ project: selected, replaceProject, sceneMedia, attachRender: excerpts.attachRender });
diff --git a/client/src/pages/MusicVideo.test.jsx b/client/src/pages/MusicVideo.test.jsx
index 0aabbdbd72..e9f291a586 100644
--- a/client/src/pages/MusicVideo.test.jsx
+++ b/client/src/pages/MusicVideo.test.jsx
@@ -2573,11 +2573,12 @@ describe('MusicVideo visual spec, takes and handoff (#8965)', () => {
await openProject({ ...PROJECT_NO_CLIP, id: 'mv-takes', name: 'Takes Project', scenes: [scene] }, 'produce');
const strip = screen.getByRole('list', { name: /Frame takes/ });
- expect(within(strip).getByText(/imported · midjourney/)).toBeTruthy();
+ // How a take was made is not labeled under it.
+ expect(within(strip).queryByText(/imported|generated/)).toBeNull();
fireEvent.click(within(strip).getByRole('button', { name: /Use/ }));
await waitFor(() => expect(selectMusicVideoSceneTake).toHaveBeenCalledWith('mv-takes', 's1', 't-b', { silent: true }));
// The server's answer moves the selection; the other take now offers "Use".
- await waitFor(() => expect(within(strip).getAllByText(/In use ·/)).toHaveLength(1));
+ await waitFor(() => expect(within(strip).getAllByText('In use', { selector: 'div > span' })).toHaveLength(1));
const items = within(strip).getAllByRole('listitem');
expect(within(items[1]).queryByRole('button', { name: /Use/ })).toBeNull();
diff --git a/server/routes/musicVideoTakes.test.js b/server/routes/musicVideoTakes.test.js
index 11b7273e34..395569685b 100644
--- a/server/routes/musicVideoTakes.test.js
+++ b/server/routes/musicVideoTakes.test.js
@@ -374,6 +374,18 @@ describe('renders made for a video with no shot', () => {
});
describe('the shot asset manager', () => {
+ // Uniquely catches a take rejected from one shot reading as bad in Swap, where another shot may want it.
+ it('lists a take rejected from its shot as not bad until the director marks it', async () => {
+ for (const name of ['first.png', 'second.png']) seedImage(name);
+ await addTake(sceneA.sceneId, { kind: 'image', assetId: 'first.png', source: 'generated' });
+ const second = await addTake(sceneA.sceneId, { kind: 'image', assetId: 'second.png', source: 'generated' });
+ await request(app).patch(`${base()}/scenes/${sceneA.sceneId}/takes/${second.body.take.takeId}`).send({ status: 'rejected' });
+ const listed = async () => (await request(app).get(`${base()}/media-pool`)).body.items.find((item) => item.assetId === 'second.png');
+ expect(await listed()).toMatchObject({ takeStatus: 'rejected', mark: null });
+ await request(app).patch(`${base()}/media-pool/marks`).send({ items: [{ kind: 'image', assetId: 'second.png' }], mark: 'bad' });
+ expect((await listed()).mark).toBe('bad');
+ });
+
// Uniquely catches a deleted still or clip leaving a take, mark or collection row pointing at a file that is gone, and a shot's own still being deletable.
it('marks unused assets, refuses a shot\'s own, and forgets deleted ones everywhere', async () => {
for (const name of ['keep.png', 'bad.png', 'used.png', 'b-used.png']) seedImage(name);
diff --git a/server/services/musicVideo/mediaPool.js b/server/services/musicVideo/mediaPool.js
index 41256e4555..5611db5754 100644
--- a/server/services/musicVideo/mediaPool.js
+++ b/server/services/musicVideo/mediaPool.js
@@ -126,8 +126,8 @@ function buildMediaPool(project, collectionItems = [], history = new Map()) {
const marks = project?.assetMarks || {};
return items
.filter((item) => !used.has(`${item.kind}:${item.assetId}`))
- // A rejected take counts as bad until the director marks it otherwise.
- .map((item) => ({ ...item, mark: marks[`${item.kind}:${item.assetId}`] || (item.takeStatus === 'rejected' ? 'bad' : null) }))
+ // Bad is only ever the director's own mark: a take rejected from one shot may be right for another.
+ .map((item) => ({ ...item, mark: marks[`${item.kind}:${item.assetId}`] || null }))
.map((item) => (item.kind === 'image' ? { ...item, clipIds: clipsByStill.get(item.assetId) || [] } : item))
.sort((a, b) => String(b.addedAt || '').localeCompare(String(a.addedAt || '')));
}