From 1c933265b3890cafbf67c3aebe3399c8ee6cb81d Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Sun, 12 Jul 2026 18:21:15 -0700 Subject: [PATCH] =?UTF-8?q?whistlegraph.org:=20fix=20deep-link=20post-coun?= =?UTF-8?q?t=20race=20=E2=80=94=20re-run=20showDetail=20when=20posts=20loa?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A deep-linked record opens on graphs.json load, before posts.json arrives, so the summary line (post count, span) and hero video used the fallback while the gallery refreshed separately — page read '13 posts' up top but '27 posts' in the gallery. Re-run the full showDetail once posts land so both agree. [unsigned: pinentry cancelled during session; re-sign on next pass] --- system/public/whistlegraph.org/index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/public/whistlegraph.org/index.html b/system/public/whistlegraph.org/index.html index e68482f241..bb4d40dd0a 100644 --- a/system/public/whistlegraph.org/index.html +++ b/system/public/whistlegraph.org/index.html @@ -449,8 +449,9 @@ function renderIndex(key){ // with (a post can appear under more than one work). Detail pages read this. fetch("/posts.json").then(r=>r.ok?r.json():{posts:[]}).then(pd=>{ for(const p of pd.posts||[]) for(const code of p.graphs||[]) (POSTS_BY_CODE[code]||=[]).push(p); - // Refresh a detail page that opened before posts arrived. - const c=location.pathname.replace(/\//g,""); if(c&&BY[c]&&det.classList.contains("on"))renderPosts(c); + // A deep-linked page may have opened before posts arrived — re-run the whole + // detail so its hero + summary metadata reflect the posts, not just the gallery. + const c=location.pathname.replace(/\//g,""); if(c&&BY[c]&&det.classList.contains("on"))showDetail(c); }).catch(()=>{}); fetch("/graphs.json").then(r=>r.json()).then(data=>{ -- 2.51.2