354 Commits
Author SHA1 Message Date
poli0981 db613e011b Merge pull request #173 from poli0981/feat/data-input-io
fix(data): hardware names, YouTube's tag count, chapters, history duplicates, validation
2026-09-30 21:15:42 +07:00
poli0981andClaude Opus 5.5 7e6c12152f fix(data): hardware names, YouTube's tag count, chapters, history duplicates, validation
Hardware
- GPU catalog rewritten with stable ids and official names: descriptions
  read "NVIDIA GeForce RTX 5080", "AMD Radeon RX 9070 XT", "Apple M4 Pro"
  instead of "NVIDIA RTX 5080" / "AMD RX 9070 XT" / "Apple Silicon M4 Pro".
  Cards that never shipped (RX 9080, RX 9090 XT, Arc B380) are gone;
  RTX 50/40/30 laptop GPUs, RX 9070 GRE, VRAM variants, Radeon/Intel
  integrated graphics, handheld APUs and Apple M5 (Pro/Max/Ultra) added.
  One searchable picker ("5080", "rog ally") replaces Brand › Series ›
  Model, with free text for anything else.
- Old `brand|series|model` values are migrated (editor v19, profiles v3,
  templates v2, and on load/import); unknown cards keep their full name.
- RAM: 24/48/192 GB, LPDDR4/4X/5/5X, optional speed ("32 GB DDR5-6000");
  no DDR6/DDR7; plain "DDR"; "48GB GB" fixed; changing the size no longer
  clears the type. OS: SteamOS, Bazzite, CachyOS, Nobara, openSUSE,
  Fedora 43/44; Linux reads "Ubuntu 24.04 LTS". CPU: suggestions, and
  Windows' "Intel(R) Core(TM) … CPU @ 3.60GHz" is tidied on blur.
- The rig block uses translated labels in a fixed order (CPU, GPU, RAM…)
  in both the description and the social captions.

Tags
- Measured the way YouTube counts (quotes around multi-word tags, one
  comma between): 15 of 51 real tag sets were over 500 by YouTube's count
  while showing under. Counters and the limit warning use the same count.
- Trimming keeps trying shorter tags after one that doesn't fit.
- "Elden Ring Steam", "itch.io gameplay" (was STEAM / ITCHIO); no platform
  tags for a publisher site; "best open world games" (was "openworld");
  RPG/simulation/card pools no longer carry other genres' tags.

Timestamps
- Keywords need a word boundary: "Final Fantasy VII" stays a title (was
  "Ending Fantasy VII"), "Introduction" stays whole.
- Accepts [0:00], 0:00 - label and editor frame counts; pt-BR and
  Indonesian keywords; a Tidy up button; a live check of YouTube's
  chapter rules (0:00 first, 3+, 10 s apart, in order).

Output and data
- History keeps one entry per video (updated in place) instead of one per
  Output visit; existing duplicates are folded (history v3). The History
  Limit is healed on every load.
- A field over its limit blocks only its own copy button (Copy All: title
  or description); a warning when YouTube would reject "<" or ">".
- Validation: Steam /sub/, /bundle/ and s.team links, GOG/Humble/xbox.com
  without www, regional Nintendo sites, Microsoft Store, Luna; social
  links with www./m./twitter.com; phone, YouTube Music and
  video-in-playlist links (normalised); email domains need a TLD; the live
  URL is validated; no bare "#" hashtag.
- The engine takes the year from the caller; "Ending N" follows the output
  language.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 21:11:58 +07:00
poli0981 7f8dc0ad64 Merge pull request #172 from poli0981/feat/ui-redesign
feat(ui): redesign — design system, app shell, command palette, every page
2026-09-30 21:11:28 +07:00
poli0981andClaude Opus 5.5 a2715f9c69 feat(ui): redesign — design system, app shell, command palette, every page
A new, compact interface on Radix primitives, Motion, cmdk and sonner.

Design system
- Tokens for surfaces, text, accent and states in dark and light, used
  everywhere (no more hard-coded red/yellow/pink); Inter and JetBrains
  Mono self-hosted; compact controls that grow to 44px on touch screens.
- Primitives rebuilt on Radix: Button, IconButton (cannot render without
  a name), Field/Input/Select/Textarea (labels wired to controls; the ten
  selects that shared id="type" are gone), Switch, Checkbox, Tabs,
  SegmentedControl, Accordion (closed content is inert), Dialog,
  AlertDialog, Sheet, Popover, Tooltip, Card, Badge, Banner, EmptyState,
  PageHeader, NumberField.
- Animated icons (copy→check, sun↔moon, hover micro-motion on the nav)
  that follow the OS reduce-motion setting.

App shell
- Collapsible sidebar with grouped pages and a sliding active marker;
  top bar with the command palette, output/interface language, theme
  and donate; on phones a bottom bar with four pages plus "More".
- Ctrl/⌘+K command palette: go anywhere, copy title/description/tags,
  apply a profile/preset/template, switch theme or languages.
- Skip link, one h1 per page, <main> focusable; toasts no longer share a
  corner with three other floating elements.

Pages
- Editor: two columns with a sticky live preview (tabs, counters, copy)
  or a sheet on phones; sections reordered so video type and game come
  first; genres are a searchable picker instead of a wall of 42 chips;
  expand/collapse all; a button to the Output page.
- Output: a YouTube preview (what search results and the "…more" fold
  show), language tabs, Copy All in the header (floating on phones).
- Profiles/presets/templates share one card with Apply + Undo; History,
  Logs, Batch, Social, Playlist, Settings, About, Legal, the consent
  screen and the error pages all use the same primitives.

Fixes
- Ctrl/⌘+Shift+C ignored the YouTube limits and Strict Mode.
- Number settings clamped on every keystroke; they now save on blur.
- Hard-coded English on Playlist, Batch, Logs, Profiles and Settings.
- Flags as language icons (Windows shows letters) → native name + code.
- The consent screen could not change language or theme.
- About: dead Discord invite removed; contact addresses by purpose.
- Desktop window is resizable (1280×820, min 960×640).

Initial load 262 KB gzip (budget 280): the command palette, the genre
list and the Output page load on demand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 20:42:43 +07:00
poli0981 676ed417c4 Merge pull request #171 from poli0981/ci/quality-gates
ci: security, licensing and style gates; pin every action by SHA
2026-09-30 20:15:32 +07:00
poli0981andClaude Opus 5.5 1b5051beaa ci: keep release builds off the npm cache; week-long Dependabot cooldown
zizmor (workflow-lint) flagged three things:

- cache-poisoning: setup-node v7 restores the npm cache unless told not
  to, and the release workflows publish what they build. They now set
  `package-manager-cache: false`, so a cache written by another workflow
  can never reach a release artifact.
