From e85f72c546fe579f3024d61f0d2f901bf1ddb4de Mon Sep 17 00:00:00 2001 From: Eric Wagoner Date: Sun, 9 Aug 2026 13:14:55 -0400 Subject: [PATCH] The where-it-lives card actually behaves; assets stop serving stale MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Eric, again with the screenshot that tells the truth: "when I click it it greys out and nothing seems to happen." Two roots. My own #storedform { display:flex } silently DEFEATED the hidden attribute (an author display beats the UA's [hidden] rule), so the form was visible from load and the click's only visible effect was disabling the link. The rule is now :not([hidden])-scoped, the click swaps the sentence for the form and focuses the select. And the "unstyled" select he saw was last week's stylesheet: /static assets had no cache-busting, so my fresh-fetch Chrome verification passed while his browser held the old CSS. Asset URLs now carry ?v= — an upgrade busts every browser's cache by construction. Verified the full interaction in-browser this time: form hidden on load, click reveals with 142 container options in a styled select. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_016jXZFSTZQKzAC8fqpWSz9g --- src/bggpipe/static/app.css | 5 ++++- src/bggpipe/templates/pages/librarygame.html | 5 +++-- src/bggpipe/templates/shell.html | 4 ++-- src/bggpipe/webreview.py | 8 +++++++- tests/test_web_dashboard.py | 15 +++++++++++++-- 5 files changed, 29 insertions(+), 8 deletions(-) diff --git a/src/bggpipe/static/app.css b/src/bggpipe/static/app.css index 4d3d4c3..2fb69d2 100644 --- a/src/bggpipe/static/app.css +++ b/src/bggpipe/static/app.css @@ -536,7 +536,10 @@ select { border: 2px solid var(--board-edge); border-radius: var(--radius); padding: .25rem .45rem; background: #fff; max-width: 24rem; } -#storedform { display: flex; gap: .5rem; align-items: center; } +/* :not([hidden]) so the hidden attribute still works — a bare + display:flex would override the browser's [hidden] rule and show + the form permanently */ +#storedform:not([hidden]) { display: flex; gap: .5rem; align-items: center; } #storedform select { flex: 1 1 auto; } .empty { diff --git a/src/bggpipe/templates/pages/librarygame.html b/src/bggpipe/templates/pages/librarygame.html index 823d7e1..1d3dd62 100644 --- a/src/bggpipe/templates/pages/librarygame.html +++ b/src/bggpipe/templates/pages/librarygame.html @@ -74,11 +74,12 @@ function wireStored(g) { const btn = document.getElementById("editstored"); if (!btn) return; btn.addEventListener("click", async () => { + btn.closest("p").hidden = true; // the sentence yields to the form const form = document.getElementById("storedform"); form.hidden = false; - btn.disabled = true; - const all = await fetchJSON("/api/library"); const pick = document.getElementById("storedpick"); + pick.focus(); + const all = await fetchJSON("/api/library"); pick.innerHTML = `` + all .filter(o => o.bgg_id && o.bgg_id !== g.bgg_id) .sort((a, b) => (a.name || "").localeCompare(b.name || "")) diff --git a/src/bggpipe/templates/shell.html b/src/bggpipe/templates/shell.html index 7c99657..4afca65 100644 --- a/src/bggpipe/templates/shell.html +++ b/src/bggpipe/templates/shell.html @@ -7,7 +7,7 @@ - + @@ -32,7 +32,7 @@
- +
diff --git a/src/bggpipe/webreview.py b/src/bggpipe/webreview.py index 09b300d..01b856f 100644 --- a/src/bggpipe/webreview.py +++ b/src/bggpipe/webreview.py @@ -724,7 +724,13 @@ def create_app( (a detail page keeps its section lit).""" active = active or name templates = resources.files("bggpipe") / "templates" - shell = (templates / "shell.html").read_text() + # version-stamped asset URLs: a browser that cached last week's + # stylesheet must fetch the new one the moment the app upgrades + from bggpipe import __version__ + + shell = ( + (templates / "shell.html").read_text().replace("__ASSET_V__", __version__) + ) fragment = (templates / "pages" / f"{name}.html").read_text() nav = "\n".join( f'