feat(pipeline): render-derived shot thumbnails, and bulk shot delete
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:
twotalesanimation
2026-08-27 17:06:55 +02:00
parent b151e8cc52
commit caaa333f02
39 changed files with 876 additions and 70 deletions
+20
View File
@@ -27,6 +27,16 @@ export const pipelineConfigSchema = z.object({
/** AE output-module templates, when this show does not use the studio defaults. */
movTemplate: z.string().max(200).optional().nullable(),
mp4Template: z.string().max(200).optional().nullable(),
/**
* Promote each finished export's thumbnail onto its shot
* (`Shot.generatedThumbnailUrl`). Off by default and deliberately per-show:
* productions that ship a still with every shot already have a reference
* frame, and the renders should not compete with it. Turn it on for shows
* that arrive with no stills at all, where an empty grid is the alternative.
*
* Never touches `Shot.thumbnailUrl` — see lib/shot-thumbnail.ts.
*/
autoShotThumbnail: z.boolean().optional().nullable(),
});
export type PipelineConfigInput = z.infer<typeof pipelineConfigSchema>;
@@ -55,6 +65,16 @@ export function conventionalNames(showId: string) {
};
}
/**
* Whether finished exports promote their thumbnail onto the shot. Defaults to
* false, including when `pipelineConfig` is malformed — a broken config must
* not start rewriting shot thumbnails.
*/
export function autoShotThumbnailEnabled(project: { pipelineConfig?: unknown }): boolean {
const parsed = pipelineConfigSchema.safeParse(project.pipelineConfig ?? {});
return parsed.success ? parsed.data.autoShotThumbnail === true : false;
}
export async function resolveProjectTemplates(project: {
showId: string | null;
code: string;