354 Commits
Author SHA1 Message Date
poli0981 c02464cafb Merge pull request #92 from poli0981/claude/v0.26.0
feat(v0.26.0): lazy-load locale bundles per language
v0.26.0
2026-06-12 07:55:15 +07:00
poli0981andClaude Fable 5 c78e49d08b chore(release): bump manifests to 0.26.0
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 07:53:20 +07:00
poli0981andClaude Fable 5 6f87dfc254 docs(i18n): document lazy-loaded locales in CHANGELOG, I18N, ARCHITECTURE, DEVELOPMENT
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 07:53:19 +07:00
poli0981andClaude Fable 5 820bbb9369 feat(i18n): lazy-load locale bundles per language
Only English ships in the main chunk (fallbackLng + the engine's
bilingual tEn must resolve synchronously); the 10 non-English locale
JSONs become Vite async chunks fetched on first use via
i18next-resources-to-backend. Main chunk: 594.0 -> 264.0 kB min
(204.3 -> 82.0 kB gzip), back under the 500 kB warning threshold.

Every reactive getFixedT site gates on the new useLanguagesReady hook
(an unloaded language would silently render English — and OutputPage
would save that as a wrong-language history entry); Batch/Social bulk
handlers preload all selected languages before their loops; main.tsx
preloads the persisted UI + output languages before first paint. A
failed chunk fetch is retried once via direct import (i18next pins
failed languages permanently), then logged, degrading to English.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 07:52:27 +07:00
poli0981 b522540614 Merge pull request #90 from poli0981/claude/v0.25.0
feat(v0.25.0): +41 content warnings (dialogue + internet/digital groups), inventory docs backfill
v0.25.0
2026-06-10 21:47:21 +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
poli0981 69ede56493 Merge pull request #88 from poli0981/claude/v0.24.2
ci(v0.24.2): harden Linux AppImage build, rebuild to ship Linux binaries
2026-06-08 14:21:24 +07:00
poli0981andClaude Opus 4.8 8569e1f81b ci(v0.24.2): harden Linux AppImage build, rebuild to ship Linux binaries
v0.24.1's Linux job failed on a sustained upstream GitHub-CDN 504 while the AppImage bundler fetched linuxdeploy, so v0.24.1 shipped with only Windows + macOS binaries. Set APPIMAGE_EXTRACT_AND_RUN=1 + NO_STRIP=true on the tauri-action step (fixes the linuxdeploy FUSE run-failure mode + future resilience; no-op on Win/macOS) and bump to 0.24.2 to re-run the full matrix. No application code changes — identical app to v0.24.1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 14:20:26 +07:00
poli0981 7a5b1f9e87 Merge pull request #85 from poli0981/claude/v0.24.1
chore(v0.24.1): clear npm audit, drop unused Cargo deps, document cross-post generator
v0.24.1
2026-06-08 13:27:34 +07:00
poli0981andClaude Opus 4.8 c29e04b15f chore(v0.24.1): clear npm audit, drop unused Cargo deps, document cross-post generator
Security/deps: react-router 6.30.3→6.30.4 (moderate open-redirect patch, non-breaking) and vitest 3.2.4→4.1.8 (clears the dev-only critical Vitest-UI advisory); all 482 tests pass unchanged on the new major. npm audit now reports 0 vulnerabilities. Removed unused serde/serde_json from src-tauri/Cargo.toml (no refs in src-tauri/src/; cargo check confirms the crate still compiles). Documented the cross-post caption generator (Social tab) in README + docs/FEATURES.md. Five manifests bumped 0.24.0→0.24.1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 13:26:47 +07:00
poli0981 23bec5fbda Merge pull request #83 from poli0981/claude/v0.24.0
feat(v0.24.0): cross-post captions, theme toggle, translation notice, Telegram
v0.24.0
2026-06-08 12:30:13 +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
poli0981 3783c2b1a5 Merge pull request #79 from poli0981/claude/v0.23.0
feat(v0.23.0): +8 VFX warnings, macOS/Linux OS rig support, CHANGELOG catch-up
v0.23.0
2026-05-28 08:04:53 +07:00
poli0981andClaude Opus 4.7 6796c78b7e feat(v0.23.0): +8 VFX warnings, macOS/Linux OS rig support, CHANGELOG catch-up
Three concerns bundled per the per-version plan:

1. CHANGELOG catch-up — v0.22.0 was shipped without a `CHANGELOG.md`
   entry. Backfilled the missing section (Added / Changed / Removed /
   Under the hood) matching v0.21.0's structure.

