From d7ac094c9ce45203aa3b2123568ce4b6ef503d09 Mon Sep 17 00:00:00 2001 From: gator Date: Thu, 17 Sep 2026 22:20:15 +0000 Subject: [PATCH] Recover a shot left stuck on "filming" by a worker restart Third occurrence of this shape after cuts and the storyboard reel: a flag meaning "work is happening" set before an in-memory thread starts, never cleared when a deploy kills it, and a page that then hides the buttons for ever. Anything older than 25 minutes is treated as gone. --- trailer.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/trailer.html b/trailer.html index 223cce2..558d271 100644 --- a/trailer.html +++ b/trailer.html @@ -181,9 +181,18 @@ function busyRun() { return RUN && /^(writing|reviewing|revising)$/.test(String(RUN.stage || "")); } + // Work happens in the worker's memory and does not survive a deploy, so a + // flag saying "in progress" is only believed while it is recent. + function stillFilming(s) { + if (!s.filming) return false; + var t = Date.parse(s.filming_since || ""); + if (!t) return false; // no stamp: from before this existed + return (Date.now() - t) < 25 * 60 * 1000; + } + function busyShots() { return (PKG.shots || []).some(function (s) { - return s.writing || s.drawing || s.filming; }); + return s.writing || s.drawing || stillFilming(s); }); } // Preparing the storyboard audio is work too. Without this the page stops @@ -859,7 +868,7 @@ var tools; if (s.drawing) tools = 'drawing…'; - else if (s.filming) tools = 'filming…'; + else if (stillFilming(s)) tools = 'filming…'; else if (EDITING === s.id) { tools = '
'