From 3d759cc71b404f62f26ea7c1c1ac937214d71ee8 Mon Sep 17 00:00:00 2001 From: 3dtours Date: Tue, 6 Oct 2026 07:28:13 +0700 Subject: [PATCH] fix(studio): let a session an older build filled heal on the next open MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous frame stops a session being written, not read: the browser that reported this still holds the olive develop under the ORF's name, and a reload would paint it once more. A session photo named like a RAW is that develop and nothing else — the RAW branch writes none — so the restore path now reads the parked RAW first and only falls back to such a copy when there is nothing parked to develop. An ordinary photo's name is left alone. Measured in Chromium on the built bundle, with the session poisoned and the ORF parked: a copy named POISON.ORF opens as the re-developed 1600x1197 frame (mean 167.3,164.2,138) and a copy named POISON.jpg opens as itself. --- docker/frontend/src/App.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/docker/frontend/src/App.tsx b/docker/frontend/src/App.tsx index 81b6b9f..474aec0 100644 --- a/docker/frontend/src/App.tsx +++ b/docker/frontend/src/App.tsx @@ -761,11 +761,17 @@ export function Workspace() { loadPhoto() .then(async (photo) => { if (!alive) return; - if (photo) { - return adoptPhoto(photo.bytes, photo.name, new Blob([photo.bytes as BlobPart], { type: 'image/jpeg' }), true); - } + const show = (row: { name: string; bytes: Uint8Array }) => + adoptPhoto(row.bytes, row.name, new Blob([row.bytes as BlobPart], { type: 'image/jpeg' }), true); + // A session photo named like a RAW is a develop an older build left + // there — the RAW branch writes none any more — and it carries that + // build's colour, which is how a fixed develop kept opening olive. The + // parked RAW is the copy that is not stale, so it is read first; the + // session's is only shown when nothing is parked to develop. + if (photo && !isRawName(photo.name)) return show(photo); const parked = await readRaw(); - if (!alive || !parked) return; + if (!alive) return; + if (!parked) return photo ? show(photo) : undefined; const jpeg = await developRaw(parked.bytes); await adoptPhoto(jpeg, parked.name, new Blob([jpeg as BlobPart], { type: 'image/jpeg' }), true, parked.bytes); })