2. +8 VFX warnings in the `photosensitive` group. New IDs:
   `lens_flare_intense`, `bloom_excessive`, `particle_effects_dense`,
   `screen_overlay_flashing`, `color_saturation_extreme`,
   `motion_blur_heavy`, `depth_of_field_aggressive`,
   `post_processing_intense`. Closes the gap between blanket
   flashing-lights / strobe warnings and AAA / horror games that ship
   intense VFX passes (bloom, particles, post-processing) without ever
   triggering a strobe-style flash. Total warnings 187 → 195;
   photosensitive group 5 → 13. Engine renders each automatically.

3. macOS + Linux in the OS Rig field. `CompositePart.options` widened
   from a static array to a union with `(previousParts) =>
   RigFieldOption[]`, plus new optional `labelKeyResolver` (swap
   "Version" ↔ "Distro") and `hiddenWhen` (macOS has no Edition slot)
   per-part predicates. macOS: 7 versions (10 Mojave-era through 26
   Tahoe — the 15 → 26 jump is intentional, matching Apple's 2025
   year-aligned numbering). Linux: 7 distros gameplay creators
   actually use via Proton (Ubuntu / Fedora / Debian / Arch /
   Manjaro / Pop!_OS / Mint) with per-distro version cascading. RAM
   (the existing 2-part static composite) is unaffected — the union
   accepts arrays unchanged. `RigEditor.renderComposite` walks parts
   with a `previousValues` accumulator and resets all downstream
   parts on parent change so the form can't end up in an invalid
   state (e.g. macOS 11 Pro).

Stats: ui.json 835 → 844 keys (+9 = 8 VFX + 1 os_distro), templates
487 → 495 keys (+8 VFX). 6 locales updated in parallel.
454 tests pass (was 445, +9: 7 OS cascading cases + 1 empty-name
fallback + 1 RAM regression check). Gates green: lint, typecheck,
validate:locales (12/12), test, build. Five manifests bumped
0.22.0 → 0.23.0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 08:02:50 +07:00
poli0981 3019be0610 Merge pull request #77 from poli0981/claude/sharp-torvalds-dd5813
feat(v0.22.0): audio warnings, video-style era, OS rig field, drop Default Genre + Dev Env
v0.22.0
2026-05-28 01:16:34 +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
poli0981 e4ba053951 Merge pull request #75 from poli0981/claude/sharp-keller-e87985
v0.21.0: +12 death-method warnings, video-vs-game copyright disclaimer, game-credit toggle, VI censoring sweep
v0.21.0
2026-05-27 23:02:50 +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
poli0981 7b99f516ae Merge pull request #73 from poli0981/claude/gifted-goldberg-c7ade7
v0.20.0 — +50 content warnings (social/political/weather) + tag comma fix
v0.20.0
2026-05-23 09:07:48 +07:00
poli0981andClaude Opus 4.7 b415d14f8b feat(v0.20.0): +50 content warnings (social/political/weather) + tag comma fix
Bundles two changes for the v0.20.0 release:

- Content warnings: +50 IDs across three thematic axes. The phobias
  group gains 10 weather-related fears (homichlophobia/fog,
  lilapsophobia/tornadoes, ombrophobia/rain, nephophobia/clouds,
  ancraophobia/wind, cryophobia/cold, heliophobia/sun, cymophobia/waves,
  limnophobia/lakes, potamophobia/rivers); 41 -> 51. The sensitive
  group gains 20 political/religion/war themes (political_extremism,
  religious_extremism, genocide, holy_war, holocaust_themes, civil_war,
  mass_shooting, colonialism, propaganda, dystopian_state,
  conspiracy_theories, censorship_themes, ethnic_conflict,
  refugee_crisis, revolution_themes, assassination, coup_themes,
  inquisition, forced_labor, ultranationalism); 29 -> 49. A new
  social_phenomena group carries 20 psychological-social IDs that
  don't fit clinical mental-health framing (autism_themes,
  adhd_themes, hikikomori, neet_themes, social_anxiety_themes,
  social_isolation, schizophrenia_themes, burnout_themes,
  survivor_guilt, abandonment_themes, parasocial_themes,
  gaslighting_themes, stockholm_syndrome, behavioral_addiction,
  existential_crisis, impostor_syndrome, midlife_crisis,
  quarter_life_crisis, workplace_harassment, masculinity_pressure).
  Total content warnings 125 -> 175 across 9 groups (was 8). Fully
  translated across all 6 locales. Purely additive.

- Tag generator: strip comma/semicolon/pipe from game names before
  they enter the tag list. New sanitizeForTag helper applied to
  rawName at generateTags entry and inside tagFriendlyGameName.
  Title/description/hashtag paths still read input.gameName verbatim
  so original punctuation survives for human copy. Fixes the case
  where a game like "Hello, World" produced YouTube-broken composite
  tags ("Hello, World gameplay" split at the comma).

