From 67b085b4cc25b82953508aed7fc41525735a78dd Mon Sep 17 00:00:00 2001 From: shrimbly Date: Sat, 21 Feb 2026 00:22:07 +1300 Subject: [PATCH] fix: update VideoStitch thumbnails when upstream videos re-execute MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The clipKey dependency used a presence-only check ("1"/"0"), so when a video re-generated (truthy→truthy), the effect never re-ran. Additionally, the ref-based cache keyed by edgeId returned stale thumbnails even if the effect did fire. Fix by fingerprinting video data via its trailing 20 chars and clearing the thumbnail cache when clipKey changes. Co-Authored-By: Claude Opus 4.6 --- src/components/nodes/VideoStitchNode.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/nodes/VideoStitchNode.tsx b/src/components/nodes/VideoStitchNode.tsx index 29a1d3dc..b40618d3 100644 --- a/src/components/nodes/VideoStitchNode.tsx +++ b/src/components/nodes/VideoStitchNode.tsx @@ -123,7 +123,7 @@ export function VideoStitchNode({ id, data, selected }: NodeProps orderedClips.map((c) => `${c.edgeId}:${c.videoData ? "1" : "0"}`).join(","), + () => orderedClips.map((c) => `${c.edgeId}:${c.videoData ? c.videoData.slice(-20) : "0"}`).join(","), [orderedClips] ); @@ -135,6 +135,7 @@ export function VideoStitchNode({ id, data, selected }: NodeProps { + thumbnailsRef.current = new Map(); const newThumbnails = new Map(); for (const clip of orderedClips) {