Commit Graph
267 Commits
Author SHA1 Message Date
poli0981 87ff484136 Merge pull request #180 from poli0981/feat/purpose-emails
feat(editor): copyright email and purpose words for split contact emails
2026-10-03 09:15:23 +07:00
poli0981andClaude Opus 5.5 116dc1c7e6 feat(editor): copyright email and purpose words for split contact emails
With "Split contact email by purpose" on, the contact block gains a fourth
line, Copyright / DMCA, and every purpose address has to say what it is
for: the part before @ must contain one of the field's words
(src/config/contact-emails.ts), matched case-insensitively anywhere in it,
so name+dmca@gmail.com works. A missing word is an error like a malformed
address: the value is not saved and Strict Mode blocks. Addresses saved
before the rule are flagged, never rewritten.

- validatePurposeEmails() on top of validateEmails(); Strict Mode and the
  three purpose inputs use it, the general Contact field does not
- copyrightEmail: EditorData, defaults, field cap, PROFILE_FIELDS (optional
  on Profile, like the v1.0.0 additions); editor store v19 -> v20
- description: "©️ Copyright / DMCA: …" after the game-keys line, 8 locales
- help texts list each field's words; the Spanish examples now carry one
  (sponsors@, games@), and a test keeps every locale's examples valid

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 09:13:45 +07:00
poli0981 1252d88883 Merge pull request #183 from poli0981/ci/rust-toolchain-pin
ci: pin dtolnay/rust-toolchain to a master commit
2026-10-03 09:13:32 +07:00
poli0981andClaude Opus 5.5 d24bf1192e ci: pin dtolnay/rust-toolchain to a master commit
workflow-lint started failing on every pull request: zizmor reports
impostor-commit for dtolnay/rust-toolchain@6bed076 (# stable). The
action's `stable` branch is regenerated from master (last on 2026-10-01),
so the commit pinned from it no longer belongs to the repository's
history, and the `# stable` comment no longer matches either.

Pin 7e38f4b, the current master head (the regenerated `stable` is that
commit plus a default toolchain), in rust.yml and both release workflows.
Master keeps its history, and every step already passes
`toolchain: stable`, which master's action.yml requires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 09:09:00 +07:00
poli0981 e7d16d8873 Merge pull request #178 from poli0981/docs/v1.0.0
docs: v1.0.0 — changelog, contacts, hosting guide, refreshed docs; bump to 1.0.0
v1.0.0
2026-09-30 23:31:08 +07:00
poli0981andClaude Opus 5.5 5b61533465 docs: refresh the technical and feature docs for v1.0.0
Every claim checked against the code.

- TECH-SPEC: current configs (React 19 / Vite 8 / Tailwind 4, the web vs
  Tauri build), Cloudflare hosting and the Worker, store versions and
  migrations, the backup format, engine rules added in 1.0, CI as it is.
- ARCHITECTURE: layers, web vs Tauri, routing and start-up, the engine,
  state, backup & restore, web delivery, the hardened Tauri shell.
- PACKAGING: tauri.conf and capabilities as shipped, the eleven
  name-only commands and what they guard, where desktop data lives, the
  first-start recovery of pre-1.0 files, the release workflows; the
  auto-update flow that never existed is gone.
- FEATURES, CONTENT-INVENTORY (+ vi): recounted from config (42 genres,
  16 store entries, 22 social/donate fields, 7 cross-post platforms,
  37 Vietnamese banks); shortcuts that never existed removed.
- DEVELOPMENT (+ vi): main-only branching, every npm script, Rust 1.90,
  Cloudflare local dev with test keys, the Rust checks.
- I18N: both namespaces and all seven registration places, including
  the check page's own language list; ROADMAP: v1.0.0 shipped + backlog.
- DISCLAIMER (vi): eight languages. The locale template script now
  prints the full registration checklist; a stale comment in main.tsx
  about the removed settings file is corrected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:29:10 +07:00
poli0981andClaude Opus 5.5 bca589e169 docs: v1.0.0 — changelog, README, contacts, hosting guide, CLAUDE.md; bump to 1.0.0
- CHANGELOG: the v1.0.0 entry (moving house, new interface, data fixes,
  backup & restore, faster entry, catalogs, desktop hardening, CI).
- README: the web app at ytgenerator.stream, what moved from GitHub
  Pages, current features, privacy as it is now (Cloudflare delivery,
  Turnstile, cookieless analytics on the web only), contacts by purpose;
  the dead Discord invite and the old email are gone.
- docs/HOSTING.md (new): Worker routing, cookies, headers, secrets,
  one-time dashboard settings, local dev, previews and rollback.
- CLAUDE.md rewritten for the real stack, layout, commands and rules.
- CONTRIBUTING / PR template / issue templates: main-only branching,
  the required checks, 8 locales, Android and current versions; issue
  links to security advisories, the wiki, Discord and poli0981.dev/links.
- DISCLAIMER (+ Vietnamese), NOTICE: current model disclosure and the
  copyright / DMCA contacts. PRIVACY: backup locations and the moving
  notice on the old address.
- Version 1.0.0 in package.json, package-lock.json, tauri.conf.json,
  Cargo.toml and Cargo.lock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:06:01 +07:00
poli0981 6e071b65db Merge pull request #176 from poli0981/chore/pages-migration
ci(pages): moving notice on the old GitHub Pages address
2026-09-30 22:36:12 +07:00
poli0981 6af4b067d4 Merge pull request #175 from poli0981/feat/quick-entry
feat(editor): quick start, next part, store links pasted anywhere, more stores and platforms
2026-09-30 22:34:06 +07:00
poli0981andClaude Opus 5.5 dc8fc396f1 ci(pages): moving notice on the old GitHub Pages address
poli0981.github.io/youtube-generator still serves v0.38 to old bookmarks,
and the data people saved there can't follow to ytgenerator.stream on its
own (browser storage belongs to a site). A single static page replaces it:

- reads the ytdescgen-* stores this browser saved on the old address and
  downloads them as a backup file in the new format (Settings › Restore
  reads it: migrations, the preview and Undo apply as for any backup);
- points to ytgenerator.stream, in English or Vietnamese;
- noindex, canonical to the new site, and a 404 copy for old deep links.

pages-migration.yml deploys it by hand (workflow_dispatch, pinned
actions, job-scoped permissions). The page, the workflow and the
github-pages environment go on 2026-11-29.

A regression test feeds the page's exact output through the restore.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 22:33:29 +07:00
poli0981 1e42a2975b Merge pull request #174 from poli0981/feat/backup-restore
feat(data): backup & restore with preview and undo; desktop files by name only
2026-09-30 22:30:01 +07:00
poli0981andClaude Opus 5.5 3c985a07d6 feat(editor): quick start, next part, store links pasted anywhere, more stores and platforms
Editor:
- Quick start at the top: pick the channel profile and the game preset
  (remembered per device); replacing fields that hold something else asks
  first, everything offers Undo; "Update profile / preset" appears when the
  editor drifts from the one in use.
- Next part (number + 1) and New video (same game) clear what belonged to
  the last video: boss, timestamps, endings, pinned comment, sponsor…
  Applying a preset for another game or a template does the same first.
- Start over replaces Clear Draft and keeps the channel (profile fields);
  a new draft starts in the Default Output Language (it was always "en").
- A store link pasted anywhere — the page, the Game name field, another
  store's field — lands in the right store field, sets the platform for a
  game's first link and names the game from it (Roman numerals and
  well-known possessives restored: "Final Fantasy VII", "Baldur's Gate 3").
  Steam links keep their name slug and drop tracking parameters.