Version bumped 0.19.0 -> 0.20.0 across all five manifests.

Pre-release gates green: lint, typecheck, validate:locales (12/12
files complete), 435 tests (+9 new for the tag fix), knip, build,
npm audit (0 vulnerabilities).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 09:06:36 +07:00
poli0981 4650273b43 Merge pull request #71 from poli0981/claude/adoring-maxwell-fd4d70
v0.19.0 — phobia warnings, dead-code sweep, scroll-to-top, audit fix
v0.19.0
2026-05-20 20:25:41 +07:00
poli0981andClaude Opus 4.7 e691fc7c58 feat(v0.19.0): phobia warnings, dead-code sweep, scroll-to-top, audit fix
Bundles five changes for the v0.19.0 release:

- Content warnings: +28 IDs (25 clinical phobias in the phobias group,
  3 discrimination terms in the sensitive group); 97 -> 125 total,
  fully translated across all 6 locales. Purely additive.
- Dead-code sweep: add knip tooling (knip.json + npm run knip); remove
  the unused use-debounce.ts hook and ~13 unreferenced exports; tighten
  ~12 symbols to module-private.
- Security: npm audit fix for the brace-expansion moderate DoS
  (transitive dev dependency, 5.0.5 -> 5.0.6).
- UI: scroll-to-top floating button that scrolls the AppShell <main>.
- Docs: accuracy pass across TECH-SPEC, ROADMAP, FEATURES,
  CONTENT-INVENTORY (+ vi mirror), CHANGELOG, README.

Version bumped 0.18.0 -> 0.19.0 across all five manifests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 20:23:26 +07:00
poli0981 753a286706 Merge pull request #69 from poli0981/feat/v0.18.0-vn-banks-persistence-fixes
feat(v0.18.0): Vietnamese bank dropdown + persistence/export fixes
v0.18.0
2026-05-15 13:01:42 +07:00
poli0981andClaude Opus 4.7 494c3622ff chore(v0.18.0): bump lockfiles to match manifests
package-lock.json (root + "" packages entry) and src-tauri/Cargo.lock
(yt-desc-gen entry) were left at 0.17.1 in the main release commit.
Bumped to 0.18.0 so tauri-action's same-version check passes and the
binaries it uploads are labelled correctly. Per project-memory note
from v0.13.1 incident — version-bump ritual is six files, not three.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 13:01:19 +07:00
poli0981andClaude Opus 4.7 86927eea63 feat(v0.18.0): Vietnamese bank dropdown + persistence/export fixes
Bundles one new feature, two persistence-layer bug fixes, one cleanup,
and a transparency doc:

- feat: Vietnamese bank dropdown in VietnameseDonateEditor when output
  language is `vi`. 30 banks from the SBV 2026 list (Big 4 state-owned
  + top 22 joint-stock + 4 foreign), plus a "Khác (nhập tay)" option
  that reveals a free-form text input for unlisted banks. Persisted
  shape (`vnBankName: string`) is unchanged.
- fix: UI language reverted to English on every app relaunch because
  i18next initialised synchronously while the Zustand persist hydration
  was async and nothing bridged the persisted value back to i18n.
  App.tsx now reads `appLanguage` at mount and subscribes for future
  changes (covers both the synchronous localStorage path and the async
  Tauri settings.json path).
- fix: Settings JSON export was dumping the entire on-disk
  `settings.json` — which contains every Zustand store's data. The new
  exporter writes only the Settings store through the envelope-typed
  flow already used by the Profiles tab. Importer rejects pre-v0.18.0
  multi-store dumps with a friendly toast instead of silently injecting
  profile / template / history rows into the Settings store.
- cleanup: removed the "Open Folder" button from Settings (low usage,
  Tauri-only). The `ensure_dir` Rust command stays for other paths.
- docs: new `docs/CONTENT-INVENTORY.md` + Vietnamese mirror listing
  every video type (20), genre (41), and content warning (96 across 8
  groups) the editor surfaces. Linked from README's Documentation table.

Locale schema +2 keys × 6 locales (vnBankNameSelectPlaceholder,
vnBankNameOther). 720/720 ui keys per locale. 426/426 tests pass.
Bundle 427.46 kB (under 500 kB cap).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 12:35:25 +07:00
poli0981 fdeec0e913 Merge pull request #67 from poli0981/feat/v0.17.1-per-video-selector
v0.17.1: per-video Output preview selector
v0.17.1
2026-05-15 00:16:36 +07:00
poli0981andClaude Opus 4.7 5df2ef8227 feat(editor): per-video Output preview selector (v0.17.1)
Closes the last deferred piece from the v0.16 ending redesign.
Multi-video ending playthroughs (case C) can now flip between
per-video previews of title / description / tags without leaving
the editor.

