fix(web-standalone): revalidate on every visit, start in the first field, honour hidden - #126
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #124.
Three things on a fresh visit.
server.pysent noCache-Control, so browsers applied heuristic caching toindex.htmlandchangelog.jsonand served yesterday's file for hours; only an incognito window showed the current one.end_headers()now sendsCache-Control: no-cacheon every response that has none (the proxy routes keep theirno-store), and the page fetches the changelog withcache: "no-cache". Cloudflare honours the origin header.preventScrollso a phone does not jump. A deep link, an incident link or a filled field leaves focus alone.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-cacheon/and/changelog.json,no-storeon/proxy/spamdetector/alerts.prefix-input; with the intro open the focus is on its button and moves toprefix-inputwhen it closes, scrollY 0; the label and the manual banner computedisplay: nonewhile hidden; the changelog request goes out on every load.pytest web-standalone/tests: 6 passed.🤖 Generated with Claude Code