Free, open-source AI video generator for Mac. Run LTX-2.5 and MiniMax H3 (Hailuo) locally on Apple Silicon: text-to-video and image-to-video with sound, lip-sync, character LoRA training, songs from lyrics (YuE2) and image editing (Qwen-Image-Edit). One-click install via Pinokio. Offline: no cloud, no API key, no NVIDIA GPU.
Python ai-filmmakingai-videoai-video-generatorapple-siliconhailuoimage-to-videolip-synclocal-ailora-trainingltx-2ltx-2-5ltx-videomacosminimax-h3mlxmusic-generationoffline-aipinokiotext-to-videovideo-generation
release(v4.9.1): the buttons v4.9.0 broke, plus a delete for imported images
mrbizarroad208f0a69e1
diff --git a/README.md b/README.mdindex 887aecb..b1b3cb8 100644--- a/README.md+++ b/README.md@@ -13,7 +13,7 @@</p>-> **Current release: v4.9.0.** An under-the-hood release: nothing on screen changes, but the panel's code was reorganized from one 72,000-line file into small named pieces (see [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)), verified byte-for-byte and render-for-render along the way. Fixes and features land faster and safer from here on. Also removes some dead code. Full notes on the [releases page](https://github.com/mrbizarro/phosphene/releases).+> **Current release: v4.9.1.** Fixes the buttons that v4.9.0's reorganization silently broke — the gallery card actions (Quality / Animate / delete), LoRA management, character training controls, timeline editing and CivitAI downloads — reported and diagnosed by a contributor within a day (thanks @blackest). Also adds an "×" on the Recent-uploads strip to delete an imported image. Full notes on the [releases page](https://github.com/mrbizarro/phosphene/releases).## Overviewdiff --git a/VERSION b/VERSIONindex 6ed7776..5b341fd 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-4.9.0+4.9.1diff --git a/docs/STATE.md b/docs/STATE.mdindex a15bdf7..f1587db 100644--- a/docs/STATE.md+++ b/docs/STATE.md@@ -1,5 +1,27 @@# Phosphene — project state, history, open work+> **🩹 2026-09-02 — v4.9.1: the buttons v4.9.0 broke, fixed the same day they were reported.**+> The module split had one blind spot: a function referenced ONLY from its own+> module's generated markup (`onclick="deleteOutput('…')"` inside a template+> literal) looked module-internal to the extraction analysis and went+> unpublished — but inline attributes resolve against the GLOBAL scope at click+> time. 38 handlers died silently: gallery card actions, LoRA management,+> training controls, timeline editing, CivitAI downloads, storyboard board+> actions. @blackest reported it, diagnosed it and sent PR #69 within a day+> (thank you); the shipped fix is the union of the PR's list and an+> independent scan (which also caught `sbeLiftSelected`), folded into each+> module's one publish block. **The class is now a build failure:**+> `scripts/lint_webapp.mjs` scans every `on*=`/`javascript:`/`setAttribute('on…')`+> string in the page and the modules and refuses any call to an unpublished+> top-level function — proven red on the v4.9.0 tree, green on this one. Also+> in: a per-thumbnail "×" on the Recent-uploads strip (`POST /upload/delete`,+> path-bound, clears the thumbnail cache — a Pinokio ask from @le_wib). Riding+> along from a parallel session: Editor Delete now LIFTS (leaves a slug) and+> Shift+Delete ripples (00c248d); the theater's mute is remembered across+> clips and restarts (a157b9b, Pinokio report by fuschichou); Update proves+> the render packages import and self-repairs once before claiming success+> (3698c53 — the fleet's second-commonest error).+> **🧱 2026-09-01 — v4.9.0: the frontend and the routes leave the monolith.**> Shipped to public `main` the same day, at the owner's explicit green light,> with the residual risks named below accepted ("we will discover if there isdiff --git a/panel/routes_files.py b/panel/routes_files.pyindex ed03fa8..353ed58 100644--- a/panel/routes_files.py+++ b/panel/routes_files.py@@ -25,6 +25,43 @@ def get_uploads(h, parsed) -> None:h._json({"uploads": P.list_uploads(limit=max(1, min(200, limit)))})+# Delete one imported reference image (and drop its thumbnails). Asked for+# on Pinokio: the Recent-uploads strip had no way to remove an image, and a+# file removed by hand in Finder kept its cached thumbnail. Path-bound to+# UPLOADS like every other file route; the thumb cache is keyed by+# (path, mtime, size, width) so it cannot be purged per-file — it is+# cleared whole and rebuilds lazily (thumbnails are small).+@post("/upload/delete")+def post_upload_delete(h, path, qs, ctype) -> None:+ _rb = h._read_form_body()+ if _rb is None:+ return+ body, form = _rb+ raw = (form.get("path", [""])[0] or "").strip()+ if not raw:+ h._json({"ok": False, "error": "path required"}, 400); return+ try:+ target = P.Path(raw).resolve()+ uploads = P.UPLOADS.resolve()+ except Exception:+ h._json({"ok": False, "error": "bad path"}, 400); return+ if not target.is_relative_to(uploads) or target == uploads:+ h._json({"ok": False, "error": "path must be an imported image"}, 400); return+ if not target.is_file():+ h._json({"ok": False, "error": "no such upload"}, 404); return+ try:+ target.unlink()+ except OSError as exc:+ h._json({"ok": False, "error": f"could not delete: {exc}"}, 500); return+ try:+ P.shutil.rmtree(P._THUMBCACHE, ignore_errors=True)+ except Exception:+ pass+ P.push(f"upload removed: {target.name}")+ h._json({"ok": True, "deleted": str(target),+ "uploads": P.list_uploads(limit=24)})++@get("/file")def get_file(h, parsed) -> None:qs = P.parse_qs(parsed.query)diff --git a/scripts/check_post_update.js b/scripts/check_post_update.jsindex 1d07bbf..fc0d909 100644--- a/scripts/check_post_update.js+++ b/scripts/check_post_update.js@@ -115,6 +115,12 @@ const mustRequire = [["the mlx pin", /mlx==0\.31\.1/],["the vendored package reinstall", /--reinstall .*\.\/packages\/ltx-core-mlx/],["the codec patch", /patch_ltx_codec\.py/],+ // The fleet's second-commonest error is `No module named 'ltx_pipelines_mlx'`+ // — 464 events, an app that boots and cannot render a frame. install.js has+ // guarded this since v2.0.2; Update did not until v4.9. A pip step exiting 0+ // is not the same claim as "the module imports", and the user discovers the+ // difference at Generate time.+ ["the render engine import gate", /import ltx_core_mlx, ltx_pipelines_mlx, mlx/],]for (const [label, re] of mustRequire) {const hit = code.find((l) => re.test(l.t) && !/^\s*require\(\)/.test(l.t))@@ -126,6 +132,23 @@ for (const [label, re] of mustRequire) {}}+// --- 2c. THE IMPORT GATE MUST BE LAST ---------------------------------------+// It is the only step that proves the app can render, so anything that can+// break the import must already have run. A gate in the middle of the script+// would pass and then be invalidated by step 7's mflux resolve, which is+// precisely the move that walks mlx to a version the engine cannot use.+{+ const gate = code.find((l) => /import ltx_core_mlx, ltx_pipelines_mlx, mlx/.test(l.t))+ if (gate) {+ const after = code.filter((l) => l.n > gate.n && /^\s*(require |uv pip install|\( cd )/.test(l.t))+ if (after.length) {+ failures.push(`the import gate (line ${gate.n}) is followed by ${after.length} more install step(s), starting at line ${after[0].n} — it must be the LAST thing the script does or it proves nothing.`)+ } else {+ console.log(" ok the import gate is the last install step")+ }+ }+}+// --- 3. THE mlx PIN AND THE mflux PIN ARE ONE DECISION -----------------------// Step 2 pins mlx. Step 7 installs mflux WITH deps (the resolving call, there// so a fresh install gets mflux's transitive set). mflux declares its OWN mlxdiff --git a/scripts/lint_webapp.mjs b/scripts/lint_webapp.mjsindex 4e02819..3290ee3 100644--- a/scripts/lint_webapp.mjs+++ b/scripts/lint_webapp.mjs@@ -72,7 +72,11 @@ function publishedNames(src) {names.add(mm[1]);// Object.assign(globalThis, { a, b, c }) — the module publish block.for (const mm of src.matchAll(/Object\.assign\(globalThis,\s*\{([\s\S]*?)\}\s*\)/g)) {- for (const name of mm[1].split(",")) {+ // Comments inside the block are legal; a brace inside one is not a+ // terminator (the block is matched up to the first `}` — keep braces+ // out of publish-block comments, and strip the comments before parsing).+ const body = mm[1].replace(/\/\/[^\n]*/g, "");+ for (const name of body.split(",")) {const t = name.trim().split(":")[0].trim();if (new RegExp(`^${IDENT}$`).test(t)) names.add(t);}@@ -156,6 +160,41 @@ if (inline.trim()) {"script", topLevelDecls(inline)));}+// ---- inline handler targets must be published ------------------------------+// The v4.9.0 regression (PR #69): markup generated INSIDE a module —+// `onclick="deleteOutput('x')"` in a template literal — resolves its+// function name against the GLOBAL scope at click time, not the module+// scope. A function referenced only from its own module's generated markup+// looked module-internal to the extraction analysis and went unpublished;+// 38 buttons died silently. eslint cannot see into attribute strings, so+// this pass scans every on*="…", href="javascript:…" and+// setAttribute('on…', …) string in the page and the modules, and requires+// each function it calls — if it is a top-level declaration in ANY module —+// to be published.+{+ const topLevelAnywhere = new Map(); // name -> file+ for (const [f, src] of modSrc)+ for (const n of topLevelDecls(src)) topLevelAnywhere.set(n, f);+ const publishedAll = new Set(shared);+ const handlerRe = new RegExp(+ String.raw`(?:\bon[a-z]+\s*=\s*\\?["']|href\s*=\s*\\?["']javascript:|setAttribute\(\s*['"]on[a-z]+['"]\s*,\s*['"\x60])([^"'\x60]{0,400})`, "g");+ const callRe = new RegExp(String.raw`\b(${IDENT})\s*\(`, "g");+ const sources = [[INDEX, html], ...modSrc.entries()];+ const seen = new Set();+ for (const [file, src] of sources) {+ for (const m of src.matchAll(handlerRe)) {+ for (const c of m[1].matchAll(callRe)) {+ const name = c[1];+ const owner = topLevelAnywhere.get(name);+ if (!owner || publishedAll.has(name) || seen.has(name)) continue;+ seen.add(name);+ errors++;+ console.error(`inline handler calls '${name}' (declared in ${path.relative(ROOT, owner)}) but it is not published — add it to that module's Object.assign(globalThis, {...}) block. Referenced from ${path.relative(ROOT, file)}`);+ }+ }+ }+}+// ---- duplicate publishes across module files -------------------------------// no-redeclare is per-file; the cross-file version of the built-twice// accident is two modules publishing the SAME name to globalThis.diff --git a/scripts/post_update.sh b/scripts/post_update.shindex 93bf0bd..d752b7c 100644--- a/scripts/post_update.sh+++ b/scripts/post_update.sh@@ -314,4 +314,36 @@ rm -f "$ROOT/mlx_models/ltx-2.3-mlx-q8/spatial_upscaler_x1_5_v1_0.safetensors"rm -f "$ROOT/mlx_models/ltx-2.3-mlx-q8/temporal_upscaler_x2_v1_0.safetensors"echo 'Trim done.'+# ---- 10. THE IMPORT GATE — the last thing, because it is the only proof -----+#+# THE FLEET SAYS THIS IS NEEDED. `No module named 'ltx_pipelines_mlx'` is the+# SECOND most common error in the 14-day fleet read (464 events): an app that is+# installed, boots, and cannot render a single frame.+#+# install.js has guarded this since v2.0.2, for a reason written in its own+# comment: "the upstream pip step had silently failed mid-install but the patch+# script's i2v target check tolerates a missing ltx_pipelines_mlx file, so the+# install reported success and the user only learned about the breakage when+# they clicked Generate." Update never got the same guard. Step 3 above+# reinstalls the three packages and `require` catches a NON-ZERO pip — but pip+# exiting 0 is not the same claim as "the module imports", which is the only+# claim that matters, and the one the user finds out about at Generate time.+#+# So: import them. If that fails, do not fail the update yet — reinstall once+# and import again, because a torn site-packages is exactly what this repairs+# and the user should not have to run anything by hand. Only a second failure+# is fatal, and then `require` says so in the app's own words.+# The probe deliberately imports ONE package and the gate imports all three, so+# `check_post_update.js` can tell them apart: the gate is the line it must find+# wrapped in `require`, and a probe that matched the same text would shadow it.+echo 'Verifying the render engine actually imports…'+if ! "$PY" -c "import ltx_pipelines_mlx" 2>/dev/null; then+ echo 'Render engine did not import — repairing the vendored packages once…'+ ( cd "$ROOT/ltx-2-mlx" && uv pip install --python env/bin/python --reinstall \+ --no-deps --build-constraints ../pip-build-constraints.txt \+ ./packages/ltx-core-mlx ./packages/ltx-pipelines-mlx ./packages/ltx-trainer ) \+ || true+fi+require "the render engine import gate" -- "$PY" -c "import ltx_core_mlx, ltx_pipelines_mlx, mlx"+echo "=== post-update complete ==="diff --git a/test_storyboard_editor_ui.py b/test_storyboard_editor_ui.pyindex 279a9d1..44ddd9f 100644--- a/test_storyboard_editor_ui.py+++ b/test_storyboard_editor_ui.py@@ -62,7 +62,7 @@ FUNCTIONS = ("sbeAdoptGaps", "sbeLayout","sbeFilmDuration", "sbeClipAt", "sbeHoles", "sbeBeatGrid","sbeGridIsAGuess", "sbeSnapTime", "sbeById", "sbeMoveTo", "sbeTrim",- "sbeRippleDelete", "sbeSplitAt", "sbeNewId", "sbePlaceUnplaced",+ "sbeRippleDelete", "sbeLiftDelete", "sbeSplitAt", "sbeNewId", "sbePlaceUnplaced","sbeCleanClip", "sbeSaveBody", "sbeErrorsByClip", "sbeDecodePeaks","sbeFmtTime", "sbeMutate", "sbeUndo", "sbeRedo", "sbeSave",# Wave 2 — kinds, the one adjustment, and the drop maths.@@ -436,6 +436,17 @@ out.rippleLengths = lengthsAgree(r.clips);cs = lay([clip({ id: 'a', end: 2, locked: true })]);out.rippleLocked = sbeRippleDelete(cs, 'a').why;+// ---- lift: the shot leaves, ITS HOLE STAYS, nothing downstream moves ------+cs = lay([clip({ id: 'a', end: 2 }), clip({ id: 'b', end: 3 }), clip({ id: 'c', end: 1.5 })]);+out.liftWindowsBefore = cs.map(c => [c.id, c.film_start, c.film_end]);+r = sbeLiftDelete(cs, 'b');+out.liftWindows = r.clips.map(c => [c.id, c.film_start, c.film_end]);+out.liftKinds = r.clips.map(c => sbeKind(c));+out.liftLengths = lengthsAgree(r.clips);+out.liftHole = (() => { const h = sbeById(r.clips, 'b'); return [h.path, h.proxy, h.source]; })();+out.liftLocked = sbeLiftDelete(lay([clip({ id: 'a', end: 2, locked: true })]), 'a').why;+out.liftTwice = sbeLiftDelete(r.clips, 'b').why;+cs = lay([clip({ id: 'a', end: 2 }), clip({ id: 'b', end: 3 })]);r = sbeSplitAt(cs, 1.2, 'a2');out.split = shape(r.clips);@@ -2270,6 +2281,17 @@ class TimelineClient(unittest.TestCase):[["a", 0, 2, 0, 2], ["c", 0, 1.5, 2, 3.5]])self.assertTrue(self.r["rippleLengths"])++ def test_a_lift_leaves_the_hole_and_moves_nothing_downstream(self):+ # The whole point: every film window is IDENTICAL before and after.+ self.assertEqual(self.r["liftWindows"], self.r["liftWindowsBefore"])+ self.assertEqual(self.r["liftKinds"], ["video", "slug", "video"])+ self.assertTrue(self.r["liftLengths"])+ self.assertEqual(self.r["liftHole"], [None, None, "human"])++ def test_a_lift_refuses_a_locked_clip_and_an_existing_hole(self):+ self.assertEqual(self.r["liftLocked"], "locked")+ self.assertEqual(self.r["liftTwice"], "already a hole")def test_a_locked_clip_refuses_to_be_deleted(self):self.assertEqual(self.r["rippleLocked"], "locked")diff --git a/test_uploads.py b/test_uploads.pynew file mode 100644index 0000000..016ae5c--- /dev/null+++ b/test_uploads.py@@ -0,0 +1,85 @@+#!/usr/bin/env python3+"""POST /upload/delete — the Recent-uploads strip's "×" (a Pinokio ask).++Path-bound like every file route: only a file under the uploads dir may go,+the uploads dir itself never, nothing outside. The thumbnail cache is+cleared with it (its keys carry mtime+size, so a per-file purge is not+possible and a stale thumbnail was half of the original report).+"""+from __future__ import annotations++import os+import sys+import tempfile+import threading+import unittest+import urllib.error+import urllib.parse+import urllib.request+from http.server import ThreadingHTTPServer+from pathlib import Path++ROOT = Path(__file__).resolve().parent+STATE = Path(tempfile.mkdtemp(prefix="phos-uploads-"))+UPLOADS = Path(tempfile.mkdtemp(prefix="phos-uploads-dir-"))+os.environ["LTX_STATE_DIR"] = str(STATE)+os.environ["LTX_UPLOADS_DIR"] = str(UPLOADS)+os.environ["PHOSPHENE_ANALYTICS_DISABLED"] = "1"+os.environ["PHOSPHENE_DISABLE_VERSION_CHECK"] = "1"+os.environ.setdefault("LTX_PORT", "8311")+sys.path.insert(0, str(ROOT))++import mlx_ltx_panel as P # noqa: E402+++class UploadDelete(unittest.TestCase):+ @classmethod+ def setUpClass(cls) -> None:+ cls.server = ThreadingHTTPServer(("127.0.0.1", 0), P.Handler)+ cls.port = cls.server.server_address[1]+ threading.Thread(target=cls.server.serve_forever, daemon=True).start()++ @classmethod+ def tearDownClass(cls) -> None:+ cls.server.shutdown()+ cls.server.server_close()++ def _post(self, path: str):+ req = urllib.request.Request(+ f"http://127.0.0.1:{self.port}/upload/delete",+ data=urllib.parse.urlencode({"path": path}).encode(), method="POST",+ headers={"Content-Type": "application/x-www-form-urlencoded"})+ try:+ r = urllib.request.urlopen(req)+ return r.status, r.read()+ except urllib.error.HTTPError as e:+ return e.code, e.read()++ def test_deletes_an_upload_and_its_thumbnails(self) -> None:+ f = P.UPLOADS / "e2e_delete_me.png"+ f.write_bytes(b"\x89PNG\r\n\x1a\n" + b"0" * 64)+ (P._THUMBCACHE).mkdir(parents=True, exist_ok=True)+ (P._THUMBCACHE / "stale.jpg").write_bytes(b"x")+ status, body = self._post(str(f))+ self.assertEqual(status, 200, body)+ self.assertFalse(f.exists(), "the upload must be gone")+ self.assertFalse((P._THUMBCACHE / "stale.jpg").exists(),+ "the thumbnail cache must be cleared with it")+ self.assertIn(b'"uploads"', body, "the reply carries the fresh strip")++ def test_refuses_paths_outside_uploads(self) -> None:+ outside = Path(tempfile.mkdtemp()) / "not_an_upload.png"+ outside.write_bytes(b"x")+ status, _ = self._post(str(outside))+ self.assertEqual(status, 400)+ self.assertTrue(outside.exists(), "nothing outside uploads may be touched")++ def test_refuses_the_uploads_dir_itself_and_missing_files(self) -> None:+ status, _ = self._post(str(P.UPLOADS))+ self.assertEqual(status, 400)+ status, _ = self._post(str(P.UPLOADS / "never_existed.png"))+ self.assertEqual(status, 404)+++if __name__ == "__main__":+ unittest.main(verbosity=2)diff --git a/webapp/js/characters.js b/webapp/js/characters.jsindex fe9fe25..3afc013 100644--- a/webapp/js/characters.js+++ b/webapp/js/characters.js@@ -2824,4 +2824,8 @@ Object.assign(globalThis, {setQuality, _qualityUsesHq, setAccel, setTemporalMode,setUpscale, setUpscaleMethod, updateAccelAvailability, updateTemporalAvailability,setAspect, updateCustomizeSummary, updatePromptPlaceholder,+ // inline-handler targets: generated markup resolves these through the+ // global scope (the v4.9.0 regression, PR #69)+ audioStudioClearAudio, charactersPickChip, trainInstall, trainRemoveImage,+ trainUseInVideo,});diff --git a/webapp/js/editor.js b/webapp/js/editor.jsindex 681f642..81ef6f7 100644--- a/webapp/js/editor.js+++ b/webapp/js/editor.js@@ -1714,6 +1714,29 @@ function sbeRippleDelete(clips, id) {return { clips: out, ok: true, removed: c };}+// LIFT: take the shot out and LEAVE ITS HOLE. Every clip after it stays+// exactly where it was. This is what an editor means by "delete" most of+// the time — the shot is wrong, the cut around it is right — and it is the+// NLE default (Delete lifts, Shift+Delete ripples). The hole is a slug, a+// real object on the timeline: black, no file, same window. It can be filled+// from the pool, trimmed, or ripple-deleted later when the cut is ready to+// close up. A ripple here would move every downstream cut off its beat.+function sbeLiftDelete(clips, id) {+ const c = sbeById(clips, id);+ if (!c) return { clips: clips, ok: false, why: 'gone' };+ if (c.locked) return { clips: clips, ok: false, why: 'locked' };+ if (sbeKind(c) === 'slug') return { clips: clips, ok: false, why: 'already a hole' };+ const len = sbeLen(c);+ const out = clips.map(x => (x === c) ? {+ id: c.id, kind: 'slug', path: null, proxy: null, duration: null,+ start: 0, end: sbeRound(len),+ film_start: c.film_start, film_end: c.film_end,+ source: 'human', locked: false, _gap: c._gap,+ } : Object.assign({}, x));+ sbeLayout(out);+ return { clips: out, ok: true, removed: c };+}+function sbeSplitAt(clips, t, newId) {const c = sbeClipAt(clips, t);if (!c) return { clips: clips, ok: false, why: 'nothing there' };@@ -5488,7 +5511,10 @@ function sbePaintInspector() {sect('Clip','<button type="button" class="ghost-btn" onclick="sbeToggleLock()">' +(c.locked ? 'Unlock' : 'Lock') + '</button>' +- '<button type="button" class="ghost-btn" onclick="sbeRippleSelected()">Ripple delete</button>') ++ '<button type="button" class="ghost-btn" onclick="sbeLiftSelected()" ' ++ 'title="Take this shot out and leave its hole. Nothing else moves. (Delete)">Lift</button>' ++ '<button type="button" class="ghost-btn" onclick="sbeRippleSelected()" ' ++ 'title="Take this shot out and close the gap. Everything after it slides earlier. (Shift+Delete)">Ripple delete</button>') +sect('Sound',// THE J-CUT'S ONE SWITCH. Only a video clip has sound of its own, so// only a video clip is offered it.@@ -7268,6 +7294,13 @@ function sbeRippleSelected() {sbePaint();}+function sbeLiftSelected() {+ if (!SBE.sel) return;+ sbeMutate(cs => sbeLiftDelete(cs, SBE.sel));+ SBE.sel = '';+ sbePaint();+}+function sbeSplitHere() {sbeMutate(cs => sbeSplitAt(cs, SBE.playhead));}@@ -7570,7 +7603,8 @@ document.addEventListener('keydown', (ev) => {if (ev.key === ' ') { ev.preventDefault(); sbeTogglePlay(); return; }if (ev.key === 'ArrowLeft') { ev.preventDefault(); sbeStop(); sbeSeek(SBE.playhead - (ev.shiftKey ? step * 10 : step)); return; }if (ev.key === 'ArrowRight') { ev.preventDefault(); sbeStop(); sbeSeek(SBE.playhead + (ev.shiftKey ? step * 10 : step)); return; }- if (ev.key === 'Delete' || ev.key === 'Backspace') { ev.preventDefault(); sbeRippleSelected(); return; }+ if ((ev.key === 'Delete' || ev.key === 'Backspace') && ev.shiftKey) { ev.preventDefault(); sbeRippleSelected(); return; }+ if (ev.key === 'Delete' || ev.key === 'Backspace') { ev.preventDefault(); sbeLiftSelected(); return; }if (ev.key === 's' || ev.key === 'S') { ev.preventDefault(); sbeSplitHere(); return; }if ((ev.metaKey || ev.ctrlKey) && (ev.key === 'z' || ev.key === 'Z')) {ev.preventDefault();@@ -7862,7 +7896,7 @@ Object.assign(globalThis, {sbeOvTrim, sbeOvAdd, sbeOvDelete, sbeStripOwned,sbePictureCarriesSound, sbeStripsAt, sbeClipAt, sbeHoles,sbeBeatGrid, sbeGridIsAGuess, sbeSnapTime, sbeById,- sbeMoveTo, sbeTrim, sbeRippleDelete, sbeSplitAt,+ sbeMoveTo, sbeTrim, sbeRippleDelete, sbeLiftDelete, sbeSplitAt,sbeNewId, sbePlaceUnplaced, sbeKind, sbeBright,sbeBrightnessCss, sbeSetBrightness, sbeDropIndex, sbeInsertAt,sbeReorderTo, sbeCleanClip, sbeSaveBody, sbeErrorsByClip,@@ -7914,4 +7948,8 @@ Object.assign(globalThis, {sbeZoomSlide, sbeOnTlWheel, sbePrepare, sbePrepareCancel,sbeAuto, sbeGenClose, sbeGenSubmit, sbeRenderFilm,sbeExportNle, sbeTick, workflowSwitch,+ // inline-handler targets: generated markup resolves these through the+ // global scope (the v4.9.0 regression, PR #69)+ sbeLiftSelected, sbeOvDeleteSel, sbeOvFadeCommit, sbePlace,+ sbeRippleSelected, sbeToggleLock,});diff --git a/webapp/js/loras.js b/webapp/js/loras.jsindex da92883..b158dc7 100644--- a/webapp/js/loras.js+++ b/webapp/js/loras.js@@ -1259,4 +1259,8 @@ Object.assign(globalThis, {onIngredientCharChange, onIngredientCharStrength, refreshLoras, _loraGenerationCompatible,renderLorasList, appendTriggerToPrompt, _updateCharsPickerVisibility, refreshManualCharacters,_renderManualCharactersList, _renderCharsAppliedNote, renderCharacterStrip,+ // inline-handler targets: generated markup resolves these through the+ // global scope (the v4.9.0 regression, PR #69)+ deleteLora, downloadLora, removeLoraFromActive, renameLora,+ setLoraStrength, toggleLora,});diff --git a/webapp/js/preview.js b/webapp/js/preview.jsindex 15a6c15..36aa7f7 100644--- a/webapp/js/preview.js+++ b/webapp/js/preview.js@@ -1807,4 +1807,7 @@ Object.assign(globalThis, {closeCivitaiModal, civitaiSearch, civitaiLoadMore, renderCivitaiGrid,openModelsModal, closeModelsModal, refreshModelsModal, startDownload,cancelDownload,+ // inline-handler targets: generated markup resolves these through the+ // global scope (the v4.9.0 regression, PR #69)+ _charactersManageDelete, _charactersManageSave, civitaiAuthSave, civitaiSetFamily,});diff --git a/webapp/js/queue.js b/webapp/js/queue.jsindex de8c228..f6ac9d9 100644--- a/webapp/js/queue.js+++ b/webapp/js/queue.js@@ -1192,23 +1192,62 @@ async function refreshUploadsStrip() {if (!els.recentStrip) return;if (!_uploadsCache.length) {els.recentWrap.style.display = 'none';+ els.recentStrip.innerHTML = ''; // no stale thumbs behind a hidden stripreturn;}els.recentWrap.style.display = '';const currentPath = els.hidden.value;+ // Each thumbnail carries its own "×" (a Pinokio ask): the strip had no+ // way to remove an imported image, and files removed by hand in Finder+ // kept their thumbnails. Listeners, not inline onclick — generated+ // markup resolves inline handlers through the global scope, which is+ // the v4.9.0 regression class (see scripts/lint_webapp.mjs).els.recentStrip.innerHTML = _uploadsCache.map(u => `- <img class="picker-recent-thumb${u.path === currentPath ? ' selected' : ''}"- src="${escapeHtml(_thumbUrl(u.url, 128))}"- data-path="${escapeHtml(u.path)}"- title="${escapeHtml(u.name)} · ${u.size_kb} KB · ${escapeHtml(u.mtime)}"- alt="">+ <span class="picker-recent-wrap">+ <img class="picker-recent-thumb${u.path === currentPath ? ' selected' : ''}"+ src="${escapeHtml(_thumbUrl(u.url, 128))}"+ data-path="${escapeHtml(u.path)}"+ title="${escapeHtml(u.name)} · ${u.size_kb} KB · ${escapeHtml(u.mtime)}"+ alt="">+ <button type="button" class="picker-recent-x" data-path="${escapeHtml(u.path)}"+ title="Delete this imported image"><svg class="ph" aria-hidden="true"><use href="#ph-x-bold"/></svg></button>+ </span>`).join('');els.recentStrip.querySelectorAll('img').forEach(img => {img.addEventListener('click', () => pickerSetImage(key, img.dataset.path));});+ els.recentStrip.querySelectorAll('.picker-recent-x').forEach(btn => {+ btn.addEventListener('click', (e) => { e.stopPropagation(); deleteUpload(btn.dataset.path); });+ });});}+// Delete an imported reference image from disk (plus its thumbnails), then+// repaint every strip. A picker currently pointing at the deleted file is+// cleared so a queued job cannot reference a path that no longer exists.+async function deleteUpload(path) {+ if (!path) return;+ const name = String(path).split('/').pop();+ if (!confirm(`Delete "${name}" from your imported images? This removes the file.`)) return;+ let r;+ try {+ r = await api('/upload/delete', 'POST', new URLSearchParams({path}));+ } catch (e) {+ phosToast('Could not delete: ' + (e && e.message ? e.message : e), {});+ return;+ }+ if (!r || r.ok === false) {+ phosToast('Could not delete: ' + ((r && r.error) || 'unknown error'), {});+ return;+ }+ PICKERS.forEach(key => {+ const els = pickerEls(key);+ if (els && els.hidden && els.hidden.value === path) pickerSetImage(key, '');+ });+ await refreshUploadsStrip();+ if (typeof refreshIngredientRecent === 'function') { try { refreshIngredientRecent(); } catch (e) {} }+}+// ====== Ingredients (multi-reference) picker ======// Unlike the single-image pickers above, Ingredients holds an ORDERED LIST of// 2-8 server-side paths. The list is mirrored into the hidden@@ -2932,6 +2971,24 @@ function findOutputByPath(path) {}return o || null;}+// Persistent stage mute (fuschichou, Pinokio, 2026-09-01). Every finished+// render lands in a FRESH <video> element, so muting via the native control+// only ever silenced that one clip — the next overnight completion started+// audible again. The native mute button is the toggle; this makes it stick:+// each new stage/lightbox video starts in the last chosen state, and any+// mute/unmute the user makes is written back.+const STAGE_MUTE_KEY = 'ph_stage_muted';+function _stageMutePreferred() {+ try { return localStorage.getItem(STAGE_MUTE_KEY) === '1'; } catch (e) { return false; }+}+function _wireStageMutePersistence(video) {+ if (!video) return;+ video.muted = _stageMutePreferred();+ video.addEventListener('volumechange', () => {+ try { localStorage.setItem(STAGE_MUTE_KEY, video.muted ? '1' : '0'); } catch (e) {}+ });+}+function stageMayAutoSelectOutput() {return !activePath && !window._liveStageOwnsPlayer;}@@ -3000,6 +3057,7 @@ function selectOutput(path, options) {`<img class="player-handoff-backdrop" src="${escapeHtml(liveBackdrop)}" alt="">` +`<video class="player-handoff-media" controls autoplay src="${escapeHtml(playerSrc)}"></video>`;const handoffVideo = wrap.querySelector('.player-handoff-media');+ _wireStageMutePersistence(handoffVideo);const revealFinished = () => {if (!handoffVideo || !handoffVideo.isConnected) return;handoffVideo.classList.add('is-ready');@@ -3017,6 +3075,7 @@ function selectOutput(path, options) {setTimeout(revealFinished, 4000);} else {wrap.innerHTML = `<video controls autoplay src="${escapeHtml(playerSrc)}"></video>`;+ _wireStageMutePersistence(wrap.querySelector('video'));}// Surface aspect adapts to actual media dimensions so vertical clips// render vertically (previous hardcoded 16:9 surface + object-fit:cover@@ -3125,6 +3184,7 @@ function openExpandLightbox() {stage.innerHTML = isPhoto? `<img src="${o.url}" alt="${escapeHtml(o.name)}">`: `<video src="${o.url}" controls autoplay></video>`;+ _wireStageMutePersistence(stage.querySelector('video'));if (meta) {const sizeLbl = `${o.size_mb.toFixed(1)} MB`;meta.textContent = `${o.name} · ${sizeLbl}`;@@ -4409,4 +4469,8 @@ Object.assign(globalThis, {animateActive, hide, openOutputsFolder, hideActive,useAsExtendSource, loadParams, _flashActionDone, closeOutputInfoModal,togglePause, openBatch, closeBatch, queueBatch,+ // inline-handler targets: generated markup resolves these through the+ // global scope (the v4.9.0 regression, PR #69)+ _copyToClipboard, animateFromPhoto, deleteOutput, openOutputInfoModal,+ remakeInQuality, removeJob, repairModel,});diff --git a/webapp/js/settings.js b/webapp/js/settings.jsindex bd67369..5ae9bec 100644--- a/webapp/js/settings.js+++ b/webapp/js/settings.js@@ -1197,4 +1197,7 @@ Object.assign(globalThis, {openSettingsModal, toggleAnalytics, saveAnalyticsKey, clearAnalyticsKey,toggleSpicyMode, onTokenInput, toggleTokenVisibility, testToken,clearToken, closeSettingsModal, applySettings, _applyHdrPillAvailability,+ // inline-handler targets: generated markup resolves these through the+ // global scope (the v4.9.0 regression, PR #69)+ removeStoragePack,});diff --git a/webapp/js/stage.js b/webapp/js/stage.jsindex 30a89d3..a4b2748 100644--- a/webapp/js/stage.js+++ b/webapp/js/stage.js@@ -1836,4 +1836,7 @@ Object.assign(globalThis, {ideoSetSelType, ideoDeleteSel, ideoRender, ideoAddImagePaletteColor,ideoBuildCaption, ideoOnRawInput, ideoApplyRaw, ideoLoadExample,ideoStagePointerDown, imgStudioGenerate, imgStudioRefreshLibrary, imgStudioCopyPath,+ // inline-handler targets: generated markup resolves these through the+ // global scope (the v4.9.0 regression, PR #69)+ imgStudioClearRef, openExternal,});diff --git a/webapp/js/storyboard.js b/webapp/js/storyboard.jsindex 5305642..89422f6 100644--- a/webapp/js/storyboard.js+++ b/webapp/js/storyboard.js@@ -2111,4 +2111,8 @@ Object.assign(globalThis, {sbStopShot, sbStopFilm, sbExport, sbFilmOpen,sbFilmPaint, sbBoardChip, sbRowAction, sbAddActiveToBoard,sbOpenFromClip, sbPollHook,+ // inline-handler targets: generated markup resolves these through the+ // global scope (the v4.9.0 regression, PR #69)+ sbDeleteBoard, sbFilmReveal, sbFilmSelect, sbFixError,+ sbOpenShotClip, sbPickCast, sbScrollToShot,});diff --git a/webapp/style/panel.css b/webapp/style/panel.cssindex e95d8de..35490b2 100644--- a/webapp/style/panel.css+++ b/webapp/style/panel.css@@ -7391,6 +7391,20 @@}.picker-recent-thumb:hover { border-color: var(--accent, #5a7cff); transform: translateY(-1px); }.picker-recent-thumb.selected { border-color: var(--success, #3fb950); }+ /* The strip's per-thumbnail delete "×" — same grammar as the Ingredients+ tile's remove button, sized for a 56 px thumb. Hidden until hover so+ the strip stays a strip, not a row of buttons. */+ .picker-recent-wrap { position: relative; flex: 0 0 auto; display: inline-block; }+ .picker-recent-x {+ position: absolute; top: -4px; right: -4px;+ width: 18px; height: 18px; border-radius: 50%; border: none;+ display: flex; align-items: center; justify-content: center;+ background: rgba(0,0,0,0.72); color: #fff; cursor: pointer;+ opacity: 0; transition: opacity 120ms ease, background 120ms ease;+ }+ .picker-recent-wrap:hover .picker-recent-x, .picker-recent-x:focus-visible { opacity: 1; }+ .picker-recent-x:hover { background: var(--danger, #d9534f); }+ .picker-recent-x .ph { width: 10px; height: 10px; }/* Ingredients (multi-reference) picker — drop tile + thumbnail grid. */.ingredients-drop { min-height: 96px; }