Key changes:

* `endingVideoIndex` joins `EditorData` (1-indexed, default 1).
  Stored on the editor so the creator's pick survives navigating
  away and back. Engine already respected the corresponding
  `GeneratorInput.endingVideoIndex` since v0.17.0 — this just
  persists it.

* "Preview video" Select dropdown in EndingsEditor case C.
  Renders `endingVideoCount` options labelled "Video N (X–Y)"
  with the matching ending-range bounds. Changing it pipes the
  index into the engine, which slices `endings[]` for both
  title (buildStructuredEndingLabel) and description
  (sliceEndingsForVideo).

* "Previewing Video X of Y — Endings A–B" banner at the top of
  Output page when in case C. Persistent reminder so a creator
  flipping through videos doesn't forget which slice they're
  looking at.

* `use-current-generator-input` forwards `endingVideoIndex` only
  when `endingVideoCount > 1` — single-video mode passes
  `undefined` so the slice helpers short-circuit to render the
  union. Keeps the input cleaner for tests.

* `EndingsEditor.setVideoCount` clamps `endingVideoIndex` down
  when the creator shrinks `endingVideoCount` (e.g. 6 → 2 with
  index = 4 → snaps to 2) so the preview never targets a
  non-existent video.

* Persist version 12 → 13 additive — `endingVideoIndex`
  back-fills to 1 on first rehydrate; pre-v0.17.1 drafts with a
  stale higher index get clamped to endingVideoCount by
  migrateEditorState.

* 3 new locale keys × 6 locales (editor.endings.videoIndexLabel,
  editor.endings.videoIndexHint, output.previewingVideo).
  718/718 ui per locale.

* 4 new tests for v12→v13 migration (default back-fill, valid
  preserved, clamp above max, clamp below 1). Total 426/426.

Bundle: index 473.91 KB (+3 KB). Under 500 KB cap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 00:15:48 +07:00
poli0981 b8e8e476f5 Merge pull request #66 from poli0981/feat/v0.17.0-logging-and-ending-titles
v0.17.0: structured ending titles + log persistence + session UI
v0.17.0
2026-05-14 23:49:08 +07:00
poli0981andClaude Opus 4.7 d0dd6bad12 feat(v0.17.0): structured ending titles + log persistence + session UI
Combined release: the deferred ending-title piece from v0.16.0 lands
alongside a full logging overhaul. Output titles now reflect the
filled-in endings; logs survive app restarts with session-grouped
navigation and JSON/TXT export.

## Structured ending titles

Title-builder reads `endings[]` + `endingVideoIndex` and picks the
video-type label from a four-tier resolver:

  1. Single entry         → formatEndingEntry()
                             ("Ending 3: Best End", "Ending 3", "Best End")
  2. Multi-entry, named   → comma-joined names
                             ("True End, Bad End, Hidden")
  3. Multi-entry, numbers → contiguous range via title.endingLabel.range
                             ("Endings 1–3" / "Kết thúc 1–3")
  4. Mixed / sparse       → title.endingLabel.count ("3 Endings")

Falls back to the legacy locale "Ending" label when no usable entries,
so pre-v0.16 single-ending creators see byte-identical output.

## Logging overhaul

* Persistence: new `src/utils/log-storage.ts`. Tauri writes
  append-only JSONL `{appData}/logs/ytdescgen-YYYYMMDD.jsonl` (daily
  rotation). Web caps localStorage at 5000 FIFO entries. Three new
  Tauri commands: `append_to_file`, `list_dir`, `delete_file`.
* Session grouping: `LogEntry.sessionId` (one per app boot). LogPage
  renders one collapsible block per session — current expanded,
  prior collapsed — with per-session "Clear" action.
* Export JSON (envelope) + TXT (one line per entry, chronological).
* Boot hydration via `hydrateLogStore(retentionDays)` in App.tsx.
* New setting `logRetentionDays` (default 7, clamped [1, 90]).
  Persist-store v9 → v10 additive.

## Locale & test churn

* 12 new locale keys × 6 locales; 715/715 ui, 370/370 templates.
* 14 new tests (408 → 422).

## Bundle

