From dab7d89db723a9d9c0b64d6fed2f07e0dacc05a3 Mon Sep 17 00:00:00 2001 From: "M. C. DeMarco" Date: Mon, 5 Oct 2026 17:39:09 -0400 Subject: [PATCH 1/3] Playground fix for Safari. YMMV --- playground/playground.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playground/playground.css b/playground/playground.css index 6d7740d6..8229ff5d 100644 --- a/playground/playground.css +++ b/playground/playground.css @@ -317,7 +317,7 @@ body[data-theme='dark'] .collapsible summary { text-align: center; } #drawing { - flex: 1 1 auto; + flex: 1 1 0; overflow: auto; transition: background-color 0.3s; background-color: inherit; @@ -331,7 +331,7 @@ body[data-theme='dark'] .collapsible summary { #drawing > svg { flex-shrink: 0; max-width: 100%; - width: auto; + width: 100%; height: auto; } .game-info { @@ -515,7 +515,7 @@ body[data-theme='dark'] input[type="radio"] { } #drawing { width: 100%; - flex: 1 1 auto; + flex: 1 1 0; min-height: 0; align-items: flex-start; justify-content: flex-start; From 1738a6194540bd935d7a97d40ee4c1fbfe98c50c Mon Sep 17 00:00:00 2001 From: "M. C. DeMarco" Date: Mon, 5 Oct 2026 21:42:41 -0400 Subject: [PATCH 2/3] Playground display fix for safari --- playground/playground.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playground/playground.js b/playground/playground.js index fcd6f472..f09773d1 100644 --- a/playground/playground.js +++ b/playground/playground.js @@ -128,7 +128,7 @@ function clearInterimRenderCache() { } function applyInterimPartialRender(gamename, maskedPartial, renderOpts) { - const preview = createEngineFromCommitted(gamename); + const preview = createEngineForView(gamename, renderOpts.perspective); if (!preview) { return; } @@ -1522,7 +1522,7 @@ function formatSingleStashItemContent(item, glyphRenderOptions) { svgid: glyphSvgId, }; const glyphSvg = renderPlaygroundStashGlyph(item.glyph, localGlyphOpts); - content += `${item.count} × ${glyphSvg}`; + content += `${item.count} × ${glyphSvg}`; if (item.movePart) { content += ` (${item.movePart})`; } From 3d00adbb9adf3a7ca0d74ced076d4b8be5903252 Mon Sep 17 00:00:00 2001 From: "M. C. DeMarco" Date: Tue, 6 Oct 2026 14:34:13 -0400 Subject: [PATCH 3/3] Playground frame fix --- playground/playground.js | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/playground/playground.js b/playground/playground.js index f09773d1..2f724da1 100644 --- a/playground/playground.js +++ b/playground/playground.js @@ -135,11 +135,8 @@ function applyInterimPartialRender(gamename, maskedPartial, renderOpts) { preview.move(maskedPartial, { partial: true }); // Partial moves mutate live board/hands but do not push stack; re-loading from // serialize() would drop in-progress placement (e.g. Thricewise compound @coords). - let render = preview.render(renderOpts); - if (Array.isArray(render)) { - render = render[render.length - 1]; - } - window.localStorage.setItem("interim", JSON.stringify(render)); + const render = preview.render(renderOpts); + window.localStorage.setItem("interim", JSON.stringify(Array.isArray(render) ? render : [render])); window.localStorage.setItem( simStorage.interimPerspective, String(renderOpts.perspective ?? ""), @@ -2211,17 +2208,27 @@ function renderGame(...args) { displayOptionsContainer.style.display = 'block'; } - let data = null; + let interim = null; try { - data = JSON.parse(window.localStorage.getItem("interim")); + interim = JSON.parse(window.localStorage.getItem("interim")); } catch { - data = null; + interim = null; } const currentPerspective = String(getRenderPerspective(game, gamename)); const interimPerspective = window.localStorage.getItem(simStorage.interimPerspective); - if (data !== null && interimPerspective !== currentPerspective) { + if (interim !== null && interimPerspective !== currentPerspective) { clearInterimRenderCache(); - data = null; + interim = null; + } + // A move in progress pages through its own frames; paging reuses the cached ones. + let data = null; + if (interim !== null) { + if (skipFrameRefresh && currentRenderFrames && currentRenderFrames.length > 0) { + data = currentRenderFrames[currentRenderFrameIndex]; + } else { + cacheRenderFrames(interim); + data = activeRenderFrame(interim); + } } let renderOpts = playgroundRenderOpts(game, gamename);