- Game-name suggestions from presets and history.

Catalogs:
- Stores: EA app, Ubisoft, Battle.net, Google Play, App Store, Meta Quest.
- Social: YouTube, Threads, Kick, Reddit, Bilibili; "X (Twitter)" with the
  X mark; threads.net and youtu.be links accepted.
- Cross-posting: YouTube Shorts, X (counted the way X counts — CJK,
  Vietnamese letters with diacritics and emoji count twice), Threads (one
  topic tag), Bluesky; hashtag caps per platform.
- Banks: MBV, VCBNeo, Vikki Bank (renamed OceanBank, CBBank, DongA Bank —
  saved old names get a one-click switch), Cake by VPBank, Timo.

Output:
- An empty channel name no longer leaves "…of Hades on ." — the channel
  phrase is dropped per language (8 locales, every template tested).
- Title alternatives are real title shapes with the user's separator and
  badge case; "Use this shape" sets them (new Title order setting:
  game first / video first); over-long ones can't be copied.
- Copy All can include the tags (setting); Batch picks Part or Demo part
  and continues from the editor's part number; Ctrl/Cmd+S saves the
  output to History.
- Social editor headings and hints translated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 22:29:44 +07:00
poli0981andClaude Opus 5.5 3912ca5152 feat(data): backup & restore with preview and undo; desktop files by name only
Storage (desktop):
- The webview can no longer name a path. Five commands that read, wrote,
  listed and deleted any path the frontend sent are replaced by name-only
  commands (backups, logs) that resolve under the app data folder, and by
  export/import commands that open the native dialog from Rust, so the only
  file touched is the one the user picked (json/jsonl/txt/csv/md, 20 MB).
  The fs and shell plugins are removed (Rust, npm, capabilities).
- The settings "mirror" file is gone: it was written next to the data
  folder (a missing path separator) and never read back. On first start
  the file becomes a restorable backup — never applied on its own — and
  the stray log folder is merged into the right one.
- Automatic backups on desktop: after library changes (quiet 30 s, at most
  every 10 min, skipped when unchanged or empty), newest ten kept, plus one
  before every restore. Settings lists them with Restore.
- One tray icon, built in code with the app icon (the config entry that
  could add a second, iconless one is removed).

Backup & restore (every platform):
- Format 2 files carry each section's store version; imports run the
  stores' own migrations (now exported functions), then a whitelist
  sanitizer: known fields and values only, editor limits, safe unique ids.
- Reads every earlier export: v0.15-v0.38 envelopes (log exports were
  labelled "history"), pre-v0.15 bare arrays, the old desktop data file.
- Restore dialog: new / already here / different per item, merge (keep the
  newer one, or both) or replace, section and item selection, one step,
  Undo. Newer-version sections are shown, not restored.
- Settings: Back up (choose sections) / Restore / drop a file. Consent and
  panel state are never exported or overwritten.
- History export as CSV (spreadsheet-safe) or JSON; logs export as "logs";
  dated file names; no more 250 ms timer guessing that a picker was
  cancelled.

Library:
- Templates save every editor field; presets save store link types and the
  other per-game fields; profiles save donate, community links and the
  custom graphics preset. Edit forms can update from the current editor,
  start fresh each time they open, and save on Enter. Toasts translated.

Dev: Vite no longer watches src-tauri (cargo's locked .dll crashed
`tauri dev` on Windows).

Verified in `tauri dev` on Windows under a test identifier: legacy file
recovered, old logs merged, auto backup, restore from the legacy backup
with a backup before it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 22:05:12 +07:00
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