- dependabot-cooldown: raise every ecosystem to 7 days.
- dangerous-triggers: the two `workflow_run` notifiers are ignored with
  the reason in zizmor.yml; the shared workflows only read run metadata
  and pass untrusted fields through `env:`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 20:00:55 +07:00
poli0981andClaude Opus 5.5 a70580e703 ci: security, licensing and style gates; pin every action by SHA
New checks
- security.yml: dependency-review blocks PRs that add a high/critical
  advisory; actionlint + zizmor lint the workflows themselves (template
  injection, permissions, credential persistence, unpinned uses); OpenSSF
  Scorecard weekly and on main (published, not uploaded as alerts).
- compliance.yml: REUSE lint over the whole repo (REUSE.toml + LICENSES/,
  no per-file headers) and Conventional-Commit PR titles.
- rust.yml (src-tauri changes + weekly): rustfmt, clippy -D warnings,
  cargo test, and cargo-deny for RustSec advisories, licenses and sources.
- ci.yml `check` gains: coverage thresholds (src/engine, worker),
  check:licenses, check:bundle, and a `wrangler deploy --dry-run`.

Licensing
- THIRD_PARTY_NOTICES.md is now generated from package.json, the installed
  packages and Cargo.toml/Cargo.lock (`npm run generate:third-party`); CI
  fails when it is stale or when anything bundled into the app carries a
  license outside the allowlist. It had drifted to React 18 / Vite 7 /
  Tailwind 3.
- Vite's build.license emits the full text of every bundled package's
  license to /licenses/third-party.md (served publicly, before the gate).

Bundle budget
- scripts/check-bundle-size.ts measures what CLAUDE.md's "500KB" never
  defined: initial load (everything index.html references) <= 280 KB gzip
  (197 KB today) and no JS chunk over 500 KB raw.

Coverage
- @vitest/coverage-v8; thresholds sit just under today's numbers. The
  engine is at 89% lines / 64% functions — not the 100% CLAUDE.md claimed.

Supply chain
- Every third-party action pinned to a commit SHA (Dependabot updates the
  SHA and its version comment); checkout never persists credentials.
- Release workflows: a `verify` job (typecheck, tests, version sync, Tauri
  alignment, tag == package version) gates the build; no dependency caches
  in release jobs; permissions granted per job.
- Reusable Discord workflows receive only the secrets they declare instead
  of `secrets: inherit` (which exposed the Android signing keys to them).
- Rust: cargo-deny found RUSTSEC-2026-0194/0195 (quick-xml DoS, via plist)
  that Dependabot had not raised; plist 1.10 brings quick-xml 0.41.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 19:46:24 +07:00
poli0981 416d9f3ee2 Merge pull request #170 from poli0981/chore/deps-2026-09
chore(deps): fold the open Dependabot bumps into one update; Tauri 2.12 drops rand
2026-09-30 19:43:45 +07:00
poli0981andClaude Opus 5.5 ffd1c7900d chore(tauri): regenerate capability schemas for tauri 2.12
tauri-build rewrites src-tauri/gen/schemas on the first build after an
upgrade; commit them with the crate bump so the next build is a no-op.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 19:35:03 +07:00
poli0981andClaude Opus 5.5 f230f036a1 chore(deps): fold the open Dependabot bumps into one update; Tauri 2.12 drops rand
One lockfile instead of nine PRs: every minor/patch the open Dependabot PRs
proposed, plus everything else that moved within range.

