caaa333f02
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>
63 lines
2.5 KiB
TypeScript
63 lines
2.5 KiB
TypeScript
import { describe, it, expect } from "vitest";
|
|
import { conventionalNames, autoShotThumbnailEnabled } from "./project-templates";
|
|
|
|
/**
|
|
* The convention has to reproduce UNG's existing comp names exactly, or
|
|
* enabling per-project templates would silently break the show it was built
|
|
* for: every findComp in the panel resolves through it.
|
|
*/
|
|
describe("conventionalNames", () => {
|
|
it("reproduces UNG's existing template names", () => {
|
|
expect(conventionalNames("UNG")).toEqual({
|
|
overlayComp: "UNG_VFX_OVERLAY",
|
|
previewComp: "UNG_EXPORT_TEMPLATE",
|
|
lutComp: "_SHOW LUT",
|
|
});
|
|
});
|
|
|
|
it("derives names for a show with a longer id", () => {
|
|
const names = conventionalNames("DH2_VFX");
|
|
expect(names.overlayComp).toBe("DH2_VFX_VFX_OVERLAY");
|
|
expect(names.previewComp).toBe("DH2_VFX_EXPORT_TEMPLATE");
|
|
});
|
|
|
|
it("keeps the LUT comp name constant across shows", () => {
|
|
// What differs between shows is the LUT inside the comp, which is why the
|
|
// template AEP is per-project rather than the comp name.
|
|
expect(conventionalNames("SNV").lutComp).toBe("_SHOW LUT");
|
|
expect(conventionalNames("QTK").lutComp).toBe("_SHOW LUT");
|
|
});
|
|
|
|
it("falls back to a placeholder rather than producing _VFX_OVERLAY", () => {
|
|
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);
|
|
});
|
|
});
|