Commit Graph
34 Commits
Author SHA1 Message Date
poli0981andClaude Opus 5.5 cefbbd13ee feat(editor): add DLSS 5 neural rendering, more frame generation modes and a custom LUT
Video settings:
- NVIDIA frame generation gains x6 (the multiplier was already in the list
  but offered by no vendor) and Dynamic Multi Frame Generation (DLSS 4.5).
- "Custom…" for every vendor reveals a text field (`frameGenCustom`); the
  description prints what was typed, like a custom graphics preset, and
  nothing for an empty box.
- A "DLSS 5 Neural Rendering" switch (`dlssNeuralRendering`), shown for
  NVIDIA only and printed after the DLSS mode:
  "Ultra - NVIDIA DLSS Quality + NVIDIA DLSS 5 Neural Rendering + NVIDIA
  Dynamic Multi Frame Generation". Another vendor turns it off
  (`coerceDlssNeuralRendering`: the vendor switch, applied profiles and
  templates, backup import).
- Editor store v21 -> v22 back-fills both fields.
- composeGraphicsPart's vendor half moves into small helpers.

My Rig: "Custom" is the LUT field's first suggestion (typing it works too,
any case). The rig block then prints just "LUT applied" in the output
language ("Có áp dụng LUT") instead of "LUT: Custom" — a field's
`customNoteKey`. No migration: the rig is a string map.

i18n: the new editor and description keys in all 8 locales and
_schema.json; brand names stay English. tests/engine/graphics-vendor.test.ts
also holds every vendor's options to their labels in the schema.

Docs: FEATURES (upscaler / frame-gen table, LUT Custom), TECH-SPEC (input
fields, store v22, rig block), CLAUDE.md (how to add an option).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 10:46:35 +07:00
poli0981andClaude Opus 5.5 941a1fad4f feat(editor): upscaled video — [4K Upscaled] badge, upscale line and warning
Video settings gain "Upscaled from" next to Resolution: footage recorded
at 1440p and exported at 4K in the video editor is now declared as such.

- Title: the quality badge reads "[4K Upscaled]" ("[2K Upscaled]",
  "[4K Upscaled 120FPS]"), with the word in the output language; badge
  position, case and the "Show quality badge" setting apply as before.
  1080p 60fps keeps no badge, upscaled or not.
- Description, VIDEO SETTINGS: "Upscale: 1440p → 4K (DaVinci Resolve
  Studio 21.2)" right under the Video line, the editor taken from My Rig.
  It stays when the graphics settings are hidden.
- Description, TECH NOTES: an automatic bilingual note that upscaling
  reconstructs fine detail, so text, textures and edges may look slightly
  different from the original image. It is not in the checklist and
  goes away with the upscale.
- The Select lists only resolutions below the video's; lowering the
  resolution to or below the source ends the upscale. The collapsed
  section reads "1440p → 4K · 60 FPS". Saved with the channel profile.
- Editor store v20 → v21 (back-fills "" and drops unknown values);
  backups and applied items read an unknown value as not upscaled.
  `validUpscaleSource` in src/engine/upscale.ts is the one rule the
  title, description and form share. AUTO_TECH_NOTES holds the engine's
  own notes; their bullets share description.techNotes.items.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 00:38:08 +07:00
poli0981andClaude Opus 5.5 d799c52112 feat(rig): add a LUT field under the video editor
A new My Rig field for the LUT graded in the video editor. The
description and the social captions print it on its own line right
under the editor ("LUT: Arri Alexa LogC to Rec709"); left empty, there
is no line.