npm (`npm update --save`)
- react/react-dom 19.3, vite 8.3, i18next 26.4, react-i18next 17.0.15,
  react-router 7.18.4, eslint 10.11, typescript-eslint 8.71, knip 6.38,
  prettier 3.9.9, @vitejs/plugin-react 6.1, @tauri-apps/* 2.12 / plugins,
  @types/*, @testing-library/react, postcss, autoprefixer, tsx.
- Security: vitest + @vitest/mocker 4.1.11 (path traversal via redirect
  mock), @humanfs/node 0.16.8 (symlinked copy). `npm audit`: 0.
- Majors stay out (TypeScript 7, Vitest 5, lucide-react 1).

Rust (`cargo update -p tauri …`)
- tauri 2.12, tauri-build 2.7, dialog 2.8, fs 2.6, opener 2.7, shell 2.4,
  single-instance 2.5 — matching the npm side minor for minor.
- tauri 2.12 no longer depends on kuchikiki, so `rand` 0.7.3 (the unsound
  custom-logger advisory) leaves Cargo.lock entirely. Only glib 0.18 (gtk-rs
  0.18 Linux stack) remains ignored.

CI and config
- New `npm run check:tauri`: the tauri CLI refuses to build when the npm
  packages and crates differ in major.minor, and CI never runs `tauri build`
  — so a one-sided bump merged green and broke the next release tag. Now CI
  says which side lags.
- dependabot.yml: 3-day cooldown for version updates (security updates are
  exempt), new ui / cloudflare / testing / types groups, rand ignore removed.
- actions/setup-java v5 -> v6 (release-android).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 19:34:44 +07:00
poli0981 d7abc1e508 Merge pull request #169 from poli0981/feat/turnstile-gate
feat(web): Turnstile gate, in-site legal pages and clean URLs
2026-09-30 19:30:34 +07:00
poli0981andClaude Opus 5.5 85a8dc121b fix(legal): build heading anchors without a tag-stripping regex
CodeQL flagged the `<[^>]+>` replace in slugify as incomplete multi-character
sanitisation. The character filter after it already reduced anything that is
not a letter or digit to a hyphen, so no markup could survive; drop the regex
and let that one rule do the work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 19:29:05 +07:00
poli0981andClaude Opus 5.5 5ced6b4a86 feat(web): Turnstile gate, in-site legal pages and clean URLs on ytgenerator.stream
A Worker (worker/) now sits in front of the static build, configured from the
same wrangler.jsonc. Cloudflare builds and deploys it; nothing in GitHub
Actions does.

Gate
- First visit shows a branded check page (8 languages, Accept-Language) with
  Cloudflare Turnstile. The token is verified server-side against
  TURNSTILE_SECRET: success, hostname, action "enter", age <= 300 s. Only
  Cloudflare's own test-key results skip the hostname/action check, so
  `npm run cf:dev` works with the published test keys.
- Pass -> `__Host-ytg_gate` (HttpOnly, Secure, SameSite=Lax, 24 h): an HMAC
  over expiry + a user-agent hash, keyed from the Turnstile secret, so no
  second secret exists and a cookie copied into a scraper is useless.
- The page reloads in place instead of redirecting, so there is no `next`
  parameter to open-redirect with; /__gate/status lets the page tell a
  cookie-blocking browser what is wrong instead of looping; after one
  failure it waits for a click rather than resubmitting.
- Missing secret = deployment mistake: the site stays up without the gate and
  the Worker logs it, instead of locking every visitor out.
- The agree box on the gate records `ytg_terms`, which the app reads on boot
  so web visitors meet one blocking screen, not two.

Headers and static files
- worker/headers.ts sets CSP (nonce + strict-dynamic on the gate, no script
  at all on legal pages), nosniff, Referrer-Policy, Permissions-Policy, COOP,
  CORP, X-Frame-Options on everything the Worker returns; _headers covers
  the files served directly; a test keeps the two baselines identical.
- `not_found_handling: "404-page"` (a static 404.html) instead of the SPA
  fallback, which would have handed index.html past the gate for any
  excluded path. The Worker serves the shell itself by fetching "/" - not
  "/index.html", which html_handling would 307 back to the home page.
- security.txt (RFC 9116) is generated per build so Expires stays ~6 months
  ahead; the Web Analytics beacon is injected into the web build only.
- theme-init.js applies the saved theme before first paint (no inline script).

Legal in-site
- build-plugins/legal-docs.ts renders TERMS, PRIVACY, DISCLAIMER (+ vi),
  LICENSE, THIRD_PARTY_NOTICES, SECURITY, NOTICE and CODE_OF_CONDUCT at build
  time into static /legal pages (public, before the gate) and a lazy
  `virtual:legal-docs` module for the in-app Legal Center, which works
  offline on desktop and Android and never leaves the webview.
- PRIVACY, TERMS and SECURITY rewritten for Cloudflare hosting, Turnstile,
  Web Analytics and the two cookies; contacts moved to the poli0981.dev
  aliases (privacy@, legal@, dmca@, copyright@, security@, code@).
- CURRENT_TERMS_VERSION 1 -> 2: the Privacy Policy changed materially.

App
- Web uses BrowserRouter (real paths; analytics can count them), Tauri keeps
  HashRouter; old /#/x bookmarks are rewritten to /x before the router reads
  them. Consent is a layout route; /legal sits outside it.
- <html lang> follows the UI language; a stale chunk after a deploy triggers
  one reload instead of an error page.

.gitattributes pins LF everywhere so Windows checkouts stop failing Prettier.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 19:26:40 +07:00
poli0981 c6e43f8e13 Merge pull request #167 from poli0981/feat/cloudflare-hosting
fix(web): serve ytgenerator.stream from the root, retire the GitHub Pages deploy
2026-09-30 19:24:32 +07:00
poli0981andClaude Opus 5.5 1fc939b711 fix(web): serve from ytgenerator.stream root and retire the GitHub Pages deploy
The Worker connected to ytgenerator.stream was serving a build made for the
GitHub Pages sub-path: index.html asked for /youtube-generator/assets/*.js, the
SPA fallback answered every one of those with index.html, and the site loaded
blank. Both builds are now served from `/`.

- vite.config.ts: base "/" for web and Tauri alike.
- wrangler.jsonc: the one Cloudflare file in the repo. Assets-only for now
  (dist/, SPA fallback, custom domain declared so `wrangler deploy` never
  detaches it, workers.dev off, build.command runs `npm run build`).
- public/_headers: CSP, nosniff, Referrer-Policy, Permissions-Policy, COOP,
  X-Frame-Options; immutable caching for hashed /assets/*. No HSTS - the
  zone edge already sends it with preload.
- index.html, manifest, robots, sitemap: canonical/OG/JSON-LD on the new
  domain, pt-BR and id added to the locale metadata, Android listed.
- Brand: one SVG source in assets/brand/ now drives the favicon, the PWA
  icons (192/512/maskable), apple-touch-icon, a 1200x630 link-preview card
  and every Tauri desktop/Android/iOS icon. The desktop and Android apps had
  been shipping a flat indigo placeholder square; manifest and index.html
  pointed at four PNGs that did not exist. `npm run generate:brand`
  re-renders the web images; the Android adaptive icon gets a glyph-only
  foreground on the brand colour instead of a tile on a white disc.
- deploy-web.yml and notify-deploy.yml removed, .nojekyll dropped. The last
  Pages deployment stays online untouched until the data-migration page
  replaces it.
- .node-version pins Node 22 for Workers Builds; wrangler, @tauri-apps/cli
  and @resvg/resvg-js are pinned dev dependencies (`npm run cf:dev`,
  `npm run cf:check` for a dry-run deploy).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 19:02:57 +07:00
poli0981 35b5badbac Merge pull request #152 from poli0981/dependabot/github_actions/actions-674967a53d
ci: bump actions/upload-artifact from 6 to 7 in the actions group
2026-08-18 11:16:25 +07:00
dependabot[bot] 37b9638b61 ci: bump actions/upload-artifact from 6 to 7 in the actions group
Bumps the actions group with 1 update: [actions/upload-artifact](https://github.com/actions/upload-artifact).


Updates `actions/upload-artifact` from 6 to 7
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-17 13:46:42 +00:00
poli0981 55a0236cc5 Merge pull request #150 from poli0981/docs/readme-refresh
docs(readme): refresh the stack, model and binary-size claims
2026-08-17 13:12:09 +07:00
poli0981andClaude Opus 5 b7be12824c docs(readme): refresh the stack, model and binary-size claims
Three things had gone stale or were never quite right:

- **Tech stack** still said React 18 / Tailwind 3. v0.37.0 moved to React 19,
  Tailwind 4, Zustand 5 and i18next 26.
- **AI disclosure** named "model 4.7 Opus, 1M-context variant", two
  generations old. Now names the family rather than pinning a version that
  goes stale on every model release.
- **"~8 MB native desktop app"** was optimistic and incomplete. Measured
  against the v0.37.0 assets: the Windows exe is 2 MB, the msi and macOS
  bundle 4 MB, deb/rpm 5 MB — but the Linux AppImage is 76 MB because it is
  self-contained, and the APK is 54 MB. Says "2–5 MB installers" and calls out
  the AppImage rather than quoting one number that only holds for some
  platforms.

Checked and left alone: "248 content-warning IDs across 12 groups" is exactly
right (`CONTENT_WARNINGS` has 248 unique ids, `CONTENT_WARNING_GROUPS` has 12).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 13:05:52 +07:00
poli0981 5edd0d6bfd Merge pull request #148 from poli0981/feat/v0.36.0-locales
feat: v0.38.0 — Portuguese (Brazil) and Indonesian
v0.38.0
2026-08-17 12:50:12 +07:00
poli0981andClaude Opus 5 b920d3567e chore(release): v0.38.0 — Portuguese (Brazil) and Indonesian
Two new locales, 1,562 strings each, complete: titles, every description
block, all 248 content warnings, tech notes, playthrough notes, pinned
comments, playlist copy, and the whole interface.

Brazil is a top-three market for gameplay viewing and Indonesia the largest in
Southeast Asia. Both use Latin script, so neither needed font or layout work.

**docs/I18N.md was wrong about what registering a locale takes**, and this
release is where that bit. It claimed `SUPPORTED_LANGUAGES` was "the only
registration step". It is one of four, and they fail differently:

  SupportedLanguage union        compile error
  CORE_TAGS_BY_LANG              compile error  (there are TWO such records,
  MULTILINGUAL_TAGS              compile error   not one — the doc mentioned one)
  detectBrowserLanguage          SILENT

The silent one matters most: the language works perfectly and simply never
auto-selects for a visitor whose browser is set to it. `SUPPORTED_LANGUAGES`
also wasn't type-bound to the union, and every consumer casts, so a mismatch
between the first two compiled cleanly — it now carries a `satisfies` clause.

`tests/i18n/locale-registration.test.ts` exists to close those gaps: it checks
the picker list against the locale directories on disk in BOTH directions, plus
namespace files, flags, native names and tag pools.

Browser-language detection now matches the full BCP-47 tag before the bare
language, or `pt-BR` would be reduced to `pt` and never found. Any other
Portuguese variant resolves to pt-BR rather than falling through to English.

115 UI keys were not hand-translated at all: their English text is
byte-identical to a string already translated in templates.json (graphics
presets, ray-tracing modes, difficulty names, content-warning labels), so they
are copied across. Translating those twice risks a checkbox and the rendered
description disagreeing about what the same option is called.

Deliberately left in English, matching what the Spanish locale already does:
vendor product names (NVIDIA DLSS, AMD FSR, Intel XeSS, Fluid Motion Frames),
platform brands, hardware acronyms, genre terms that are loanwords in both
languages, and example URLs/emails in placeholders. So pt-BR reads 1,344/1,562
and id 1,308/1,562 "differing from English" — the remainder are those
pass-throughs, not gaps.

Both are AI-translated and NOT native-reviewed. Recorded in DISCLAIMER.md
alongside JA/ES/KO/ZH.

Also replaces `__dirname` in the Vite and Vitest configs with
`import.meta.dirname` — Vite 8's native config loader doesn't provide the CJS
global and warned on every run.

v0.36.0 is skipped: the dependency release shipped first and took 0.37.0.

Tests 692 → 698. Validator now 1,562 keys x 8 locales.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 12:46:54 +07:00
poli0981andClaude Opus 5 3b0db9a95f feat(i18n): translate the editor's game-info and video-settings labels
120 more keys per locale: section headings, game / channel / boss / DLC / mod
fields, the gacha quest taxonomy, GPU-RAM-OS pickers, the Vietnamese donate
block, graphics-preset and video-style options, timestamps and store links.

Vendor tech names stay in English throughout — DLSS, FSR, XeSS, DLAA, the frame
generation multipliers, NVIDIA / AMD / Intel. They are product names, and the
templates locale already keeps them, so translating the picker but not the
rendered line would make the two disagree.

Note for anyone editing these files by script: `ui.json` contains literal keys
that themselves contain dots — `"frameGenMultiplier.nvidia"` sits directly
beside a plain `"frameGenMultiplier"` leaf — so a naive split-on-dot path walk
resolves to the wrong node, or crashes.

pt-BR now 1039/1562 translated, id 1003/1562. The remainder is `editor.*`
content-warning and tech-note checkbox labels.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 12:37:52 +07:00
poli0981andClaude Opus 5 bbf201c30f feat(i18n): translate the UI chrome for pt-BR and id
~500 keys per locale: tabs, About, Output, common actions, error pages, the
consent gate, video types, genres, rig labels, Profiles / Presets / Templates /
History, the whole Settings page, Social, Batch, shortcuts, validation
messages, Playlist and Logs.

115 of them were not translated by hand at all — their English text is
byte-identical to a string already translated in templates.json (graphics
presets, ray-tracing modes, difficulty names, content-warning labels), so they
are copied across. Translating those twice risks a checkbox and the rendered
description disagreeing about what the same option is called.

Left as English on purpose: brand and product names (Ko-fi, Patreon, PayPal,
GitHub, Discord, Steam, Twitch, TikTok, Mastodon, Bluesky), hardware acronyms
(CPU, GPU, RAM), genre terms that are loanwords in both languages (RPG, JRPG,
FPS, MMO, Indie, Metroidvania, Roguelike, Souls-like, SHMUP, Battle Royale),
and resolution / FPS values.

Still to do: `editor.*`, the largest single block.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 12:37:52 +07:00
poli0981andClaude Opus 5 e56c32e76a feat(i18n): translate templates.json for pt-BR and id
563 keys per locale — the strings YouTube viewers actually read: titles,
description blocks, all 250 content warnings, tech notes, playthrough notes,
pinned comments, playlist copy and timeline keywords.

Left identical to English on purpose, matching what the existing Spanish locale
does: separator glyphs, empty video-type keys, vendor product names (NVIDIA
DLSS / AMD FSR / Intel XeSS / Frame Generation), and loanwords that are the
same word in both target languages (Demo, Beta, Speedrun, New Game+, Normal,
Ultra, Jumpscare, Doomscrolling).

Not yet registered in code — the locales are inert until `SUPPORTED_LANGUAGES`,
the `SupportedLanguage` union, `detectBrowserLanguage` and `MULTILINGUAL_TAGS`
name them. ui.json and that wiring follow.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 12:37:52 +07:00
poli0981 841df7d246 Merge pull request #146 from poli0981/fix/android-release-upload
fix(ci): upload the Android APK with gh instead of action-gh-release
v0.37.0
2026-08-17 12:07:25 +07:00
poli0981andClaude Opus 5 b244063555 fix(ci): upload the Android APK with gh instead of action-gh-release
The v0.35.0 APK built successfully three times and was never attached. The
build was fine every time; the upload step failed with "Resource not accessible
by integration" on update-a-release.

`softprops/action-gh-release@v3` was resolving the target release from
GITHUB_REF rather than from the `tag_name` it was handed. On the tag push it
looked for a release tagged `refs/tags/v0.35.0`; on the workflow_dispatch re-run
it looked for one tagged `refs/heads/main`. Neither exists, so it fell through
to CREATING a release against a branch ref, which the token is quite right to
refuse. The permissions were never the problem — the job log shows
`Contents: write` on every run.

Replaced with `gh release upload`, which is pre-installed on every runner and
takes the tag as a positional argument, so it cannot make that substitution.
`--clobber` makes a re-run idempotent.

Also uploads the APK as a workflow artifact first, so a failed release upload
never costs another 20-minute NDK build to recover from — which is what it cost
to diagnose this.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 12:06:07 +07:00
poli0981 bb0a40cfae Merge pull request #145 from poli0981/chore/v0.37.0-deps
chore: v0.37.0 — dependency modernization
2026-08-17 11:46:29 +07:00
poli0981andClaude Opus 5 0c7fb31165 chore(release): v0.37.0 — dependency modernization
Every major the project had been sitting on, brought current. No user-facing
feature changes; the app should behave identically.

  React 18 → 19 (+ types, @vitejs/plugin-react 6)
  Tailwind 3 → 4
  ESLint 9 → 10 (+ eslint-plugin-react-hooks 5 → 7)
  Zustand 4 → 5
  i18next 23 → 26, react-i18next 15 → 17
  @testing-library/*, typescript-eslint 8.67, Vite/Vitest/tsx/knip patches

**React 19** needed exactly one source change: `useRef<T>(null)` is now typed
`RefObject<T | null>` rather than `RefObject<T>`. The old type quietly claimed a
ref was non-null before its element mounted; ScrollToTopButton now matches,
which makes its existing null check honest rather than defensive.

**Tailwind 4** moves configuration from `tailwind.config.ts` (deleted) into
CSS. The tokens live in an `@theme` block that maps Tailwind's names onto the
existing `:root` / `.light` variables, so the runtime theme toggle still owns
the values and keeps working untouched. `darkMode: "class"` becomes
`@custom-variant dark` — the app toggles a class on <html> rather than
following the OS, so the default prefers-color-scheme variant would be wrong.
Verified in the browser in both themes; a CSS migration fails visually, not at
build time.

**The lint upgrade earned its keep.** `react-hooks/set-state-in-effect` (new in
v7, React Compiler-aware) flagged seven sites. Four were real extra render
passes:

  - use-online-status rewritten to `useSyncExternalStore`. It had been
    re-reading `navigator.onLine` inside an effect to close the gap between
    first render and the listeners attaching — subscribing properly removes the
    gap instead of patching it.
  - ShortcutHelpModal derives its filter from `open` instead of resetting state
    in an effect, so a modal that is closed most of the time stops scheduling
    work on unrelated parent updates.
  - DraftIndicator and use-languages-ready now guard their setters.

Three remain as warnings, deliberately. They genuinely sync state FROM an
external source (i18next bundle readiness, a text mirror of a numeric store
field, a useMemo the compiler cannot preserve) and need a restructure rather
than a guard. Recorded in eslint.config.js with the reason — downgraded, not
silenced, and not a reason to hold back ESLint 10.

**lucide-react deliberately stays at 0.577.0.** 1.x removes every brand icon;
upstream dropped them for trademark reasons. Taking it would mean either a
generic globe beside a Facebook link or re-adding the marks ourselves and
inheriting the exposure lucide just shed. 0.577 already delivered the win —
main bundle 175 kB → 137 kB.

knip now ignores `tailwindcss`: after the migration its only reference is
`@import "tailwindcss"` in CSS, which knip does not follow.

Full gate green — typecheck, typecheck:all, lint, format:check,
validate:locales, knip, check:version, 692 tests, build — plus a browser check
of both themes with the editor and batch pages functional.

0.36.0 is reserved for the two new locales.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 11:43:51 +07:00
poli0981 11a822a881 Merge pull request #144 from poli0981/docs/v0.35.0
docs: correct the i18n registration claim, document v0.35.0
2026-08-17 11:33:23 +07:00
poli0981andClaude Opus 5 08be7d1ff8 docs: correct the i18n guide's registration claim, document v0.35.0
**docs/I18N.md was wrong in a way that would waste a contributor's afternoon.**
It said adding a locale to `SUPPORTED_LANGUAGES` was "the only registration
step". It is one of four, and the missing ones fail differently: the
`SupportedLanguage` union is a compile error, `MULTILINGUAL_TAGS` is a compile
error, but `detectBrowserLanguage`'s own hardcoded copy of the list fails
*silently* — the language works and simply never auto-selects for a visitor
whose browser is set to it. Also noted: `SUPPORTED_LANGUAGES` is not type-bound
to the union and every consumer casts, so a mismatch compiles cleanly.

Also documents the `--copy-english` / `--force` flags on the locale generator,
which only started existing in v0.35.0 despite having been advertised in
package.json since v0.1.

Elsewhere:

- **DEVELOPMENT.md** — the five new npm scripts, including why `format:check`
  excludes markdown and locale JSON, and why `typecheck:all` exists.
- **TECH-SPEC.md** — the real CI job, a new Field Limits section, and how
  over-limit enforcement derives from the engine's long-ignored `warnings`.
- **ARCHITECTURE.md** — the settings→engine mapping and its two guards, the
  two-source validation state, and an honest note that the first Strict Mode
  implementation typechecked, passed tests, and did nothing.
- **FEATURES.md** — the settings table still listed `Default Genre` and
  `Auto-save Draft`, removed in v0.22.0 and v0.3. Replaced, plus a guardrails
  section.
- **README.md** — guardrails in the feature list, and a link to the wiki.

The wiki itself (12 pages: quick start, glossary, field reference, guardrails,
batch/social, import-export, languages, privacy, troubleshooting, FAQ, release
process) is published separately — it lives in its own repository.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 11:32:09 +07:00
poli0981 03174084cf Merge pull request #143 from poli0981/chore/deps-minor
chore(deps): consolidate the six Dependabot minor bumps
2026-08-17 11:29:16 +07:00
poli0981andClaude Opus 5 d6de8764f1 chore(deps): consolidate the six Dependabot minor bumps into one lockfile
The new grouped Dependabot config opened six PRs within minutes of landing.
Merging them one at a time would mean six lockfile rebases and six CI runs for
what is a single dependency resolution, so this applies all of them together:

  i18next-resources-to-backend 1.2.1 → 1.2.3
  @tauri-apps/{api,plugin-dialog,plugin-fs,plugin-opener} → latest 2.x
  lucide-react 0.400.0 → 0.577.0
  eslint + @eslint/js 9.39.4 → 9.39.5, typescript-eslint 8.58 → 8.67
  knip 6.14.1 → 6.32.2, prettier 3.8.1 → 3.9.6,
  prettier-plugin-tailwindcss 0.6.14 → 0.8.1
  vite 8.0.16 → 8.2.1, vitest 4.1.8 → 4.1.10, tsx 4.22 → 4.23,
  postcss 8.5.15 → 8.5.26, autoprefixer 10.4.27 → 10.5.4

All within-major; the majors (React 19, Tailwind 4, ESLint 10, i18next 26,
Zustand 5) are held back by the Dependabot ignore rule and belong to their own
planned release.

The `lint-and-format` group's own PR was RED, and correctly so: prettier 3.9
formats six files differently, and Dependabot cannot run `npm run format` for
itself. Reformatted here — which is the format gate doing exactly its job on
its first real outing.

lucide-react's jump also drops the main bundle 175 kB → 137 kB (gzip 48 → 37).

Verified: typecheck, typecheck:all, lint, format:check, validate:locales, knip,
check:version, 692 tests and build all pass, and the app renders with icons
intact in the browser.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 11:21:30 +07:00
poli0981 ff8c1133e6 Merge pull request #137 from poli0981/dependabot/github_actions/actions-859475a651
ci: bump the actions group with 4 updates
2026-08-17 11:18:43 +07:00
poli0981 c9facc59ec Merge pull request #142 from poli0981/feat/v0.35.0-guardrails
feat: v0.35.0 — guardrails
v0.35.0
2026-08-17 11:16:50 +07:00
poli0981andClaude Opus 5 b8f245dee4 chore(release): v0.35.0 — guardrails
Splits SettingsPage (544 → 347 lines), extracting the import/export IO and the
42-input Genre Playlists section — the two pieces with no reason to sit inside
a page component.

Bumps all six version manifests and adds the CHANGELOG entry. `npm run
check:version`, added earlier in this cycle, confirms they agree.

Deliberately NOT split: `description-builder.ts` (974) and `editor-store.ts`
(998). Both are large, but this release changes almost nothing in either, and
carving up a 20-section render pipeline or a migration ladder is a test-heavy
refactor with real regression surface and no connection to guardrails.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 11:15:08 +07:00
poli0981andClaude Opus 5 8c32435d8a fix(strict-mode): derive the gate from state, not from mounted inputs
The first cut had each input register its own error into a shared store as it
rendered, clearing on unmount. That read as reasonable and was quietly useless:
the fields live on the Editor page, the gates live on Batch / Social / Output /
Profiles, and unmounting the Editor took every issue with it. Verified in the
browser — typing a malformed Steam URL, navigating to Batch, and finding
Generate perfectly enabled with no banner.

Replaced with two sources that between them cover what the setting promises:

- `collectEditorIssues` (pure, `@utils/editor-issues`) walks the editor STATE
  against the same validators and the same `PLATFORMS` / `SOCIAL_FIELDS` config
  the inputs use — one rule set, two consumers, no duplicated regexes. This is
  what catches data that never passed through an input at all: an imported
  profile, a preset shared by someone else, a draft persisted before a
  validator got stricter. Since `ValidatedInput` refuses to commit invalid
  text, imports are in fact the main way bad data reaches the store.
- `pending-invalid-store` holds text that is invalid and therefore *not*
  committed. Without it, a field showing a red error would still be invisible
  to every gate, because the store behind it holds the last good value. It has
  no unmount cleanup — that was the original bug — so an entry lives until the
  field is valid again.

Both are filtered through one relevance check, so a field nobody can see never
blocks: `adEmail` / `gameKeyEmail` while the split toggle is off, `zaloGroupLink`
outside Vietnamese output. Without that, Strict Mode could become an
unresolvable dead end — blocked on a field with no visible input to fix it.

Dropping the registry also removes the render-loop hazard it carried: the
effect published on every render of every input, guarded only by a deep-equal
bail-out.

Verified end to end in the browser: a bad Steam URL now disables Generate on
Batch and names the field in the banner; fixing it re-enables; and a Ko-fi link
on a vanity domain shows its inline prefix warning without blocking anything.

Tests 687 → 696.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 11:11:20 +07:00
poli0981andClaude Opus 5 1f9621b5cd feat: enforce the field caps everywhere they can be reached
Completes the field-limit work: `maxLength` is now wired at 53 call sites
across every editor form, the Settings genre-playlist inputs, the save dialogs
and the Playlist notes — grouped by what the field holds rather than named one
by one, so a new input inherits a sensible cap instead of inventing a number.

Two gaps that a `maxLength` attribute alone cannot close:

- **Imports bypass it entirely.** `maxLength` constrains typing and pasting;
  a profile, preset or template — including one saved before the caps existed
  — never passes through an input at all. `normalizeEditorPatch` now clamps on
  the way in, covering the flat fields plus the nested `social` and
  `storeLinks` URL maps. Without this the cap was decorative for exactly the
  path most likely to violate it.
- **Strict Mode could not see any field.** The registry landed in the previous
  commit, but nothing registered with it. Every `ValidatedInput` now carries a
  stable `fieldId` (composed for loop-rendered fields: `editor.social.twitch`,
  `settings.genrePlaylists.horror`), so the banner can name the offending
  input rather than saying "something is wrong".

Also fixed: `liveUrl` was a plain `Input` with no validation at all — the only
URL field in the app that would accept anything and pass it straight into the
description.

Tests 681 → 687.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 11:00:51 +07:00
poli0981andClaude Opus 5 f69941aae3 feat: block copying over-limit output, and add an opt-in Strict Mode
**Over-limit output could always be copied.** `renderAll` has returned
`warnings: CharLimitWarning[]` since v0.5 and nothing in the UI ever read it.
Three ad-hoc checks had grown up in the components instead, each with a
different blind spot:

  - `CopyButton` turned red and stayed clickable.
  - `CopyAllBar` checked title and description but not tags — and bailed out of
    every check when its `extraText` prop was set. Exactly one caller set that
    prop: OutputPage, whenever more than one language was selected. So picking
    a second language silently disabled limit checking on the main copy path.
  - BatchPage passed no limits at all, so a 6000-character description copied
    without a word.

`src/engine/limits.ts` is now the single derivation, and the requested rule is
all-or-nothing per output: if any one of title / description / tags is over,
none of them can be copied. Copying two fields and silently leaving the third
is how a half-populated description gets published.

Scoping decisions worth stating:
  - Batch blocks the offending part's own buttons plus Copy All Batch, but not
    the other 99 parts. Freezing an entire batch because part 7 is three
    characters long would be useless.
  - On Output, per-field buttons use the ACTIVE TAB's status while Copy All
    uses the merge — an over-long Japanese title must not disable the English
    copy button the user is looking at, but it must block the blob containing it.
  - `OutputExtras` (thumbnail text, pinned comment) and Playlist stay ungated:
    different YouTube surfaces with different limits, so reusing YT_LIMITS
    there would be wrong.

Batch also gained the description and tag counters it never had — a row could
be 1500 characters over with nothing on screen saying so. Social bulk Copy All
now respects each platform's own cap (TikTok 4000, Reels 2200).

**Strict Mode** (Settings → Guardrails, default OFF). Blocks Generate, Copy and
Export while any field carries a hard error. This needed something that did not
exist: an app-wide view of which fields are invalid. Every error lived in the
private `useState` of the input that produced it, so no caller could ask the
question. `src/store/validation-store.ts` is that registry — ephemeral, not
persisted, since an error rehydrated from disk would describe text the user can
no longer see.

Errors only. `validateUrlWithPrefix` returns a soft warning for a link that
works but doesn't match a platform's usual prefix; blocking on that would
strand anyone on a vanity domain or a regional mirror.

Two exemptions: the log .txt/.json export stays ungated (a debugging export
must not be held hostage by an unrelated bad URL), and the Editor gets the
banner but no gate — it is where you go to FIX the fields, so disabling
anything there would be backwards. Unmounted fields deregister, so a hidden
`adEmail` or a swapped-out video-type field can never block.

**Settings sections are collapsible.** Genre Playlists renders one input per
genre — 42 of them — and was the tallest block on the page. It now ships
collapsed with a filled-count badge. The other eight sections became accordions
too (defaulting OPEN) because a page mixing bare headings with chevrons reads
as broken, and unknown ids default open so a section added later cannot vanish
for an existing user.

Settings persist v11 → v12 (`strictMode`, `settingsAccordionState`), with
`SCHEMA_VERSIONS.settings` bumped in lockstep. Both are coerced, not just
back-filled: a hand-edited `"strictMode": "yes"` is truthy in JS, and silently
switching a seatbelt on is the opposite of an opt-in. Also corrected
`SCHEMA_VERSIONS.profile` 1 → 2, left behind when profile-store bumped in v0.34.0.

16 UI keys across all six locales (validator 999 ui / 563 templates).
Tests 665 → 681.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 10:56:05 +07:00
dependabot[bot] 913e82f6b5 ci: bump the actions group with 4 updates
Bumps the actions group with 4 updates: [actions/checkout](https://github.com/actions/checkout), [actions/setup-node](https://github.com/actions/setup-node), [actions/cache](https://github.com/actions/cache) and [tauri-apps/tauri-action](https://github.com/tauri-apps/tauri-action).


Updates `actions/checkout` from 6 to 7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

Updates `actions/setup-node` from 6 to 7
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v6...v7)

Updates `actions/cache` from 5 to 6
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v5...v6)

Updates `tauri-apps/tauri-action` from 0 to 1
- [Release notes](https://github.com/tauri-apps/tauri-action/releases)
- [Changelog](https://github.com/tauri-apps/tauri-action/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/tauri-apps/tauri-action/compare/v0...v1)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/setup-node
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/cache
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: tauri-apps/tauri-action
  dependency-version: '1'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-17 03:42:57 +00:00
poli0981andClaude Opus 5 6e0b02a050 feat: ask where to save exports, and cap what can be typed into a field
Two independent guardrails; both were missing outright rather than broken.

**Exports never asked where to save.** There were two writers that disagreed:
`saveFile` branched correctly per platform but had exactly one caller (the log
.txt export), while every JSON export went through a private blob-download
helper with no platform branch at all. So "Export" on Settings, Profiles,
Presets, Templates, Social and the log JSON dumped straight into Downloads —
even on desktop, where a native Save As dialog had been available and
capability-approved the whole time.

Now one writer, `saveTextFile`, with three branches:
  1. Tauri desktop — native Save As, then the existing `save_to_file` command.
     No Rust or capability change was needed; the permissions were already there.
  2. Web with the File System Access API — a real picker. It must be the FIRST
     await in a click handler because it needs transient user activation, so
     every call site now builds its payload synchronously first. A
     `NotAllowedError` from a spent activation degrades to (3) instead of
     losing the file.
  3. Everything else (Android WebView, Firefox, Safari) — blob download.

`exportTypedToJsonFile` is now async and returns the outcome, so **cancelling
is silent**: dismissing a save dialog is a decision, not a failure, and
toasting "Export failed" at someone who pressed Escape is how people learn to
ignore toasts. The shared `useFileExport` hook holds that rule in one place and
retires the hardcoded English "Exported!" / "Export failed" strings.

Settings Import/Export is no longer desktop-only. That gate was a leftover from
when export meant dumping the on-disk settings.json; import has always been a
plain <input type="file">, and export now offers a real dialog on the web too.

**No field had a length cap** — `maxLength` appeared nowhere in the codebase, so
a pasted novel in the game-name field produced a title YouTube would reject.
`FIELD_LIMITS` groups caps by what a field holds (URL 200, email 320, short
name 100, label 300, long text 2000, timestamps = the 5000 description budget)
so a new input inherits a sensible limit instead of inventing one. `clampField`
covers the paths `maxLength` cannot: profile/preset/template import and
paste-autofill.

**Emails hard-stop at three per field.** The cap is enforced on the increase,
not the absolute count, which buys two things: a field that already holds four
(legacy profile, hand-edited import) stays editable down to three instead of
freezing, and a half-typed `a@b.com,c@` is never punished. Per field rather
than across the split — each of the three renders its own labelled line, so
filling the advertising address must not retroactively invalidate the contact.

**`ValidatedInput` no longer destroys good input.** On an invalid value it used
to call `onChange("")`, wiping the stored value while the box still showed the
user's text — so backspacing one character out of a complete URL silently
emptied the field, and autosave then persisted the empty value with no signal.
It now simply doesn't commit, leaving the last valid value in place; bad input
is kept out just as effectively. Also fixed while here: `displayValue` never
re-synced when the prop changed, so applying a profile or preset left the box
showing stale text that disagreed with the store.

i18n keys for the new strings land in the following commit.

Tests 629 → 655.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 10:41:33 +07:00
poli0981andClaude Opus 5 6b6613cca0 fix(batch): render split contact emails in Batch, and make the drift impossible
Reported: with Settings → "Split contact email by purpose" ON, the Batch tab
showed only the old single "📧 Business inquiries:" line, while the Output tab
correctly showed the grouped 📧 BUSINESS / CONTACT block with all three
addresses.

Root cause is not in the engine. `renderAll` had three call sites, each
hand-copying the same twelve settings fields into an options object, and
BatchPage's copy was missing two: `splitContactEmail` and `showThirdPartyAds`
(plus `tEn`). An absent flag defaults to `false` inside `buildDescription`, so
the else-branch emitted the legacy single line — silently, with no type error
and no failing test, because the engine tests call `buildDescription` directly
with an explicit options object and never exercise the wiring.

Rather than add a third copy of the list, the mapping now lives in one place:

- `SettingsRenderOptions` (settings-derived) is split from
  `RenderOptionOverrides` (per-caller: `tEn`, `bilingualContentBlocks`), and
  `RenderOptions` is their intersection. Same shape as before for `renderAll`.
- New `useRenderOptions` / `buildRenderOptions` produce the settings half; all
  three call sites consume it and layer only their own overrides.

Two guards, both verified to fail when the original bug is reintroduced:

- Compile-time: `buildRenderOptions` builds a `Required<SettingsRenderOptions>`,
  so dropping a key is `TS2741: Property 'splitContactEmail' is missing`.
- Runtime: `tests/hooks/render-options-parity.test.ts` diffs the produced keys
  against `SETTINGS_DERIVED_RENDER_KEYS` in both directions and names the
  offending key in the failure message.

Also fixed by the same change, since Batch was dropping it too:
`showThirdPartyAds` — the SPONSORS & PARTNERS block now renders in Batch.

Batch deliberately still passes no `tEn`: its rows are one language each, so
the bilingual `EN · LOCAL` treatment would duplicate every content-warning line.

Note for the changelog: Batch descriptions get *longer* for anyone who had
either toggle on, because those blocks were being silently dropped.

Tests 621 → 629.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 10:41:33 +07:00
poli0981 31fa18627e Merge pull request #135 from poli0981/chore/security-and-format
ci: enforce existing checks, patch advisories, backfill CHANGELOG
2026-08-17 10:41:30 +07:00
poli0981andClaude Opus 5 7b0189a1f9 test: assert the (free) suffix by adjacency instead of a URL substring
The first attempt at this alert swapped the bare host substring for the full
URL, which CodeQL still flags — `js/incomplete-url-substring-sanitization`
fires on `.includes()` against any URL-shaped value, not on the needle's
length, so the change produced two alerts where there had been one.

A store line renders as `🎮 {label}{suffix}: {url}`, so asserting
`(free): <url>` against the whole description tests the actual adjacency the
case is about, drops `.includes()` entirely, and no longer needs to locate a
line by host at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 10:33:57 +07:00
poli0981andClaude Opus 5 d2100d2d40 ci: enforce the checks the repo already had, and close the CHANGELOG gap
CI ran typecheck/lint/locales/test/build. Everything else the repo owned was
configured but never executed — `knip` was installed and configured yet ran
nowhere, Prettier had a config and no gate, and the six version fields the
release ritual bumps by hand had nothing watching them. This wires all of it
into the pipeline.

Correctness gaps this immediately caught:

- `tsconfig.json` covers only `src`, so tests/ and scripts/ were NEVER
  type-checked. Adding `tsconfig.check.json` (+ `typecheck:all`) surfaced 53
  errors, including three fields silently missing from the editor→engine
  parity fixture: `videoStyleEra` (v0.22.0), `adEmail` + `gameKeyEmail`
  (v0.34.0), and the four `endings*` fields (v0.16.0/v0.17.1). The fixture is
  the guard against exactly that class of drift, and it had drifted itself.
- `vitest.config.ts` `include` matched only `*.test.ts`, so any `.test.tsx`
  would have been collected by nobody and "passed" silently. Now `{ts,tsx}`.

New gates in ci.yml: `typecheck:all`, `format:check`, `knip`, `check:version`,
and an advisory `npm audit --audit-level=high` (advisory so a fresh transitive
advisory cannot redden every unrelated PR before Dependabot opens its fix).
Plus least-privilege `permissions: contents: read` — which also clears the
`actions/missing-workflow-permissions` code-scanning alert — and a
concurrency group that cancels superseded runs everywhere except `main`.

New scripts:

- `scripts/check-version-sync.ts` — asserts all SIX version fields agree
  (package.json, package-lock root AND packages[""], tauri.conf.json,
  Cargo.toml, Cargo.lock self-entry). Nothing else notices a missed one, and a
  stale tauri.conf.json ships an installer that disagrees with its tag.
- `scripts/generate-locale-template.ts` — `npm run generate:locale` has been
  advertised in package.json and docs/I18N.md step 1 since v0.1, but the file
  was never committed, so the documented first step of adding a language
  failed outright. Blocks the planned pt-BR + id work.

Dead code removed: the Rust `ensure_dir` command and its two scoped `opener:`
capabilities. Its documented caller, `openSettingsFolder()`, no longer exists
in `src/` — `opener:default` (all `openExternal` needs) is untouched. Also
`@tauri-apps/plugin-opener` left knip's ignore list now that it is genuinely
imported, and `DroppedReasonId` went from unused export to typing
PlaylistPage's dropped-reason state.

Security: the `js/incomplete-url-substring-sanitization` alert in
description-builder.test.ts was a real (if low-stakes) weak assertion —
`includes("itch.io")` also matches `https://itch.io.example.com/`, so the
test could pass on the wrong line. Now matches the full URL.

CHANGELOG: v0.31.0, v0.32.0 and v0.32.1 shipped as tagged releases but were
never logged, leaving the file jumping v0.33.0 → v0.30.0. Reconstructed from
the release commits in the file's existing house style.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 10:28:00 +07:00
poli0981andClaude Opus 5 48d5bb035c style: apply Prettier across src, tests and scripts
`prettier --check` failed on 81 files: the repo had a Prettier config and a
`format` script from day one, but nothing ever enforced them, so formatting
drifted file by file. This is that pass, isolated in its own commit so the
CI gate added alongside it lands on an already-clean tree and no future
feature diff has to carry whitespace noise.

Formatting only — no behavioural change. Verified by `npm run test:run`
(621 passing, unchanged) and `npm run typecheck`.

Markdown, `_schema.json` and the workflow YAML are deliberately excluded:
Prettier reflows prose and expands the locale schema's compact arrays by
~1600 lines, which makes both harder to review for zero benefit. The
`format` script is scoped to `{src,tests,scripts}/**/*.{ts,tsx,css}` to
match.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 10:27:24 +07:00
poli0981andClaude Opus 5 86c5dec087 chore(deps): patch nanoid DoS advisory via npm audit fix
`nanoid` <3.3.18 (GHSA-2v37-7h3g-55p8 — custom generators can loop
indefinitely when size is zero) reached the tree transitively through
postcss. `npm audit` now reports 0 vulnerabilities; the brace-expansion
advisories were cleared separately by #134.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 10:16:56 +07:00
poli0981 216eabcec8 Merge pull request #134 from poli0981/dependabot/npm_and_yarn/brace-expansion-1.1.18
chore(deps-dev): bump brace-expansion from 1.1.13 to 1.1.18
2026-08-17 10:16:32 +07:00
poli0981 69f6e32ebf Merge pull request #126 from poli0981/dependabot/cargo/src-tauri/serde_with-3.21.0 2026-08-13 09:45:25 +07:00
poli0981 779aa1943e Merge pull request #131 from poli0981/dependabot/npm_and_yarn/postcss-8.5.25 2026-08-13 09:43:20 +07:00
poli0981 1a67dc6901 Merge pull request #133 from poli0981/dependabot/npm_and_yarn/multi-2181bdc769 2026-08-13 09:42:20 +07:00