* index 470.51 KB (+7 KB), LogPage 8.37 KB (+3 KB). Under 500 KB cap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 23:46:57 +07:00
poli0981 a685b050d9 Merge pull request #65 from poli0981/feat/v0.16.0-ending-redesign
v0.16.0: structured endings editor + multi-video split
v0.16.0
2026-05-14 23:24:15 +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
poli0981 df7d734c74 Merge pull request #64 from poli0981/claude/ecstatic-blackwell-457818
v0.14.1 + v0.15.0: Windows AppData fix, Import Settings, ErrorBoundary, envelope import/export
v0.15.0
2026-05-14 23:02:47 +07:00
poli0981andClaude Opus 4.7 8af06c425a feat(stability): ErrorBoundary + envelope import/export overhaul (v0.15.0)
Closes the "black-screen on bad file" class of bugs and gives every
JSON export an auto-detect header so users can no longer confuse
profile / preset / template files with each other.

Key changes:

* `ErrorBoundary` (new) wraps every <Route> in App.tsx plus a
  top-level boundary in main.tsx. Catches render-time exceptions
  that previously black-screened the app, surfaces a fallback UI
  with `Try again` + `Reload page` actions, and copies the error
  to the in-app Logs tab via the logger. Per-route boundaries mean
  a crash on Profiles cannot take down the Editor.

* File envelope format (`src/utils/file-schema.ts`) — every JSON
  export now writes `{ _app: "ytdescgen", _type, _schemaVersion,
  _exportedAt, data }`. The `_type` discriminator lets imports
  detect "you opened a Template file in Profiles importer" and
  offer to auto-switch tabs instead of failing silently. Legacy
  bare-array exports still import via shape detection.

* `importTypedFromJsonFile(expected)` returns a discriminated union
  with five distinct failure kinds (cancelled / read-failed / empty
  / parse-error / wrong-shape / newer-schema) so every error gets a
  targeted toast instead of a generic "Import failed".

* Black-screen root cause fix: null-guard the three-spread chain
  `TemplateCard.snapshot` → `editor-store.normalizeEditorPatch` →
  `ProfileCard.Object.values(profile.social)`. All three now treat
  null/undefined as no-ops. Store-level import validators in
  profile/preset/template stores filter rows with missing `id`
  before they hit the store, so a malformed file can't even reach
  the render path.

* 17 new unit tests in `tests/utils/file-schema.test.ts` cover the
  envelope round-trip plus every detection branch. Total 367/367
  pass.

Migration notes:

* No store schema bump. v0.14.x persisted state loads unchanged.
* Legacy bare-array export files still import via shape-detector.
  Re-export to get the envelope header + tab-switch hints.
* Envelope versions: profile=1, preset=2, template=1, settings=9,
  history=2. Bump per-type on a non-additive shape change.

Bundle: index 401 KB, ProfilesPage chunk 18.44 KB. Well under the
500 KB cap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 23:01:37 +07:00
poli0981andClaude Opus 4.7 406d68b19e fix(desktop): Windows AppData open-folder + add Import Settings (v0.14.1)
Same-day patch on v0.14.0 closing two desktop-only papercuts.

* `openSettingsFolder()` now pre-creates the app-data directory via a
  new `ensure_dir` Tauri command before calling `openPath(dir)`. Fixes
  the first-run "Windows cannot find ... AppData\Roaming\
  com.skullmute.ytdescgen" Explorer error — `appDataDir()` only
  resolves the path string; the folder itself was being created lazily
  on the first `save_to_file` write, so users who clicked Open Folder
  before any setting had persisted hit the shell with a non-existent
  path. `exportSettingsToFile` gets the same guard.

* Adds a Settings → Import button (Tauri-only, next to Export). Reads
  via the existing `loadFile()` dialog wrapper, accepts both the
  multi-store dump shape that Export produces *and* a bare
  SettingsData payload, runs the input through `healSettings()` to
  back-fill any missing keys, then dispatches via setState. Five
  failure modes get their own toast (cancel, read-error, empty,
  parse-error, non-object). Theme class on <html> is re-applied
  directly because setState bypasses the setTheme action.

Auto-regenerated Tauri ACL schemas from local tauri-dev (incidental
Tauri-plugin minor versions; not behavioural). package-lock.json
version bump only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
v0.14.1
2026-05-14 22:59:58 +07:00
poli0981 00d19202f4 Merge pull request #62 from poli0981/chore/v0.14.0-bump
chore(release): bump to v0.14.0
v0.14.0
2026-05-14 15:54:14 +07:00
poli0981andClaude Opus 4.7 2ec146712b chore(release): bump to v0.14.0
Bumps the six manifest files per the established ritual:
- package.json
- package-lock.json (root version + "" packages entry)
- src-tauri/Cargo.toml
- src-tauri/Cargo.lock (yt-desc-gen entry only)
- src-tauri/tauri.conf.json

