From c346b657eb0cdd3b1c42b5f54691bf0e2e6a0ba5 Mon Sep 17 00:00:00 2001 From: 3dtours Date: Tue, 6 Oct 2026 07:23:21 +0700 Subject: [PATCH] fix(studio): stop the session from serving a frame an older build developed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A RAW was parked in OPFS whole and its develop kept in the session too, so a reload painted the stored JPEG and never went back to the sensor. That makes a session outlive the engine that filled it: 2e36acd fixed the Olympus ORF's colour — measured against the file's own preview, mean 167.0,163.9,137.7 against the preview's 167.0,164.8,138.6 — and a browser that had opened the ORF before the fix kept painting the olive develop, which is what "the fix is deployed and it still opens olive" was. The RAW is in OPFS either way, so the RAW branch now clears the session slot instead of filling it (forgetPhoto) and the reload develops the parked sensor data again (App.tsx:767). Measured in Chromium against the deployed bundle: after a drop the session holds no photo, and a reload re-develops the parked RAW to the same 1600x1197 frame, mean 167.3,164.2,138. The cost is one develop per reload; the comment names the build stamp that would lift it. --- docker/frontend/src/App.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docker/frontend/src/App.tsx b/docker/frontend/src/App.tsx index 2a402a6..81b6b9f 100644 --- a/docker/frontend/src/App.tsx +++ b/docker/frontend/src/App.tsx @@ -1111,12 +1111,20 @@ export function Workspace() { const bytes = await fileToBytes(file); if (isRawName(file.name)) { // A camera RAW: parked in OPFS whole, developed to the JPEG the studio - // works on, and remembered in that same shape by the session — so the - // 30MB is read once, not once per reload. + // works on. The developed JPEG is deliberately NOT the session's copy: + // it is this build's reading of the sensor, and a session keeps it + // across reloads — so the next build's colour fix would never reach a + // frame already open, which is exactly how a fixed develop kept opening + // olive. The RAW is in OPFS either way, so the reload re-develops it + // (a few seconds) and always opens at the current engine's colour; the + // session's slot is cleared rather than left holding an older photo. + // + // ponytail: the reload pays one develop. Stamp the session copy with + // the build and keep it while the stamp holds, if that ever hurts. await storeRaw(bytes, file.name); const jpeg = await developRaw(bytes); await adoptPhoto(jpeg, file.name, new Blob([jpeg as BlobPart], { type: 'image/jpeg' }), false, bytes); - void savePhoto(file.name, jpeg); + void forgetPhoto(); return; } await clearRaw();