feat(pipeline): render-derived shot thumbnails, and bulk shot delete
Deploy / deploy (push) Failing after 19m11s
Deploy / deploy (push) Failing after 19m11s
Two independent features landing together: Generated shot thumbnails — a shot can now carry a thumbnail promoted from a render export (Shot.generatedThumbnailUrl/generatedThumbnailFrom) alongside the existing brief-supplied thumbnailUrl, which always takes display precedence (lib/shot-thumbnail.ts) so a promoted frame can only ever fill a gap, never overwrite the brief. Shows with pipelineConfig.autoShotThumbnail promote automatically on every finished export (lib/render-pipeline/preview.ts); promoteExportThumbnail/ clearGeneratedThumbnail (actions/shots.ts) are the manual equivalent for everyone else. Worker-side seek logic for picking the promoted frame is covered by RenderWorker/VFXReviewWorker.Tests/ThumbnailSeekTests.cs. Bulk shot delete — the shot-status page's selection bar gets a "Bulk Actions" dropdown (alongside the existing Change Due Date) with Delete Shots. bulkDeleteShots() (actions/shots.ts) deletes one at a time rather than in a single statement: exports_shotId_fkey is ON DELETE RESTRICT by design, so a shot with renders or deliveries on record is protected and gets skipped and reported by name rather than aborting the whole selection or being silently destroyed along with its history. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { conventionalNames } from "./project-templates";
|
||||
import { conventionalNames, autoShotThumbnailEnabled } from "./project-templates";
|
||||
|
||||
/**
|
||||
* The convention has to reproduce UNG's existing comp names exactly, or
|
||||
@@ -32,3 +32,31 @@ describe("conventionalNames", () => {
|
||||
expect(conventionalNames("").overlayComp).toBe("SHOW_VFX_OVERLAY");
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* The flag decides whether finished renders start writing shot thumbnails, so
|
||||
* anything short of an explicit `true` has to leave shots alone — a malformed
|
||||
* config in particular, which must not be read as consent.
|
||||
*/
|
||||
describe("autoShotThumbnailEnabled", () => {
|
||||
it("is on only when explicitly enabled", () => {
|
||||
expect(autoShotThumbnailEnabled({ pipelineConfig: { autoShotThumbnail: true } })).toBe(true);
|
||||
});
|
||||
|
||||
it("defaults to off", () => {
|
||||
expect(autoShotThumbnailEnabled({ pipelineConfig: {} })).toBe(false);
|
||||
expect(autoShotThumbnailEnabled({ pipelineConfig: null })).toBe(false);
|
||||
expect(autoShotThumbnailEnabled({})).toBe(false);
|
||||
expect(autoShotThumbnailEnabled({ pipelineConfig: { autoShotThumbnail: false } })).toBe(false);
|
||||
});
|
||||
|
||||
it("stays off when the config is malformed", () => {
|
||||
expect(autoShotThumbnailEnabled({ pipelineConfig: { autoShotThumbnail: "yes" } })).toBe(false);
|
||||
expect(autoShotThumbnailEnabled({ pipelineConfig: "not an object" })).toBe(false);
|
||||
});
|
||||
|
||||
it("does not disturb the other settings it shares a column with", () => {
|
||||
const cfg = { pipelineConfig: { templateAep: "X:/show.aep", autoShotThumbnail: true } };
|
||||
expect(autoShotThumbnailEnabled(cfg)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user