`@tauri-apps/api` stays at 2.11.0 (Rust tauri crate is at 2.11.x;
no minor cross-bump needed this cycle).

CHANGELOG.md gains a v0.14.0 section covering the Apache-2.0
license switch, 22 new content-warning IDs (new gameplay_disclosure
group), mobile-responsive layout, and the docs sweep. Also
backfills the missing v0.13.1 hotfix section that the v0.13.1
release-day churn never landed in CHANGELOG.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 15:52:22 +07:00
poli0981 966da96d1b Merge pull request #61 from poli0981/claude/bold-dhawan-e2a9f3
feat: v0.14 mobile responsive + content warnings + Apache-2.0 docs sweep
2026-05-14 15:49:22 +07:00
poli0981andClaude Opus 4.7 c9840c88a1 docs: rewrite README + Apache-2.0 policy set + merge dev guides
Inventory:
- README.md: full rewrite (~200 lines) per docs_guide.txt - badges,
  features, Use Cases (esp. horror gameplay), Privacy section,
  doc table, AI disclosure, channel/socials block (from username.txt).
- CLAUDE.md: license MIT -> Apache-2.0, project-structure tree
  updated (PRD removed, DEVELOPMENT added).

New root policy docs (per docs_guide.txt):
- SECURITY.md: private disclosure, response timeline.
- CONTRIBUTING.md: PR process, validate:locales gate, auto-ignore
  rules (malicious code = ban, off-topic rambling rejected, etc.).
- CODE_OF_CONDUCT.md: brief + Contributor Covenant 2.1 link.
- PRIVACY.md: offline-first, localStorage keys listed, GDPR/CCPA
  via clear-storage. Tauri app-data paths use the actual identifier
  `com.skullmute.ytdescgen` from tauri.conf.json.
- DISCLAIMER.md: AI-assistance disclosure (Claude Opus 4.7 1M
  context), translation-quality table (VI native, JA/ES/KO/ZH AI).
- TERMS.md: Apache-2.0 + GitHub ToS + GDPR/CCPA/PIPL/LGPD/VN
  Cybersecurity Law compliance, generated-content responsibility.
- THIRD_PARTY_NOTICES.md: full dep table (npm + Cargo) with
  versions and licenses, plus AI-Assisted Development Disclosure.
- MAINTAINERS.md: @poli0981 only.
- .github/PULL_REQUEST_TEMPLATE.md: checklist + AI-disclosure box.

New docs/:
- DEVELOPMENT.md (EN): merges deleted pc_spec.md + dev_env.md.
  Covers toolchain, JetBrains 2026.x + VS Code, build commands,
  Tauri prerequisites per OS, troubleshooting.
- i18n/vi/DEVELOPMENT.md, i18n/vi/DISCLAIMER.md: Vietnamese
  mirrors with AI-translation header note.

Deleted (consolidated into DEVELOPMENT or no longer relevant):
- docs/PRD.md (V1.0 from 2026-04-07, shipped already)
- docs/pc_spec.md + dev_env.md (merged)
- docs/i18n/vi/pc_spec.md + dev_env.md (merged)

Cross-link fixes:
- src/pages/AboutPage.tsx: comment now points to DEVELOPMENT.md.
- src/config/about.ts: license string MIT -> Apache-2.0; pcSpecDocUrl
  and devEnvDocUrl preserved by name (for layout compat) but now
  point to DEVELOPMENT.md (EN) and i18n/vi/DEVELOPMENT.md (VI).
- webapp/TAURI.md: cross-links updated to DEVELOPMENT.md.

Verification:
- npm run typecheck: clean.
- npm run lint: clean.
- Grep PRD.md|pc_spec|dev_env in repo: no stale doc references.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 15:47:33 +07:00
poli0981andClaude Opus 4.7 e6e49d329a feat(mobile): responsive layout + drawer + iOS-safe touch sizing
Web build was usable on desktop only - the editor layout flipped
to two-column at `lg` (1024px), the sidebar had no mobile drawer,
inputs lacked keyboard hints, and `text-sm` triggered iOS Safari
focus zoom (Safari zooms when font-size < 16px).

Changes:
- tailwind.config.ts: add theme.extend.spacing.touch = 44px (iOS HIG
  minimum), exposed via min-h-touch utility.
- New src/components/ui/Drawer.tsx (~80 LOC): slide-in overlay,
  body-scroll lock, Esc + tap-outside close, safe-area-inset padding.
  Reuses Modal.tsx's overlay/Esc patterns; not its centered layout.
- Sidebar.tsx: extract `<SidebarNavList>` for drawer reuse. Outer
  `<aside>` gated `hidden md:flex`.
