Skip to content

fix(web-standalone): revalidate on every visit, start in the first field, honour hidden - #126

Merged
khagele merged 1 commit into
mainfrom
fresh-visit
Sep 7, 2026
Merged

khagele merged 1 commit into
mainfrom
fresh-visit

Conversation

@khagele

@khagele khagele commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Closes #124.

Three things on a fresh visit.

  • 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 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.
  • A Step 2 label showed too early. "Add repeater prefixes within this cluster" 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 -D -: Cache-Control: no-cache on / and /changelog.json, no-store on /proxy/spamdetector/alerts.
  • In the pane: a fresh visit focuses prefix-input; with the intro open the focus is on its button and moves to prefix-input when it closes, scrollY 0; the label and the manual banner compute display: none while hidden; the changelog request goes out on every load.
  • pytest web-standalone/tests: 6 passed.

🤖 Generated with Claude Code

…eld, 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 <noreply@anthropic.com>
@khagele
khagele merged commit 79af285 into main Sep 7, 2026
2 checks passed
@khagele
khagele deleted the fresh-visit branch September 7, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fresh visit: What's new is stale, nothing has focus, and a Step 2 label shows too early

1 participant