main
25
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2b4b988cc7 |
docs: sync the community docs with the repository
A read-through against the code found about forty claims that had drifted. README: - Dynamic game-count and version badges. The count is index.json's total. The version is the newest v* release by semver, since an app release published last would otherwise count as "latest". - SvelteKit 3, every desktop package, and the shard layout without a last shard number. - The media host, which commits deploy, and the nine workflows the table left out. - The accessibility statement and form in the link lists. SECURITY.md: - Fix the broken bullet list. - Describe the real stack, and pushes with the built-in GITHUB_TOKEN. - Add to scope: the media host, /api/ingest/*, /api/updates/desktop and the avatar origin. AUTHORS.md and username.txt: - Donations are in FUNDING.yml. - The Add-games template is gone. - Test devices come from pc_spec. The issue forms lose the hash URLs, the GitHub Pages permalink, and the editing and GPG options. web/README.md, dev_env (EN + VI), the acknowledgements and the contact page are updated to match. The last two are not consent documents, so nobody is asked to accept the terms again. CHANGELOG [Unreleased] lists all three commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
4c987036e2 |
docs: random games and Leave site
CLAUDE.md: why /random keeps its picks in memory and only the reader rolls, the crypto sampling (not Math.random), why the route is top-level, and the base key a plural needs; how Leave site finds the page before the site, the watchdog and its three cancel events, the deliberate second click to close, and why Decline quits through exit(). Both READMEs list the random page and its modules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
0f600a99aa |
build(web): migrate to SvelteKit 3 and adapter-static 4
@sveltejs/kit 2.70.3 -> 3.1.0, @sveltejs/adapter-static 3.0.10 -> 4.0.0. Closes GHSA-27mw-82g8-phjj and GHSA-pfhg-q3qv-9q6r (dismissed in v4.4.1 as not applicable), and drops the cookie override kit 2 needed: npm audit reports nothing. - Config: svelte.config.js is refused by kit 3. Its options are now sveltekitConfig(tauri) in build/sveltekit-config.ts, passed by vite.config.ts as sveltekit(sveltekitConfig(IS_TAURI)), with tests for both CSP flavours, paths.relative, the sitemap entry and the prerender 404 handler. The unused, now-deprecated "@" alias and typescript.config hook are gone; tsconfig.json extends $app/tsconfig and owns `include`. - $lib -> #lib (package.json imports), with .js on module imports. tsconfig repeats the mapping in `paths`: svelte-check --tsgo only maps .svelte imports through `paths`, and without it every #lib component fell back to the *.svelte shim (props unchecked; proven with a planted error). - Param matchers: src/params/legaldoc.ts -> src/params.ts (defineParams). vite build imports that file with Node's own import(), so it imports #lib/legal.ts and legal.ts imports ./schema.ts by their real names. - PWA: @vite-pwa/sveltekit never supported kit 3 and wrote the worker when the SERVER build closed, which kit 3's environment build does first. build/pwa.ts wires vite-plugin-pwa in a buildApp hook after kit's prerender and before its adapter, with the same globs and URL mapping. - goto options renamed (replace, reset: false, refreshAll); the /games filter write is a shallow goto; a legacy /#/ path that matches no route falls back to location.replace (kit 3's goto rejects it). Hook types from @sveltejs/kit/hooks; the client handleError returns nothing to keep kit's message. - runed 0.35 (bits-ui) peers kit ^2: overridden to our kit, as for echarts-wordcloud. Verified against a kit 2 build of the same commit: same 11,037 files bar hashed chunks, same non-immutable precache URLs, navigateFallback "/", identical CSP per page (hashes masked), manifest and sitemap byte-equal, same visible text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
ee146dd023 |
docs: the TypeScript 7 / Node 26 / Python 3.15 move, and a runbook for 7.1
- docs/plan/16-toolchain-2026.md: the assessment - what each release
changes, what was measured here, the decisions, how to move each runtime
next time, and what was left.
- docs/plan/17-typescript-7.1.md: the springboard for dropping TypeScript 6
once 7.1 ships - start conditions and how to check them, the steps, the
planted-error table and the baselines to compare against.
- CLAUDE.md: "TypeScript is two packages, on purpose" and "One version of
each runtime"; the uv compile line says 3.15.
- dev_env (EN/VI), README, AUTHORS, TAURI.md, web/README, THIRD_PARTY,
DEPLOYMENT (Workers Builds' NODE_VERSION=26, the Checks paragraph),
ACKNOWLEDGEMENTs and the About page's stack list ("TypeScript 7 + 6").
- CHANGELOG: the Tooling entry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
||
|
|
7449489519 |
docs: anti-cheat is the developer's declaration on Steam; the extension is archived
- DISCLAIMER section 5 and ToS item 5: anti-cheat is read from the anti-cheat disclosure on the Steam store page, which the developer fills in; an undeclared one shows "-", and a declaration can be wrong. Both are consent documents: the web gate shows these two diffs once. - README, CONTRIBUTING, Contact (shown at /legal/contact, not consent-gated): no more extension; a missing game or a correction goes in Discussions > Ideas; the manual fork path queues store links only. - CLAUDE.md: the anti-cheat sweep and its rules, the trio as the one manual set a writer replaces (an override still wins), OverrideGuard, links-only queue, clean_notes, the pattern mirror; 15 data writers. - ADMIN, dev_env (+vi), web/README: the extension is no longer a producer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
ebdd7073a1 |
feat(web): keep the offline catalogue as the packs it arrived in
IndexedDB held the catalogue as ~5,568 parsed records (~9.5 MB of
structured-clone objects, readable in DevTools) while fetcher.ts threw
away the pack it had just downloaded. Now the cache stores those packs:
seven Uint8Arrays, ~1.4 MB, opaque. Obfuscation and compression like
the wire packs - the key is public - never protection.
- cache.ts: new database `f2p-catalogue`, the SAME two keys the Privacy
Policy lists (so no policy edit, no consent gate): `f2p:index` (the
DataIndex, readable public metadata) and `f2p:records` (one pack per
index entry). A generation is stored only when every shard arrived
packed - the browser never packs - and every pack's IV must be its
entry's sha256 prefix, or the cache is a miss. Both keys go in one
setMany, records first; the old code's two set() calls could leave a
new index next to old records.
- The copy app <= 2.1.x left in idb-keyval's default `keyval-store` is
read like any verified generation until the next one is written,
which delMany's it. A new database is what keeps a tab still running
old code from reading Uint8Arrays as records; indexedDB.databases() is
checked first so nobody gets an empty legacy database.
- games-loader.ts: readCache() hands back the index at once and the
records lazily, so an older cached generation is never decoded just
to compare it; fetchShard returns { plain, pack } and writeCache gets
the packs. The verify-then-cache contract is unchanged.
- The parser worker opens packs (decodeShard), so a cache hit costs the
main thread ~6 ms at most instead of a ~20 ms block (desktop,
measured), for ~45 ms more until the data is ready.
- Found in the browser: Chromium's failed AES-GCM decrypt is a
DOMException with an EMPTY message, and worker-pool's `if (error)`
read "" as success - a damaged pack resolved as a shard with no
records. The worker now always names the error and the pool rejects
on any string; both have tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
||
|
|
53556a649b |
Merge pull request #150 from poli0981/feat/data-packs
feat(data): serve shards packed at /api/data/p1, plain stays in Git |
||
|
|
4e381e734c |
docs(web): keep the README's pack note clear of the /img line
The image PR rewrites the /img route line directly below; inserting the pack entry above the unchanged shard line keeps the two edits mergeable in either order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
2cb8235d6a |
feat(data): serve shards packed at /api/data/p1, plain stays in Git
Phase A of making the dataset unreadable on the wire while the repository stays its readable home. /api/data/p1/data_NNN.bin (and removed_games.bin) is the committed file run through shared/data-pack.ts at the edge: "F2P\x01" | IV (first 12 bytes of its SHA-256) | AES-GCM(deflate-raw) under a key that is PUBLIC in this repository. Obfuscation and compression, not secrecy: curl and DevTools see an opaque blob instead of a ready-made JSON API, and it is ~15% of the JSONL (data_001: 223,907 bytes against 1,497,828). Native WebCrypto and Compression Streams only - installed apps' CSP has no 'wasm-unsafe-eval'. The cache contract does not move: a pack unpacks to the exact committed bytes, so games-loader.ts is untouched and its sha256 check against index.json runs on the unpacked bytes before anything is cached. The Worker verifies `?v=` before packing (the fetch-and-verify step and its mismatch marker are now shared with the plain versioned path), caches versioned packs immutably and unversioned ones for five minutes, and answers every error with CORS. `.bin`, not `.jsonl`, so the zone's .jsonl Compression Rule never recompresses a pack. The app fetches packs when it can unpack and falls back to the plain path for a missing pack or one that will not open - never after a network error. The plain /api/data/data/*.jsonl paths are unchanged for released apps (1.4.5 unversioned, 2.0.x ?v=), which cannot unpack. Verified locally with wrangler dev: all seven shards loaded as p1 packs, 5,568 records verified and cached in IndexedDB, /games shows 5,568 of 5,568. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
2f883238aa |
feat(img): AVIF header art minted by the cron into R2, served read-only
/img/* used to pass Steam's JPEG straight through (median 36 KB; every header is 460x215). Thumbnails and the detail hero are now AVIF for every browser that accepts it: measured locally, 6.9 KB for the 460 px hero and 2.7 KB for the 230 px thumbnail of Counter-Strike 2, against a 34.3 KB JPEG. How it is split: - worker/lib/img-mint.ts (cron, every 15 min) is the ONLY place a billed transformation happens. It builds the source list from shards that hash to data/index.json (a lagging raw.githubusercontent shard would otherwise freeze a stale list under the new generation), most-played first, encodes `s` 230 px q55 and `d` 460 px q60 with the Images binding and writes them to R2 `f2p-media` under img/v1/<w>/<path>@<t>.avif. The list is kept in a marker object, so a backfill does not re-download the shards every tick. - worker/routes/img.ts only READS: Cache API -> R2 -> Steam's JPEG. No request (unknown appid, forged ?t=, HEAD) can create a transformation or an R2 object. The old cf.image WebP branch is gone. - Budget: Images Paid has no spend cap, so IMG_TRANSFORM_MONTHLY_CAP (20,000, at most $7.50 against the agreed $15/month) is enforced by an atomic D1 counter (locks.ts bumpCounter), counted before each call, fail closed. Error 9422 stops every isolate until the month turns. Variants: s/d are negotiated on Accept with Vary: Accept. An AVIF browser gets the JPEG only as a provisional answer (one day, no X-Img-Final) and the service worker now caches only X-Img-Final responses, because CacheFirst ignores Cache-Control. t and d2 stay JPEG: released apps request them and d2 is og:image. Cache keys are normalised, so stray query strings no longer fork the edge cache, and the t capsule probe no longer runs on hashed paths where it was two guaranteed 404s. Client: thumbnails use s, the hero uses d with fetchpriority="high". The Steam URL parser moves to shared/steam-image.ts so the client, route and cron cannot disagree. worker-configuration.d.ts regenerated (runtime types unchanged). Bucket f2p-media already exists (created 2026-10-02). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
fa8b81fd9b |
docs: the Turnstile check and the Referer fix, and what they made untrue
Legal (both reopen the consent gate for returning visitors, showing only the changed lines - edited line-locally so that diff stays small): - PRIVACY_POLICY: a section on the website's Turnstile check - after acceptance, at most daily, what challenges.cloudflare.com reads (IP, User-Agent, TLS fingerprint, page signals), that Cloudflare is processor for the site and controller where it improves its bot detection (the Turnstile Privacy Addendum), that the Worker forwards the token and IP and keeps neither; the f2p:human_check storage row. "The only third party", "the verification step" and "No fingerprinting" are corrected. - ToS section 9: the check exists; /api/data/*, /img/* and the apps stay excluded from both human checks. SECURITY_SETUP: - section 10 rewritten. It said the apps survived Hotlink Protection only because their webview sent no Referer (untrue since WebView2 started sending tauri.localhost), recommended switching the protection off, and said no allowlist could express the apps' origin - a Configuration Rule on http.referer can. Now: the per-<img> fix and its test, the rule for 2.0.0 installs, and the check, with the results measured today. - new section 12: widget settings (hostname, Managed, pre-clearance off), the TURNSTILE_SECRET secret and rotation, what the check is not, local testing with Cloudflare's test keys, the optional rate-limit expression. - the CSP block, the script-src/frame-src prose, "no form posts", the rule budget (Configuration Rules 1/10), and two stale paths. CLAUDE.md gains the human-check and <img> invariants and says "after consent and the human check" where the service worker, analytics and /welcome used to say "after consent". README, web/README, DEPLOYMENT, ACKNOWLEDGEMENTs, SECURITY (bypassing the client-side gate is out of scope), TAURI troubleshooting and the changelog follow. _headers and worker/lib/http.ts: comments only - why images override Referrer-Policy, what X-Frame-Options does and does not govern, and the public/_headers and SITE_ORIGIN references that were stale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
7d0025112b |
docs: record the WAF rules as live, and replace the React-era dependency list
THE TWO WAF RULES EXIST NOW. `human-check-pages` (Managed Challenge) and `blocked-countries` (Block) went live 2026-09-20, so SECURITY_SETUP no longer reads as instructions for something that has not been done. Section 4 says what is deployed and when, and carries what was measured afterwards: a plain curl with no browser User-Agent is still served `/`, `/games`, `/legal/tos`, `/.well-known/security.txt`, `/sitemap.xml` and `/robots.txt`, the challenge rate has stayed at 0%, and a real browser loads a game page, the service worker and the beacon uninterrupted. Section 9 records the analytics beacon returning 200 and its reports 204 on the live site, and that "Enable with JS Snippet installation" is the only mode this CSP can ever accept. "Still open" now names the Free-plan rule budget - 1/1 rate limiting, 2/5 custom - because that is the next thing to run out. THE DEPENDENCY LIST WAS THE REACT APP'S. ACKNOWLEDGEMENTs credited React 18, react-router, i18next, Zustand, TanStack Query, Radix, shadcn/ui, cmdk, OpenPGP.js, Tailwind 3, TypeScript 5 and PostCSS - none of which has shipped since the v4 rewrite - while omitting Svelte, SvelteKit, Bits UI, unified and the typefaces that actually do. Rewritten from package.json and Cargo.toml, with every licence read out of node_modules rather than remembered: echarts-wordcloud is ISC, not BSD-3-Clause. The claim that /about carries a "full SPDX list" is gone; it is a curated subset and says so now. THIRD_PARTY.md gains svelte-check and vitest, which the pre-publish suite has been running unlisted, and drops "the TypeScript SPA". web/README.md documents the two analytics CSP hosts, why automatic injection can never be used, the navigateFallback fix, and the consent hashing and diff mechanism - none of which existed when its CSP and PWA sections were written. Its file tree lists the four new modules. DEPLOYMENT.md records that a zero-duration "Workers Builds" failure on a PR branch is a preview-build artefact: it happened twice on PR #130 while the identical commits deployed from main minutes later, and the GitHub Actions `check` job already runs the same build, verify-dist and wrangler dry-run. Also fixes a pre-existing broken curl snippet in section 10, whose `%{http_code}\n` had been saved with a literal newline in it. The dead relative links the link checker finds in CHANGELOG.md are left alone: they are in released sections and name files that existed at the time. A changelog is a record, not documentation. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
1b10b33a40 |
docs: describe v4.0.0 as it is - README, web README, Tauri, security, changelog
- README: SvelteKit rather than React, Cloudflare rather than GitHub Pages, a resizable self-updating desktop app, the /admin review queue, the real workflow list, and no in-browser editing or GPG signing (removed in September). - web/README.md: the admin app, verified shard generations, prerendered game pages, the service worker as it is now, and the checks CI runs. - TAURI.md: the update feed at /api/updates/desktop (drafts are never offered), settings surviving updates, the Android update check; the OAuth note is gone with sign-in. - dev_env (en, vi), CONTRIBUTING, android-support (en, vi): tests exist now, and the web side is Svelte. - SECURITY_SETUP: the admin shell's nonce policy, and the report-only CSP that Cloudflare's Continuous script monitoring adds at the edge (turn it off). - CLAUDE.md: where old /#/ links still come from and why the upgrade uses goto; /api/activity sends CORS too. - CHANGELOG [v4.0.0]: the admin app, verified data, a page per game, the installable web app, the desktop updater, the new pages, and the live-site fixes. Deploying needs D1 migration 0002. - Code comments that still described React, GitHub Pages, hash routing or a sign-in token. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
28e0e04c60 |
feat(app): 2.0.0 — and the packaged build was shipping the OLD app
Version bumps plus the Phase 7 binary work, but the reason this commit is
large is that building an actual 2.0.0 desktop binary and driving it over CDP
found three defects that no amount of reading would have.
## The desktop app was serving the React UI from a dead service worker
The 2.0.0 build launched, in its new 1280x860 window, showing the 1.4.x
React app: a sidebar reading "Steam · v1.0", no Stats or Developers entries.
Measured in the running release binary:
caches: ["workbox-precache-v2-http://tauri.localhost/"]
navigator.serviceWorker.controller: http://tauri.localhost/sw.js
A service worker registered at tauri.localhost can never be updated. Asking
it to, in the packaged app:
TypeError: Failed to update a ServiceWorker for scope
('http://tauri.localhost/') with script ('http://tauri.localhost/sw.js'):
An unknown error occurred when fetching the script.
The update algorithm refetches the worker script bypassing the worker itself,
and Tauri's custom protocol does not satisfy it. So the worker installed by
whatever version a user ran FIRST answers every navigation from its own
precache - index.html included - for the life of the install. Every desktop
and Android release since the PWA landed would have shipped invisible.
No frontend fix exists: the frontend that would unregister the worker is the
part being served from the stale cache. It has to happen before the webview
loads anything, so `purge_stale_webview_data` in lib.rs clears the webview's
storage once per version.
That clear also wipes localStorage and IndexedDB - WebView2's
ClearBrowsingData is all-or-nothing - so an upgrade re-asks for legal consent
and re-downloads the catalogue once. Stated in the code rather than glossed:
being asked for consent again beats silently running last year's app.
It also needs an explicit reload, because setup() runs while the first page is
already loading and clearing storage underneath it leaves an empty body. That
was found the same way - by looking at the window after the first attempt.
The build now omits the PWA plugin entirely when TAURI_ENV_PLATFORM is set.
The packaged apps lose nothing by it: their assets are local files already,
and offline data has always come from the IndexedDB cache in lib/cache.ts.
## The CSP would have bricked both packaged apps
`kit.csp` ships inside the Tauri bundle, and there the page origin is
tauri://localhost - so `connect-src 'self'` means the BUNDLE, not the site.
Every /api/data/* fetch would have been blocked and the apps would have shown
an empty catalogue. Separately, Tauri sends its own CSP as a header, and a
browser enforces the INTERSECTION: its `script-src 'self'` would have won
against SvelteKit's hashed meta policy and blocked the hydration bootstrap -
the same failure the web build hit before the CSP moved.
svelte.config.js now emits a second flavour when TAURI_ENV_PLATFORM is set,
naming the site origin explicitly. The web policy is untouched and still has
no api.github.com in connect-src - removing it was deliberate, /api/activity
proxies it - so the looser sources exist only where they are needed.
Verified in the running binary: consent accepted, 3,666 games loaded
cross-origin, a chart painted, both fonts reporting "loaded". And
/games/730 opened by full page load resolves to Counter-Strike 2, which
finally proves at runtime what CLAUDE.md had only asserted about
tauri::manager::get_asset()'s fallback chain.
## Binary 2.0.0
- The window unlocks: 1280x860, resizable, maximisable, minimum 880x600. It
was pinned to exactly 1400x900 with minWidth == maxWidth, which made a
responsive redesign pointless on the one platform that could not use it.
- tauri-plugin-http is gone, with its `https://github.com/*` capability and
its plugin init. It existed for the GitHub OAuth Device Flow, whose
endpoints send no CORS headers; sign-in was removed, and the only remaining
GitHub call is android-update.ts, a plain fetch to an endpoint that does
send them.
## Docs
web/README.md described React 18, Zustand, TanStack Query, HashRouter, a
GitHub Pages deploy, fetching from raw.githubusercontent.com, PAT sign-in and
client-side GPG signing - and a directory tree in which almost no path still
exists. Rewritten against the code.
The CHANGELOG's v4.0.0 entry says 95 tests because that is what `vitest run`
prints.
check / 95 tests / build / knip / wrangler dry-run clean. Desktop release
binary built, launched, and driven.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
3525554eb6 |
feat(worker): proxy GitHub avatars and the commit feed, add security.txt
Fixes two of the five reported console errors, and narrows the site CSP to connect-src 'self' as a consequence. ## The avatar error Loading the image 'https://avatars.githubusercontent.com/in/15368?v=4' violates the following Content Security Policy directive: "img-src ..." Activity.tsx rendered commit.author.avatar_url straight from the GitHub API. avatars.githubusercontent.com appears in NONE of this repo's four CSPs (_headers, admin-ui, edit-ui, tauri.conf.json), so every avatar on /activity was blocked - in the browser and in both packaged apps. `in/15368` is the pipeline's GitHub App; verified live, the page requests exactly three avatars (in/15368, in/29110, u/127664709). Widening img-src was the smaller diff and the wrong call: it puts a third-party host back in the page and hands every visitor's IP to GitHub, which PRIVACY_POLICY.md says does not happen. Instead /img/gh/{u|in}/{id} proxies them, reusing the existing /img/ prefix so run_worker_first and the service-worker CacheFirst rule both needed no change. Anchored regex, digits only, fixed 56px size (a caller-chosen size is unbounded cache keys). ## /api/activity The commits fetch was the last third-party request the public app made. It now goes through the Worker, which also lets connect-src drop to 'self'. Two things the proxy deliberately drops, both found by reading live output: - commit.author.email, which GitHub returns for every commit and the page never used. Forwarding it would make this a bulk email-harvesting endpoint for everyone who has ever contributed. - the commit message BODY. Only the subject line is rendered, and the bodies here carry Co-Authored-By trailers with real addresses - the first version of this route shipped them to every visitor from a publicly edge-cached response. Sending the subject only also cut the payload 98,203 -> 30,324 bytes. Edge-cached 5 minutes, keyed on the path alone so `?x=1` cannot mint cache entries and walk past that. This bounds upstream traffic to ~12 calls/hour against GitHub's anonymous budget of 60/hour, which a pass-through would exhaust immediately since a Worker egresses from a shared address. It is NOT authenticated: the GitHub App token is a repo-write credential and has no business on a public route. Carries ACAO: * for the same reason /api/data/* does - the Tauri builds read it cross-origin from tauri://localhost. ## security.txt web/public/.well-known/security.txt (RFC 9116). It had to be a real file: not_found_handling is "single-page-application", so a request for it returned dist/index.html at HTTP 200 and scanners got a web page with no error. Verified it now returns text/plain. Expires 2027-09-01; renewal is logged as a recurring task in SECURITY_SETUP.md. ## Header gaps found while in here - worker/index.ts's unauthenticated /admin 404 shipped NO security headers - it was the one response built by hand instead of through jsonError. It now uses withSecurityHeaders(), which was exported and never called. - admin-ui.ts and edit-ui.ts contained byte-identical copies of the CSP for the only origin holding a repository-write credential. Extracted to adminCsp()/adminHtmlResponse() in lib/http.ts; a hardening change applied to one copy and not the other is invisible. Adds an explicit object-src and the Cross-Origin-Opener-Policy the SPA had and these pages did not. - SITE_ORIGIN was duplicated in fetcher.ts and image.ts with the same comment. A third caller made lib/site.ts the right shape. ## Two things the maintainer must do, both dashboard-only Recorded in SECURITY_SETUP.md sections 2 and 9: - HSTS preload: the header already carries `preload` and the domain passes hstspreload.org's preloadable check with {"errors": [], "warnings": []}, port 80 301s to HTTPS. Status is still "unknown" = not submitted. Submission is irreversible on any useful timescale, so it is yours to make. - Cloudflare Web Analytics is ON and injecting static.cloudflareinsights.com's beacon at the edge, which our own script-src 'self' blocks - two CSP errors on every page load of the live site, and analytics that have never collected anything. Not in the repo; curl of the deployed HTML shows no such tag. Recommend turning it off rather than allowlisting, since the privacy policy promises no third-party resources. Verified against a local `wrangler dev`: avatars 200 through the proxy, all malformed avatar paths 404, Steam variants unaffected, /api/activity unauthenticated and 200, /api/data CORS intact, /admin 404 now carrying headers, and zero requests to any GitHub host from the browser. typecheck, build, wrangler --dry-run and knip all pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
192f17622f |
chore: drop the bulk generated markdown, keep the two leaderboards
games/ held 1.8 MB of markdown regenerated from data/*.jsonl on every data
change: 18 all-games_part*.md files, anti-cheat-list.md, a README index of
them, and a .gen-hash checksum whose only purpose was to make regenerating
them cheaper. The web app has been the way to browse the catalogue since v3.0,
so these were a second rendering of the same records that had to be rebuilt,
committed and reviewed forever.
Kept: games/top-online.md and games/top-offline.md.
Removed with them, because nothing else used them:
scripts/generate_tables.py, scripts/generate_anti_cheat_list.py
.github/workflows/update-daily.yml ("Generate Markdown Tables")
.github/workflows/anti-cheat-list.yml
bash/daily.sh, bash/anti_cheat.sh
and the generate_tables call inside ingest.sh, purge.sh, refetch_all.sh and
ingest-from-issue.yml.
Nothing depended on the anti-cheat markdown: /charts/anti-cheat reads
data/*.jsonl, not that file.
Four references would have broken, two of them user-visible:
- web/public/sitemap.xml advertised all-games_part1.md to search engines, and
About.tsx had an "All games (markdown)" button. Both would now 404. The
sitemap entry is gone; the button points at data/ instead.
- .github/workflows/mark-dead-games.yml ended with
`gh workflow run "Generate Markdown Tables"`. That command exits non-zero
against a workflow that does not exist, so every successful dead-games run
would have finished red.
- notify-ci-failure.yml's allowlist is matched by exact workflow NAME, and the
file's own comment warns that a stale entry breaks silently.
Also fixed the stale poli0981.github.io URL in the bug-report template while
removing its games/*.md option.
Verified: typecheck, build, all 24 workflow YAML files parse, sitemap.xml is
well-formed, and no reference to the removed files survives outside CHANGELOG
and docs/plan (both historical).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
8bb3a5f042 |
docs(web): describe v3.4.1 build stack as Vite 8 + Rolldown (#99)
* docs(web): describe v3.4.1 build stack as Vite 8 + Rolldown The web build migrated from Vite 7 (rollup + esbuild) to Vite 8, which uses the Rolldown bundler; esbuild and standalone rollup are no longer in the dependency tree. Reconcile the stack documentation with reality: - docs/ACKNOWLEDGEMENTs.md: "Vite 7" -> "Vite 8 + Rolldown" in the Runtime & build list. - web/src/pages/About.tsx: bump the in-app "Stack & third-party" list entry "Vite 7" -> "Vite 8 (Rolldown)" and add a Rolldown row. - web/README.md: Stack line now reads "Vite 8 (Rolldown bundler)". - web/src/gpgauth/README.md: stale "Rollup" bundler note -> "Rolldown". Docs-only / content cleanup follow-up to v3.4.1. No canonical version files, source logic, or CHANGELOG history touched. typecheck + build pass; knip shows only pre-existing unused exports. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(web): sync package-lock version to 1.4.1 The v3.4.1 bump updated web/package.json to 1.4.1 but left web/package-lock.json at 1.4.0, so `npm install` kept re-touching the lockfile. Sync the lockfile `version` fields to match. No dependency graph changes — only the two version lines. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
138e5186be |
v3.2.7: coming-soon guard, dead-code cleanup, dev tooling (#84)
Coming-soon games rejected at ingest (health_checker COMING_SOON status). Dead-code cleanup via knip + vulture: 2 unused web files, 11 npm deps, the one-shot dedup_removed_games.py. New knip/vulture/pip-audit dev tooling + docs/THIRD_PARTY.md. Bump 3.2.6 -> 3.2.7 (desktop 1.2.6 -> 1.2.7). |
||
|
|
ee917b255a |
Phase 8: i18n vi/en + Tauri 2 desktop + release workflow + v3.0.0 docs refresh (#55)
i18n (vi / en)
react-i18next + i18next-browser-languagedetector. Two resource bundles
in web/src/i18n/locales/{en,vi}.json covering sidebar, topbar,
dashboard, top-online, settings, common buttons (save / cancel / edit
/ delete / search / filter / clear), common toasts (saved / failed /
verifying), the four PWA-related toasts, and the language picker
itself. ~110 keys.
Auto-detects from navigator.language on first load (English fallback);
override persists in localStorage as `f2p:lang`. New Settings card with
flag-emoji buttons.
Long-form legal copy on /about and the static docs/* files intentionally
stays English — translating legal wording across languages risks
weakening the meaning, and the maintainer isn't in a position to have a
bilingual lawyer review both bundles.
Tauri 2 desktop scaffold
web/src-tauri/ with tauri.conf.json, Cargo.toml, build.rs, src/main.rs,
src/lib.rs, capabilities/default.json, and PNG/ICO/ICNS icons generated
from a Pillow-rendered source via `npx tauri icon`.
Window: fixed 1400 × 900, resizable=false, maximizable=false,
decorations=true, theme=Dark, centred, single instance ("main").
Bundles `tauri-plugin-shell` so the embedded SPA can shell-open Steam
links + GitHub URLs without granting broader native capability.
package.json gets new scripts:
tauri — pass-through CLI
tauri:dev — dev build with hot reload from vite
tauri:build — release binary into src-tauri/target/release/bundle
Plus a `build:desktop` that builds the SPA with base="/" instead of
the GitHub Pages base.
Release workflow (.github/workflows/release-desktop.yml)
Matrix `ubuntu-latest` / `windows-latest` / `macos-latest`. Triggers
on push of a `desktop-v*` tag or a manual workflow_dispatch (with a
configurable tag input).
Steps: checkout v5 → install Linux build deps when relevant → setup
Node 24 + npm cache → install Rust stable (with universal targets on
macOS) → Swatinem/rust-cache → npm ci → tauri-apps/tauri-action@v0
with releaseDraft=true so the maintainer reviews + publishes after
smoke-testing.
Outputs per platform:
Windows → .msi
macOS → .dmg (universal: aarch64 + x86_64)
Linux → .AppImage + .deb
Versioning
Repo version badge bumped 2.1.0 → 3.0.0.
web/package.json 0.1.0 → 1.0.0.
src-tauri/Cargo.toml + tauri.conf.json ship at 1.0.0.
Sidebar version label "Steam · v0.1" → "Steam · v1.0".
Docs refresh
README.md — full rewrite of the top section: v3.0 framing (list +
web app + desktop), refreshed quick-links table, three What's-new
sections (web app phase summary, desktop, v2.x foundations), updated
architecture diagram including web/ + src-tauri/, refreshed
workflows table, refreshed contribute paths, refreshed docs index.
CHANGELOG.md — new v3.0.0 entry consolidating phases 1 → 8 with
per-phase one-liner summaries (including the four bug-fix points
6.1 / 6.2 / 4.1 / 7's date-sort).
docs/ACKNOWLEDGEMENTs.md — phase-by-phase AI-assistance table
(Grok v1, Claude v2 + the entire v3 stack), explicit third-party
list (Python deps + headline web/desktop deps), trademark note for
Steam / GitHub.
web/README.md — phases 6.1, 6.2, 7, 8 added; new Desktop builds and
i18n sections; PWA strategy note updated to NetworkFirst.
Build 3.84 s; index chunk 113 → 136 KB gz (+22 KB for i18n + Tauri
shell wrapper). PWA precache 1.66 MiB.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
5425014bf3 |
Phase 6: enums + JSON editor + Add overrides + pagination + About + permalinks + verify poll + owner gate (#50)
Curated enums (lib/enums.ts)
ANTI_CHEAT_ENUM mirrors scripts/core/constants.py:45 (14 patterns + "-").
GENRE_ENUM is a curated 44-item list rendered as a combobox so users can
pick or type a one-off. TYPE_GAME / SAFE / STATUS are fixed.
EditGameDrawer + BulkEditDrawer + Add page all consume these.
JSON editor toggle (EditGameDrawer)
Form / JSON segmented control. JSON mode shows the full record, validates
on every keystroke, and refuses to commit if the edited link's appid
doesn't match the original. New replaceGame() helper in edits.ts skips
the patch-merge path and writes the whole record back; added_at is
preserved from the original. JsonDiff renders a side-by-side stringified
diff per field.
Add page upgrade
AddEntry now carries optional manual fields. SingleAdd has a collapsible
"Manual overrides" panel; BulkAdd has a Links/JSON view toggle —
Links mode = current 1-URL-per-line, JSON mode = 1 object per line with
per-link manual fields. Pruned empty values so we don't clog
temp_info.jsonl with empty strings. Pipeline's parse_entries already
accepts dict entries, so this is purely client-side.
GamesTable pagination + scrollbar + validation badge + export
pageSize state added to filters store: 50/100/200/500/all, default 100.
Page nav buttons render only when not "all". Page resets on filter or
sort change. Native scrollbar hidden via CSS. New "issues" column shows
an amber AlertTriangle when recordIssues() flags missing manual fields,
stale (>30d) records, or online + AC + kernel-unknown.
Export menu downloads filtered+sorted subset as CSV or JSON
(lib/export.ts).
Per-game permalinks
GamesPage now responds to /games/:appid. Row click navigates instead of
opening a local drawer. URL is the source of truth so deep-links share
cleanly. Unknown appid → friendly 404 drawer with link to Steam +
Health.
Verify-after-commit poll (lib/verify-commit.ts)
GitHub computes verification asynchronously, so the create-commit
response usually still says "unverified" even when the signature is
valid. pollCommitVerification retries up to 4× with backoff and resolves
on first verified=true. Edit / bulk edit / bulk delete / single add /
bulk add all wire it through sonner toast IDs so the chip updates
in-place from "verifying…" to "Verified ✓" or "Unverified · {reason}".
About page (/about)
Stat cards (game count, last_updated). Repo info + quick links to
markdown all-games / top-online / raw JSONL. Dev info pulled from the
fields in username.txt — X / YouTube / Discord / Patreon / Steam /
Bluesky / Mastodon. Bug-report / feature-request / add / delete /
feedback issue templates linked directly. Third-party stack with
per-dep links. Wired into Sidebar + ⌘K palette. username.txt is now
committed.
Topbar GPG quick-unlock
Locked chip is now a Radix Popover trigger instead of a Settings link.
Click → small form with passphrase + Unlock — same flow as Settings but
one click. Lock action stays inline.
Owner gate (useIsOwner + OWNER_LOGIN)
Visitors signed in with their own PATs would fail at the API push
anyway, but they used to see the Edit / Add / Delete UI greyed out.
useIsOwner returns true only when login matches OWNER_LOGIN
("poli0981") OR the API confirmed write/admin permission. GameDetail's
Edit button, Bulk action bar, Add page, and Sidebar's "Add" entry all
hide for non-owners.
bug_report.yml
New "where did you see it?" dropdown (web app / GitHub markdown /
top-online / raw / API). Expanded "kind of bug" checklist (Edit-fail,
GPG unverified, SW cache, dropdown / form, mobile). New optional
Browser/OS, web-app version, and Console-errors textarea fields.
Tightened wording.
Bundle: index 109 KB gz (+21 KB across 12 features). Build 3.93 s.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
1ec50faf3d |
Phase 5: PWA + GPG identity override + auto-lock + Activity feed (#48)
PWA
vite-plugin-pwa with autoUpdate registration. Manifest declares standalone
display, brand colors, and SVG icons. Workbox precaches the app shell
(~1.55 MiB / 17 entries) and adds runtime caching:
- raw.githubusercontent.com data shards: StaleWhileRevalidate, 7 days
- Steam header images: CacheFirst, 30 days, cap 800
- GitHub avatars: StaleWhileRevalidate, 7 days
Topbar gains a small PwaIndicator chip: shows "offline" when navigator
reports it, prompts "Install" on beforeinstallprompt, and surfaces a
reload toast + "Update" button when a new SW is waiting.
GPG identity override
GPG keys often carry multiple user IDs (work email, personal email,
GitHub noreply alias, etc.). Forcing the primary one means commits land
unverified for users whose primary UID isn't on GitHub.
GpgPanel now shows a dropdown of all UIDs whenever the key has > 1.
preferredUidIndex is persisted in localStorage and wiped on key replace.
useCommitContext picks that UID's name+email as the commit author and
falls back to plain (unsigned) mode if the chosen UID has no email.
GPG auto-lock
Layout mounts useGpgAutolock which arms a setTimeout(N min) and resets it
on mousemove / keydown / pointerdown / scroll / focus / touchstart /
visibilitychange→visible. On expiry it calls gpg.lock() and toasts
"GPG locked". Configurable in GpgPanel: never / 5 / 15 / 30 / 60 min,
default never. autolockMinutes lives in the gpg store + localStorage.
Activity feed
New /activity page lists the latest 80 commits via
GET /repos/.../commits?per_page=80. Each row shows avatar, subject,
author, relative time, sha, and a status badge: Verified / unsigned /
reason (e.g. bad_email, invalid). Filter pills let you scope to "Me"
(auth.user.login), "Bots" (github-actions[bot]), or All. Polls on focus
and a 60 s stale time. Wired into Sidebar + ⌘K palette.
New deps: vite-plugin-pwa@^0.20.5, workbox-window@^7.1.0.
Bundle: index 88 KB gz (+4 KB for Activity + autolock UI). PWA workbox
runtime adds ~2.3 KB gz. tsc clean, vite build 3.72 s.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
72fafeb7ea |
Phase 4: fix GPG salt notation + bulk edit/delete + 8 charts + Health + ⌘K (#46)
GPG signature fix Phase 3 commits landed as "could not be verified" because OpenPGP.js v6 attaches a per-signature salt@notations.openpgpjs.org notation by default to randomise v4/v5 signatures, and GitHub's verifier rejects unknown notation subpackets. Set config.nonDeterministicSignaturesViaNotation=false so we emit plain RFC4880 signatures GitHub accepts. The option is missing from openpgp@6.1.1's d.ts but exists at runtime (dist/openpgp.mjs:1746), so we cast through PartialConfig. Also zero-out milliseconds before signing so the unix-second timestamp baked into the signed commit-object content can't drift from what GitHub recomputes after parsing the ISO date. Bulk edit / bulk delete Selection state added to filters store. GamesTable gets a sticky checkbox column and a BulkActionBar above it. BulkEditDrawer lets you toggle individual fields on/off and applies one EditPatch to every selected row. bulkEditGames groups selected appids by shard, refetches each affected shard's current contents (so the daily pipeline's edits to non-selected records survive), applies patches, and lands all touched shards in a single signed commit via the new commitFiles / commitFilesWithRetry. bulkDeleteGames also appends removed records (with removed_at) to scripts/removed_games.jsonl in the same atomic commit. 8 new charts TagsWordCloud (echarts-wordcloud, top 100 minus SKIP_GENRE_TAGS) AntiCheatStacked (kernel/usermode/none × top 18 genres) LanguagesHeatmap (lang × interface/audio/subtitles, top 30) ReleaseYearHistogram (year bins from release_date) AddedCumulativeLine (catalog growth over time) ReviewsHistogram (10% bins, color by label) PlayerTiersPie (100k+/10k+/1k+/<1k/0 for online games) DrmDlcBars (clean / DRM / paid-DLC / both) + new chart pages Languages, Time, Players, Drm; updated Sidebar nav. Health page Real implementation: validation buckets (delisted, stale > 30 days, missing manual fields, online+AC+kernel-unknown), each linkable to the affected rows. Maintenance triggers fire workflow_dispatch on the six Python pipeline workflows (update-json, update-reviews, top-online, check-dead-links, purge-unhealthy, generate-tables). ⌘K command palette cmdk-based overlay with three sections (Pages, Charts, GPG lock/unlock) and a fuzzy game-by-name search that opens the Steam page directly. Bound to ⌘/Ctrl+K. Topbar shows the keybinding next to the search box. Bundle: 514 KB gzipped total. ECharts 222 KB (+14 for wordcloud + heatmap modules), openpgp 128 KB unchanged, index 84 KB (+19 for bulk + health + palette). Build 3.91 s; tsc --noEmit clean. New deps: cmdk@^1.0.0, echarts-wordcloud@^2.1.0. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
1ab852e5fb |
Add web app Phase 3: GPG-signed commits via Git Data API (#45)
Switches every write (edit, add) from the Contents API to the Git Data API
and optionally signs the commit object with the user's OpenPGP private key.
Signed commits land on GitHub with the "Verified" badge — fixes the previous
phase's incorrect claim that PATs alone produced verified commits.
How signing works:
• User pastes their armored OpenPGP private key once → encrypted block
stored in localStorage (PGP itself encrypts it under the passphrase).
• Per-session: enter passphrase → key decrypted in memory only via
OpenPGP.js, never written to disk. Lock button wipes it.
• commitFile builds the exact bytes of a Git commit object
(tree/parent/author/committer/message) and signs them detached binary.
The signature is sent as the `signature` field on POST /git/commits;
GitHub recomputes the same bytes server-side and verifies.
New libs:
- lib/gpg.ts — parse/unlock/sign helpers around `openpgp` (npm)
- stores/gpg.ts — Zustand: encrypted armored in localStorage,
decrypted key in memory only
- lib/git-data.ts — getHead/createBlob/createTree/createCommit/
updateBranchRef + commitFile orchestrator with
1 retry on 422 ("ref advanced")
- hooks/useCommitContext — derives { author, signer } from auth + gpg
Refactored:
- lib/edits.ts — updateGame & addLinks now route through
commitFileWithRetry; signing optional
- components/games/EditGameDrawer — passes ctx.author + ctx.signer; shows
"will sign" / "unsigned" badge in
diff preview; surface verified state
in success toast
- pages/Add — same plumbing for single + bulk add
- components/auth/GpgPanel — settings UI: import key, unlock w/ passphrase,
lock, replace, forget
- components/layout/Topbar — chip showing "signed" (unlocked) or "locked"
next to user avatar
Why npm openpgp instead of the dropped local file: web/src/gpgauth/openpgp.min.mjs
dynamically imports companion chunks (noble_curves, noble_hashes) that weren't
copied alongside it, so the build couldn't resolve them. The npm package
bundles all chunks; Vite splits it into a 129 KB gzipped lazy chunk that only
loads when the GPG panel mounts. Local file kept with a README explaining the
swap and how to switch back.
Bundle: openpgp 369.92 KB / 129 KB gz as a separate manualChunk.
Build: tsc --noEmit clean, vite build 5.78s.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
7c290403e5 |
Add web app Phase 2: GitHub auth + edit + add (single & bulk) (#44)
PAT-based GitHub authentication, single-record edit drawer for the 8 manual
fields, single + bulk Steam-link queue add via scripts/temp_info.jsonl.
Edits commit directly to data/data_00X.jsonl shards via the Contents API and
trigger update-daily.yml afterwards so the markdown tables stay in sync.
New: auth store + AuthPanel (Settings page), edit drawer with diff preview,
conflict-retry on 409, Add page with single + bulk forms (dedup, validation,
preview), sonner toasts, Topbar avatar + Verified badge.
Auth model: Classic PAT (repo + workflow scopes) → GitHub web-flow signs
commits server-side → "Verified" badge. Fine-grained PATs work but commits
are unsigned. Token kept in localStorage on the user's own Pages domain.
Why PAT instead of OAuth Device Flow (per the original plan): Device Flow
needs a registered GitHub OAuth App / CLIENT_ID, which the user hasn't set up.
PAT path ships immediately and produces signed commits all the same.
Device Flow can be added in Phase 3 once an OAuth App is registered.
Edit drawer flow:
- Form for genre / type_game / anti_cheat / anti_cheat_note / is_kernel_ac
(tri-state) / notes / safe / status
- "Review changes" → DiffViewer shows before/after for changed fields only
- "Commit & save" → shard locate → GET shard for sha → patch in place →
PUT new content → trigger update-daily.yml → invalidate query cache
- 409 handler: surface "Conflict — refetch" toast, refetch shards, close
- 1 transparent retry on conflict before surfacing
Add flow:
- Single: paste Steam URL or appid → normalize via normalizeLink port →
dedup against in-memory appidIndex + already-queued temp_info.jsonl →
PUT temp_info.jsonl → ingest-new.yml auto-triggers
- Bulk: textarea with line-by-line preview (valid / dup / invalid) → one
commit per batch → one ingest run
New deps: sonner ^1.5 (toasts).
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
08df95019c |
Add web app Phase 1: read-only F2P browser (Vite + React + ECharts) (#41)
Static UI under web/ that fetches data/data_*.jsonl from raw.githubusercontent.com,
parses in a Web Worker, caches in IndexedDB, and renders a virtualized table +
4 charts. Deploys to GitHub Pages via a new workflow.
Stack: React 18 + TypeScript + Vite, shadcn/ui (Radix + Tailwind), TanStack
Query/Table/Virtual, Apache ECharts, Zustand, Fuse.js fuzzy search.
Phase 1 scope (read-only):
- Dashboard with 6 KPI cards + Top Online bar + Genre treemap + Platforms donut
- Games page: 1,224-row virtualized table, faceted filters, sort, fuzzy search,
detail drawer with all ~25 schema fields
- Top Online page (top 50 by current_players)
- Charts: Genres treemap, Platforms donut. Tags / Anti-Cheat / Reviews are
Phase 3 placeholders. Health / Add / Settings are Phase 2 placeholders.
Schema is ported to web/src/lib/schema.ts and must mirror MANUAL_FIELDS /
ARRAY_FIELDS / EXTENSION_FIELDS in scripts/core/constants.py.
deploy-pages.yml builds on push to main when web/** or data/** change. Existing
9 Python workflows are cron/dispatch-triggered, so no path collision.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|