- AppShell.tsx: wire `mobileNavOpen` state + render `<Drawer>` with
  SidebarNavList inside.
- Header.tsx: add Menu hamburger (md:hidden) wired to drawer,
  `pt-[max(0.75rem,env(safe-area-inset-top))]` for iOS notch,
  donate icon-only below md, dropdown width
  `min-w-[200px] max-w-[calc(100vw-2rem)]` so it never overflows
  at 360px.
- Button/Input/Textarea/ValidatedInput: bump heights to min-h-touch
  (sm size at min-h-[36px] iOS minimum), add `text-base sm:text-sm`
  to inputs to defeat iOS Safari focus zoom.
- EditorPage.tsx: responsive padding gap-6 p-6 lg:flex-row ->
  gap-4 p-3 sm:p-4 md:gap-6 md:p-6 lg:flex-row. Sticky preview
  wrapper sticky top-6 -> lg:sticky lg:top-6 so mobile portrait
  doesn't lock the preview.
- OutputPreview.tsx: description scroll-box max-h-[400px] ->
  max-h-[60vh] sm:max-h-[400px].
- CopyAllBar.tsx: pb safe-area-inset-bottom for iOS home indicator,
  responsive button class compaction.
- GameInfoForm.tsx + ValidatedInput call sites: autoComplete /
  enterKeyHint / inputMode hints so iOS shows the right keyboard
  (URL/email for the validated URL+email fields).

Tested with `npm run typecheck` (clean), `npm run lint` (clean),
`npm run test:run` (350/350 pass), `npm run build` (1.81s, bundle
443.55 KB raw / 136.55 KB gzip - under 500 KB cap).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 15:46:52 +07:00
poli0981andClaude Opus 4.7 bd2660e73a feat(engine): add 22 content-warning IDs across 8 groups (69 -> 91)
Expands the content-warning vocabulary toward horror-channel staples
that the existing 7-group list lacked. Adds a new 8th group
`gameplay_disclosure` for transparency about non-vanilla play.

New IDs by group:
- Phobias (+3): coulrophobia, ablutophobia, taphophobia
- Photosensitive (+2): strobe_effects, screen_shake_intense
- Mental Health (+3): paranoia_themes, intrusive_thoughts, medical_horror
- Sensitive (+3): human_experimentation, cannibalism, nuclear_themes
- Horror-Specific (+5): liminal_spaces, analog_horror, unreality_themes,
  pursuit_chase, entity_horror
- Playstyle (+2): first_time_playing, returning_player
- Gameplay Disclosure (NEW +4): mods_used, cheats_enabled,
  glitch_exploits, assisted_run

Updates src/engine/types.ts CONTENT_WARNINGS array, the UI grouping
config, the locale validator schema, and all 6 locales x 2 files
(templates.json + ui.json). EN and VI authored directly; JA/ES/KO/ZH
AI-translated with disclosure documented in DISCLAIMER.md.

`npm run validate:locales` passes at 686/686 ui + 368/368 templates
across all 6 locales. Engine logic in description-builder.ts is
unchanged - the loop already renders content warnings in user
selection order regardless of count.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 15:46:17 +07:00
poli0981andClaude Opus 4.7 f7ebd1f078 chore: switch project to Apache-2.0
Adds canonical Apache License 2.0 text as LICENSE, NOTICE asserting
copyright + AI-assisted-dev disclosure, and the `license` field on
both package.json (npm) and src-tauri/Cargo.toml (Cargo).

Repository previously claimed MIT in README/CLAUDE.md without an
actual LICENSE file. Apache-2.0 was selected for the patent grant
and NOTICE pattern; see docs_guide.txt requirement.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 15:45:16 +07:00
poli0981 4e64d5a25a Merge pull request #59 from poli0981/fix/tauri-api-version-2.11
fix(deps): bump @tauri-apps/api 2.10.1 → 2.11.0 to match Rust crate
v0.13.1
2026-05-11 22:32:12 +07:00
poli0981andClaude Opus 4.7 a0d20617e2 fix(deps): bump @tauri-apps/api 2.10.1 → 2.11.0 to match Rust tauri 2.11.1
The v0.13.1 rebuild failed because tauri-action's same-minor-version check
caught:

    tauri (v2.11.1) : @tauri-apps/api (v2.10.1)

Dependabot's PR #51 bumped the Rust `tauri` crate to 2.11.1 but left the
npm `@tauri-apps/api` package at 2.10.1 (different ecosystem, separate
alert). The constraint `^2.0.0` allowed 2.10.x → 2.11.x but npm doesn't
auto-bump within range; needs explicit `npm install @tauri-apps/api@^2.11.0`.

