From 0df8eb127ce79825dde0b849b4a4bdf8803366c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20H=C3=A4gele?= Date: Mon, 7 Sep 2026 19:37:31 +0200 Subject: [PATCH] fix(web-standalone): revalidate on every visit, start in the first field, honour hidden Three things on a fresh visit (#124). What's new showed old entries: server.py sent no Cache-Control, so browsers applied heuristic caching to index.html and changelog.json and served yesterday's file for hours; only an incognito window showed the current one. end_headers() now sends Cache-Control: no-cache on every response that has none (the proxy routes keep their no-store), and the page fetches the changelog with cache: "no-cache". Cloudflare honours the origin header. Nothing had focus: a fresh visit now puts the cursor in the first-hop field, also right after the intro is dismissed, with preventScroll so a phone does not jump. A deep link, an incident link or a filled field leaves focus alone. "Add repeater prefixes within this cluster" showed before any cluster was locked: the label carried hidden, but a display rule on labels beat the attribute, the same trap the manual banner had a local fix for. One global rule: [hidden] { display: none !important }. Verified: curl shows Cache-Control: no-cache on / and /changelog.json and no-store on the proxy; in the pane a fresh visit focuses prefix-input, with the intro the focus is on its button and moves to prefix-input when it closes without scrolling; the label and the manual banner compute display: none while hidden; pytest 6 passed. Co-Authored-By: Claude Fable 5.1 --- web-standalone/changelog.json | 6 ++++++ web-standalone/index.html | 21 ++++++++++++++++++++- web-standalone/server.py | 12 ++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/web-standalone/changelog.json b/web-standalone/changelog.json index e883e12..732746b 100644 --- a/web-standalone/changelog.json +++ b/web-standalone/changelog.json @@ -1,4 +1,10 @@ [ + { + "id": "2026-09-07-fresh-visit", + "date": "2026-09-07", + "title": "Fresh visits start in the right place", + "body": "What's new showed old entries because the browser kept yesterday's file; the page now revalidates on every visit. A fresh visit puts the cursor in the first-hop field, also right after the intro. And a Step 2 label no longer shows before a cluster is locked." + }, { "id": "2026-09-07-the-link-carries-the-scene", "date": "2026-09-07", diff --git a/web-standalone/index.html b/web-standalone/index.html index d1dec2a..f7ac6fb 100644 --- a/web-standalone/index.html +++ b/web-standalone/index.html @@ -10,6 +10,12 @@ crossorigin="" >