- Typing offers the LUTs that come with DaVinci Resolve, named the way
  its LUT menu shows them (from Resolve 21's own LUT folder); any other
  name is printed as typed.
- cleanLutName tidies a pasted file name or path: Explorer's "Copy as
  path" or a macOS path keeps only the file name, and a .cube / .dat /
  .3dl / .csp / .ilut / .olut / .look extension goes. Dots inside a
  name ("SLog3SGamut3.CineToLC-709") stay.
- RigField gets `clean` (CPU and LUT) and `wide`. The cleaner runs when
  the field loses focus and again in formatRigValue, so Ctrl/Cmd+Shift+C
  or Ctrl/Cmd+S pressed with the cursor still in the field prints the
  tidy name too; the LUT field spans both columns, under the editor row.
- `rig.lut` and `description.rigLabels.lut` ("LUT") in all eight
  locales and _schema.json; a test now holds both label sets to
  RIG_FIELDS.

No store migration: the rig is a flat string map in the channel
profile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 22:17:44 +07:00
poli0981andClaude Opus 5.5 7a81690974 feat(editor): AI-generated content warnings and three more disclosures
A new content-warning group, AI-generated content (7): general, art /
visuals, voices, music / sound, text / dialogue, generated live while
playing, and disclosed by the developer. It follows Steam's AI
disclosure (made with AI during development vs generated live while the
game runs); machine translation stays the Language patch field.

Also simulated gambling and in-game purchases (ESRB / PEGI descriptors
with no warning so far), and a tech note for upscaling / frame-generation
artifacts (which upscaler was on is already the Video settings line).

A test now fails when a content warning or tech note has no editor label
or description bullet in _schema.json, and so in any locale; tech notes
get the group-parity test content warnings already had.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 21:56:53 +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
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 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
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 4.8 633298c049 feat: split contact email by purpose behind a toggle (v0.34.0)
Add a Settings "Split contact email by purpose" toggle (off by default).
When on, the editor exposes three email fields — Contact, Advertising,
and Game keys & playtest — and the description renders a grouped
"BUSINESS / CONTACT" block with one labeled line per non-empty field.
Off keeps the single "Business inquiries" line unchanged.

- New editor fields adEmail/gameKeyEmail (persist v17->v18); contactEmail
  is reused as the Contact line, so no saved data moves. The
  splitContactEmail toggle mirrors showThirdPartyAds end-to-end
  (settings persist v10->v11). Profiles persist v1->v2. All migrations
  are additive back-fills.
- +8 ui / +4 templates i18n keys across all six locales (983/563).
- 621 tests pass (613 + 8), typecheck/lint/locale validation green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 20:59:19 +07:00
poli0981andClaude Opus 4.8 10ef68bfdc feat: add Signal + Instagram community links, move Facebook Group (v0.33.0)
Grow the description's COMMUNITY block into the channel's full "join the
chat" hub. Two new dedicated invite fields — Signal
(https://signal.group/#<id>) and the Instagram group chat
(https://www.instagram.com/j/<id> or https://ig.me/j/<id>) — plus
Facebook Group moved out of the generic Social list into its own
facebookGroupLink community field. All three render for every output
language (like Messenger); Zalo stays Vietnamese-only. Block order:
Messenger, Signal, Instagram, Facebook Group, Zalo.

Each new link hard-rejects off-format input via a strict validator
(validateSignalGroupUrl / validateInstagramInviteUrl /
validateFacebookGroupUrl). The three fields thread through defaults, the
store (persist v16 -> v17), GeneratorInput, the editor -> engine mapper,
and template snapshots. The v17 migration lifts a legacy social.fb_group
value into facebookGroupLink and drops the dead key; normalizeEditorPatch
does the same for profiles/presets/templates.

i18n: 9 keys added / 1 removed across all 6 locales + schema
(975 ui / 559 templates). 613 tests pass (was 583). Five manifests
bumped 0.32.1 -> 0.33.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 19:18:19 +07:00
poli0981andClaude Opus 4.8 2d92d5ba81 fix: correct Messenger community link format to m.me/ch/ (v0.32.1)
v0.32.0 accepted `https://m.me/[id]` (a personal-page link) for the
Messenger Community field. A community/channel invite is actually
`https://m.me/ch/[id]` (e.g. https://m.me/ch/Abb1hmBhU_97UMCF/).

- Tighten MESSENGER_URL_REGEX to require the /ch/ segment (trailing
  slash optional) and hard-reject the old bare form.
- Update the shown example (MESSENGER_URL_EXPECTED) + the 6-locale
  placeholder to https://m.me/ch/yourid; refresh stale doc comments.
- Update validation/engine/migrate tests; add trailing-slash accept
  and bare-form reject cases.

Engine and store are unchanged (the link is printed verbatim, and the
field type/persist shape is untouched). Bump to v0.32.1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 23:10:53 +07:00
poli0981andClaude Opus 4.8 12b0099238 feat: add Messenger community + VN Zalo group links (v0.32.0)
Add two "join the chat" community links that render into a single
"💬 COMMUNITY" description block:

- Messenger community (https://m.me/[id]) — shown for every language.
- Zalo group (https://zalo.me/g/<code>) — Zalo is a Vietnam-audience
  app, so the editor input only appears (and the description line only
  renders) when the output language is Vietnamese, mirroring the VN
  donate block. A value entered while in Vietnamese is preserved if the
  creator switches language.

Both links are hard-validated (validateMessengerUrl / validateZaloGroupUrl)
so a malformed URL never reaches the output. New editor-store fields
persist via a v15→v16 migration and round-trip through saved templates.

i18n across all 6 locales (967 ui / 559 templates). Tests 560→581.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 20:47:53 +07:00
poli0981andClaude Opus 4.8 1e5720eecc feat: add Playtest section and invalid-number validation (v0.30.0)
Playtest section (Store & Social): a signup link + platform dropdown
(Steam Playtest / Epic / itch.io / Discord / Other) + invite count
capped per-platform (≤100). Renders a localized "🧪 PLAYTEST" block in
the description only when a link is set, like Store Links. New config
playtest-platforms.ts; 3 editor fields thread through the store (persist
v14→v15 migration), GeneratorInput, and the editor→engine mapping.

Invalid-number guarding: validateIntegerInRange + validateBatchRange
reject negative / decimal / out-of-range / end<start / >100-span inputs.
Batch and Social bulk disable Generate + warn on a bad range; Playlist
"Total videos" and Playtest invites warn inline and guard the output.
Input primitive gains optional errorText/helpText.

60 new i18n strings across all six locales (validator 948/544). 544
tests (517 + 27), typecheck, lint, and locale validation pass; verified
live. Five manifests bumped 0.29.3 → 0.30.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 01:08:58 +07:00
poli0981andClaude Opus 4.8 da22625178 fix(engine): keep multi-language content blocks single-language (v0.29.3)
Multi-language Output tabs were rendering content warnings / tech notes / playthrough notes bilingually after v0.29.2 forwarded the shared `tEn` translator. New `bilingualContentBlocks` render option (default true) lets the multi-language hook keep those blocks single-language while the AI-translation disclaimer stays bilingual. Single-language output unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 20:33:04 +07:00
poli0981andClaude Fable 5 b8317c2151 feat(v0.25.0): +41 content warnings (dialogue + internet/digital groups), inventory docs backfill
Two new warning groups — Dialogue / Language (10) and Internet / Digital
life (18) — plus 5 color phobias, 5 suggestive-imagery disclosures, 2
body-image phenomena, and an educational/PSA-purpose disclosure: 207 -> 248
ids across 12 groups. 504 new locale strings (84 keys x 6 locales), VI
flag-prone labels masked per the v0.21.0 precedent. Backfills the
content-inventory docs (audio group + v0.23.0 VFX items were never
documented) and replaces the stale v0.7 warning lines in FEATURES.md.
Adds 8 tests incl. a CONTENT_WARNINGS <-> groups parity guard. Five
manifests bumped 0.24.2 -> 0.25.0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 21:44:45 +07:00
poli0981andClaude Opus 4.8 f86469485f feat(v0.24.0): cross-post captions, theme toggle, translation notice, Telegram
Adds a cross-post caption generator (TikTok 4000 / Instagram Reels 2200 / Facebook Reels 2200) with single + bulk modes and JSON import/export, a header dark/light theme toggle synced with Settings, an opt-in translation-quality notice for non-trusted (non EN/VI) output languages, and a Telegram social link. Fixes a stray 'Pick a DDR generation' warning on the OS Rig field via a pure validateCompositeField helper. Extracts a shared buildBilingualBulletSection helper reused across content warnings, tech notes, the translation notice, and the social-post builder. +28 tests (482 total). Gates green: typecheck, lint, validate:locales, knip, build.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 12:28:42 +07:00
poli0981andClaude Opus 4.7 6ba2acfd7e feat(v0.22.0): +12 audio warnings, video-style era toggle, OS rig field, drop Default Genre + Dev Env
Group A — Warnings expansion + UX cleanup:
- New "audio" content-warning group (12 IDs: ear_piercing,
  jumpscare_audio, sudden_volume_changes, distorted_audio,
  screeching_metallic, persistent_high_pitch, audio_glitches,
  heavy_bass_rumble, screaming_audio, glass_breaking_audio,
  microphone_pops, white_noise_static). `loud_noises` migrated from
  photosensitive into this dedicated group. Total warnings 175 → 187.
- Remove "Default Genre" from Settings (UI + state + legacy v1→v2
  migration + migration tests). `healSettings` now strips both
  `defaultGenre` and `defaultGenres` from persisted blobs.
- Remove "Dev Environment" block from About (locked hardcoded specs
  that drift on every box upgrade; their wiki link survives in repo).

Group B — Editor additions:
- Video Style era toggle (12 eras: 1980s/90s/00s/10s/20s + modern,
  cinematic, retro, vhs, film_noir, anime_mv, documentary). Combines
  with `rig.video_editor` to emit a one-line credit like
  "Edited in 1990s VHS style using DaVinci Resolve". Renders even
  when `skipGraphicsSettings` is on (2D/pixel-art creators still
  edit footage). New `src/config/video-styles.ts`; editor-store
  persist version bumped 13 → 14 (additive, defensive coercion).
- OS field in My Rig — composite_dropdown following the RAM pattern
  (name + version + edition → "Windows 11 Pro"). Windows 10/11 +
  Home/Pro/Enterprise/Education/IoT for now; macOS/Linux can be
  added later by extending the option arrays.
- `rig.os` locale key added across 6 locales (the rig.* namespace
  itself already existed — only the new field's label is new).

Locale stats (per locale): ui.json 816 → 835 keys (+19),
templates.json 473 → 487 keys (+14). 6 locales updated in parallel
(en/vi/ja/es/ko/zh).

Tests: 416 → 445 passing (+29 — audio warnings touch no test, but
new OS composite tests + new video style line tests + reworked
default-genre migration test).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 01:14:35 +07:00
poli0981andClaude Opus 4.7 58fce6d8d2 feat(v0.21.0): +12 death-method warnings, video-vs-game copyright disclaimer, game-credit toggle, VI censoring sweep
Reduces YouTube auto-flag risk on Vietnamese descriptions, adds twelve method-specific
death/violence warnings, rewords the channel copyright line to disambiguate video
content from game IP, and adds an opt-in toggle for crediting the game's studio/publisher
in the description.

- F1: VI censoring sweep — 2-tier policy (asterisk + euphemism) applied consistently
  across warning labels/templates; fixes malformed `b* ng*y h*i` and uncensored `Bạo lực`.
- F2: +12 warnings (hanging_depiction, drowning_depiction, burning_alive, ...,
  defenestration) extend group `sensitive` (49→61). Total 175→187 across 9 groups.
- F3: Channel copyright reworded 1 line → 2-3 sentence disclaimer in all 6 locales.
  JA/KO/ZH now ship proper translations (no more EN fallback).
- F4: New `showGameCopyright` setting (default off) renders `© {publisher}` line right
  after store links. `pubDevName` promoted to first-class field in GameInfoForm,
  persists in GamePreset, decoupled from publisher store URL.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 23:00:21 +07:00
poli0981andClaude Opus 4.7 25d4e9e148 feat(editor): structured endings + multi-video split (v0.16.0)
Replaces the freeform "Endings shown" Input in Playthrough Notes
with a structured editor that knows about ending numbers, names,
multi-video splits, and timeline cross-validation. The output
description bullet renders comma-joined structured entries with
fallback to the legacy freeform for migrated drafts.

Key changes:

* New `EndingsEditor` component with three logical cases:
  - 1 ending  → Number + Name pair with live preview
  - 2+ endings, 1 video → table row per ending + timeline gate
    (warns when timeline lacks `ending` markers for each row)
  - 2+ endings, 2+ videos → endings table + per-video range table
    with auto-contiguous balanced split (extras spill into the
    LAST video — climactic-final convention) and override support
    + inline overlap/gap/out-of-bounds warnings.

* Schema additions to `EditorData`:
  - `endings: EndingEntry[]` ({number, name})
  - `endingVideoCount: number`
  - `endingVideoRanges: EndingVideoRange[]` (1-indexed inclusive)
  - `endingsShown` kept on the type for migration round-trip but
    no longer surfaces in the UI.

* Engine `endings-format.ts` — pure helpers used by description
  builder + editor preview:
  - `formatEndingEntry` (4 cases: both / number-only / name-only
    / neither → null drop signal)
  - `sliceEndingsForVideo` (whole-array fallback when not multi-
    video / index out of range; targeted slice otherwise)
  - `clampRange`

* Timeline parser ending pattern now captures an optional ordinal
  so `Ending 3: Best End` parses into `{keyword: "ending",
  number: 3, rest: ": Best End"}`. Unblocks the case-B timeline
  gate. Renderer collapses trailing whitespace so a bare `Boss`
  no longer becomes `Boss `.

* Description builder reads structured `endings[]` first, falls
  back to legacy `endingsShown` only when the array is empty.
  Multi-row entries render comma-joined; sliced by
  `endingVideoIndex` when supplied.

* Migration `migrateEditorState` v11 → v12:
  - `liftLegacyEndingString` parses "Ending 3: Best End" /
    "Ending 3" / localised "Kết thúc N" / "エンディングN" / etc.
    into a single structured row. Unparseable strings fall
    through to a name-only row.
  - `computeContiguousRanges` builds the default video split.
  - Clamps `endingVideoCount` to `[1, endings.length]`.

* 19 new locale keys × 6 locales under `editor.endings.*`
  (705/705 keys, up from 686/686). Schema updated.

* 42 new tests (367 → 409): endings-format, editor-store
  migration, description-builder structured render, timeline-
  parser ending ordinal capture.

* Bundle: index 463.08 KB (+62 KB for new UI + engine). Under
  the 500 KB cap.

Migration notes:

* Persisted v0.12–v0.15 drafts auto-lift their `endingsShown`
  string into a single structured row on first rehydrate. The
  rendered description bullet is byte-identical for the common
  case ("True ending only" → "True ending only"). Numbered
  legacy strings ("Ending 3: Best End") gain structure so future
  edits via the new UI work seamlessly.

* Pre-v0.16 templates with `endings` missing still load — the
  TemplateSnapshot type makes all three new fields optional.

* Case C (multi-video) currently renders the union of all
  endings in the Output preview. Per-video output rendering is
  wired into the engine via `endingVideoIndex` but the UI
  selector for it lands in a follow-up patch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 23:23:16 +07:00
poli0981andClaude Opus 4.7 d94e6ac024 feat(v0.12): single-instance Tauri fix, unified Playthrough Notes block, Tech Notes checklist
Fixes the duplicate-tray-icon / orphan-process bug on desktop by registering
tauri-plugin-single-instance in src-tauri/src/lib.rs — second launches refocus
the existing window instead of spawning a fresh process.

Replaces the v0.7 standalone "🎯 Playthrough" line + "🎮 DIFFICULTY" block with
a unified ▸ 🎮 PLAYTHROUGH NOTES section (Run type, Difficulty, Endings shown,
Language patch, Game version) — three new structured fields piggyback on the
existing playthroughStatus + difficulty data, keeping the editor-store v9→v10
migration purely additive. A new ▸ 🛠 TECH NOTES bilingual checklist (24 items
across 5 groups) sits next to Content Warnings for production / playstyle
disclaimers, mirroring the v0.11 CW render pattern.

All 6 locales updated; 14 new description-builder tests + 9 new migration
tests; bundle 345 KB raw / 116 KB gzip (under the 500 KB constraint).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 18:29:43 +07:00
poli0981andClaude Opus 4.7 4d974bbfc6 feat(v0.11): vendor-aware graphics, third-party ads block, bilingual content-warning checklist
Three independent v0.11 features in one PR:

- Vendor-aware upscaling & frame-gen options. NVIDIA exposes DLAA + 4
  quality bins and goes to x4 multi-frame-gen; AMD keeps FSR Native AA
  and caps at x3; Intel adds XeSS Ultra Quality and ships only x2.
  Description-builder uses vendor-keyed full labels ("NVIDIA DLAA",
  "AMD FSR Quality", "Intel XeSS Ultra Quality") so DLAA reads
  correctly without double-prefixing. Stale combos coerce to "none"
  on rehydrate (editor / template stores) and on profile / preset /
  template loads via normalizeEditorPatch.

- Third-party advertising block. New `showThirdPartyAds` toggle in
  Settings → Description renders a "🤝 SPONSORS & PARTNERS" section
  driven by a per-profile `thirdPartyAdText` Textarea. Multi-line
  preserved verbatim. Block gated on toggle ON AND text non-empty;
  the SettingsPage shows an inline hint pointing to Profiles → Edit
  when the toggle's on but the field's blank.

- Content-warning overhaul. Replaces the v0.7 WarningToggles (2
  booleans + 3-item checklist) with ContentWarningChecklist —
  searchable, collapsible-grouped checkboxes covering 44 items
  across Spoilers / Photosensitive / Phobias / Mental health /
  Mature & Sensitive. Description renders a unified bilingual block:
  "▸ ⚠️ CONTENT WARNINGS / CẢNH BÁO NỘI DUNG" header (bilingual
  when output language ≠ English), two-line intro, bullets paired
  via U+00B7 MIDDLE DOT (`• EN · local`). Vietnamese labels apply
  asterisk masking on YouTube-ToS-prone terms (`t* tử`,
  `x*m h*i t*nh d*c`, `g*ết người`); other locales use clinical
  wording. Selection order preserved.

Migrations:
- editor-store v8 → v9 (legacy boolean → checklist + ad text +
  vendor coercion).
- settings-store v8 → v9 (showThirdPartyAds default false).
- profile-store unversioned → v1 (thirdPartyAdText back-fill).
- template-store unversioned → v1 (vendor coercion on snapshots).

Verification:
- typecheck / lint / validate:locales clean.
- 310 / 310 tests green (9 new cases for vendor labels, bilingual
  rendering, censoring, ads gating, multi-line preservation, and
  selection order).
- Production build succeeds; main chunk 313 KB (under the 500 KB
  bundle constraint in CLAUDE.md).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 16:15:28 +07:00
poli0981 09989c6aca feat(v0.9-phase1-b1): gacha_quest video type with 17 quest patterns (#40)
Adds a first-class video type for gacha-game playthroughs. Covers the
quest taxonomy across major titles (Genshin, HSR, Wuthering Waves, ZZZ,
Honkai Impact 3rd, Reverse 1999, Nikke, Azur Lane, Granblue, …) where
the typical video is a quest-by-quest run with structured chapter /
event / side-quest metadata.

New config in src/config/gacha-quest-types.ts:
- GACHA_QUEST_TYPES: 17 literals grouped by use case
  (story / events / tutorial-trial / endgame-multiplayer / showcase)
- GACHA_QUEST_TYPE_GROUPS: display-order grouping for the dropdown
- GACHA_PART_SUFFIX_STYLES: per-quest-type partNumber style — main_story
  uses "Part N", anniversary + daily_commission use "Day N", endgame
  uses "Floor N", every other quest type drops the suffix.

GeneratorInput grows three optional fields: gachaQuestType (the enum),
chapterName (free-form chapter / story-arc label), questName (free-form
event / side-quest name). partNumber is reused as-is.

Engine wiring:
- title-builder.buildTitle dispatches on videoType === "gacha_quest" to
  the per-quest-type i18n template (`title.gachaQuestType.<id>`). The
  template already embeds gameName + chapterName / questName + the
  optional partSuffix; the standard `title.suffix` ("Gameplay No
  Commentary") still tails the result, and the quality badge respects
  badgePosition. Empty `videoTypeLabel` means a non-default badge in
  "middle" position lands as its own segment, matching the v0.6
  behaviour for `full` 4K runs.
- New helper `buildGachaPartSuffix(questType, partNumber, t)` resolves
  `title.gachaPartSuffix.{part|day|floor}` based on the per-type style.
- description-builder routes the intro through
  `description.intro.gacha_quest_<questType>` (17 distinct openings)
  while every other videoType keeps its flat key.
- tag-generator gets one shared gacha pool — quest-type-specific tags
  would balloon the pool and rarely surface in YouTube search.

UI (ExtraFieldsInput.tsx) renders a native <select> with <optgroup>
headers for the 5 quest groups, plus chapterName + questName inputs.
ExtraFields list for `gacha_quest` is
[gachaQuestType, chapterName, questName, partNumber].

Stores:
- editor-store v6 → v7: additive migration. Pre-v0.9 drafts get
  gachaQuestType="main_story", chapterName="", questName="".
- TemplateSnapshot adds the three fields as optional so legacy
  templates load cleanly via `loadProfile`'s spread.
- TemplateSaveForm + use-current-generator-input capture the new
  fields end-to-end.

i18n: 67 new keys per locale (28 ui + 39 templates). All 6 locales now
carry 421 ui + 203 template keys. en + vi fully translated; ja/es/ko/zh
seeded with English placeholders per the v0.8 polish convention.

17 new tests across title + description + part-suffix engine paths.
297 total pass. Main bundle 266 KB (≤500 KB gate).
2026-05-03 08:33:20 +07:00
poli0981andClaude Opus 4.7 39dd346050 feat(v0.8-polish): VN bank/MoMo/ZaloPay donate, video-settings multi-line, mod-list textarea, template-snapshot fixes (#34)
Four small refinements requested before bumping 0.8.0.

VN donate (bank + MoMo + ZaloPay)
* Five new editor fields — vnBankName / vnBankAccount / vnBankHolder /
  vnMomo / vnZalopay — surface in a new `VietnameseDonateEditor`
  component nested inside the existing Store & Social accordion. The
  editor is always visible regardless of output language; the
  description block is gated on `language === "vi"` because non-VN
  viewers don't typically use these payment methods.
* Description renders a `🏦 CHUYỂN KHOẢN / VÍ ĐIỆN TỬ (Việt Nam)` block
  between donate links and social links. Bank line includes the holder
  in parens when set, drops the parens when not. MoMo / ZaloPay each
  get their own line, independent of the bank entry.

Video Settings — multi-line block with labels
* The "🖥 VIDEO SETTINGS" section now renders one labelled line per
  token (Video / In-game Setting / Art Style / Version), matching the
  key-value-per-line shape of the rig + timestamps blocks. The pre-v0.8
  pipe-separated single line is gone.
* `composeGraphicsPart` drops its trailing "Setting" suffix — the new
  "In-game Setting:" label provides the same context without the
  "Cinematic Setting" / "Ultra Setting" double-up. The
  `description.graphics.settingSuffix` template key is removed across
  all 6 locales.

Mod List
* New `modList: string` editor field — multi-line textarea exposed
  alongside `modName` whenever videoType is `mods`. Designed for pasting
  straight from a mod manager (Wabbajack / Vortex / Mod Organizer).
* Description renders a `🧩 MOD LIST` block right after MY RIG, only
  for the `mods` video type and only when the field is non-empty.

TemplateSnapshot completeness fix
* Adds the v0.7 phase 2 fields that had been missing — playthroughStatus,
  difficulty, difficultyCustomLabel, contentWarnings — plus all v0.8
  polish fields (modList, vnBank*, vnMomo, vnZalopay). Saving a template
  now captures the full editor state. All new fields are optional on
  the type so legacy snapshots load cleanly via `loadProfile`'s spread.

Migrations
* Editor store v5 → v6, additive — empty-string defaults for the 6 new
  fields. No value mapping, no data loss.

i18n
* 6 locales × ui.json (14 new editor keys) + templates.json (2 new
  section headers, 3 new graphics labels, dropped settingSuffix). 391
  ui keys + 164 template keys per locale. Vietnamese fully translated;
  ja / es / ko / zh seeded with English defaults for new editor strings.

Tests (7 new, 7 updated): `Video: 1080p - 60 FPS` / `In-game Setting:`
multi-line shape (8 tests), VN donate gating (4 tests, including the
non-vi guard), Mod List gating (2 tests). 249 total.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 22:25:55 +07:00
poli0981andClaude Opus 4.7 ba58037306 feat(v0.8-phase2): graphics settings v2, livestream, pinned-comment genre playlists (#33)
The big v0.8 feature drop: PC build viewers can finally see RT modes,
frame-gen multipliers, and upscaling quality in the description; 2D /
pixel-art games skip the Video Settings section entirely; livestreams
get their own video type with a 🔴 LIVE block; and the pinned-comment
template auto-suggests a per-genre playlist configured once in Settings.

Foundations
* New `src/config/graphics-settings.ts` — GraphicsPreset, RTMode,
  FrameGenVendor, FrameGenMultiplier, UpscaleQuality, ArtStyle enums,
  plus `GENRES_WITHOUT_GRAPHICS_SETTINGS` for the auto-suggest hint.
* `engine/types.ts` extends GeneratorInput; `livestream` joins VideoType.
* Editor store v4 → v5 migration maps legacy free-form `graphicsPreset`
  text ("Ultra"→"ultra"; "Epic"→"custom"+"Epic") and backfills 9 new
  fields. `legacyGraphicsPresetToEnum` is exported for unit tests, and
  `normalizeEditorPatch` runs on `loadProfile` / `loadPreset` so legacy
  profile / template snapshots round-trip cleanly.
* Settings store v6 → v7 — `genrePlaylists: {}` and
  `pinnedCommentIncludeGenrePlaylist: false`.

Engine
* `description-builder.ts` — `composeGraphicsPart` produces lines like
  `Cinematic Setting - NVIDIA Frame Generation x2 with Ray Tracing`,
  with Art Style and Driver/Game Version as separate trailing tokens.
  The whole 🖥 VIDEO SETTINGS section is omitted when
  `skipGraphicsSettings` is true. Livestream videos render an extra
  block with a locale-formatted scheduled time and the watch link.
* `tag-generator.ts` — new `livestream` pool ("livestream",
  "live gameplay", `${gameName} live`, `${gameName} stream`).
* `pinned-comment-builder.ts` gains `includeGenrePlaylist`,
  `genrePlaylists`, `genreLabels` options; emits the genre-playlist
  suggestion line for the primary genre when configured.

UI
* `VideoSettingsForm.tsx` rewritten — preset Select, Custom field,
  skip toggle (with help text), Ray Tracing chip multi-select,
  Frame Gen vendor + multiplier, Upscaling Quality, Art Style, free-form
  Driver/Game Version.
* `ExtraFieldsInput.tsx` — livestream extras (live URL, scheduled time
  via native datetime-local input).
* `GenreSelector.tsx` — auto-suggest skip-graphics chip when a
  visual_novel / fmv / rhythm genre is added; session-local dismissal.
* `SettingsPage.tsx` — Genre Playlists section (per-genre URL inputs
  validated by `validatePlaylistUrl`); `pinnedCommentIncludeGenrePlaylist`
  toggle nested under the existing pinned-comment template toggle.
* `OutputExtras.tsx` resolves genre labels and passes the new options
  to `buildPinnedComment`.
* Profile + template stores carry `GraphicsPreset` typed slot;
  TemplateSnapshot picks up the new fields as optional.

i18n — all 6 locales updated, schema enforces 377 ui + 160 template
keys / locale. Vietnamese fully translated; ja/es/ko/zh seeded with
English defaults for the new strings (refine later as needed). Brand
terms (DLSS / FSR / XeSS / Ray Tracing) intentionally English everywhere.

Tests (24 new): graphics composition (7), livestream (4 description +
1 title + 1 tag pool + 1 pinned greeting), genre-playlist suggestion (4),
`legacyGraphicsPresetToEnum` (7), settings-heal v6→v7 (3). 242 total.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 21:21:36 +07:00
poli0981andClaude Opus 4.7 66753acce0 feat(v0.7-phase2): pinned-comment templates + playthrough/difficulty/content-warning fields (#31)
Second half of v0.7. Bumps package.json to 0.7.0 and ships the final
feature set for this version. See CHANGELOG.md for the full cumulative
entry covering both phases.

New description fields
- PlaythroughStatus (none / blind / replay / newgame_plus / postgame)
  renders a "🎯 Playthrough: …" line right after the intro.
- DifficultyLevel (none / easy / normal / hard / nightmare / custom)
  renders a "🎮 DIFFICULTY" block after Video Settings. "custom" reveals
  a free-form label that passes through the description untranslated —
  game-specific names like "Lethal" survive a locale switch.
- ContentWarnings (multi-select: flashing_lights / loud_noises /
  jump_scares) render a "⚠️ CONTENT WARNINGS" bulleted block between
  the spoiler and mature warnings.
- All three use a "none" / [] sentinel: creator hasn't picked → section
  is skipped entirely rather than rendered with a blank value.

Pinned-comment template system
- New pure engine module src/engine/pinned-comment-builder.ts composes
  from four shared sub-keys (thanks / playlist / engage / askNextGame)
  plus a per-video-type greeting. Missing per-type greeting falls back
  to greetings.part; missing that too drops the line rather than
  leaking a raw locale key.
- New Settings toggles showPinnedCommentTemplate (default off) and
  pinnedCommentIncludeAskNextGame (default on, only rendered when the
  parent toggle is on).
- OutputExtras renders a third section for the generated template with
  its own copy button, alongside the existing freeform pinnedComment
  field. They coexist as independent sections — no magic precedence.
- BatchPage generates one pinned-comment template per part per language
  with its own copy button; the combined "copy everything" bar includes
  the pinned block when the setting is on.

Refactor: useCurrentGeneratorInput hook
- The editor → GeneratorInput shape used to be copy-pasted across four
  call sites (use-generated-output, use-multilang-output, BatchPage,
  OutputExtras). Extracted into src/hooks/use-current-generator-input.ts
  so future input fields touch one file instead of four.

Store migrations
- Editor store v3 → v4: adds playthroughStatus, difficulty,
  difficultyCustomLabel, contentWarnings. Missing entries back-fill to
  sentinels, so existing drafts round-trip cleanly.
- Settings store v5 → v6: adds showPinnedCommentTemplate and
  pinnedCommentIncludeAskNextGame. Flat booleans pick up via the
  existing healSettings spread.

Locales (6 languages, all in sync)
- ui.json: playthrough / playthroughOptions, difficulty /
  difficultyOptions, difficultyCustomLabel / placeholder, content
  warnings + options, pinnedCommentTemplate label + copy button,
  Settings toggles for the template. (~23 new keys per locale.)
- templates.json: description.sections.{playthrough,difficulty,
  contentWarnings} + description.{playthrough,difficulty,
  contentWarnings} blocks + pinnedComment.{thanksForWatching,
  playlistPrompt, engagementPrompt, askNextGame} + 18 per-video-type
  greetings. (~36 new keys per locale.)
- _schema.json updated. validate:locales passes 314/125 keys across
  all 6 locales.

Tests
- New tests/engine/pinned-comment-builder.test.ts (11 cases): default
  greeting, localized game name, playlist include/exclude,
  includeAskNextGame toggle, per-type greetings (boss, speedrun),
  fallback to `part` greeting when per-type is missing, graceful
  drop-line when even fallback is missing, channelName interpolation,
  empty-locale returns "".
- description-builder.test.ts +8 cases for playthrough / difficulty
  (preset + custom + blank custom) / content warnings (render / empty /
  placement between spoiler & mature).
- settings-heal.test.ts +2 cases for v5 → v6 migration (back-fill
  defaults + preserve user-set values).
- Full suite: 177 / 177 pass.

Version
- package.json 0.7.0-phase1 → 0.7.0.
- New CHANGELOG.md with cumulative v0.7.0 entry.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 21:50:09 +07:00
poli0981andClaude Opus 4.7 a5b2a16c29 feat(v0.6): sponsor / key-provider credit toggle (#28)
Adds a new optional "🎁 Thanks to {sponsor} for providing the
{platform} key of this game." line to the generated description, for
creators who get review / press keys from publishers or developers.

- Editor: new SponsorCreditEditor (sponsor name + key platform) inside
  the Attribution accordion. Editor store v2 → v3 with a trivial
  migration that back-fills empty strings for old drafts.
- Settings: new `showSponsorCredit` toggle under Tag Settings. Off by
  default so existing users see no behaviour change. Settings store
  v3 → v4; healSettings back-fills the new default.
- Engine: `buildDescription` / `renderAll` take a `showSponsorCredit`
  option. Renders only when the toggle is on AND BOTH sponsor fields
  are non-empty — partial data is treated as "not ready, skip" rather
  than rendered with holes. Positioned above the music section and
  donate block so the thank-you is visually prominent.
- i18n: added sponsor-section UI labels/placeholders, the
  `settings.showSponsorCredit` toggle label, and
  `description.sections.sponsorCredit` template across all 6 locales
  (en, vi, ja, es, ko, zh) + schema.
- Tests: 7 new description-builder cases (render / toggle-off / blank
  name / blank platform / trim / ordering / vi localization) + 1
  healSettings case for the v3 → v4 back-fill.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 10:48:51 +07:00
poli0981andClaude Opus 4.7 42bc7e8b6d feat(v0.5): A/B title variants, template cloning, copyright + usage policy
Phase 6 closes v0.5.0. Ships the last two roadmap features plus the two
description-footer additions the user requested mid-flight.

## A/B title variants

New `src/engine/title-variants.ts` exposes a pure `buildTitleVariants`
that reuses `buildTitle` and `buildQualityBadge` to produce 3 phrasings:

- default:      Game — Type [2K] — suffix
- typeFirst:    Type — Game [2K] — suffix
- qualityFirst: [2K] Game — Type — suffix

`qualityFirst` collapses to the default shape when no badge exists so
callers never see two identical variants.

UI: `VariantPicker` modal opens from the Output page's "Generate
alternatives" button. Each variant has its own CharCounter + Copy.

## Template cloning ("Save as Template")

New `src/store/template-store.ts` persists full-form snapshots of the
editor (`TemplateSnapshot` matches editor-store's partialize shape so
`loadProfile()` can restore everything). Dual-write to file-backed
storage alongside the other stores.

- Output page header gains "Save as Template" → modal prompting a
  name, saves the entire editor state.
- Profiles page gains a third tab "Templates" with list / apply /
  delete, plus export / import JSON — matches the existing preset
  tab pattern.

## Copyright footer (new)

`description-builder` appends section 13.5 between CTA and hashtags
when `showCopyright` is on AND `channelName` is non-empty:

  © 2026 TestChannel. All rights reserved.

`RenderOptions.showCopyright` (default true) threads through
`renderAll` → both hooks → BatchPage. Settings toggle added in Tags
section. Skipping when channelName is blank prevents orphan
"©  . All rights reserved." lines.

## Usage policy block (new)

Section 13.7 — localised fixed template behind `showUsagePolicy`
(default off). Uses the 5-bullet "how to reuse my footage" block
supplied by the user, translated to all 6 locales with plain-text
bullets (YouTube descriptions don't render markdown).

All 6 locales gain:

- `description.sections.copyright` (interpolates year + channelName)
- `description.sections.usagePolicyHeader` (e.g. 📋 USAGE POLICY)
- `description.sections.usagePolicy` (multi-line body)

## i18n

Schema grew to 273 ui + 84 templates keys. Added namespaces:
- `ui.output` — `generateAlternatives`, `saveAsTemplate`,
  `variants.{default, typeFirst, qualityFirst}`
- `ui.templates` — title, createNew, saveAsTemplate, templateName,
  templateNamePlaceholder, loadTemplate, deleteConfirm, emptyState,
  saveHint, savedAs, appliedToast, export/importTemplates
- `ui.settings` — showCopyright, showUsagePolicy

## Signature change

`buildDescription(input, t, hashtagCount)` → `buildDescription(input,
t, options?)` where options is `{ hashtagCount, showCopyright,
showUsagePolicy }`. All internal callers updated; no public API
exposed outside the engine.

## Version bump

`package.json`, `src-tauri/tauri.conf.json`, `src-tauri/Cargo.toml` →
`0.5.0`. CLAUDE.md updated to mention `title-variants.ts` and
`template-store.ts`.

## Tests

129 passing (+13 new):
- 7 title-variants tests — shape, ordering, badge on/off, fallback
  when no badge, mod name interpolation.
- 6 description-builder tests — copyright render/skip/no-channel,
  usage policy render/skip, footer order (CTA → copyright → policy
  → hashtags).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 21:17:08 +07:00
poli0981andClaude Opus 4.7 2474cb68ba feat(editor): music attribution, thumbnail text, and pinned comment fields
Phase 4 of the v0.5 roadmap. Adds three data fields that gameplay
YouTubers manage manually today — keeps everything inside YTDescGen so
workflow stays single-app.

## Music / sound attribution

- New `musicAttribution` field on GeneratorInput and editor-store.
- When non-empty, description-builder emits a "🎵 MUSIC / SOUND"
  section right before the donate block (both are credit-adjacent).
- Threaded through `useGeneratedOutput`, `useMultilangOutput`, and the
  BatchPage render loop so every language and part picks it up.
- New template key `description.sections.music` in all six locales.

## Thumbnail text helper

- `thumbnailText` field on editor-store. Never touches the engine —
  it's a creator-private draft so a designer (or the creator) can
  copy the thumbnail overlay text separately.

## Pinned comment template

- `pinnedComment` field on editor-store. Kept out of the description
  on purpose: YouTube treats the pinned comment as its own surface,
  so the text ships via its own copy button, not inlined.

## UI

- Three new editor components (ThumbnailHelper, PinnedCommentEditor,
  MusicAttributionEditor), each a thin Textarea wired into the store.
- EditorPage renders them after WarningToggles and before the store/
  rig/social blocks — roughly the "Attribution" cluster.
- New OutputExtras component on OutputPage shows thumbnail text and
  pinned comment as standalone sections (with their own Copy
  buttons) only when the corresponding field has content.

## i18n

All six locales gain:
- editor: `thumbnailText`, `thumbnailTextPlaceholder`, `pinnedComment`,
  `pinnedCommentPlaceholder`, `musicAttribution`,
  `musicAttributionPlaceholder`
- output: `thumbnailText`, `copyThumbnailText`, `pinnedComment`,
  `copyPinnedComment`
- templates: `description.sections.music` (the section header)

Schema bumped; validate:locales shows 247/247 ui + 81/81 templates.

## Tests

116 passing (+3 new): music section rendered, order vs donate section,
blank/whitespace skipped.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 20:37:24 +07:00
poli0981andClaude Opus 4.7 32e2e1e90e feat(genres): multi-select genres with 15 new granular sub-genres
Phase 2 of the v0.5 roadmap. Turns the single-genre picker into a
multi-select (max 3) and doubles the genre catalogue to 42 entries
so creators can tag a game like Elden Ring as "Action + Action RPG +
Souls-like" instead of picking one.

## Engine — breaking change to GeneratorInput

- `GeneratorInput.genre: Genre` became `genres: Genre[]`. The first
  entry drives the genre hashtag and trending-tag template; all
  selected genres contribute to the tag pool and the final dedup
  collapses overlap.
- New `MAX_GENRES = 3` constant.
- 15 new `GENRE_TAG_REGISTRY` entries, each with 3-4 genre-specific
  tag phrases: hack_slash, beatemup, platformer, survival_horror,
  psychological_horror, jrpg, action_rpg, arena_shooter, tactical_fps,
  boomer_shooter, extraction_shooter, shmup, city_builder, deck_builder,
  auto_battler.

## Stores — zustand persist migrations

All four persisted stores bump to version 2 and migrate v1 → v2
in-place so existing drafts, settings, presets, and history survive:

- editor-store: `genre` → `genres[]`
- settings-store: `defaultGenre` → `defaultGenres[]`
- preset-store: `GamePreset.genre` → `genres[]` (plus import normalisation)
- history-store: `HistoryEntry.genre` → `genres[]`

## UI

- ChipGroup gains a `multiple` mode with optional `max`. When the cap
  is reached, unselected chips disable and a counter (e.g. 2/3) shows
  next to the label.
- GenreSelector and the Settings page's default-genre field both use
  the new multi-select chip group.
- PresetCard renders every selected genre as a chip instead of just
  the first one.

## i18n

All 6 locales (en/vi/ja/es/ko/zh) gain 15 genre labels. The schema
(`_schema.json`) is updated to match so `npm run validate:locales`
stays strict. Tests: 98 passing (+1 new multi-genre hashtag test).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 20:08:39 +07:00
poli0981andClaude Opus 4.7 d07b3fb3fa fix(engine): sanitise hashtags and humanise snake_case rig keys
Three underscore leaks were surfacing in the generated output:

- Rig section printed snake_case keys as-is (VIDEO_EDITOR:), now the key
  is split on underscore before upper-casing (VIDEO EDITOR:).
- Genre hashtag included the raw id (#visual_novel), now goes through a
  new sanitiseHashtag that drops every non-letter/digit so game names
  with punctuation also work (#STALKER2, #YakuzaLikeaDragon).
- Trending tag template interpolated the raw genre id ("best
  visual_novel games 2026"), now humanised via humanizeId.

Also narrows the store-links filter with a type predicate to remove a
pre-existing non-null assertion that was failing ESLint on main.

Adds 16 new tests covering the sanitiser, rig humanisation, hashtag
sanitising, and trending-tag humanisation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 19:47:23 +07:00
poli0981andClaude Opus 4.6 f14b898d98 feat(store-links): per-link Free/Paid/Demo type with dynamic heading
Adds a parallel storeLinkTypes map to the editor store and GeneratorInput
so each store link can be classified as paid, free, or demo. Missing
entries default to "paid" so pre-existing drafts keep rendering
identically.

- Engine: new StoreLinkType union; description-builder picks a heading
  by majority (>50% non-paid → DOWNLOAD THE GAME, otherwise GET THE GAME)
  and appends a (free) or (free demo) suffix per link.
- Locales: the old description.sections.storeLinks key is replaced by
  storeLinksBuy / storeLinksDownload + a storeLinkSuffix block across
  all 6 templates.json files. ui.json gains editor.storeLinkType and a
  storeLinkTypes namespace.
- UI: StoreLinkEditor now renders a Type select next to each URL input.
  setStoreLinkType action added to editor-store.
- 6 new description-builder tests cover majority rule, tie-breaking,
  demo/free suffixes, and the paid default fallback.

No migration is required because storeLinkTypes starts empty and the
engine treats missing entries as "paid".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 14:57:22 +07:00
poli0981andClaude Opus 4.6 e2e789beeb feat: Phase 4.1 — Bug fixes, validation, playlist generator, FMV genre
Bug fixes:
- Storage adapter: dual localStorage + file persistence for Tauri
- All 4 stores (settings, profiles, presets, history) now dual-write via subscriber
- Tauri: save_to_file creates parent dirs, tray with fixed ID + tooltip
- Tauri: hide-on-close (prevent_close), keep alive in tray (prevent_exit)
- Description builder: uses proper brand labels (Steam, PayPal) instead of IDs
- Social fields restructured: added label field for direct use in output

Input validation:
- validateEmails() — 1-3 comma-separated emails
- validateUrl() / validateUrlWithPrefix() — URL format validation
- ValidatedInput component with error display
- Applied to contactEmail, playlistLink, store links, social links

Unified language selection:
- Renamed defaultLanguage → appLanguage with browser locale detection
- Header: custom dropdown quick-switch (flag + name)
- Settings page: clear App Language vs Output Language labels

New features:
- FMV genre (26 total) with tag pool
- New social: Bluesky, Mastodon, Facebook, FB Page, FB Group (17 total)
- Social icons in description output (emoji per platform)
- Playlist template generator: 4 statuses × 8 content types
- PlaylistPage with status/content-type chips, output preview, copy
- Batch mode: multi-language per part (select languages, grouped output)

i18n: 202 UI keys + 61 template keys across 6 languages (all validated)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 15:02:15 +07:00
poli0981andClaude Opus 4.6 a763f7c78a feat: Phase 1 MVP scaffold — core engine, i18n, UI, CI/CD
Complete Phase 1 implementation of YTDescGen:
- Project setup: Vite 5 + React 18 + TypeScript strict + Tailwind CSS dark theme
- Config layer: 7 video types, 10 genres, 7 platforms, rig/social fields
- i18n: EN/VI/JA with separate UI and template namespaces + validation script
- Core engine: title-builder, description-builder, tag-generator (pure TS, zero React)
- 42 unit tests covering all engine functions
- Zustand stores: editor + settings with localStorage persistence
- UI: 6 primitives, 11 editor components, 4 output components, 3 layout components
- Pages: Editor (form + quick preview) and Output (title/desc/tags + copy)
- CI/CD: GitHub Actions for lint/typecheck/test/build + GitHub Pages deploy

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 21:46:59 +07:00