The four plugin pairs were already aligned (plugin-dialog/fs/opener/shell
Rust crate versions match their npm counterparts exactly), so no other
bumps needed.

Side effect of `npm install`: package.json deps were alphabetized — that's
npm's default key-ordering on save.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 22:31:21 +07:00
poli0981 43c77c99d4 Merge pull request #58 from poli0981/chore/bump-tauri-manifests-0.13.1
chore(release): bump src-tauri manifests to 0.13.1 (recover from v0.13.1 release miss)
2026-05-11 22:11:43 +07:00
poli0981andClaude Opus 4.7 14bb517a9a chore(release): bump src-tauri manifests to 0.13.1 (missed in v0.13.1 hotfix)
When PR #50 shipped the v0.13.1 hotfix, only `package.json` got bumped from
0.13.0 → 0.13.1; the Tauri-side manifests stayed on 0.13.0. As a result the
release-desktop run on the v0.13.1 tag built binaries as 0.13.0 and the
tauri-action uploaded them to the existing v0.13.0 release object, leaving
the v0.13.1 tag without a release on GitHub.

This commit closes the gap by bumping all three Tauri-side files:
- src-tauri/Cargo.toml
- src-tauri/tauri.conf.json
- src-tauri/Cargo.lock (yt-desc-gen entry)

Recovery follow-up after merge:
1. Force-move the v0.13.1 tag from d1cc099 to this merge commit
2. Re-run release-desktop on v0.13.1 (will pick up correct version)
3. Re-run release-desktop with workflow_dispatch input `tag: v0.13.0` to
   restore the original v0.13.0 release binaries (which were clobbered)

The repo's version-bump checklist already documents this (5-file ritual:
package.json, package-lock.json, src-tauri/Cargo.toml, src-tauri/Cargo.lock
yt-desc-gen entry, src-tauri/tauri.conf.json) — see project memory note on
the v0.9.0 lockfile-bump miss.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 22:11:00 +07:00
poli0981 0b9dfcb0e6 Merge pull request #57 from poli0981/deps/cargo-rand-0.8.6
chore(deps): bump rand 0.8.5 → 0.8.6 in src-tauri/Cargo.lock
2026-05-11 22:04:18 +07:00
poli0981andClaude Opus 4.7 404efa9a92 chore(deps): bump rand 0.8.5 → 0.8.6 in src-tauri/Cargo.lock
Clears the upgradeable half of the rand Dependabot alert (GHSA-c275-2vrh-rmmc,
unsoundness with custom loggers using rand::rng()). Transitive update only —
no Cargo.toml change.

The other `rand 0.7.3` copy in the lockfile (deeply nested as
phf_codegen → selectors → kuchikiki → tauri-utils build-dependency) cannot
be bumped without a major upstream change in tauri-utils, and is build-only
(used by phf_codegen for hash-table seed generation — no runtime exposure).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 22:03:35 +07:00
poli0981 63212ef4b6 Merge pull request #56 from poli0981/deps/vite-7-security-fix
chore(deps): bump vite 5 → 7 + vitest 2 → 3 to clear security alerts
2026-05-11 21:58:12 +07:00
poli0981andClaude Opus 4.7 abb0a624d5 chore(deps): bump vite 5 → 7 and vitest 2 → 3 to clear security alerts
Resolves Dependabot alerts:
- vite (GHSA-4w7w-66w2-5vf9, path traversal in optimized deps .map handling,
  patched in 6.4.2 — jumping to vite 7 covers it cleanly)
- esbuild (GHSA-67mh-4wv8-2f99, dev server CORS allows arbitrary origins,
  pulled transitively via vite 7 / vitest 3)

Dependabot's own PR #54 tried to bump vite to 8 but broke `npm ci` because
@vitejs/plugin-react@4.7.0 caps at vite 7 in its peer-dep range. This bumps
to the latest vite/vitest pair that plugin-react still supports.

Both deps are dev-scope only — no runtime impact on shipped artifacts.
- npm run typecheck — clean
- npm run lint — clean
- npm run test:run — 350/350 pass on vitest 3.2.4
- npm run validate:locales — 663 ui + 346 templates × 6 locales
- npm run build — clean, main bundle 426 KB raw / 133 KB gzip
  (vite 7 default chunking runs a bit looser than vite 5's; still well under
  the 500 KB CLAUDE.md budget)

No version bump — dev deps don't appear in the shipped artifact.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 21:57:11 +07:00
poli0981 6fb476f7a5 Merge pull request #52 from poli0981/dependabot/npm_and_yarn/postcss-8.5.14
chore(deps-dev): bump postcss from 8.5.8 to 8.5.14
2026-05-11 21:50:30 +07:00