itch.io AI disclosure + accessibility, tagline descriptions; bump to 4.3.0 (#117) [skip-discuss]

itch.io game pages now carry an "AI Disclosure" row (AI Assisted, then what it was used for), a "Content" row ("No generative AI was used", /games/tag-no-ai) and an "Accessibility" row. The scraper reads them into three optional fields (ai_disclosure, ai_content, accessibility), which the daily refresh keeps current; description becomes the creator's tagline (og:description), else the first sentence as before; whitespace inside titles and links is collapsed. A --full re-scrape keeps a known release_date / thumbnail (itch.io shows "Published" only for a few weeks).

Web app: "Generative AI" and "Accessibility" filters on /games (?ai=, ?access=), game-page rows, three charts (Overview: Generative AI; Discovery: Accessibility Features, What AI Was Used For). EN/VI strings, docs, changelog, version 4.3.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
poli0981andClaude Opus 5.5 authored and GitHub committed 2026-10-10 10:49:13 +07:00
1 parent 1b596b9927
commit 7f6994a9dc
35 files changed
+723 -75

No files matched your search

+2 -1
View File
@@ -3,12 +3,13 @@
All notable changes to this project, newest first. The notes of each release live in
[`changelog/`](changelog/), one file per minor version: `changelog/<major>.x/ver<major>.<minor>.x.md`.
**Latest release: [4.2.0](changelog/4.x/ver4.2.x.md#420---2026-10-03-compact-catalog-data-themed-scrollbars) (2026-10-03) — Compact catalog data, themed scrollbars.**
**Latest release: [4.3.0](changelog/4.x/ver4.3.x.md#430---2026-10-10-ai-disclosure-accessibility-refreshed-catalog) (2026-10-10) — AI disclosure, accessibility, refreshed catalog.**
## 4.x
| Version | Date | Highlights |
|---|---|---|
| [4.3.0](changelog/4.x/ver4.3.x.md#430---2026-10-10-ai-disclosure-accessibility-refreshed-catalog) | 2026-10-10 | AI disclosure, accessibility, refreshed catalog |
| [4.2.0](changelog/4.x/ver4.2.x.md#420---2026-10-03-compact-catalog-data-themed-scrollbars) | 2026-10-03 | Compact catalog data, themed scrollbars |
| [4.1.1](changelog/4.x/ver4.1.x.md#411---2026-09-29-new-contact-addresses) | 2026-09-29 | New contact addresses (@poli0981.dev) |
| [4.1.0](changelog/4.x/ver4.1.x.md#410---2026-09-24-verification-check-readable-charts-changelog-folder) | 2026-09-24 | Verification check, readable charts, changelog folder |
+7 -4
View File
@@ -10,7 +10,7 @@ everyone; the old github.io URL only redirects). Three layers share one JSON cat
1. **Python pipeline** — the data layer (GitHub Actions).
- `data_game/game_info_NNN.json` — chunked records, max 500 per file, 2,811 games on 2026-09-24. Serialization is fixed: `json.dumps(..., ensure_ascii=False, indent=4)`, no trailing newline (`json_io.dumps`) — the Worker port (`webapp/worker/catalog.ts`) emits identical bytes (`tests/fixtures/golden/`).
- `data_game/index.json` — chunk manifest (total + per-file counts). `data_game/count_history.json` — date-keyed `{date,total}` series ("games over time" chart). `scripts/deleted_games.json` — removal log (public "Removed" page). `scripts/temp_link.json` — ingest queue.
- `scripts/` — scanners never write the catalog: `update_info.py` (queued URLs) and `refresh.py` (rotating 1/7-per-day check; `--full` re-scrape) emit a URL-keyed **patch** (`patch.py`); `apply_patch.py` applies it to the latest `main` and runs `validate.py`; `bash/commit_push.sh` does fetch → reset → apply → commit → push with retries. Shared: `scraper.py` (session, `Pacer` + 429 back-off, parsing), `data_store.py` (chunks stay in place, rebalance only past thresholds, write-if-changed), `json_io.py`, `canonical.py` (canonical itch.io URL; vectors in `tests/fixtures/url_vectors.json`, shared with the Worker). Pipeline bookkeeping lives in `scripts/state/` (not published). Tests: `pytest` (network blocked). Lint: `ruff check scripts tests webapp/scripts`, `ruff format`, `vulture` (config in root `pyproject.toml`). Local env: `python -m venv .venv && .venv/Scripts/pip install -r requirements-dev.txt` (Windows: run with `PYTHONUTF8=1`).
- `scripts/` — scanners never write the catalog: `update_info.py` (queued URLs) and `refresh.py` (rotating 1/7-per-day check; `--full` re-scrape) emit a URL-keyed **patch** (`patch.py`); `apply_patch.py` applies it to the latest `main` and runs `validate.py`; `bash/commit_push.sh` does fetch → reset → apply → commit → push with retries. Shared: `scraper.py` (session, `Pacer` + 429 back-off, parsing: the info panel incl. itch.io's 2025–26 rows — `AI Disclosure` ("AI Assisted", then what for) / `Content` linking `/games/tag-no-ai` → `ai_disclosure` + `ai_content`, `Accessibility` → `accessibility`; `description` = the creator's tagline (`og:description`), else the first sentence), `data_store.py` (chunks stay in place, rebalance only past thresholds, write-if-changed), `json_io.py`, `canonical.py` (canonical itch.io URL; vectors in `tests/fixtures/url_vectors.json`, shared with the Worker). Pipeline bookkeeping lives in `scripts/state/` (not published). Tests: `pytest` (network blocked). Lint: `ruff check scripts tests webapp/scripts`, `ruff format`, `vulture` (config in root `pyproject.toml`). Local env: `python -m venv .venv && .venv/Scripts/pip install -r requirements-dev.txt` (Windows: run with `PYTHONUTF8=1`).
2. **Cloudflare Worker + static assets** — `webapp/worker/` + `webapp/wrangler.jsonc`, deployed by **Cloudflare Workers Builds** from `main` (root dir `webapp`, build `npm run build`, deploy `npx wrangler deploy`; no deploy workflow). The catalog is bundled into the site at build time (`vite-plugins/catalog-data.ts` → `dist/data/pack/` compact packs + the legacy readable JSON in `dist/data/`, plus `data/urls.json` and `sitemap.xml`), so every data commit rebuilds the site.
3. **Web app + Tauri apps** — `webapp/src/` (React 19.3 + TypeScript 6.0 + Vite 8/rolldown + Tailwind + shadcn/ui + React Router 8), and the **Tauri 2 desktop + Android** read-only viewers in `webapp/src-tauri/` (same code; they fetch `https://freeitchgames.win/data/pack` and load covers straight from img.itch.zone). Plus `webapp/admin/` — the maintainer-only admin app (second Vite entry, served at `/admin/`).
@@ -56,8 +56,8 @@ Local admin without Access: put `DEV_ADMIN_EMAIL=you@example.com` in `webapp/.de
- Data: `lib/config.ts` (`PACK_BASE` = `/data/pack` on the web, `https://freeitchgames.win/data/pack` in Tauri). **Packs** (since 4.2): `lib/data/pack-format.ts` (pure, shared with the build plugin: records by column, dictionaries for repeated strings and every string list; `manifest-v1.json` names per chunk a `main` pack — every field but `description` — and a `desc` pack, plus `deleted` / `history`; files are `<sha256 prefix>.bin`, deflate-raw, served `immutable`). `lib/data/catalog.ts` loads them (`['db','all']` →`{ games, index: {total_games, last_updated}, chunks }`; the manifest revalidated per load and shared 10 s; a main-pack 404 → manifest `cache: 'reload'` + one retry; an unchanged manifest returns the previous result). `lib/data/compression.ts`: `DecompressionStream('deflate-raw')`, else lazy `fflate`. `Game` has **no `description`**: `hooks/useDescriptions.ts` loads `['desc', <file>]` on demand (game page: its chunk; Games search: all, `filterGames(…, descriptions)`).
- Cache: react-query persisted to IndexedDB (`webapp.query-cache`, 7 days) by `lib/data/persister.ts` — byte 0 = format (1 deflate-raw, 0 plain), then the JSON; a legacy string is dropped; writes throttled 1 s and skipped when no data object changed. Persisted: `db`, `deleted`, `count-history` and only the `desc` files the current catalog names (`shouldPersistQuery`); stale `desc` queries are removed after a `db` success. `CACHE_BUSTER = ${APP.version}:data-v2`. **`gcTime` must stay >= persist `maxAge`.**
- Layout: `components/site/*` (sticky top nav + global search with the `/` shortcut + display menu + phone sheet menu; footer) — the window scrolls, not `<main>`. `/` is the Welcome page (`routes/welcome.tsx`).
- `/games`: search, filters, sort and page live in the URL — `lib/game-filters.ts` (`parseQuery` / `toParams` drop defaults; params `q genre platform status tag lang input engine rating browser sort page`; unit-tested) — rendered by `components/games/*` (filter chips with facet counts that ignore their own filter, a desktop ARIA table / phone list chosen by `useIsMobile`, 100 per page; the detail page's breadcrumb links back to the same list via router state). Counts show the whole catalog ("2,729 of 2,811") because 18+ games are hidden by default.
- `components/charts/` (16 charts, 4 lazy tabs, **no barrel `index.ts`**; every Recharts tooltip/cursor comes from `chart-theme.ts` + `chart-tooltip.tsx`), `components/game-thumb.tsx` (`lib/thumbnail.ts` → `/img/160|640/...` on the web, the original URL in Tauri), `components/legal-gate.tsx` (a non-dismissable Radix dialog **over** the page, so deep links land where they pointed; links flagged `inGate` in `lib/about.ts`; re-prompts when `LEGAL_VERSION` in `stores/prefs.ts` changes; no "Leave" button in Tauri).
- `/games`: search, filters, sort and page live in the URL — `lib/game-filters.ts` (`parseQuery` / `toParams` drop defaults; params `q genre platform status tag lang input engine ai access rating browser sort page`; `ai` treats "N/A" / a missing field as its own "Not disclosed" value and lists its options in a fixed order (`aiRank`); unit-tested) — rendered by `components/games/*` (filter chips with facet counts that ignore their own filter, a desktop ARIA table / phone list chosen by `useIsMobile`, 100 per page; the detail page's breadcrumb links back to the same list via router state). Counts show the whole catalog ("2,729 of 2,811") because 18+ games are hidden by default.
- `components/charts/` (19 charts, 4 lazy tabs, **no barrel `index.ts`**; every Recharts tooltip/cursor comes from `chart-theme.ts` + `chart-tooltip.tsx`), `components/game-thumb.tsx` (`lib/thumbnail.ts` → `/img/160|640/...` on the web, the original URL in Tauri), `components/legal-gate.tsx` (a non-dismissable Radix dialog **over** the page, so deep links land where they pointed; links flagged `inGate` in `lib/about.ts`; re-prompts when `LEGAL_VERSION` in `stores/prefs.ts` changes; no "Leave" button in Tauri).
- Styling: **Tailwind v4** via `@tailwindcss/vite` (no PostCSS, no `tailwind.config`); tokens are hex CSS variables in `src/index.css` (`:root` / `.dark`, `@theme inline`; `--brand-soft`, `--thumb`, `--success`, `--scrollbar-thumb(-hover/-active)` besides the shadcn set) and must match the approved mockup. Themed scrollbars (`@layer base`, only under `(hover: hover) and (pointer: fine)`): `::-webkit-scrollbar*` for Chromium/Safari, `scrollbar-color` / `scrollbar-width: thin` for Firefox only (gotcha 28); "Hide scrollbars" = unlayered `html[data-scrollbars='hidden']` rules (`hooks/useScrollbarsEffect.ts`). Self-hosted Geist / Geist Mono (`@fontsource-variable/*`, CSP `font-src 'self'`). Numbers and dates go through `lib/format.ts` (`useFormat`: en-GB / vi-VN). `webapp/scripts/gen_assets.py` redraws favicon, PWA icons and `og.png` from the same tokens and the Geist fonts in `node_modules`.
- `lib/gate.ts` (web only): when a tab comes back into view or a cover fails and the verification pass may have run out (`webapp.gate` hint), it asks `GET /api/verify` and reloads into the verification page; `lib/reload.ts` is the shared at-most-every-30-s reload guard.
- `hooks/useSeoHead.ts` sets canonical + robots per route (index.html has no static canonical/og:url on purpose).
@@ -68,7 +68,7 @@ Local admin without Access: put `DEV_ADMIN_EMAIL=you@example.com` in `webapp/.de
## Editable vs read-only fields
Each game has **20** fields (plus optional `added_at` / `updated_at`, appended by the pipeline — schema changes are additive only, installed v3 apps may still read the raw JSON). Only **3** are maintainer-editable: `safe_virus` (`?|Yes|No|Caution`), `notes`, `nsfw` (`Yes|No`) — via `/admin`. The other 17 are scraper output; no scrape (not even `--full`) overwrites the 3 editable fields.
Each game has **20** fields (plus optional `added_at` / `updated_at`, appended by the pipeline, and since 4.3 the optional scraper fields `ai_disclosure` (`No AI|AI Assisted|N/A`) / `ai_content` / `accessibility`, which the daily refresh adds to older records — schema changes are additive only, installed v3 apps may still read the raw JSON). Only **3** are maintainer-editable: `safe_virus` (`?|Yes|No|Caution`), `notes`, `nsfw` (`Yes|No`) — via `/admin`. The other 17 are scraper output; no scrape (not even `--full`) overwrites the 3 editable fields.
## GitHub Actions
@@ -135,6 +135,7 @@ Code **MIT** (`LICENSE`); catalog data **CC BY 4.0** for the maintainer's contri
27. **A `desc` pack matches its games by row, so only within one build.** Load the `desc` named in the same `db` result; on a 404 refetch `db` (`useDescriptions.ts`), never re-resolve a desc file against a newer manifest for games already on screen.
28. **In Chromium 121+, `scrollbar-color` or `scrollbar-width` on an element switches its `::-webkit-scrollbar` styling off.** Keep the standard properties Firefox-only (`@supports not selector(::-webkit-scrollbar)`), except `scrollbar-width: none` for hiding.
29. **Pack names are content hashes: the build must stay deterministic** (column and dictionary order, zlib level 9 — a Node/zlib upgrade only re-downloads once), **and no hash may reach the JS bundle** (data-only deploys keep JS byte-identical; the manifest is fetched, never imported). `_headers` joins a header set by two matching rules with a comma — give each path one `Cache-Control`.
30. **itch.io shows the `Published` and `Updated` info rows only for a few weeks** after the event (every `Published` date in a 250-page sample of Oct 2026 was under four weeks old); an explicit `Release date` row stays. That is why `release_date` is N/A for most older games, and why a `--full` re-scrape keeps a known `release_date` / `thumbnail` instead of writing N/A (`KEEP_KNOWN_FIELDS` in `refresh.py`).
## Safe-edit rules
@@ -145,6 +146,8 @@ Code **MIT** (`LICENSE`); catalog data **CC BY 4.0** for the maintainer's contri
## Current state (Oct 2026)
**v4.3.0** (2026-10-10): itch.io's newer info rows in the catalog — `ai_disclosure` / `ai_content` (generative-AI disclosure) and `accessibility` — on the game page, as `/games` filters (`ai`, `access`) and as charts (Overview: "Generative AI"; Discovery: "Accessibility Features", "What AI Was Used For"); `description` = the creator's tagline. Rolled out with a full re-scrape: after the merge, `force_update.yml` dispatched ~6× (budget ≈550, one ~45-min batch each, FIFO); the daily refresh fills the new fields in on its own within a week. A 250-page sample before the release: No AI 47 %, AI Assisted 10 %, not disclosed 43 %; accessibility listed on ≈20 % of games.
**v4.2.0** (2026-10-03, PR #103): catalog packs + lazy descriptions (first visit ≈ 264 KB instead of ≈ 520 KB), compressed IndexedDB cache, `/data/*.json` only for apps 4.0–4.1.1 (410 + repository links for everyone else), `/img` cache fixes, themed scrollbars + "Hide scrollbars", policies (`LEGAL_VERSION` 2026-10-03: data reuse goes through the repository). Checked on the live site the same day: TLS 1.2/1.3 only, HSTS preload header (domain not on the preload list), Cloudflare compression already on (zstd/br), Smart Tiered Cache on but irrelevant here (`docs/operations.md` §1 step 12).
**v4.1.1** (2026-09-29): contact addresses moved to `@poli0981.dev` (Google Workspace), About page links poli0981.dev + /links/, `LEGAL_VERSION` 2026-09-29.
+8 -4
View File
@@ -35,7 +35,7 @@ read-only for everyone: no accounts, no sign-in, no comments, no ads, no payment
Everything lives on the website, **<https://freeitchgames.win>**:
- **Games**: the whole catalog in one fast table (a compact list on phones), with filters for genre, platform,
status and more, plus a detail page for every game.
status, the creator's generative-AI disclosure, accessibility and more, plus a detail page for every game.
- **Charts**: how the catalog breaks down, and how it has grown over time.
- **Removed**: every game dropped from the catalog, with the reason
(<https://freeitchgames.win/removed>).
@@ -239,8 +239,9 @@ mass changes are reported to the project's Discord as automated notifications.
## Data fields
Each game in `data_game/game_info_NNN.json` has these 20 fields (plus optional `added_at` / `updated_at`
timestamps added by the pipeline). Only `safe_virus`, `notes` and `nsfw` are maintained by the Maintainer;
Each game in `data_game/game_info_NNN.json` has these 20 fields, plus optional `added_at` / `updated_at`
timestamps added by the pipeline and, since 4.3, the optional `ai_disclosure` / `ai_content` /
`accessibility` fields (filled in as each game is re-checked). Only `safe_virus`, `notes` and `nsfw` are maintained by the Maintainer;
everything else is scraped from the game's public itch.io page, and no re-scrape ever overwrites those three.
| Field | Description |
@@ -248,7 +249,7 @@ everything else is scraped from the game's public itch.io page, and no re-scrape
| `url` | Game page URL |
| `name` | Game title |
| `dev` | Developer / author name(s) |
| `description` | Short description (first sentence, max 200 chars) |
| `description` | The creator's tagline on itch.io, else the description's first sentence (max 200 chars) |
| `genre` | Genre(s) from itch.io |
| `tags` | All tags |
| `status` | Release status |
@@ -265,6 +266,9 @@ everything else is scraped from the game's public itch.io page, and no re-scrape
| `safe_virus` | Manual safety note: `?` (default), `Yes`, `No`, `Caution`. A note, not a guarantee: downloads are not scanned |
| `notes` | Manual notes |
| `thumbnail` | Cover image URL (on itch.io) |
| `ai_disclosure` | The creator's generative-AI disclosure: `No AI`, `AI Assisted` (itch.io's wording) or `N/A` (not disclosed) |
| `ai_content` | What AI was used for when assisted (`Graphics`, `Text`, `Code`, `Sounds`) |
| `accessibility` | Accessibility features (`Subtitles`, `Configurable controls`, `Color-blind friendly`, …) |
Scraped fields default to `N/A` when not available on the game page.
+6 -3
View File
@@ -34,7 +34,7 @@ Một danh mục được tuyển chọn và tự động cập nhật gồm **h
Mọi thứ nằm trên website **<https://freeitchgames.win>**:
- **Danh sách game**: toàn bộ danh mục trong một bảng chạy nhanh (dạng danh sách gọn trên điện thoại), lọc theo thể loại, nền tảng, trạng thái và nhiều thứ khác, cùng một trang chi tiết cho từng game.
- **Danh sách game**: toàn bộ danh mục trong một bảng chạy nhanh (dạng danh sách gọn trên điện thoại), lọc theo thể loại, nền tảng, trạng thái, công bố của tác giả về AI tạo sinh, hỗ trợ tiếp cận và nhiều thứ khác, cùng một trang chi tiết cho từng game.
- **Biểu đồ**: danh mục được chia ra sao, và đã lớn lên thế nào theo thời gian.
- **Đã gỡ** (Removed): mọi game bị loại khỏi danh mục, kèm lý do (<https://freeitchgames.win/removed>).
- **Kiểm tra nhanh trước.** Lần đầu vào, rồi khoảng mỗi 48 giờ, trang sẽ chạy một bước kiểm tra Cloudflare Turnstile ngắn để chặn bot. Thường nó tự qua rồi mở đúng trang bạn cần. Dữ liệu trong `/data` và các ứng dụng không cần bước này.
@@ -182,14 +182,14 @@ Lỗi mạng được coi là tạm thời; game chỉ bị gỡ khi cùng lỗi
## Các trường dữ liệu
Mỗi game trong `data_game/game_info_NNN.json` có 20 trường sau (cộng thêm dấu thời gian tùy chọn `added_at` / `updated_at` do pipeline thêm vào). Chỉ `safe_virus`, `notes` và `nsfw` do Maintainer quản lý; mọi thứ khác được cào từ trang itch.io công khai của game, và không lần cào lại nào ghi đè ba trường đó.
Mỗi game trong `data_game/game_info_NNN.json` có 20 trường sau, cộng thêm dấu thời gian tùy chọn `added_at` / `updated_at` do pipeline thêm vào và, từ bản 4.3, các trường tùy chọn `ai_disclosure` / `ai_content` / `accessibility` (được điền dần khi từng game được kiểm tra lại). Chỉ `safe_virus`, `notes` và `nsfw` do Maintainer quản lý; mọi thứ khác được cào từ trang itch.io công khai của game, và không lần cào lại nào ghi đè ba trường đó.
| Trường | Mô tả |
|-------------------|------------------------------------------------------------|
| `url` | URL trang game |
| `name` | Tên game |
| `dev` | Tên nhà phát triển / tác giả |
| `description` | Mô tả ngắn (câu đầu tiên, tối đa 200 ký tự) |
| `description` | Tagline của tác giả trên itch.io, nếu không có thì là câu đầu tiên của phần mô tả (tối đa 200 ký tự) |
| `genre` | Thể loại theo itch.io |
| `tags` | Tất cả tag |
| `status` | Trạng thái phát hành |
@@ -206,6 +206,9 @@ Mỗi game trong `data_game/game_info_NNN.json` có 20 trường sau (cộng th
| `safe_virus` | Ghi chú an toàn thủ công: `?` (mặc định), `Yes`, `No`, `Caution`. Chỉ là ghi chú, không phải bảo đảm: file tải về không được quét |
| `notes` | Ghi chú thủ công |
| `thumbnail` | URL ảnh bìa (trên itch.io) |
| `ai_disclosure` | Công bố của tác giả về AI tạo sinh: `No AI`, `AI Assisted` (cách ghi của itch.io) hoặc `N/A` (chưa công bố) |
| `ai_content` | Phần dùng AI khi có dùng AI hỗ trợ (`Graphics`, `Text`, `Code`, `Sounds`) |
| `accessibility` | Tính năng hỗ trợ tiếp cận (`Subtitles`, `Configurable controls`, `Color-blind friendly`, …) |
Các trường được cào mặc định là `N/A` khi trang game không có thông tin.
+48
View File
@@ -0,0 +1,48 @@
# Changelog — 4.3.x
Release notes for 4.3.0. Every version: [CHANGELOG.md](../../CHANGELOG.md).
## [4.3.0] - 2026-10-10 (AI disclosure, accessibility, refreshed catalog)
Version 4.3 reads the rows itch.io has added to game pages (the creator's generative-AI disclosure and
the accessibility features) into the catalog, its filters and its charts, uses the creator's own
tagline as the description, and re-scrapes the whole catalog once.
### Upgrade notes
- **Nothing to accept**: the policies have not changed.
- **The catalog is re-scraped after the release**, in a few batches over a few hours. Until a game has
been checked again, its AI disclosure shows as "Not disclosed" and its accessibility list is empty.
- **Reusing the data?** Every record gains three optional fields (`ai_disclosure`, `ai_content`,
`accessibility`), and `description` now holds the creator's tagline when there is one. The 20
existing fields keep their names and types, and apps 4.0–4.2 ignore the new ones.
### Added
- **Generative AI**: what the creator disclosed on itch.io. "No AI used" means the page's Content row
says "No generative AI was used". "AI-assisted" comes with what the AI was used for (Graphics, Text,
Code, Sounds). Otherwise it is "Not disclosed". It appears on the game page, as a filter on Games
(`?ai=…`) and as a chart (Charts → Overview); a second chart shows what AI-assisted games used AI
for (Charts → Discovery).
- **Accessibility**: the features itch.io lists, such as Subtitles, Configurable controls, Color-blind
friendly, High-contrast, One button and Interactive tutorial. They appear on the game page, as a
filter (`?access=…`) and as a chart (Charts → Discovery).
### Changed
- **Descriptions are the creator's tagline** (itch.io's "short description or tagline", set for about
87 % of games). Games without one keep the first sentence of their page's description, as before
(200 characters at most). 18+ suggestions for newly added games still look at that first sentence
too.
- **The whole catalog is re-scraped once** (`force_update.yml`). Besides the new fields, this picks up
the tags, platforms, engines, covers, names, authors and publishers that changed on itch.io since
the games were added.
- **The daily refresh keeps the AI disclosure and accessibility current**, as it already does for the
status and rating.
- **Re-scrapes keep a known release date and cover.** itch.io shows the "Published" row only for a few
weeks after a game comes out, so a later re-scrape no longer replaces a known date with N/A.
### Fixed
- **Text from pages that break lines inside a title or link** is read with single spaces: a tag such
as "Meaningful Choices" no longer carries an embedded line break.
+16 -7
View File
@@ -10,8 +10,8 @@ then the least recently checked — about 1/7 of the catalog by default, so
every game is re-checked weekly. From that single page it derives:
- alive: 404/410 → "dead" strike
- price: paid → "paid" strike
- rating, rating_count, status (+ backfills release_date / thumbnail /
updated_at when missing)
- rating, rating_count, status, ai_disclosure / ai_content / accessibility
(+ backfills release_date / thumbnail / updated_at when missing)
A game is removed only when the same strike is seen again at least
MIN_STRIKE_GAP after it was first seen (a single 404 or a flaky price widget
no longer deletes a game). If a run would remove, or newly strike, more than
@@ -51,6 +51,7 @@ from scraper import (
NA,
Pacer,
Page,
ai_and_accessibility,
create_session,
extract_thumbnail,
fetch_page,
@@ -66,6 +67,9 @@ STATE_FILE = "scripts/state/refresh_state.json"
# User-editable annotations: never overwritten by any scrape.
PRESERVE_FIELDS = ("safe_virus", "notes", "nsfw")
# A full re-scrape keeps these when the page no longer shows them: itch.io shows
# the "Published" row only for a few weeks, and a game's cover doesn't go away.
KEEP_KNOWN_FIELDS = ("release_date", "thumbnail")
DEAD_CODES = {404, 410}
CHECKPOINT_EVERY = 50
@@ -152,11 +156,13 @@ def refresh_updates(game: dict, soup) -> dict:
if not has_info_panel(soup):
return updates
info = parse_info_table(soup)
for field, value in (
("status", info.get("Status", NA)),
("rating", info.get("Rating", NA)),
("rating_count", info.get("RatingCount", NA)),
):
current = {
"status": info.get("Status", NA),
"rating": info.get("Rating", NA),
"rating_count": info.get("RatingCount", NA),
**ai_and_accessibility(info),
}
for field, value in current.items():
if game.get(field) != value:
updates[field] = value
if game.get("release_date", NA) == NA:
@@ -176,6 +182,9 @@ def full_updates(game: dict, soup) -> dict:
"""Every scraper-owned field that differs from a fresh scrape."""
fresh = parse_game(soup, game["url"])
fresh.pop("is_free", None)
for field in KEEP_KNOWN_FIELDS:
if fresh.get(field) == NA and game.get(field, NA) != NA:
fresh[field] = game[field]
return {
k: v
for k, v in fresh.items()
+84 -28
View File
@@ -5,8 +5,10 @@ Provides:
- Session creation (honest User-Agent, retries on 5xx only)
- fetch_page(): one GET with explicit 429 / Retry-After reporting
- Pacer: polite delays, batch pauses, back-off after a 429
- Free/paid detection, info table parsing (all fields → N/A on missing)
- Description, thumbnail, NSFW extraction
- Free/paid detection, info table parsing (all fields → N/A on missing),
including the AI-disclosure and accessibility rows itch.io added in 2025–26
- Description (the creator's tagline, else the first sentence), thumbnail,
NSFW extraction
- parse_game(): full single-game record from a fetched page
"""
@@ -207,10 +209,15 @@ def is_free_game(soup: BeautifulSoup) -> bool:
# ---------------------------------------------------------------------------
# Helpers
# ---------------------------------------------------------------------------
def _text(tag) -> str:
"""Visible text with whitespace runs collapsed (a page may break lines inside a link)."""
return " ".join(tag.get_text().split())
def _safe_text(tag, fallback: str = NA) -> str:
if tag is None:
return fallback
text = tag.get_text(strip=True)
text = _text(tag)
return text if text else fallback
@@ -234,17 +241,27 @@ def has_info_panel(soup: BeautifulSoup) -> bool:
# ---------------------------------------------------------------------------
# Fields where itch.io lists multiple <a> links → store as JSON array
_LIST_FIELDS = {"Tags", "Platforms", "Languages", "Inputs", "Made with"}
_LIST_FIELDS = {"Tags", "Platforms", "Languages", "Inputs", "Made with", "Accessibility"}
# Date rows: prefer abbr@title ("23 April 2021 @ 19:30 UTC") over the relative text
_DATE_FIELDS = {"Release date", "Published", "Updated"}
# Stored when the "Content" row says "No generative AI was used" (/games/tag-no-ai).
AI_NONE = "No AI"
def _links_to(a, slug: str) -> bool:
return str(a.get("href", "")).split("?", 1)[0].rstrip("/").endswith(f"/games/{slug}")
def parse_info_table(soup: BeautifulSoup) -> dict[str, Any]:
"""Parse the right-side info panel into a dict.
Multi-value fields (Tags, Platforms, etc.) → list[str]
Single-value fields (Genre, Status, etc.) → str
"AI Disclosure" ("AI Assisted, Graphics, Text") → the classification as
"AI Disclosure", what AI was used for as "AI content" (list); a "Content"
row linking to /games/tag-no-ai also sets "No AI" = True.
Missing fields are NOT inserted — caller handles defaults.
"""
info: dict[str, Any] = {}
@@ -261,7 +278,7 @@ def parse_info_table(soup: BeautifulSoup) -> dict[str, Any]:
if len(tds) < 2:
continue
key = tds[0].get_text(strip=True)
key = _text(tds[0])
value_td = tds[1]
if key in _DATE_FIELDS:
@@ -269,8 +286,7 @@ def parse_info_table(soup: BeautifulSoup) -> dict[str, Any]:
if abbr and abbr.get("title"):
info[key] = abbr["title"]
else:
text = value_td.get_text(strip=True)
info[key] = text if text else NA
info[key] = _safe_text(value_td)
continue
# --- Rating: extract from itemprop attributes ---
@@ -288,37 +304,69 @@ def parse_info_table(soup: BeautifulSoup) -> dict[str, Any]:
# --- Multi-value fields → list of strings ---
links = value_td.find_all("a")
texts = [_text(a) for a in links]
if key in _LIST_FIELDS:
info[key] = [a.get_text(strip=True) for a in links] if links else []
info[key] = texts
continue
# --- AI Disclosure: the classification first, then what AI was used for ---
if key == "AI Disclosure":
info[key] = texts[0] if texts else _safe_text(value_td)
info["AI content"] = texts[1:]
continue
if key == "Content" and any(_links_to(a, "tag-no-ai") for a in links):
info["No AI"] = True
# --- Genre: use only the FIRST value (primary genre) ---
if key == "Genre":
if links:
info[key] = links[0].get_text(strip=True)
else:
text = value_td.get_text(strip=True)
info[key] = text if text else NA
info[key] = texts[0] if texts else _safe_text(value_td)
continue
# --- Generic single-value: prefer link texts joined, fallback plain ---
if links:
value = ", ".join(a.get_text(strip=True) for a in links)
else:
value = value_td.get_text(strip=True)
value = ", ".join(texts) if links else _text(value_td)
info[key] = value if value else NA
return info
def ai_and_accessibility(info: dict[str, Any]) -> dict[str, Any]:
"""The stored fields from itch.io's newer rows (the daily refresh keeps them current).
ai_disclosure: "AI Assisted" (the "AI Disclosure" row), "No AI" (the
"Content" row's /games/tag-no-ai) or N/A — the creator has not said.
ai_content: what AI was used for ("Graphics", "Text", "Code", "Sounds").
"""
return {
"ai_disclosure": info.get("AI Disclosure") or (AI_NONE if info.get("No AI") else NA),
"ai_content": info.get("AI content", []),
"accessibility": info.get("Accessibility", []),
}
# ---------------------------------------------------------------------------
# Description
# ---------------------------------------------------------------------------
_SENTENCE_END = re.compile(r"(?<=[.!?])\s+(?=[A-Z0-9\"'“(])")
DESCRIPTION_MAX = 200
def extract_description(soup: BeautifulSoup) -> str:
def _cap(text: str) -> str:
"""`text`, cut on a word and marked with "..." when longer than DESCRIPTION_MAX."""
if len(text) <= DESCRIPTION_MAX:
return text
cut = text[: DESCRIPTION_MAX - 3]
return (cut.rsplit(" ", 1)[0] if " " in cut else cut) + "..."
def extract_tagline(soup: BeautifulSoup) -> str:
"""The creator's "short description or tagline" (itch.io puts it in og:description)."""
meta = soup.find("meta", property="og:description")
text = " ".join(str(meta.get("content", "")).split()) if meta else ""
return _cap(text) if text else NA
def extract_first_sentence(soup: BeautifulSoup) -> str:
desc_tag = soup.find("div", class_="formatted_description")
if not desc_tag:
return NA
@@ -329,11 +377,13 @@ def extract_description(soup: BeautifulSoup) -> str:
return NA
# First sentence (a terminator followed by whitespace + a capital), capped at 200 chars.
first = _SENTENCE_END.split(full, maxsplit=1)[0]
if len(first) <= 200:
return first
cut = first[:197].rsplit(" ", 1)[0] if " " in first[:197] else first[:197]
return cut + "..."
return _cap(_SENTENCE_END.split(full, maxsplit=1)[0])
def extract_description(soup: BeautifulSoup) -> str:
"""The tagline, or the description's first sentence when the creator wrote none."""
tagline = extract_tagline(soup)
return tagline if tagline != NA else extract_first_sentence(soup)
# ---------------------------------------------------------------------------
@@ -361,12 +411,15 @@ _NSFW_RE = re.compile(
)
def detect_nsfw(soup: BeautifulSoup, tags, description: str) -> str:
"""Detect NSFW. `tags` can be list[str] or str. Matches whole words only."""
def detect_nsfw(soup: BeautifulSoup, tags, *texts: str) -> str:
"""Detect NSFW from tags, short texts (tagline, first sentence) and itch.io's warning.
`tags` can be list[str] or str. Matches whole words only.
"""
tags_text = " ".join(tags) if isinstance(tags, list) else (tags or "")
if _NSFW_RE.search(tags_text):
return "Yes"
if description != NA and _NSFW_RE.search(description):
if any(text != NA and _NSFW_RE.search(text) for text in texts):
return "Yes"
if soup.find("div", class_=["view_game_warning", "mature_content_notice"]):
return "Yes"
@@ -387,6 +440,8 @@ def parse_game(soup: BeautifulSoup, url: str) -> dict:
tags = info.get("Tags", [])
description = extract_description(soup)
release_date = info.get("Release date") or info.get("Published") or NA
# The first sentence too: a tagline rarely says what the description does.
nsfw = detect_nsfw(soup, tags, description, extract_first_sentence(soup))
record = {
"url": url,
@@ -401,13 +456,14 @@ def parse_game(soup: BeautifulSoup, url: str) -> dict:
"rating": info.get("Rating", NA),
"rating_count": info.get("RatingCount", NA),
"average_session": info.get("Average session", NA),
"nsfw": detect_nsfw(soup, tags, description),
"nsfw": nsfw,
"thumbnail": extract_thumbnail(soup),
"tags": tags,
"platforms": info.get("Platforms", []),
"languages": info.get("Languages", []),
"inputs": info.get("Inputs", []),
"made_with": info.get("Made with", []),
**ai_and_accessibility(info),
"safe_virus": "?",
"notes": "",
}
+15 -5
View File
@@ -8,7 +8,9 @@ print.
Checks:
- chunk files game_info_001..N are contiguous, ≤ CHUNK_SIZE, lists of records
- every record has the 20 schema fields with the right types, a canonical
URL, valid enums; URLs are unique across chunks
URL, valid enums; URLs are unique across chunks; the optional fields
(added_at, updated_at, ai_disclosure, ai_content, accessibility) have the
right types when present
- index.json agrees with the chunk files
- count_history.json: one {date, total} row per day, sorted
- deleted_games.json entries are complete; temp_link.json is a list of strings
@@ -44,7 +46,9 @@ STRING_FIELDS = (
"notes",
)
LIST_FIELDS = ("tags", "platforms", "languages", "inputs", "made_with")
OPTIONAL_STRING_FIELDS = ("added_at", "updated_at")
# Optional: older records lack them until a refresh adds them (schema changes stay additive).
OPTIONAL_STRING_FIELDS = ("added_at", "updated_at", "ai_disclosure")
OPTIONAL_LIST_FIELDS = ("ai_content", "accessibility")
SAFE_VIRUS = {"?", "Yes", "No", "Caution"}
NSFW = {"Yes", "No"}
@@ -66,10 +70,11 @@ def check_record(game, where: str) -> tuple[list[str], list[str]]:
errors.append(f"{where}: missing field '{field}'")
elif not isinstance(game[field], str):
errors.append(f"{where}: '{field}' must be a string")
for field in LIST_FIELDS:
for field in LIST_FIELDS + OPTIONAL_LIST_FIELDS:
value = game.get(field)
if field not in game:
errors.append(f"{where}: missing field '{field}'")
if field in LIST_FIELDS:
errors.append(f"{where}: missing field '{field}'")
elif not isinstance(value, list) or not all(isinstance(v, str) for v in value):
errors.append(f"{where}: '{field}' must be a list of strings")
for field in OPTIONAL_STRING_FIELDS:
@@ -82,7 +87,12 @@ def check_record(game, where: str) -> tuple[list[str], list[str]]:
errors.append(f"{where}: safe_virus {game.get('safe_virus')!r} not in {sorted(SAFE_VIRUS)}")
if game.get("nsfw") not in NSFW and "nsfw" in game:
errors.append(f"{where}: nsfw {game.get('nsfw')!r} not in {sorted(NSFW)}")
known = set(STRING_FIELDS) | set(LIST_FIELDS) | set(OPTIONAL_STRING_FIELDS)
known = (
set(STRING_FIELDS)
| set(LIST_FIELDS)
| set(OPTIONAL_STRING_FIELDS)
| set(OPTIONAL_LIST_FIELDS)
)
extra = sorted(set(game) - known)
if extra:
warnings.append(f"{where}: unknown field(s) {extra}")
+58
View File
@@ -0,0 +1,58 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="https://img.itch.zone/aW1nLzM=/original/Lamp.png" property="og:image"/>
<meta content="Keep the lighthouse burning
through one long night." property="og:description"/>
<meta content="Keep the lighthouse burning through one long night." name="description"/>
<title>Lantern Keeper by Moth Lane</title>
</head>
<body>
<h1 class="game_title">Lantern Keeper</h1>
<div class="formatted_description user_formatted"><p>You are the last keeper of the northern light. Storms are coming, and the oil is running out.</p></div>
<div class="info_panel_wrapper">
<div id="game_info_panel_5551234" class="game_info_panel_widget base_widget">
<table>
<tbody>
<tr>
<td>Published</td>
<td><abbr title="01 October 2026 @ 11:11 UTC"><span aria-hidden="true" class="icon icon-stopwatch"></span> 8 days ago</abbr></td>
</tr>
<tr>
<td>Status</td>
<td><a href="https://itch.io/games/released">Released</a></td>
</tr>
<tr>
<td>Platforms</td>
<td><a href="https://itch.io/games/html5">HTML5</a>, <a href="https://itch.io/games/platform-windows">Windows</a></td>
</tr>
<tr>
<td>Author</td>
<td><a href="https://mothlane.itch.io">Moth Lane</a></td>
</tr>
<tr>
<td>Genre</td>
<td><a href="https://itch.io/games/genre-simulation">Simulation</a></td>
</tr>
<tr>
<td>Tags</td>
<td><a href="https://itch.io/games/tag-atmospheric">Atmospheric</a>, <a href="https://itch.io/games/tag-pixel-art">Pixel Art</a></td>
</tr>
<tr>
<td>Accessibility</td>
<td><a href="https://itch.io/games/accessibility-subtitles">Subtitles</a>, <a href="https://itch.io/games/accessibility-configurable-controls">Configurable controls</a></td>
</tr>
<tr>
<td>AI Disclosure</td>
<td><a href="https://itch.io/games/ai-assisted">AI Assisted</a>, <a href="https://itch.io/games/ai-graphics">Graphics</a>, <a href="https://itch.io/games/ai-text">Text</a></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="buy_row">
<div class="button_message"><a class="button buy_btn" href="https://mothlane.itch.io/lantern-keeper/purchase">Download Now</a><span class="buy_message"><span class="sub">Name your own price</span></span></div>
</div>
</body>
</html>
+85
View File
@@ -0,0 +1,85 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Quiet Orchard [Demo] by Ash &amp; Ivy</title>
</head>
<body>
<!-- Markup as a browser's "copy outer HTML" + formatter leaves it: line breaks
inside link texts, the info panel opened by script. -->
<div class="header align_center has_image" id="header">
<h1 itemprop="name" class="game_title">Quiet Orchard
[Demo]</h1>
</div>
<div class="formatted_description user_formatted">
<p>A gentle story about
growing back. Pick apples, mend fences and talk to the neighbours.</p>
</div>
<div class="more_information_toggle open">
<div class="info_panel_wrapper" style="display: block;">
<div id="game_info_panel_6667267" class="game_info_panel_widget base_widget">
<table>
<tbody>
<tr>
<td>Updated</td>
<td><abbr title="03 October 2026 @ 11:28 UTC"><span aria-hidden="true"
class="icon icon-stopwatch"></span> 6 days ago</abbr></td>
</tr>
<tr>
<td>Status</td>
<td><a href="https://itch.io/games/in-development">In development</a></td>
</tr>
<tr>
<td>Platforms</td>
<td><a href="https://itch.io/games/html5">HTML5</a>, <a
href="https://itch.io/games/platform-windows">Windows</a></td>
</tr>
<tr>
<td>Author</td>
<td><a href="https://ashandivy.itch.io">Ash &amp; Ivy</a></td>
</tr>
<tr>
<td>Genre</td>
<td><a href="https://itch.io/games/genre-visual-novel">Visual Novel</a>, <a
href="https://itch.io/games/tag-interactive-fiction">Interactive
Fiction</a></td>
</tr>
<tr>
<td>Made with</td>
<td><a href="https://itch.io/games/made-with-renpy">Ren'Py</a>, <a
href="https://itch.io/games/made-with-photoshop">Adobe
Photoshop</a></td>
</tr>
<tr>
<td>Tags</td>
<td><a href="https://itch.io/games/tag-meaningful-choices">Meaningful
Choices</a>, <a href="https://itch.io/games/tag-cozy">Cozy</a></td>
</tr>
<tr
title="License for any source-code provided with the project's files.">
<td>Code license</td>
<td><a href="https://itch.io/games/code-mpl">Mozilla Public License 2.0
(MPL)</a></td>
</tr>
<tr>
<td>Average session</td>
<td><a href="https://itch.io/games/duration-half-hour">About a half-hour</a>
</td>
</tr>
<tr>
<td>Content</td>
<td><a href="https://itch.io/games/tag-no-ai">No generative AI was used</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="buy_row">
<div class="button_message"><a class="button buy_btn"
href="https://ashandivy.itch.io/quiet-orchard/purchase">Download Now</a><span
class="buy_message"><span class="sub">Name your own price</span></span></div>
</div>
</body>
</html>
+54
View File
@@ -10,6 +10,7 @@ from scraper import (
Pacer,
detect_nsfw,
extract_description,
extract_tagline,
parse_game,
parse_retry_after,
)
@@ -31,10 +32,63 @@ def test_free_game_full_record():
assert record["thumbnail"].startswith("https://img.itch.zone/")
assert record["safe_virus"] == "?" and record["notes"] == ""
assert "updated_at" not in record
# No AI or accessibility rows: the creator has not said.
assert record["ai_disclosure"] == NA
assert record["ai_content"] == [] and record["accessibility"] == []
# Schema order: the 20 stored fields (+ is_free flag) in a fixed order.
assert list(record)[:4] == ["url", "name", "is_free", "dev"]
def test_ai_assisted_game_with_accessibility():
record = parse_game(load_fixture_soup("game_ai_assisted.html"), "https://x.itch.io/y")
assert record["is_free"] is True
assert record["ai_disclosure"] == "AI Assisted"
assert record["ai_content"] == ["Graphics", "Text"]
assert record["accessibility"] == ["Subtitles", "Configurable controls"]
assert record["release_date"] == "01 October 2026 @ 11:11 UTC" # "Published"
# The creator's tagline (og:description), whitespace collapsed, wins over the first sentence.
assert record["description"] == "Keep the lighthouse burning through one long night."
def test_no_ai_game_from_reformatted_markup():
record = parse_game(load_fixture_soup("game_no_ai.html"), "https://x.itch.io/y")
assert record["ai_disclosure"] == "No AI"
assert record["ai_content"] == [] and record["accessibility"] == []
# Line breaks inside titles and links collapse to single spaces.
assert record["name"] == "Quiet Orchard [Demo]"
assert record["genre"] == "Visual Novel"
assert record["made_with"] == ["Ren'Py", "Adobe Photoshop"]
assert record["tags"] == ["Meaningful Choices", "Cozy"]
assert record["status"] == "In development"
assert record["updated_at"] == "03 October 2026 @ 11:28 UTC"
# No tagline: the first sentence of the description.
assert record["description"] == "A gentle story about growing back."
def test_tagline_is_capped_on_a_word():
from bs4 import BeautifulSoup
long = "tagline " * 40
soup = BeautifulSoup(f'<meta property="og:description" content="{long}">', "html.parser")
tagline = extract_tagline(soup)
assert len(tagline) <= 200 and tagline.endswith("...")
blank = BeautifulSoup('<meta property="og:description" content=" ">', "html.parser")
assert extract_tagline(blank) == NA
def test_nsfw_checks_the_first_sentence_behind_a_tagline():
from bs4 import BeautifulSoup
soup = BeautifulSoup(
'<meta property="og:description" content="A love story.">'
'<div class="formatted_description"><p>An erotic visual novel. Enjoy.</p></div>',
"html.parser",
)
record = parse_game(soup, "https://x.itch.io/y")
assert record["description"] == "A love story."
assert record["nsfw"] == "Yes"
def test_description_first_sentence_keeps_version_numbers():
record = parse_game(load_fixture_soup("game_free_full.html"), "https://x.itch.io/y")
assert record["description"].startswith("Bake cookies with Jonut")
+30
View File
@@ -121,6 +121,36 @@ def test_full_mode_rescrapes_but_preserves_annotations():
assert entry["full"] == NOW
def test_daily_refresh_keeps_ai_and_accessibility_current():
# An older record without the fields gets them; a changed disclosure is updated.
_, updates, _, _ = refresh.check_game(make_game("a"), ok_page("game_ai_assisted.html"), {}, NOW)
assert updates["ai_disclosure"] == "AI Assisted"
assert updates["ai_content"] == ["Graphics", "Text"]
assert updates["accessibility"] == ["Subtitles", "Configurable controls"]
game = make_game("b", ai_disclosure="AI Assisted", ai_content=["Code"], accessibility=[])
_, updates, _, _ = refresh.check_game(game, ok_page("game_no_ai.html"), {}, NOW)
assert updates["ai_disclosure"] == "No AI" and updates["ai_content"] == []
assert "accessibility" not in updates
# Not disclosed on the page: stored as N/A / empty lists.
_, updates, _, _ = refresh.check_game(make_game("c"), ok_page(), {}, NOW)
assert (updates["ai_disclosure"], updates["ai_content"]) == ("N/A", [])
assert updates["accessibility"] == []
def test_full_mode_keeps_a_known_release_date_and_thumbnail():
# The "Published" row is gone a few weeks after publishing; no og:image / screenshots.
game = make_game("a", release_date="02 September 2026 @ 10:00 UTC")
_, updates, _, _ = refresh.check_game(game, ok_page("game_no_ai.html"), {}, NOW, full=True)
assert "release_date" not in updates and "thumbnail" not in updates
assert updates["ai_disclosure"] == "No AI"
# An unknown date is still filled in from the page.
_, updates, _, _ = refresh.check_game(make_game("b"), ok_page(), {}, NOW, full=True)
assert updates["release_date"] == "23 April 2021 @ 19:30 UTC"
def test_errors_and_parse_failures_keep_the_game():
game = make_game("a")
for page, expected in (
+17
View File
@@ -30,6 +30,23 @@ def test_detects_schema_and_consistency_errors(repo):
assert any("unknown field" in w for w in warnings)
def test_optional_fields_are_typed_when_present(repo):
seed_catalog(
[
make_game("a", ai_disclosure="No AI", ai_content=[], accessibility=["Subtitles"]),
make_game("b"), # older record without them
]
)
assert validate.validate() == ([], [])
chunk = read_json("data_game/game_info_001.json")
chunk[0]["ai_content"] = "Graphics"
chunk[1]["ai_disclosure"] = ["No AI"]
save_json("data_game/game_info_001.json", chunk)
errors, _ = validate.validate()
assert any("'ai_content' must be a list of strings" in e for e in errors)
assert any("'ai_disclosure' must be a string" in e for e in errors)
def test_fix_normalizes_enums(repo):
seed_catalog([make_game("a", safe_virus="y"), make_game("b", nsfw="yes")])
assert validate.fix() == 2
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "webapp",
"version": "4.2.0",
"version": "4.3.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "webapp",
"version": "4.2.0",
"version": "4.3.0",
"license": "MIT",
"dependencies": {
"@fontsource-variable/geist": "^5.3.0",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "webapp",
"private": true,
"version": "4.2.0",
"version": "4.3.0",
"license": "MIT",
"type": "module",
"engines": {
+1 -1
View File
@@ -1033,7 +1033,7 @@ dependencies = [
[[package]]
name = "free-games-itchio-webapp"
version = "4.2.0"
version = "4.3.0"
dependencies = [
"serde",
"serde_json",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "free-games-itchio-webapp"
version = "4.2.0"
version = "4.3.0"
description = "Itch.io free games catalog viewer"
authors = ["poli0981"]
license = "MIT"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Itch.io Free Games DB",
"version": "4.2.0",
"version": "4.3.0",
"identifier": "com.poli0981.freegamesitchio",
"build": {
"beforeDevCommand": "npm run dev",
@@ -0,0 +1,37 @@
import { useMemo } from 'react'
import { Bar, BarChart, CartesianGrid, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts'
import { countByArray, topN } from '@/lib/analytics'
import { useT } from '@/lib/i18n'
import type { Game } from '@/types/game'
import { ChartCard } from './chart-card'
import { BAR_CURSOR, TOOLTIP_BASE } from './chart-theme'
import { ChartTooltipContent } from './chart-tooltip'
import { PALETTE } from './palette'
export function AccessibilityChart({ games }: { games: Game[] }) {
const t = useT()
const data = useMemo(() => topN(countByArray(games, 'accessibility'), 10), [games])
return (
<ChartCard title={t('charts.accessibility.title')} description={t('charts.accessibility.desc')}>
{data.length === 0 ? (
<p className="flex h-full items-center justify-center text-sm text-muted-foreground">{t('charts.empty')}</p>
) : (
<ResponsiveContainer width="100%" height="100%">
<BarChart data={data} layout="vertical" margin={{ left: 20 }}>
<CartesianGrid horizontal={false} strokeDasharray="3 3" />
<XAxis type="number" allowDecimals={false} />
<YAxis
dataKey="key"
type="category"
width={140}
tick={{ fontSize: 12 }}
tickFormatter={(v: string) => (v.length > 22 ? `${v.slice(0, 21)}…` : v)}
/>
<Tooltip {...TOOLTIP_BASE} cursor={BAR_CURSOR} content={<ChartTooltipContent />} />
<Bar dataKey="count" name={t('charts.series.games')} fill={PALETTE[7]} radius={[0, 4, 4, 0]} />
</BarChart>
</ResponsiveContainer>
)}
</ChartCard>
)
}
@@ -0,0 +1,32 @@
import { useMemo } from 'react'
import { Bar, BarChart, CartesianGrid, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts'
import { countByArray } from '@/lib/analytics'
import { useT } from '@/lib/i18n'
import type { Game } from '@/types/game'
import { ChartCard } from './chart-card'
import { BAR_CURSOR, TOOLTIP_BASE } from './chart-theme'
import { ChartTooltipContent } from './chart-tooltip'
import { PALETTE } from './palette'
/** What AI-assisted games used AI for; the orange of "AI-assisted" in the disclosure chart. */
export function AiContentChart({ games }: { games: Game[] }) {
const t = useT()
const data = useMemo(() => countByArray(games, 'ai_content'), [games])
return (
<ChartCard title={t('charts.aiContent.title')} description={t('charts.aiContent.desc')}>
{data.length === 0 ? (
<p className="flex h-full items-center justify-center text-sm text-muted-foreground">{t('charts.empty')}</p>
) : (
<ResponsiveContainer width="100%" height="100%">
<BarChart data={data} layout="vertical" margin={{ left: 20 }}>
<CartesianGrid horizontal={false} strokeDasharray="3 3" />
<XAxis type="number" allowDecimals={false} />
<YAxis dataKey="key" type="category" width={100} tick={{ fontSize: 12 }} />
<Tooltip {...TOOLTIP_BASE} cursor={BAR_CURSOR} content={<ChartTooltipContent />} />
<Bar dataKey="count" name={t('charts.series.games')} fill={PALETTE[6]} radius={[0, 4, 4, 0]} />
</BarChart>
</ResponsiveContainer>
)}
</ChartCard>
)
}
@@ -0,0 +1,51 @@
import { useMemo } from 'react'
import { Cell, Legend, Pie, PieChart, ResponsiveContainer, Tooltip } from 'recharts'
import { aiLabel } from '@/lib/ai-disclosure'
import { aiDisclosureCounts } from '@/lib/analytics'
import { AI_ASSISTED, AI_NONE, AI_UNDISCLOSED } from '@/lib/game-filters'
import { useT } from '@/lib/i18n'
import type { Game } from '@/types/game'
import { ChartCard } from './chart-card'
import { SLICE_STROKE, TOOLTIP_BASE } from './chart-theme'
import { ChartTooltipContent } from './chart-tooltip'
import { NEUTRAL, PALETTE } from './palette'
// Blue / orange / gray stay apart for colour-blind readers on both themes.
const COLOR: Record<string, string> = {
[AI_NONE]: PALETTE[4],
[AI_ASSISTED]: PALETTE[6],
[AI_UNDISCLOSED]: NEUTRAL,
}
export function AiDisclosureChart({ games }: { games: Game[] }) {
const t = useT()
const data = useMemo(
() => aiDisclosureCounts(games).map((e) => ({ ...e, label: aiLabel(e.key, t) })),
[games, t],
)
const total = data.reduce((sum, d) => sum + d.count, 0)
return (
<ChartCard title={t('charts.ai.title')} description={t('charts.ai.desc')}>
<ResponsiveContainer width="100%" height="100%">
<PieChart>
<Pie
data={data}
dataKey="count"
nameKey="label"
innerRadius="50%"
outerRadius="80%"
paddingAngle={2}
stroke={SLICE_STROKE}
>
{data.map((d) => (
<Cell key={d.key} fill={COLOR[d.key] ?? PALETTE[8]} />
))}
</Pie>
<Tooltip {...TOOLTIP_BASE} content={<ChartTooltipContent total={total} />} />
{/* The data's order (no AI, AI-assisted, not disclosed), not Recharts' alphabetical default. */}
<Legend itemSorter={(item) => data.findIndex((d) => d.label === item.value)} />
</PieChart>
</ResponsiveContainer>
</ChartCard>
)
}
+3
View File
@@ -12,3 +12,6 @@ export const PALETTE = [
'hsl(280 65% 60%)',
'hsl(160 60% 45%)',
]
/** "Unknown / not disclosed" slices: a mid gray that reads on both themes' cards. */
export const NEUTRAL = '#6b6b74'
@@ -1,4 +1,6 @@
import type { Game } from '@/types/game'
import { AccessibilityChart } from '@/components/charts/accessibility-chart'
import { AiContentChart } from '@/components/charts/ai-content-chart'
import { GenreTreemapChart } from '@/components/charts/genre-treemap-chart'
import { TopTagsChart } from '@/components/charts/top-tags-chart'
@@ -11,6 +13,8 @@ export default function DiscoveryTab({ games }: DiscoveryTabProps) {
<div className="grid gap-4 md:grid-cols-2">
<TopTagsChart games={games} />
<GenreTreemapChart games={games} />
<AccessibilityChart games={games} />
<AiContentChart games={games} />
</div>
)
}
@@ -1,4 +1,5 @@
import type { CountHistoryPoint, DeletedGameEntry, Game } from '@/types/game'
import { AiDisclosureChart } from '@/components/charts/ai-disclosure-chart'
import { GameCountChart } from '@/components/charts/game-count-chart'
import { GenreChart } from '@/components/charts/genre-chart'
import { KpiCards } from '@/components/charts/kpi-cards'
@@ -23,6 +24,7 @@ export default function OverviewTab({ games, deleted, history, hiddenNsfw }: Ove
<OnlineOfflineChart games={games} />
<MadeWithChart games={games} />
<GameCountChart history={history} />
<AiDisclosureChart games={games} />
</div>
</div>
)
+1 -1
View File
@@ -8,7 +8,7 @@ export interface ThirdParty {
export const APP = {
name: 'Free Itch Games',
version: '4.2.0',
version: '4.3.0',
repo: 'https://github.com/poli0981/free-games-itchio-list',
license: 'code MIT · data CC BY 4.0',
} as const
+19
View File
@@ -0,0 +1,19 @@
/**
* Labels for the creator's generative-AI disclosure (`Game.ai_disclosure`).
* The pipeline stores itch.io's wording ("AI Assisted") or its own short
* forms ("No AI", "N/A"); the UI translates the values it knows and shows
* anything new as itch.io wrote it.
*/
import { AI_ASSISTED, AI_NONE, AI_UNDISCLOSED } from './game-filters'
import type { MessageKey } from './i18n'
const LABEL: Record<string, MessageKey> = {
[AI_NONE]: 'ai.none',
[AI_ASSISTED]: 'ai.assisted',
[AI_UNDISCLOSED]: 'ai.undisclosed',
}
export function aiLabel(value: string, t: (key: MessageKey) => string): string {
const key = LABEL[value]
return key ? t(key) : value
}
+12 -1
View File
@@ -1,4 +1,5 @@
import type { Game, DeletedGameEntry } from '@/types/game'
import { aiDisclosureOf, aiRank } from './game-filters'
export interface CountEntry {
key: string
@@ -16,7 +17,7 @@ export function countBy(games: Game[], key: 'genre' | 'status' | 'average_sessio
export function countByArray(
games: Game[],
key: 'tags' | 'platforms' | 'languages' | 'inputs' | 'made_with',
key: 'tags' | 'platforms' | 'languages' | 'inputs' | 'made_with' | 'ai_content' | 'accessibility',
): CountEntry[] {
const m = new Map<string, number>()
for (const g of games) {
@@ -34,6 +35,16 @@ export function topN(entries: CountEntry[], n: number): CountEntry[] {
return entries.slice(0, n)
}
/** Games per AI disclosure: "No AI", "AI Assisted", any newer itch.io value, then not disclosed. */
export function aiDisclosureCounts(games: Game[]): CountEntry[] {
const m = new Map<string, number>()
for (const g of games) {
const v = aiDisclosureOf(g)
m.set(v, (m.get(v) ?? 0) + 1)
}
return Array.from(m, ([key, count]) => ({ key, count })).sort((a, b) => aiRank(a.key) - aiRank(b.key) || b.count - a.count)
}
function parseRating(rating: string): number | null {
const n = parseFloat(rating)
return isFinite(n) ? n : null
+31
View File
@@ -84,6 +84,37 @@ describe('filterGames', () => {
{ value: 'Visual Novel', count: 1 },
])
})
it('filters on the AI disclosure, with "not disclosed" as a value of its own', () => {
const games = [
game('Hand Made', { ai_disclosure: 'No AI', ai_content: [] }),
game('Helper', { ai_disclosure: 'AI Assisted', ai_content: ['Graphics'] }),
game('Quiet', { ai_disclosure: 'N/A', ai_content: [] }),
game('Not Rechecked'), // a record from before 4.3
]
// A fixed order, not by count.
expect(facetCounts(games, 'ai')).toEqual([
{ value: 'No AI', count: 1 },
{ value: 'AI Assisted', count: 1 },
{ value: 'N/A', count: 2 },
])
const q = parseQuery(new URLSearchParams('ai=No+AI&ai=N%2FA'))
expect(q.lists.ai).toEqual(['No AI', 'N/A'])
expect(filterGames(games, q).map((g) => g.name)).toEqual(['Hand Made', 'Quiet', 'Not Rechecked'])
expect(toParams(q).toString()).toBe('ai=No+AI&ai=N%2FA')
})
it('filters on accessibility features', () => {
const games = [
game('Captioned', { accessibility: ['Subtitles', 'High-contrast'] }),
game('Remappable', { accessibility: ['Configurable controls'] }),
game('Plain'),
]
const q = emptyQuery()
q.lists.access = ['Subtitles', 'Configurable controls']
expect(filterGames(games, q).map((g) => g.name)).toEqual(['Captioned', 'Remappable'])
expect(facetCounts(games, 'access').map((c) => c.value)).toEqual(['Configurable controls', 'High-contrast', 'Subtitles'])
})
})
describe('sortGames', () => {
+31 -8
View File
@@ -16,6 +16,8 @@ export const LIST_FILTERS = {
lang: 'languages',
input: 'inputs',
engine: 'made_with',
ai: 'ai_disclosure',
access: 'accessibility',
} as const satisfies Record<string, keyof Game>
export type ListFilter = keyof typeof LIST_FILTERS
@@ -37,10 +39,28 @@ export const RATING_STEPS = [4.5, 4, 3.5, 3] as const
const NA = 'N/A'
/** `ai_disclosure` values the pipeline writes; anything else is shown as itch.io wrote it. */
export const AI_NONE = 'No AI'
export const AI_ASSISTED = 'AI Assisted'
/** The AI filter's value for games whose creator has not said (or not re-checked yet). */
export const AI_UNDISCLOSED = NA
export function aiDisclosureOf(game: Game): string {
const value = game.ai_disclosure
return value && value !== NA ? value : AI_UNDISCLOSED
}
/** One order wherever the disclosures are listed: no AI, AI-assisted, any newer value, not disclosed. */
export function aiRank(value: string): number {
if (value === AI_NONE) return 0
if (value === AI_ASSISTED) return 1
return value === AI_UNDISCLOSED ? 3 : 2
}
export function emptyQuery(): GameQuery {
return {
q: '',
lists: { genre: [], platform: [], status: [], tag: [], lang: [], input: [], engine: [] },
lists: { genre: [], platform: [], status: [], tag: [], lang: [], input: [], engine: [], ai: [], access: [] },
minRating: null,
browser: false,
sort: 'rated',
@@ -83,8 +103,10 @@ export function fold(text: string): string {
return text.normalize('NFD').replace(/\p{Diacritic}/gu, '').toLowerCase()
}
function values(game: Game, field: (typeof LIST_FILTERS)[ListFilter]): string[] {
const value = game[field]
function values(game: Game, key: ListFilter): string[] {
// "Not disclosed" is a choice of its own: hiding AI-assisted games keeps those.
if (key === 'ai') return [aiDisclosureOf(game)]
const value = game[LIST_FILTERS[key]]
if (Array.isArray(value)) return value
return typeof value === 'string' && value && value !== NA ? [value] : []
}
@@ -132,9 +154,9 @@ export function filterGames(
if (key === skip) continue
const wanted = query.lists[key]
if (wanted.length === 0) continue
const have = values(game, LIST_FILTERS[key])
// Genre, status: any of the chosen values. Platforms, tags, languages,
// inputs, engines: any of them too (a game rarely has all).
const have = values(game, key)
// Genre, status, AI: any of the chosen values. Platforms, tags, languages,
// inputs, engines, accessibility: any of them too (a game rarely has all).
if (!wanted.some((v) => have.includes(v))) return false
}
if (query.minRating !== null && (ratingOf(game) ?? -1) < query.minRating) return false
@@ -177,9 +199,10 @@ export function sortGames(games: Game[], sort: SortKey): Game[] {
export function facetCounts(games: Game[], key: ListFilter): { value: string; count: number }[] {
const counts = new Map<string, number>()
for (const game of games) {
for (const value of values(game, LIST_FILTERS[key])) counts.set(value, (counts.get(value) ?? 0) + 1)
for (const value of values(game, key)) counts.set(value, (counts.get(value) ?? 0) + 1)
}
const rank = key === 'ai' ? aiRank : () => 0
return [...counts]
.map(([value, count]) => ({ value, count }))
.sort((a, b) => b.count - a.count || a.value.localeCompare(b.value))
.sort((a, b) => rank(a.value) - rank(b.value) || b.count - a.count || a.value.localeCompare(b.value))
}
+15
View File
@@ -336,6 +336,21 @@ export const en = {
"settings.appearance.desc": "Theme, language, row density and scrollbars. Saved in this browser only.",
"welcome.feature.open.text": "The whole catalog is open data under CC BY 4.0, in the GitHub repository. Reuse it, chart it, build on it.",
"about.legal.desc": "All policies are Markdown files in the repository — plain language, full terms. Updated 2026-10-03.",
"games.filter.ai": "Generative AI",
"games.filter.access": "Accessibility",
"ai.none": "No AI used",
"ai.assisted": "AI-assisted",
"ai.undisclosed": "Not disclosed",
"detail.ai": "Generative AI",
"detail.aiAssisted": "AI-assisted: {uses}",
"detail.accessibility": "Accessibility",
"charts.ai.title": "Generative AI",
"charts.ai.desc": "As disclosed by each game's creator on itch.io",
"charts.aiContent.title": "What AI Was Used For",
"charts.aiContent.desc": "AI-assisted games by what they used it for (a game may list several)",
"charts.accessibility.title": "Accessibility Features",
"charts.accessibility.desc": "Counted per game (a game may list several)",
"charts.empty": "No data yet.",
} as const
export type MessageKey = keyof typeof en
+15
View File
@@ -338,4 +338,19 @@ export const vi: Record<MessageKey, string> = {
"settings.appearance.desc": "Giao diện, ngôn ngữ, độ dày dòng và thanh cuộn. Chỉ lưu trong trình duyệt này.",
"welcome.feature.open.text": "Toàn bộ danh mục là dữ liệu mở theo giấy phép CC BY 4.0, nằm trong repo GitHub. Bạn cứ dùng lại, vẽ biểu đồ hay xây dựng tiếp trên đó.",
"about.legal.desc": "Tất cả chính sách là file Markdown trong repo — dễ hiểu, đầy đủ điều khoản. Cập nhật 2026-10-03.",
"games.filter.ai": "AI tạo sinh",
"games.filter.access": "Hỗ trợ tiếp cận",
"ai.none": "Không dùng AI",
"ai.assisted": "Có dùng AI hỗ trợ",
"ai.undisclosed": "Chưa công bố",
"detail.ai": "AI tạo sinh",
"detail.aiAssisted": "Có dùng AI hỗ trợ: {uses}",
"detail.accessibility": "Hỗ trợ tiếp cận",
"charts.ai.title": "AI tạo sinh",
"charts.ai.desc": "Theo công bố của tác giả mỗi game trên itch.io",
"charts.aiContent.title": "AI được dùng cho",
"charts.aiContent.desc": "Game có dùng AI hỗ trợ, theo phần dùng AI (một game có thể ghi nhiều phần)",
"charts.accessibility.title": "Tính năng hỗ trợ tiếp cận",
"charts.accessibility.desc": "Đếm theo từng game (một game có thể có nhiều tính năng)",
"charts.empty": "Chưa có dữ liệu.",
}
+1 -1
View File
@@ -104,7 +104,7 @@ export default function Charts() {
</TabsContent>
<TabsContent value="discovery">
<Suspense fallback={<ChartGridSkeleton count={2} />}>
<Suspense fallback={<ChartGridSkeleton count={4} />}>
<DiscoveryTab games={data} />
</Suspense>
</TabsContent>
+12 -1
View File
@@ -12,8 +12,9 @@ import { useGameBySlug } from '@/hooks/useGameBySlug'
import { useGameDescription } from '@/hooks/useDescriptions'
import { useDocumentTitle } from '@/hooks/useDocumentTitle'
import { APP } from '@/lib/about'
import { aiLabel } from '@/lib/ai-disclosure'
import { useFormat } from '@/lib/format'
import { playsInBrowser, ratingCountOf, ratingOf } from '@/lib/game-filters'
import { AI_ASSISTED, aiDisclosureOf, playsInBrowser, ratingCountOf, ratingOf } from '@/lib/game-filters'
import { useT, type MessageKey } from '@/lib/i18n'
import { isNsfw, requestNsfw } from '@/lib/nsfw'
import { orderPlatforms, platformLabel } from '@/lib/platforms'
@@ -36,6 +37,14 @@ function list(values: string[] | undefined): string {
return (values ?? []).filter((v) => v && v !== NA).join(', ')
}
/** "No AI used", "AI-assisted: Graphics, Text", "Not disclosed"; nothing before the pipeline has checked. */
function aiFact(game: Game, t: ReturnType<typeof useT>): string {
if (game.ai_disclosure === undefined) return ''
const value = aiDisclosureOf(game)
const uses = list(game.ai_content)
return value === AI_ASSISTED && uses ? t('detail.aiAssisted', { uses }) : aiLabel(value, t)
}
/** Descriptions load on their own (a small pack per chunk), after the rest of the page. */
function Description({ game }: { game: Game }) {
const t = useT()
@@ -147,7 +156,9 @@ function GameDetailView({ game }: { game: Game }) {
{ label: t('detail.avgSession'), value: text(game.average_session) },
{ label: t('detail.languages'), value: list(game.languages) },
{ label: t('detail.inputs'), value: list(game.inputs) },
{ label: t('detail.accessibility'), value: list(game.accessibility) },
{ label: t('detail.madeWith'), value: list(game.made_with) },
{ label: t('detail.ai'), value: aiFact(game, t) },
{ label: t('detail.genre'), value: genre },
{ label: t('detail.status'), value: status },
{ label: t('detail.publisher'), value: text(game.publisher) },
+11 -5
View File
@@ -17,6 +17,7 @@ import { Skeleton } from '@/components/ui/skeleton'
import { useSearchDescriptions } from '@/hooks/useDescriptions'
import { useVisibleGames } from '@/hooks/useGames'
import { useDocumentTitle } from '@/hooks/useDocumentTitle'
import { aiLabel } from '@/lib/ai-disclosure'
import { useFormat } from '@/lib/format'
import {
emptyQuery,
@@ -46,6 +47,8 @@ const FILTER_LABEL: Record<ListFilter, MessageKey> = {
lang: 'games.filter.lang',
input: 'games.filter.input',
engine: 'games.filter.engine',
ai: 'games.filter.ai',
access: 'games.filter.access',
}
const SORT_LABEL: Record<SortKey, MessageKey> = {
@@ -57,10 +60,13 @@ const SORT_LABEL: Record<SortKey, MessageKey> = {
// Chip order: the common filters first, the long-tail ones after rating/browser.
const MAIN_FILTERS: ListFilter[] = ['genre', 'platform', 'status', 'tag']
const MORE_FILTERS: ListFilter[] = ['lang', 'input', 'engine']
const MORE_FILTERS: ListFilter[] = ['ai', 'lang', 'input', 'engine', 'access']
const ALL_FILTERS = Object.keys(LIST_FILTERS) as ListFilter[]
const optionLabel = (key: ListFilter, value: string) => (key === 'platform' ? platformLabel(value) : value)
function optionLabel(key: ListFilter, value: string, t: (key: MessageKey) => string): string {
if (key === 'platform') return platformLabel(value)
return key === 'ai' ? aiLabel(value, t) : value
}
function ListSkeleton() {
return (
@@ -145,10 +151,10 @@ export default function Games() {
const counts = facetCounts(filterGames(all, query, key, descriptions), key)
const listed = new Set(counts.map((c) => c.value))
for (const value of query.lists[key]) if (!listed.has(value)) counts.push({ value, count: 0 })
return counts.map((c) => ({ ...c, label: optionLabel(key, c.value) }))
return counts.map((c) => ({ ...c, label: optionLabel(key, c.value, t) }))
}
return Object.fromEntries(ALL_FILTERS.map((key) => [key, getter(key)])) as Record<ListFilter, () => FilterOption[]>
}, [all, query, descriptions])
}, [all, query, descriptions, t])
// A failed background refresh (offline, deploy in flight) keeps the cached catalog on screen.
if (games.isError && !games.data) return <RouteError error={games.error} onRetry={() => void games.refetch()} />
@@ -158,7 +164,7 @@ export default function Games() {
...ALL_FILTERS.flatMap((key) =>
query.lists[key].map((value) => ({
key: `${key}:${value}`,
label: optionLabel(key, value),
label: optionLabel(key, value, t),
onRemove: () => setList(key, query.lists[key].filter((v) => v !== value)),
})),
),
+10
View File
@@ -26,6 +26,16 @@ export interface Game {
added_at?: string
/** itch.io "Updated" date as shown on the game page. */
updated_at?: string
/**
* The creator's generative-AI disclosure on itch.io: "No AI", "AI Assisted"
* or "N/A" (not disclosed). Absent on records the pipeline has not re-checked
* since 4.3 (the same as "N/A" for display).
*/
ai_disclosure?: string
/** What AI was used for when assisted ("Graphics", "Text", "Code", "Sounds"). */
ai_content?: string[]
/** itch.io accessibility features ("Subtitles", "Configurable controls", …). */
accessibility?: string[]
}
export interface CatalogIndex {