Files
poli0981andClaude Opus 5.5 ec1bf939f6 docs: split CHANGELOG.md into one file per release
changelog/v<major>/<major>.<minor>.x/<version>.md for each of the 42
releases from v1.0.0 to v4.7.1, and changelog/beta/ for pre-releases
(none has been published; its README says how one would be filed).
CHANGELOG.md becomes the index: what the layout is, [Unreleased] exactly
as it was, and a table per major version (version, date, edition) that
links each file.

Each file is its section, copied byte for byte except that its heading
is the file's H1 (so the sub-headings move up one level, outside code
fences), relative links gain ../../../ so they name the same repository
paths, and the --- separators between sections are gone. Checked by
reversing all three changes on every file and comparing with the
original section: 40 of 40 equal. Two releases had no section: v1.0.0
(its GitHub release notes, which the changelog pointed to as "Initial
stable") and v1.1.3 (its tag message).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:02:37 +07:00

8.3 KiB
Raw Permalink Blame History

v4.0.1 – 2026-09-23 (The "Human Check" Edition)

All versions

The web app now asks each browser to pass a Cloudflare Turnstile check once a day after the terms are accepted, shows a changed legal document as a diff instead of asking for a full re-read, and counts page views with Cloudflare Web Analytics. The desktop app's game artwork - blank because its webview sends a Referer the zone's Hotlink Protection refuses - is back, and nothing in the app loads data before the reader is past the consent step and the check. Web app + desktop/Android bumped 2.0.0 → 2.0.1; repo public-facing version 4.0.0 → 4.0.1.

The web changes are already live - pushing main deploys. The desktop app offers 2.0.1 through its updater once the release is published; on Android, install the new APK over the old one. Returning visitors see the consent gate once, listing only the Privacy Policy and Terms of Use changes.

✨ Added

  • A legal document that changes now shows you the change, not the whole document again. Each binding document is hashed at build time (virtual:legal-versions); when one differs from the version you accepted, the consent gate reopens on its own and lists only that document, with a +/- diff against the copy kept in your browser. TERMS_VERSION is no longer the only signal — it stays as the lever that forces a full re-read. Clearing site data removes the stored copy, and the gate then links to the full text instead.
  • Cloudflare Web Analytics, cookieless, loaded only after you accept the terms and never in the desktop or Android apps. It replaces an "automatic" edge injection that had been enabled for months and could never have worked: it inserts an inline script, and a hash-based CSP ignores 'unsafe-inline' by specification, so it only ever produced two console errors per page load. Measured on the live site: the beacon returns 200 and its reports 204, with nothing loaded at all before consent.
  • A human-verification step for suspicious page loads, and a country block (mainland China, Russia, Argentina). Both are WAF custom rules, live since 2026-09-20 and documented with their expressions and every exclusion in docs/SECURITY_SETUP.md. Verified after they went live: a plain curl with no browser User-Agent is still served every public path, and the challenge rate has stayed at 0%. BLOCKED_COUNTRIES in wrangler.jsonc makes the Worker refuse the same countries as defence in depth; the rule is the boundary, because prerendered pages never reach the Worker at all.
  • A Cloudflare Turnstile check on the website, separate from the WAF challenge above: after accepting the terms, each browser passes a Turnstile widget at most once every 24 hours before the app loads its data. The Worker verifies the token at POST /api/human-check with the TURNSTILE_SECRET secret, checking the action and the hostname; nothing is stored server-side. It is an overlay like the consent gate, so prerendered pages and crawlers are unaffected, and it is soft on purpose: /api/data/*, /img/* and the desktop and Android apps never require it (the Terms of Use promise as much). It refuses only when Cloudflare says no; a missing secret, a siteverify outage, a widget misconfiguration or being offline let the reader through for that page load. The web CSP gains challenges.cloudflare.com in script-src and a new frame-src; verify-dist.mjs fails the Tauri build if either appears there. The privacy policy and the terms describe it, so returning visitors see those two documents' changes at the consent gate once.

🐛 Fixed

  • Game artwork was blank in the desktop app (and would be on Android): the WebView2 webview sends Referer: http://tauri.localhost/, and the zone's Hotlink Protection refused every /img/* request carrying it — before the Worker ran, so nothing in the app's logs showed it. Every <img> now sets referrerpolicy="no-referrer", which the protection allows, and src/lib/images.test.ts fails on one that does not. That also fixes the thumbnails npm run dev could never show. Installed 2.0.0 apps are covered by a Configuration Rule on the zone until they update; Hotlink Protection itself stays on for other sites.

  • /activity and /charts/delisted fetched their data before consent. The root layout held the catalogue back, but those two pages called load() from effects of their own, and the activity feed also refetched on window focus. The gate now lives in Resource itself: an enabled option read inside every load(), which every resource sets to appReady() - consent accepted and the human check cleared - so a held-back load starts by itself once both are passed. src/lib/resource.test.ts fails on a new Resource without it.

  • The service worker threw non-precached-url: /200.html on every page load. navigateFallback named the adapter-static fallback, which is written into dist/ after workbox has already globbed the build output — so it was never in the precache, and the throw abandoned the rest of the worker's setup. It is now /, which is both precached and what Cloudflare and Tauri already serve for an unmatched path. verify-dist.mjs fails the build if the two ever disagree again.

  • /admin no longer writes the maintainer's email address into public Git. Commit bodies and data/overrides/*.json say admin; the four override files that already carried it were rewritten. The acting identity is still recorded in D1, where /admin/audit reads it.

  • /admin said "Your Cloudflare Access session has expired" straight after signing in, in a private window too. Its API was at /api/admin/*, behind a second Cloudflare Access application. Access issues its session cookie per application and fetch() cannot follow the sign-in redirect, so the session for /admin never reached the API and every call bounced to the login page. The API now lives at /admin/api/*, under the page's own application, and worker/index.test.ts drives it through the real router and token check. The /api/admin Access application is no longer used and can be deleted.

  • scripts/discover_new.py took any host ending in cloudflareaccess.com for an Access login page, lookalikes included; the suffix check now needs the dot.

  • The i18n, SEO and chart tests share one comment stripper instead of three regexes, one of which removed text that was never inside a comment.

📚 Docs

  • docs/ACKNOWLEDGEMENTs.md listed the dependencies of the React app — React 18, react-router, i18next, Zustand, TanStack Query, Radix, shadcn/ui, OpenPGP.js, Tailwind 3, TypeScript 5, PostCSS. None of that has shipped since the v4 rewrite. Replaced with the real list, licences checked against node_modules rather than remembered (echarts-wordcloud is ISC, not BSD-3-Clause), and the claim that /about carries a "full SPDX list" dropped — it is a curated subset.
  • docs/DEPLOYMENT.md records that a zero-duration "Workers Builds" failure on a PR branch is a preview-build artefact, not a broken commit, so the next person does not go looking for a bug that is not there.
  • docs/SECURITY_SETUP.md section 10 claimed the packaged apps survived Hotlink Protection because their webview sent no Referer, recommended switching the protection off, and said no allowlist could express the apps' origin. The first was no longer true and the last never was; it now documents the per-image fix and the Configuration Rule, with the measured check. A new section 12 covers the Turnstile widget settings, the secret and local testing with Cloudflare's test keys (web/.dev.vars.example).
  • Stale public/_headers paths (the file has been static/_headers since the SvelteKit move) and a SITE_ORIGIN that is really API_ORIGIN in src/lib/site.ts are corrected in worker/lib/http.ts, svelte.config.js and the security doc; _headers itself gains comments on why images opt out of its Referrer-Policy.

🛠 CI

  • The Android release builds the tag it releases (a manual run used to build main), installs platform-tools only (the SDK no longer carries tools, which stopped android-v2.0.0), and names the commit it built.
  • CodeQL also runs when only .mjs/.cjs files change, and verify-dist.mjs finds <script>/<style> by scanning.