From 0e0e442de5b876407ccebadae3a7887e1bc8266f Mon Sep 17 00:00:00 2001 From: poli0981 <127664709+poli0981@users.noreply.github.com> Date: Wed, 11 Nov 2026 21:44:32 +0700 Subject: [PATCH] chore: maintenance mode, Qodana analysis; 4.6.1 (#188) [skip-discuss] The project moves to maintenance mode (stable, feature-complete): docs, templates and badges (EN + VI). Qodana analysis in CI for the TypeScript / JavaScript, Python and Rust projects, with the findings of its first reports fixed. Version 4.6.1. Co-Authored-By: Claude Fable 5.2 --- .github/ISSUE_TEMPLATE/bug_report.yml | 6 +- .github/ISSUE_TEMPLATE/config.yml | 6 + .github/ISSUE_TEMPLATE/feature_request.yml | 62 ------ .github/ISSUE_TEMPLATE/feedback.yml | 36 ---- .github/ISSUE_TEMPLATE/general_question.yml | 25 --- .github/PULL_REQUEST_TEMPLATE/bug_fix.md | 28 --- .../PULL_REQUEST_TEMPLATE/documentation.md | 27 --- .github/PULL_REQUEST_TEMPLATE/new_features.md | 31 --- .github/pull_request_template.md | 7 +- .github/workflows/qodana.yml | 195 ++++++++++++++++++ CHANGELOG.md | 3 +- CLAUDE.md | 8 +- CONTRIBUTING.md | 58 +++--- README.md | 32 ++- README.vi.md | 26 ++- SECURITY.md | 4 +- changelog/4.x/ver4.6.x.md | 62 +++++- docs/THIRD_PARTY.md | 5 +- docs/dev_env.md | 4 + docs/i18n/vi/CONTRIBUTING.md | 60 +++--- docs/i18n/vi/SECURITY.md | 4 +- docs/i18n/vi/dev_env.md | 6 +- docs/operations.md | 14 ++ qodana.yaml | 36 ++++ scripts/refresh.py | 4 +- scripts/update_info.py | 1 - webapp/package-lock.json | 4 +- webapp/package.json | 2 +- webapp/qodana.yaml | 34 +++ webapp/src-tauri/Cargo.lock | 3 +- webapp/src-tauri/Cargo.toml | 3 +- webapp/src-tauri/qodana.yaml | 23 +++ webapp/src-tauri/tauri.conf.json | 2 +- .../components/charts/ai-disclosure-chart.tsx | 15 +- .../charts/deletion-reasons-chart.tsx | 12 +- .../components/charts/genre-treemap-chart.tsx | 4 +- .../src/components/charts/made-with-chart.tsx | 12 +- .../charts/online-offline-chart.tsx | 13 +- webapp/src/components/charts/palette.ts | 8 + .../src/components/charts/platform-chart.tsx | 12 +- webapp/src/components/charts/status-chart.tsx | 12 +- webapp/src/components/site/global-search.tsx | 2 + webapp/src/components/ui/checkbox.tsx | 4 +- webapp/src/components/ui/dialog.tsx | 4 +- webapp/src/components/ui/label.tsx | 4 +- webapp/src/components/ui/popover.tsx | 4 +- webapp/src/components/ui/separator.tsx | 4 +- webapp/src/components/ui/sheet.tsx | 10 +- webapp/src/components/ui/switch.tsx | 4 +- webapp/src/components/ui/tabs.tsx | 8 +- webapp/src/lib/about.ts | 2 +- webapp/src/lib/game-filters.ts | 5 +- webapp/src/routes/game-detail.tsx | 2 + webapp/src/routes/suggest.tsx | 4 +- webapp/worker/data.ts | 2 +- 55 files changed, 599 insertions(+), 369 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml delete mode 100644 .github/ISSUE_TEMPLATE/feedback.yml delete mode 100644 .github/ISSUE_TEMPLATE/general_question.yml delete mode 100644 .github/PULL_REQUEST_TEMPLATE/bug_fix.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE/documentation.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE/new_features.md create mode 100644 .github/workflows/qodana.yml create mode 100644 qodana.yaml create mode 100644 webapp/qodana.yaml create mode 100644 webapp/src-tauri/qodana.yaml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 8464b69..312e056 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,5 +1,5 @@ -name: 🐛 Bug Report -description: Report a bug on the website, in the desktop/Android app, in the game data, or in the scripts +name: 🛠️ Report a problem (wrong data, something broke) +description: Wrong or outdated game data, a dead link, or something that stopped working on the website or in the apps. Not for feature requests. title: "[Bug] " labels: ["bug"] body: @@ -8,6 +8,8 @@ body: value: | Thanks for reporting! I'm a lazy unemployed dev, so bugs happen a lot :D My AI buddies fix most, but your help is gold. + **The project is in maintenance mode** (stable, no new features): this form is for wrong game data and for things that broke. Ideas and feature requests are closed without review. + **Found a security vulnerability?** Please don't file it here — report it privately via https://github.com/poli0981/free-games-itchio-list/security/advisories/new or security@poli0981.dev. Want a game removed (or you're its creator)? Use the "Remove a Game" template instead. Something doesn't work with your keyboard, screen reader, zoom or contrast settings? The "Accessibility barrier" template asks the right questions. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 4d6bf74..0272444 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -6,3 +6,9 @@ contact_links: - name: 🔒 Report a security vulnerability (private) url: https://github.com/poli0981/free-games-itchio-list/security/advisories/new about: Please report vulnerabilities privately here (or email security@poli0981.dev), never in a public issue. + - name: 💬 Questions, feedback, anything else + url: https://github.com/poli0981/free-games-itchio-list/discussions + about: Issues are for the catalog data only (add, fix or remove a game). Everything else goes to Discussions. + - name: 🧊 Feature requests are closed + url: https://github.com/poli0981/free-games-itchio-list#project-status + about: The project is stable and in maintenance mode — security fixes and dependency updates only. Feature requests and code pull requests are closed without review. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml deleted file mode 100644 index 86469cd..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: 💡 Feature Request / Improvement -description: Suggest a new feature or code improvement -title: "[Feature/Improvement] " -labels: ["enhancement"] -body: - - type: markdown - attributes: - value: | - Yo legend! My code is mediocre at best, so ideas are welcome. Grok helps, but you might have better ones :D - - - type: checkboxes - id: type - attributes: - label: Type (choose one only) - options: - - label: New Feature - - label: Code Improvement - validations: - required: true - - - type: input - id: title - attributes: - label: Feature/Improvement Name - description: Short title — what is it? - validations: - required: true - - - type: textarea - id: reason - attributes: - label: Why? (e.g tables too slow, missing info, etc.) - description: Explain the problem it solves or why it's cool/good for the repo. - validations: - required: true - - - type: checkboxes - id: priority - attributes: - label: How necessary? (choose one only) - options: - - label: Not urgent (nice to have) - - label: Maybe needed - - label: Very needed - - label: Extremely urgent (repo dying without it) - validations: - required: true - - - type: textarea - id: code - attributes: - label: (Optional) Pseudo-code, snippet, or file idea - description: | - Share code ideas — I'll check (no malware pls, I'm paranoid and lazy :D). My skill is average, so keep it simple. - - - type: checkboxes - id: agreement - attributes: - label: Agreement (required) - options: - - label: I agree — if this issue is off-topic, spam, or violates repo policy, it may be ignored/closed without response. - required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feedback.yml b/.github/ISSUE_TEMPLATE/feedback.yml deleted file mode 100644 index aa21f6e..0000000 --- a/.github/ISSUE_TEMPLATE/feedback.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: 💬 Feedback -description: General feedback about the repo/docs -title: "[Feedback] " -labels: ["feedback"] -body: - - type: markdown - attributes: - value: | - Roast me, praise me, or complain — I'm introvert but I'll read :D - - - type: checkboxes - id: reasons - attributes: - label: What's the feedback about? (can check multiple) - options: - - label: EULA/ToS too strict/annoying - - label: Repo concept wrong/bad - - label: Anti-AI vibes (but Grok built half of it :v) - - label: Delete the repo pls - - label: Other (describe below) - - - type: textarea - id: details - attributes: - label: Full feedback/details - description: Be honest — my self-loathing can handle it - validations: - required: true - - - type: checkboxes - id: agreement - attributes: - label: Agreement (required) - options: - - label: I agree — if this issue is off-topic, spam, or violates repo policy, it may be ignored/closed without response. - required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/general_question.yml b/.github/ISSUE_TEMPLATE/general_question.yml deleted file mode 100644 index 8b87630..0000000 --- a/.github/ISSUE_TEMPLATE/general_question.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: ❓ General / Off-Topic -description: Anything not fitting other templates -title: "[General] " -labels: ["question"] -body: - - type: markdown - attributes: - value: | - Not bug/feature/games/feedback? Drop it here. Memes welcome :D - - - type: textarea - id: content - attributes: - label: What's on your mind? - description: Questions, random thoughts, or just saying hi - validations: - required: true - - - type: checkboxes - id: agreement - attributes: - label: Agreement (required) - options: - - label: I agree — if this issue is off-topic, spam, or violates repo policy, it may be ignored/closed without response. - required: true \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE/bug_fix.md b/.github/PULL_REQUEST_TEMPLATE/bug_fix.md deleted file mode 100644 index 4886a45..0000000 --- a/.github/PULL_REQUEST_TEMPLATE/bug_fix.md +++ /dev/null @@ -1,28 +0,0 @@ -**🐛 Bug Fix** - -Thanks for fixing my mediocre code! I'm just an unemployed noob dev, so bugs are my specialty :D - -### What bug did you fix? -- [ ] Wrong game info or NSFW/safety flag (usually easier as a Bug Report issue — please don't hand-edit `data_game/`, the pipeline writes it) -- [ ] Scraping failure (itch.io changed HTML again) -- [ ] Data pipeline / GitHub Actions fail -- [ ] Website bug (`webapp/src/`) -- [ ] Worker bug (`webapp/worker/` — image proxy, Suggest API, admin API) -- [ ] Desktop/Android app (Tauri) bug -- [ ] Other (describe below) - -### Description -Explain the bug and how your fix works. Bonus points if you tested locally! - -### Related Issues -Closes # (link issue number if any) - -### Checklist -- [ ] Tested locally — Python: `pytest`, `ruff check scripts tests webapp/scripts`, `python scripts/validate.py`; webapp: `npm test`, `npm run lint`, `npx tsc -b` -- [ ] No new bugs introduced (hopefully) -- [ ] No secrets, tokens or personal data in the diff -- [ ] Touched the UI? It still works with the keyboard alone and a screen reader ([checklist](https://github.com/poli0981/free-games-itchio-list/blob/main/ACCESSIBILITY.md#8-for-contributors)) -- [ ] I agree my contribution is licensed under the MIT License (see `LICENSE`) -- [ ] Followed the vibe (chill, no drama) - -Grok approved? (just kidding, but thanks legend!) 🚀 diff --git a/.github/PULL_REQUEST_TEMPLATE/documentation.md b/.github/PULL_REQUEST_TEMPLATE/documentation.md deleted file mode 100644 index 59bfcf5..0000000 --- a/.github/PULL_REQUEST_TEMPLATE/documentation.md +++ /dev/null @@ -1,27 +0,0 @@ -**📝 Documentation Update / Other** - -Not code or games? Fix my bad English, typos, or update legal docs — still super helpful! - -### What did you update? -- [ ] Fix typo/grammar in README/docs -- [ ] Update DISCLAIMER/PRIVACY/TERMS/EULA/SECURITY/ACCESSIBILITY/etc. -- [ ] Update the Vietnamese mirror (`README.vi.md`, `docs/i18n/vi/`) -- [ ] Improve MY_STUFF or ACKNOWLEDGEMENTS -- [ ] Add badges/screenshots -- [ ] Other small polish - -### Description -Explain changes and why. - -### Related Issues -References # (if any) - -### Checklist -- [ ] No breaking changes -- [ ] Relative links still resolve; website links use `https://freeitchgames.win/` -- [ ] Headings in order, link text that says where it goes, alt text for images, header cells in tables -- [ ] If I changed an English doc that has a Vietnamese mirror, I updated the mirror too (or said so above so someone else can) -- [ ] I agree my contribution is licensed under CC BY 4.0, like the rest of the documentation -- [ ] Keeps the self-deprecating vibe :D - -Even small fixes make this repo look less noob — thanks bro! 🚀 diff --git a/.github/PULL_REQUEST_TEMPLATE/new_features.md b/.github/PULL_REQUEST_TEMPLATE/new_features.md deleted file mode 100644 index d762175..0000000 --- a/.github/PULL_REQUEST_TEMPLATE/new_features.md +++ /dev/null @@ -1,31 +0,0 @@ -**💡 New Feature / Code Improvement** - -Yo legend! My code is "kinda works" level, so any upgrade is huge. Grok helps me, but real humans are better :D - -Heads-up: the website and apps are read-only for visitors on purpose — no accounts, no ads, no profiling, no telemetry in the apps. Features that would add those (or new cookies, or a new third-party service) need a chat in an issue first, since the Privacy Policy would have to change. - -### What feature/improvement? -- [ ] Better scraping (more info, rating, etc.) -- [ ] Website/app UI (new page, filter, chart, better mobile layout) -- [ ] Desktop/Android app (Tauri) -- [ ] Automation (pipeline, GitHub Actions) -- [ ] Performance fix (faster pages, faster Actions) -- [ ] Refactor my messy code -- [ ] Other (describe) - -### Description -Explain what it does and why it's cool. Include code snippets if needed. - -### Related Issues -References # (link if any) - -### Checklist -- [ ] Tested locally (Python: `pytest`, `ruff check scripts tests webapp/scripts`; webapp: `npm test`, `npm run lint`, `npm run knip`, `npx tsc -b`) -- [ ] Doesn't break the daily refresh or the ingest workflow -- [ ] UI changes pass the [accessibility checklist](https://github.com/poli0981/free-games-itchio-list/blob/main/ACCESSIBILITY.md#8-for-contributors): keyboard, focus, labels in `en.ts` + `vi.ts`, contrast (`npm test`), reduced motion, one screen-reader check -- [ ] New npm dependency? Added it to `webapp/src/lib/about.ts` so the About page lists it -- [ ] Edited `webapp/wrangler.jsonc`? Ran `npm run cf:types` -- [ ] I agree my contribution is licensed under the MIT License (see `LICENSE`) -- [ ] Keeps the noob vibe intact - -If this makes the repo less mediocre — you're the MVP. 🚀 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 94587b4..710daa1 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,6 +1,9 @@ ### What and why diff --git a/.github/workflows/qodana.yml b/.github/workflows/qodana.yml new file mode 100644 index 0000000..ee31cef --- /dev/null +++ b/.github/workflows/qodana.yml @@ -0,0 +1,195 @@ +# Qodana (JetBrains) static analysis, one linter per Qodana Cloud project: +# +# typescript — qodana-js webapp/ https://qodana.cloud/projects/wwgZ1 +# python — qodana-python the repository root https://qodana.cloud/projects/GgGnX +# rust — qodana-rust webapp/src-tauri/ https://qodana.cloud/projects/P2Rd7 +# +# Each project has its own token (a repository secret) and its own settings +# file (`qodana.yaml` in the directory above). Every run analyses the whole +# project (`pr-mode: false`), so a pull request and `main` report the same way. +# +# Dependabot and fork PRs get no repository secrets: the analysis is skipped +# there, not failed (the `tokens` job). Dependencies are installed before the +# scan, in steps that don't see the token. +name: Qodana + +on: + push: + branches: [main] + # Data commits (the pipeline's, the admin Worker's) and docs change no code. + paths-ignore: + - 'data_game/**' + - 'scripts/temp_link.json' + - 'scripts/deleted_games.json' + - 'scripts/state/**' + - '**.md' + pull_request: + paths-ignore: + - 'data_game/**' + - 'scripts/temp_link.json' + - 'scripts/deleted_games.json' + - 'scripts/state/**' + - '**.md' + workflow_dispatch: + +permissions: {} + +concurrency: + group: qodana-${{ github.ref }} + cancel-in-progress: true + +jobs: + tokens: + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: {} + outputs: + present: ${{ steps.check.outputs.present }} + steps: + - name: Check for the Qodana tokens + id: check + env: + TOKEN_TS_JS: ${{ secrets.QODANA_TOKEN_TS_JS }} + TOKEN_PYTHON: ${{ secrets.QODANA_TOKEN_PYTHON }} + TOKEN_RUST: ${{ secrets.QODANA_TOKEN_RUST }} + run: | + if [ -n "$TOKEN_TS_JS" ] && [ -n "$TOKEN_PYTHON" ] && [ -n "$TOKEN_RUST" ]; then + echo "present=true" >> "$GITHUB_OUTPUT" + else + echo "::notice::No Qodana tokens in this run (Dependabot or fork PR): Qodana analysis skipped." + fi + + typescript: + name: TypeScript / JavaScript + needs: tokens + if: needs.tokens.outputs.present == 'true' + runs-on: ubuntu-latest + timeout-minutes: 30 + permissions: + contents: read + checks: write # the action's annotations + steps: + - name: Checkout repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + fetch-depth: 0 + persist-credentials: false + + - name: Set up Node.js + uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version-file: webapp/.node-version + cache: npm + cache-dependency-path: webapp/package-lock.json + + # The linter resolves imports and types from node_modules. + - name: Install npm dependencies + working-directory: webapp + run: npm ci --ignore-scripts + + - name: Qodana scan + uses: JetBrains/qodana-action@3e8d76ff0e0241618abd808682f426afe84bab3f # v2026.2.2 + with: + args: --project-dir webapp --repository-root . --linter qodana-js --within-docker false + pr-mode: false + post-pr-comment: false + upload-result: true + artifact-name: qodana-report-typescript + primary-cache-key: qodana-2026.2-js-${{ github.ref }}-${{ github.sha }} + additional-cache-key: qodana-2026.2-js-${{ github.ref }} + cache-default-branch-only: true + env: + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_TS_JS }} + + python: + name: Python + needs: tokens + if: needs.tokens.outputs.present == 'true' + runs-on: ubuntu-latest + timeout-minutes: 30 + permissions: + contents: read + checks: write + steps: + - name: Checkout repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + fetch-depth: 0 + persist-credentials: false + + - name: Set up Python + uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 + with: + python-version-file: .github/python-version + cache: pip + cache-dependency-path: | + requirements.txt + requirements-dev.txt + + # Hash-locked, wheels only (CLAUDE.md, gotcha 40). In native mode the + # linter finds no interpreter by itself: it gets this virtual environment + # (QODANA_PYTHON_PATH below) and resolves imports from it. + - name: Install Python dependencies + run: | + python -m venv .venv + .venv/bin/pip install --require-hashes --only-binary :all: -r requirements.txt -r requirements-dev.txt + + - name: Qodana scan + uses: JetBrains/qodana-action@3e8d76ff0e0241618abd808682f426afe84bab3f # v2026.2.2 + with: + args: --linter qodana-python --within-docker false + pr-mode: false + post-pr-comment: false + upload-result: true + artifact-name: qodana-report-python + primary-cache-key: qodana-2026.2-python-${{ github.ref }}-${{ github.sha }} + additional-cache-key: qodana-2026.2-python-${{ github.ref }} + cache-default-branch-only: true + env: + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_PYTHON }} + QODANA_PYTHON_PATH: ${{ github.workspace }}/.venv/bin/python + + rust: + name: Rust + needs: tokens + if: needs.tokens.outputs.present == 'true' + runs-on: ubuntu-latest + timeout-minutes: 45 + permissions: + contents: read + checks: write + steps: + - name: Checkout repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + fetch-depth: 0 + persist-credentials: false + + # tauri::generate_context!() refuses to expand without the frontend + # directory (frontendDist): an empty page stands in for the web build. + - name: Stand-in for the web build + run: | + mkdir -p webapp/dist + echo 'stand-in' > webapp/dist/index.html + + # qodana-rust ships only as a Docker image (Early Access). It runs as + # root so that its bootstrap (webapp/src-tauri/qodana.yaml) can install + # the C toolchain and the libraries Tauri links against; the crates go + # to the (cached) Qodana cache directory. `cargo check` runs the build + # scripts of the locked dependencies in that container. + - name: Qodana scan + uses: JetBrains/qodana-action@3e8d76ff0e0241618abd808682f426afe84bab3f # v2026.2.2 + with: + args: --project-dir webapp/src-tauri --repository-root . --linter qodana-rust -u root -e CARGO_HOME=/data/cache/cargo + pr-mode: false + post-pr-comment: false + upload-result: true + artifact-name: qodana-report-rust + primary-cache-key: qodana-2026.2-rust-${{ github.ref }}-${{ github.sha }} + additional-cache-key: qodana-2026.2-rust-${{ github.ref }} + cache-default-branch-only: true + env: + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_RUST }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 09b1577..8d24442 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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/.x/ver..x.md`. -**Latest release: [4.6.0](changelog/4.x/ver4.6.x.md#460---2026-11-09-accessibility) (2026-11-09) — Accessibility.** +**Latest release: [4.6.1](changelog/4.x/ver4.6.x.md#461---2026-11-11-stable-maintenance-mode) (2026-11-11) — Stable: maintenance mode.** ## 4.x | Version | Date | Highlights | |---|---|---| +| [4.6.1](changelog/4.x/ver4.6.x.md#461---2026-11-11-stable-maintenance-mode) | 2026-11-11 | Stable: maintenance mode (data-only issues and PRs), Qodana code analysis | | [4.6.0](changelog/4.x/ver4.6.x.md#460---2026-11-09-accessibility) | 2026-11-09 | Accessibility: statement, keyboard and screen-reader fixes, chart data tables, WCAG contrast | | [4.5.0](changelog/4.x/ver4.5.x.md#450---2026-10-27-rate-limits-for-the-whole-site) | 2026-10-27 | Rate limits for the whole site (HTTP 429), WAF guide | | [4.4.3](changelog/4.x/ver4.4.x.md#443---2026-10-26-dependency-and-security-updates) | 2026-10-26 | Dependency and security updates (build-tool advisories closed) | diff --git a/CLAUDE.md b/CLAUDE.md index 7a8b416..ed12ae0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -8,7 +8,7 @@ A curated, auto-updating catalog of free itch.io games, published at **https://f everyone; the old github.io URL only redirects). Three layers share one JSON catalog: 1. **Python pipeline** — the data layer (GitHub Actions). - - `data_game/game_info_NNN.json` — chunked records, max 500 per file, 5,818 games on 2026-11-09. 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/game_info_NNN.json` — chunked records, max 500 per file, 5,907 games on 2026-11-11. 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: 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), including `ingest_outcomes.json` (how each queued link ended — added / duplicate / paid / dead / private / deleted / gave_up; patch key `ingest_outcomes`; the last 90 days, ≤ 5,000) that the admin's tracking and the cron's reconcile read. Tests: `pytest` (network blocked; `pytest --cov --cov-report=xml` → `coverage.xml` for SonarQube Cloud, gotcha 41). Lint: `ruff check scripts tests webapp/scripts`, `ruff format`, `vulture` (config in root `pyproject.toml`). Local env: Python 3.15 (`.github/python-version`, gotcha 39; ruff `target-version = "py315"`), `python -m venv .venv && .venv/Scripts/pip install -r requirements-dev.txt` (3.15 is in UTF-8 mode by default — no `PYTHONUTF8` needed, the workflows no longer set it). Both requirements files are hash-locked pip-tools compiles of `requirements*.in` — edit the `.in`, then recompile (gotcha 40). 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. @@ -84,6 +84,7 @@ Each game has **20** fields (plus optional `added_at` / `updated_at`, appended b | `notify-failure.yml` | `workflow_call` | Discord (`DISCORD_CI_WEBHOOK`) on failure / **cancelled** (job-level timeouts end as cancelled) / rate-limited / mass change / failed Cloudflare build. | | `python-ci.yml` / `webapp-ci.yml` | PRs (+ pushes for Python) | ruff + format + vulture + pytest + `validate.py` (both requirements locks installed at once, so drifting pins fail) / `npm ci --ignore-scripts` + `npm run check:tauri` (gotcha 31) + `npm run cf:types -- --check` + lint + knip + vitest + build + `npm run cf:check` (`wrangler deploy --dry-run`). SonarQube Cloud runs in `sonarcloud.yml`. | | `sonarcloud.yml` | Push to `main` + PRs (both skip data-only and `.md`-only changes) + `workflow_dispatch` | SonarQube Cloud CI analysis (gotcha 41): `token` (no `SONAR_TOKEN` — Dependabot and fork PRs — → notice, the rest skipped) → `coverage` (pytest-cov + Vitest v8, no secrets; artifact kept 1 day) → `scan` (`sonarqube-scan-action`, full history, `sonar.projectVersion` from `webapp/package.json`; the only step that uses the token). | +| `qodana.yml` | Push to `main` + PRs (both skip data-only and `.md`-only changes) + `workflow_dispatch` | Qodana (JetBrains) analysis (gotcha 49): `tokens` (no Qodana secrets — Dependabot and fork PRs — → notice, the rest skipped) → three jobs, one per Qodana Cloud project and token: `typescript` (`qodana-js`, native, `webapp/qodana.yaml`), `python` (`qodana-python`, native, root `qodana.yaml`), `rust` (`qodana-rust`, Docker image, `webapp/src-tauri/qodana.yaml`). Whole-project scans (`pr-mode: false`), no PR comment; each `qodana.yaml` has a quality gate of 0 problems (`failureConditions`), so a finding fails its job. | | `deploy-status.yml` | Hourly + manual | Not a deploy. `bash/cf_build_status.sh` walks main's first-parent history to the latest finished `Workers Builds: free-games-itchio-list` check run (Cloudflare posts it only when a build ends; branch commits carry preview builds under the same name) and alerts once per failed build (cache key per check-run id, saved after the Discord post). Scheduled because GitHub never starts `check_run` workflows for `GITHUB_TOKEN` pushes (the data commits). | | `release_desktop.yml` | Tag `v*` push, or manual | `create-release` makes the single draft (id passed to tauri-action v1 `releaseId`); release builds use **no** npm/cargo caches (cache-poisoning). Win + macOS aarch64 + macOS x86_64 (cross-compile) + Linux (`ubuntu-22.04` for a low glibc floor). Uploads `.dmg` / `.app.tar.gz` / `.pkg` (macOS), `.msi` / `.exe` (Windows), `.deb` / `.rpm` / `.AppImage` (Linux). macOS `.pkg` `--identifier` reads `tauri.conf.json`. | | `release_android.yml` | Tag `v*` push, or manual | Tauri **Android** build → arm64-v8a APK, **post-signed** with `zipalign`+`apksigner` (gen/ stays gitignored). Tag → attaches to the same draft Release; manual dispatch → workflow artifact. Secrets: `ANDROID_KEYSTORE_BASE64` / `ANDROID_KEYSTORE_PASSWORD` / `ANDROID_KEY_ALIAS`. | @@ -160,6 +161,7 @@ Code **MIT** (`LICENSE`); catalog data **CC BY 4.0** for the maintainer's contri 46. **Radix FocusScope gives focus back to the trigger in a `setTimeout` after unmount.** A link inside a menu or sheet that navigates would have focus pulled back to the menu button, away from the new page's h1: `SheetContent` / `PopoverContent` call `e.preventDefault()` in `onCloseAutoFocus` when the path changed. A modal opened without a Radix trigger (the 18+ dialog) drops focus to `` unless `onCloseAutoFocus` focuses something. Radix 1.3.1 sets no `aria-modal` (it hides the rest with `aria-hidden`). 47. **Name Recharts charts with `aria-labelledby`, not their `title` prop** (`title` also shows a native browser tooltip over the whole chart); `Treemap`'s props type has no `role`. A custom tooltip loses Recharts' live region, and the tooltip box is `visibility: hidden` while inactive, so announcements go through the card (`ChartAnnounce`). 48. **The tool permissions refuse loading third-party code into the preview page** (an axe-core `