Compare commits

...
52 Commits
Author SHA1 Message Date
poli0981 9f156d1f2c Merge pull request #107 from poli0981/claude/clever-goldberg-557979
fix(ui): mobile viewport overflow on Batch/Profile + sweep (v0.29.1)
2026-06-17 11:06:44 +07:00
poli0981andClaude Opus 4.8 79be06b804 fix(ui): mobile viewport overflow on Batch/Profile + sweep (v0.29.1)
Side-by-side rows that never collapsed on narrow mobile (~360-400px) made
the Batch and Profile screens overrun the viewport horizontally on Android
and web mobile. Make those rows responsive (flex-col -> sm:flex-row) and
sweep a few adjacent overflow spots. Layout-only; desktop is unchanged
(every change gated behind the sm: breakpoint).

- Batch: part-range row stacks below sm (full-width Generate); copy-button
  rows wrap.
- Profile: tab pill + Export/Import stack onto separate rows; Profile/
  Preset/Template cards stack action buttons below content and let long
  names wrap (min-w-0).
- Sweep: Settings responsive padding + wrapping header (Import/Export shows
  on Android), VideoSettingsForm grid 1-col below sm, Modal pinned to
  calc(100% - 2rem).

Bumps five manifests 0.29.0 -> 0.29.1 (package-lock.json resynced from a
0.28.0 drift). typecheck/lint/locales/513 tests/build all green; verified
live at 375px and 1280px with zero horizontal overflow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 11:04:42 +07:00
poli0981 b4e32eac63 Merge pull request #106 from poli0981/claude/android-docs
docs(android): requirements + tested versions (11–16, real device Android 12)
2026-06-15 19:29:31 +07:00
poli0981andClaude Opus 4.8 f8ada5944a docs(android): document requirements + tested versions
Add an explicit "Requirements & tested versions" section for the Android build:
- Minimum Android 11 (minSdk 30), target Android 16 (targetSdk 36), universal ABIs.
- Tested Android 11 -> 16 on emulators, plus a real device on Android 12.
- Rationale for the Android 11 floor: device coverage, a modern auto-updating
  WebView (why the Android 12 real device worked but a stale WebView-91 emulator
  black-screened), and component-level security upkeep (Play system updates /
  Play services / WebView) since OS bulletins for 11-13 have ended.

Touches docs/PACKAGING.md, docs/FEATURES.md, README.md only — no code change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 19:28:11 +07:00
poli0981 ca0b795a0d Merge pull request #104 from poli0981/claude/youthful-albattani-95ef02
feat(android): Android (.apk) build + WebView fixes + Android 11+ (v0.29.0)
2026-06-15 18:58:40 +07:00
poli0981andClaude Opus 4.8 89c0e76c2c feat(android): Android (.apk) build + packaging, WebView fixes, Android 11+ (v0.29.0)
Build and package the app for Android from the same Tauri 2 codebase, shipping
an installable, sideloadable signed APK alongside the desktop binaries.

Build / packaging
- cfg-gate desktop-only tray / single-instance / hide-to-tray / exit-prevention
  in lib.rs behind #[cfg(desktop)]; move tauri-plugin-single-instance to a
  desktop-only target table so the library compiles for Android.
- `cargo tauri android init` -> committed gen/android Gradle project; release
  signingConfigs read keystore.properties (gitignored, from CI secrets locally).
- .github/workflows/release-android.yml: JDK 17 + Android SDK/NDK + rust targets,
  decode keystore from secrets, build --apk, upload to the same draft release.
- vite.config.ts: es2020 build.target for Tauri builds (older-WebView safety).

Runtime fixes (found via on-device testing)
- External links: a real tap on `<a target="_blank">` makes the Android WebView
  fire onCreateWindow, which Tauri tries to satisfy via the shell plugin's open
  (no such binary on Android -> uncaught error, nothing opens). Strip
  target="_blank" from external anchors and route clicks through the opener
  plugin in the capture phase. (open-external.ts, main.tsx)
- Boot black screen on old WebViews: crypto.randomUUID() (Chrome/WebView 92+)
  ran at module load and threw on WebView 91. Fall back to a manual RFC 4122 v4
  built on getRandomValues. (uuid.ts; +4 regression tests, 509 -> 513)
- File export on Android routes through the in-WebView blob download. (IS_MOBILE)

Compatibility
- minSdk 30 (Android 11+), targetSdk 36 (Android 16): covers the large majority
  of active devices with a modern, patched WebView + Google Play system updates.

Release: bump manifests 0.28.0 -> 0.29.0; docs (README, FEATURES, PACKAGING,
CHANGELOG). Verified on an Android 13 emulator (render, links, export).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 18:56:37 +07:00
poli0981 61281c5815 Merge pull request #102 from poli0981/claude/v0.28.0
feat(legal): first-run consent gate + Windows installer license — v0.28.0
2026-06-13 21:28:18 +07:00
poli0981andClaude Opus 4.8 7caf4180e9 chore(release): bump manifests to 0.28.0
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 21:26:37 +07:00
poli0981andClaude Opus 4.8 521ca559d5 docs(legal): document consent gate in CHANGELOG, FEATURES, PACKAGING, PRIVACY
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 21:26:36 +07:00
poli0981andClaude Opus 4.8 2f84586cf1 feat(legal): add first-run consent gate + Windows installer license
Render a full-screen, non-dismissible consent gate in place of the router
until the user reviews the legal docs (Terms/Privacy/Disclaimer/License,
linked to the GitHub copies) and ticks one 'I agree' box. Acceptance is
recorded in the settings store (legalConsentVersion + timestamp) — no
cookie, no new storage key — and re-prompts only when CURRENT_TERMS_VERSION
is raised, so it is one-time in normal use and re-appears in fresh/incognito
storage.

Also: surface all four docs in About -> Legal (only License was linked
before); add a Windows MSI/NSIS installer license page via bundle.licenseFile;
add an accessible Checkbox primitive; and apply the persisted theme on boot
in main.tsx (fixes a pre-existing dark flash for light-theme users, and makes
the gate render in the right theme before the app shell mounts).

Consent state is additive (no persist version bump); healSettings coerces a
malformed value to 0 so a corrupt file re-shows the gate. 60 new locale
strings (10 keys x 6 languages); validator now 937 ui keys. +9 tests (500 ->
509).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 21:26:00 +07:00
poli0981 6f95d292e6 Merge pull request #100 from poli0981/claude/hopeful-mirzakhani-8581d4
chore(deps): upgrade vite 7→8 to patch esbuild advisories (v0.27.1)
2026-06-13 19:46:49 +07:00
poli0981andClaude Opus 4.8 9554dcc7af chore(deps): upgrade vite 7->8 to patch esbuild advisories (v0.27.1)
Resolves the 4 high-severity esbuild advisories (GHSA-gv7w-rqvm-qjhr,
GHSA-g7r4-m6w7-qqqr) deferred from v0.27.0. esbuild 0.17.0-0.28.0 is
vulnerable; the fix (0.28.1) is only reachable via vite 8 -- vite 7.3.3
pins esbuild ^0.27.0 and cannot reach it. Dev-server-only; the shipped
static bundle was never affected. npm audit: 4 high -> 0.

- vite ^7.3.3 -> ^8.0.16, @vitejs/plugin-react ^4.3.0 -> ^5.2.0,
  tsx ^4.16.0 -> ^4.22.4 (vitest 4.1.8 already supports vite 8)
- vite 8 bundles with Rolldown: manualChunks object form -> function
  form (vite.config.ts) is the only source change required
- Full gate chain green (typecheck, lint, knip, validate:locales,
  500/500 tests, build); dev/preview + Tauri-context build verified
- Bump 5 manifests 0.27.0 -> 0.27.1; CHANGELOG + stack-version docs

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 19:43:39 +07:00
poli0981 3c667fa8d3 Merge pull request #98 from poli0981/claude/adoring-wilbur-9b3de5
feat(errors): error pages (404/403/419/500) + offline detection — v0.27.0
2026-06-13 19:06:50 +07:00
poli0981andClaude Opus 4.8 03d430d49a chore(release): bump manifests to 0.27.0
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 19:04:41 +07:00
poli0981andClaude Opus 4.8 114c8d1ec6 docs(errors): document error pages in CHANGELOG, FEATURES, ARCHITECTURE
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 19:04:33 +07:00
poli0981andClaude Opus 4.8 12b17dbed0 feat(errors): add internationalized error pages + offline detection
Add a reusable, router-agnostic ErrorPage (404/403/419/500/offline/runtime)
driven by a pure config/error-pages.ts kind->meta map. Wire standalone
error routes (/403, /419, /500, /offline) plus a catch-all '*' -> 404 as
siblings of the AppShell group, so they render full-screen with no shell —
closing the long-standing gap where unknown hash routes rendered blank.

Add a navigator.onLine hook + non-blocking, dismissible OfflineBanner (the
app works fully offline, so it never blocks input). Redesign the
ErrorBoundary fallback to reuse ErrorPage's 'contained' runtime variant, so
render crashes share the same localized visual language.

120 new locale strings (20 keys x 6 languages) + _schema.json; validator
now expects 927 ui keys per locale. +6 pure config tests (494 -> 500).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 19:04:02 +07:00
poli0981 10ac1764b4 Merge pull request #94 from poli0981/claude/fervent-feynman-42a586
ci(dependabot): ignore unfixable transitive cargo advisories (rand, glib)
2026-06-12 13:35:28 +07:00
poli0981 107efcb0fa Merge pull request #96 from poli0981/claude/clever-wing-ce2a1f
ci(node): bump workflows from EOL Node 20 to Node 22 LTS
2026-06-12 08:52:10 +07:00
poli0981andClaude Fable 5 12c2fcd01c ci(node): bump workflows from EOL Node 20 to Node 22 LTS
Node 20 reached end-of-life in April 2026 and GitHub is removing it
from runner images (actions/runner-images#14029), so setup-node now
downloads it on every run. Node 22 satisfies Vite 7's engine range
(^20.19 || >=22.12) and matches the docs/TECH-SPEC.md snippets.
Also sync the two doc mentions of CI's Node version.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:49:20 +07:00
poli0981 9faa192ec4 Merge pull request #95 from poli0981/claude/admiring-snyder-a5292f
ci(actions): bump workflow actions to Node 24 majors before June 16 forced migration
2026-06-12 08:43:34 +07:00
poli0981andClaude Fable 5 211d2d8364 ci(test): drop temporary vs2026 build check, record verification
Build-only run 27388695090 on windows-2025-vs2026 produced both MSI
and NSIS bundles cleanly, so windows-latest stays unpinned.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:42:25 +07:00
poli0981andClaude Fable 5 2f50658d89 docs(tech-spec): sync workflow snippets with Node 24 action majors
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:35:17 +07:00
poli0981andClaude Fable 5 bbeae33506 ci(test): temporary build-only check on windows-2025-vs2026
windows-latest redirects to this image from June 15, 2026. Build-only
(no tagName), so no release is touched. Reverted before merge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:33:33 +07:00
poli0981andClaude Fable 5 0d4f1c7800 ci(actions): bump checkout/setup-node/pages actions to Node 24 majors
GitHub forces the Node 24 runtime for actions on June 16, 2026 and
removes Node 20 from runners September 16, 2026. checkout v4,
setup-node v4, configure-pages v5, upload-pages-artifact v3 and
deploy-pages v4 all declare node20; their current majors (v6/v6/v6/
v5/v5) declare node24. tauri-action@v0 already runs node24 and
dtolnay/rust-toolchain is composite, so both stay.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:33:33 +07:00
poli0981andClaude Fable 5 7ae5da629a ci(dependabot): ignore unfixable transitive cargo advisories (rand, glib)
Dependabot cargo security-update jobs for rand and glib fail with
security_update_not_possible every time Cargo.lock changes on main
(runs 27387346373, 27387346324). Both are transitive deps of tauri:
rand 0.7.3 is pinned to ^0.7 by phf_generator 0.8 (via kuchikiki),
fix is 0.8.6; glib 0.18.5 is pinned by the gtk-rs 0.18 stack, fix is
0.20.0. Cargo cannot resolve the patched versions until tauri bumps
those subtrees, so ignore both to stop the recurring red runs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:31:52 +07:00
poli0981 c02464cafb Merge pull request #92 from poli0981/claude/v0.26.0
feat(v0.26.0): lazy-load locale bundles per language
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
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
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
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
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
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
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
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
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
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
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
172 changed files with 24232 additions and 1584 deletions

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
# Dependabot configuration.
#
# This file exists only to configure SECURITY updates for cargo in /src-tauri.
# Version updates stay disabled (open-pull-requests-limit: 0); npm and
# GitHub Actions keep GitHub's default security-update behavior.
#
# Why the ignores: `rand` and `glib` are transitive dependencies of tauri,
# and their security fixes require semver-major bumps that the dependency
# tree does not allow, so every Dependabot security-update job for them
# fails with `security_update_not_possible` (runs 27387346373, 27387346324):
#
# rand 0.7.3 (fix: 0.8.6) pinned by
# tauri -> tauri-utils -> kuchikiki -> selectors -> phf_codegen 0.8
# -> phf_generator 0.8 (requires rand ^0.7)
# glib 0.18.5 (fix: 0.20.0) pinned by
# tauri's gtk-rs 0.18 Linux stack (gtk/gdk/gio 0.18 require glib 0.18)
#
# Remove these ignores once tauri updates kuchikiki / the gtk-rs bindings
# (re-check with: cargo update -p rand@0.7.3 --precise 0.8.6 --dry-run).
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/src-tauri"
schedule:
interval: "weekly"
# No version-update PRs; this entry only feeds ignore rules to security updates.
open-pull-requests-limit: 0
ignore:
- dependency-name: "rand"
- dependency-name: "glib"
+3 -3
View File
@@ -10,10 +10,10 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
node-version: 22
cache: npm
- run: npm ci
- run: npm run typecheck
+6 -6
View File
@@ -16,16 +16,16 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
node-version: 22
cache: npm
- run: npm ci
- run: npm run build
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
- uses: actions/configure-pages@v6
- uses: actions/upload-pages-artifact@v5
with:
path: dist
- id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v5
+89
View File
@@ -0,0 +1,89 @@
name: Release Android
on:
push:
tags: ["v*"]
workflow_dispatch:
inputs:
tag:
description: "Tag to build (e.g. v0.29.0). The manifests must already carry this version."
required: true
type: string
permissions:
contents: write
jobs:
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.tag || github.ref }}
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"
- uses: android-actions/setup-android@v3
- name: Install Android NDK (r27 LTS)
run: sdkmanager "ndk;27.3.13750724"
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
src-tauri/target
key: ${{ runner.os }}-android-cargo-${{ hashFiles('src-tauri/Cargo.lock') }}
- run: npm ci
- name: Install Tauri CLI
run: cargo install tauri-cli --version "^2" --locked
- name: Decode keystore
env:
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
run: echo "$ANDROID_KEYSTORE_BASE64" | base64 -d > "$RUNNER_TEMP/release.jks"
- name: Write keystore.properties
env:
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
ANDROID_STORE_PASSWORD: ${{ secrets.ANDROID_STORE_PASSWORD }}
run: |
{
echo "storeFile=$RUNNER_TEMP/release.jks"
echo "storePassword=$ANDROID_STORE_PASSWORD"
echo "keyAlias=$ANDROID_KEY_ALIAS"
echo "keyPassword=$ANDROID_KEY_PASSWORD"
} > src-tauri/gen/android/keystore.properties
- name: Build signed APK
env:
# Pin NDK_HOME to the exact version we installed above — the runner may
# ship a different default NDK that ANDROID_NDK_ROOT would point at.
NDK_HOME: ${{ env.ANDROID_HOME }}/ndk/27.3.13750724
run: cargo tauri android build --apk
- name: Upload APK to draft release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
draft: true
files: src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+15 -3
View File
@@ -23,6 +23,10 @@ jobs:
fail-fast: false
matrix:
include:
# windows-latest serves the windows-2025-vs2026 image (VS 2026
# toolchain) from June 15, 2026. Tauri build (MSI + NSIS)
# verified on that exact image 2026-06-12, actions run
# 27388695090 — no runner pin needed.
- os: windows-latest
target: x86_64-pc-windows-msvc
# Default Windows bundles: MSI + NSIS (.exe). Both ship.
@@ -48,14 +52,14 @@ jobs:
bundleArgs: ""
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
# On `workflow_dispatch` checkout the requested tag; on a
# tag push we already get the tag commit by default.
ref: ${{ github.event.inputs.tag || github.ref }}
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version: 20
node-version: 22
cache: npm
- uses: dtolnay/rust-toolchain@stable
with:
@@ -74,6 +78,14 @@ jobs:
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# AppImage bundling on hosted runners flakes: linuxdeploy (itself
# an AppImage) needs FUSE to mount, which GitHub runners don't
# reliably provide → "failed to run linuxdeploy". Extract-and-run
# avoids FUSE; NO_STRIP skips a strip pass that also intermittently
# fails. (No-op on Windows / macOS.) Transient CDN 504s while
# *fetching* linuxdeploy are handled by re-running the job.
APPIMAGE_EXTRACT_AND_RUN: 1
NO_STRIP: true
with:
tagName: ${{ github.event.inputs.tag || 'v__VERSION__' }}
releaseName: "YTDescGen ${{ github.event.inputs.tag || 'v__VERSION__' }}"
+11
View File
@@ -11,3 +11,14 @@ coverage/
.claude/
src-tauri/target/
app-icon.png
# Android (Tauri gen) — the generated Gradle project source IS committed, but
# never the signing secrets, machine-local files, or build artifacts.
*.jks
*.keystore
src-tauri/gen/android/keystore.properties
src-tauri/gen/android/local.properties
src-tauri/gen/android/.gradle/
src-tauri/gen/android/.idea/
src-tauri/gen/android/build/
src-tauri/gen/android/app/build/
+469
View File
@@ -2,6 +2,475 @@
All notable changes to YTDescGen ship as tagged releases on `main`.
## v0.29.1 — 2026-06-17
A UI/UX hotfix for **mobile viewport overflow**. On Android and narrow web
mobile (~360–400px) the **Batch** and **Profile** screens overran the viewport
horizontally — rows laid out side-by-side on desktop never collapsed to a stack
on small screens. This release makes those rows responsive and sweeps a few
adjacent overflow spots. Layout-only: no logic, store, or i18n changes, and
desktop layout is byte-for-byte unchanged (every change is gated behind the
`sm` breakpoint).
### Fixed
- **Batch page fits mobile** ([src/pages/BatchPage.tsx](src/pages/BatchPage.tsx)) — the part-range row (Start / End / Generate) stacks vertically below `sm` with a full-width Generate button, and the result-card copy-button rows wrap instead of overflowing.
- **Profile page fits mobile** ([src/pages/ProfilesPage.tsx](src/pages/ProfilesPage.tsx)) — the tab pill and the Export/Import buttons drop onto separate rows below `sm`; the Profile / Preset / Template cards ([ProfileCard](src/components/profiles/ProfileCard.tsx), [PresetCard](src/components/presets/PresetCard.tsx), [TemplateCard](src/components/templates/TemplateCard.tsx)) move their action buttons below the content and let long names wrap (`min-w-0`) instead of shoving the buttons off-screen.
- **Adjacent mobile overflow swept** — responsive padding + a wrapping header on [Settings](src/pages/SettingsPage.tsx) (its Import/Export row shows on Android, where `IS_TAURI` is true), the video-settings selector grid collapses to one column below `sm` ([VideoSettingsForm](src/components/editor/VideoSettingsForm.tsx)), and modals are pinned to `calc(100% - 2rem)` so they never exceed the viewport ([Modal](src/components/ui/Modal.tsx)).
### Under the hood
- Layout-only className changes across 8 components. typecheck, lint, locale validation (937/542), all **513 tests**, and the production build pass; verified live at 375 px and 1280 px with zero horizontal overflow on Batch, Profiles, Settings, and Editor.
- Five manifests bumped 0.29.0 → 0.29.1 (`package-lock.json`, which had drifted at 0.28.0, is resynced to 0.29.1).
## v0.29.0 — 2026-06-15
Adds an **Android build** — an installable, sideloadable signed `.apk` built
from the same Tauri 2 codebase as the desktop apps. No app rewrite: Tauri 2
ships Android support, the crate was already `cdylib`/`staticlib` with a
`#[cfg_attr(mobile, …)]` entry point, and the Android launcher icons were
already in the repo. The work was making the Rust shell compile for mobile,
routing file export through the WebView on Android, and wiring a signed-APK CI
job that publishes the APK alongside the desktop binaries.
### Added
- **Android APK target** — `cargo tauri android init` + `cargo tauri android build --apk` produce a signed, sideloadable APK. The generated Gradle project lives at [src-tauri/gen/android](src-tauri/gen/android) (committed so signing/manifest edits persist); secrets (`keystore.properties`, `*.jks`) and build artifacts are gitignored.
- **Requires Android 11+ (minSdk 30)** ([src-tauri/tauri.conf.json](src-tauri/tauri.conf.json) `bundle.android.minSdkVersion`, [build.gradle.kts](src-tauri/gen/android/app/build.gradle.kts)) — raised from Tauri's default 24 (Android 7) to API 30. Android 11+ covers the large majority of active devices and keeps a modern, auto-updating System WebView plus Google Play system/Play-services security updates — even though Google's OS-level security bulletins for Android 11–13 have now ended (12 in 2025, 13 in early 2026). `targetSdk` stays at 36 (Android 16).
- **APK signing config** ([src-tauri/gen/android/app/build.gradle.kts](src-tauri/gen/android/app/build.gradle.kts)) — a `release` `signingConfigs` block reads `keystore.properties`, guarded by `if (exists())` so keystore-less debug / contributor builds still work (they produce an unsigned release build instead of failing).
- **Android release CI** ([.github/workflows/release-android.yml](.github/workflows/release-android.yml)) — on a `v*` tag (or `workflow_dispatch`), an `ubuntu-latest` job sets up JDK 17 + Android SDK/NDK + the four Rust android targets, decodes the keystore from repo secrets, builds the signed APK, and uploads it to the same draft release as the desktop binaries. Needs four secrets: `ANDROID_KEYSTORE_BASE64`, `ANDROID_STORE_PASSWORD`, `ANDROID_KEY_PASSWORD`, `ANDROID_KEY_ALIAS`.
### Changed
- **Rust shell is now mobile-aware** ([src-tauri/src/lib.rs](src-tauri/src/lib.rs)) — the tray icon, single-instance plugin, hide-to-tray and exit-prevention logic are gated behind `#[cfg(desktop)]`; the four cross-platform plugins (dialog / fs / opener / shell) and all six file commands register on every platform. Desktop behaviour is byte-for-byte unchanged (`cargo check` clean).
- **`tauri-plugin-single-instance` is desktop-only** ([src-tauri/Cargo.toml](src-tauri/Cargo.toml)) — moved under `[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]` so it is never compiled into the Android library.
- **File export is mobile-aware** ([src/utils/platform.ts](src/utils/platform.ts), [src/utils/file-ops.ts](src/utils/file-ops.ts)) — a new `IS_MOBILE` flag routes `saveFile()` (log export) through the in-WebView blob download on Android (lands in Downloads), since the native save dialog + `std::fs` path write is unreliable under Android scoped storage. Settings / profile / preset JSON export + import already use blob download / `<input type=file>`, which work as-is in the Android WebView.
### Fixed
These two surfaced during on-device testing of the Android build:
- **External links now open on Android** ([src/utils/open-external.ts](src/utils/open-external.ts), [src/main.tsx](src/main.tsx)) — legal-doc / donate / repo / social links did nothing on a real device. On-device debugging showed why: a real tap on `<a target="_blank">` makes the Android WebView fire its native `onCreateWindow`, which Tauri tries to satisfy via the shell plugin's `open` — there is no such binary on Android, so it throws an uncaught *"Scoped shell IO error"* and nothing opens (JS `preventDefault` does **not** stop that native path). Fix (Tauri-only; the web build keeps native `target="_blank"`): strip `target="_blank"` from external anchors (a `MutationObserver` covers React re-renders) so `onCreateWindow` never fires, and intercept the click in the **capture** phase, routing the URL through the `opener` plugin (`openUrl` → system browser). `opener:default` already grants `allow-open-url`, so no capability change was needed. Verified end-to-end on an Android 13 emulator (tap → Chrome opens, no shell error).
- **No more black screen on older Android WebViews** ([src/utils/uuid.ts](src/utils/uuid.ts)) — `generateId()` called `crypto.randomUUID()`, which only exists in Chromium/WebView **92+**. It runs at module load (the log store's `CURRENT_SESSION_ID`), so on a stale WebView (e.g. the Chromium 91 some emulator images ship) it threw during boot and black-screened the whole app. It now falls back to a manual RFC 4122 v4 built on `crypto.getRandomValues`. As defence-in-depth, Tauri builds also set `build.target: "es2020"` ([vite.config.ts](vite.config.ts)) so the bundle's *syntax* stays within reach of older WebViews (the web build keeps Vite's modern default).
### Under the hood
- **+4 tests (509 → 513)** — [tests/utils/uuid.test.ts](tests/utils/uuid.test.ts) locks down the `generateId()` v4 shape and both fallback paths (no `randomUUID`, no `crypto` at all) so the WebView-91 black screen can't regress. The rest is build/infra plus small guards. Storage (`appDataDir()` via the six file commands) and localStorage persistence both work unchanged on Android (the app's private data dir is writable with `std::fs`).
- Five manifests bumped 0.28.0 → 0.29.0.
## v0.28.0 — 2026-06-13
Adds a first-run **legal consent gate**. Before the app is usable, the user
reviews the Terms of Use, Privacy Policy, Disclaimer, and License (all already
published at the repo root) and ticks a single "I agree" box. Acceptance is
recorded and only re-prompts when the terms version changes — so it is a
one-time step in normal use, and naturally re-appears in a fresh / incognito
browser. On Windows desktop, the installer additionally shows a license page.
### Added
- **Legal consent gate** ([src/components/ConsentGate.tsx](src/components/ConsentGate.tsx), [src/config/legal.ts](src/config/legal.ts)) — a full-screen, non-dismissible screen rendered in place of the router until consent is recorded. Lists the four legal docs as links (open in the browser) + one combined agree checkbox; Continue is disabled until checked. Version-based re-prompt via `CURRENT_TERMS_VERSION` + `needsConsent()`; acceptance persists in the existing settings record (`legalConsentVersion` + timestamp) — **no cookie, no new storage key**.
- **About → Legal section** ([src/pages/AboutPage.tsx](src/pages/AboutPage.tsx)) — the License/Terms/Privacy/Disclaimer docs are now linked in-app (previously only the License was), reusing the shared `LEGAL_DOCS` list.
- **Windows installer license page** ([src-tauri/tauri.conf.json](src-tauri/tauri.conf.json), [src-tauri/installer-license.txt](src-tauri/installer-license.txt)) — `bundle.licenseFile` shows an "accept the terms" page in the MSI/NSIS installers. (macOS `.app`/Linux packages have no interactive license step — they rely on the in-app gate.)
- **Accessible `Checkbox` primitive** ([src/components/ui/Checkbox.tsx](src/components/ui/Checkbox.tsx)) — a real `<input type="checkbox">` styled with theme tokens, distinct from the existing on/off `Toggle`.
- **60 new locale strings** (10 keys × 6 languages: `consentGate.*` + `about.legalHeading`) + [`_schema.json`](src/i18n/locales/_schema.json); validator now expects 937 ui keys per locale (927 → 937).
### Fixed
- **Persisted theme is now applied on boot** ([src/main.tsx](src/main.tsx)) — `index.html` hardcodes `class="dark"`, and previously only the Header toggle wrote the theme class, so a light-theme user saw a brief dark flash on every cold start (and the new gate, which renders before the app shell, would have shown in the wrong theme). The persisted theme is now applied synchronously before first paint.
### Under the hood
- **+9 tests (500 → 509)** — [tests/config/legal.test.ts](tests/config/legal.test.ts) (the `needsConsent` version logic + `LEGAL_DOCS` shape; a `NaN`/Infinity version re-shows the gate) and two `legalConsentVersion` back-fill / coercion cases in [tests/store/settings-heal.test.ts](tests/store/settings-heal.test.ts).
- Consent state is **additive** — `legalConsentVersion` / `legalConsentAt` join `SettingsData`, `initialSettings`, `extractData`, and `healSettings` (which coerces a malformed value to `0` so a corrupt file re-shows the gate, never skips it). **No persist version bump** (stays at 10).
- The gate is a boot-time blocker but stays inside the root `ErrorBoundary`, behind a single boolean — a render error degrades to the designed error page, not a black screen.
- Web bundle: the gate + Checkbox + legal config + English strings add ~4 kB min to the main chunk (local Rollup measure); the shipped size comes from CI's vite 8 / Rolldown build.
- Five manifests bumped 0.27.1 → 0.28.0.
## v0.27.1 — 2026-06-13
Security/dependency release. Resolves the 4 high-severity `esbuild` advisories
deferred from v0.27.0 by upgrading `vite` 7 → 8. The advisories
([GHSA-gv7w-rqvm-qjhr](https://github.com/advisories/GHSA-gv7w-rqvm-qjhr),
[GHSA-g7r4-m6w7-qqqr](https://github.com/advisories/GHSA-g7r4-m6w7-qqqr)) affect
`esbuild` `0.17.0 – 0.28.0`; the fix lives in `esbuild` 0.28.1, which only
`vite` 8 pulls (`vite` 7.3.3 pins `esbuild ^0.27.0` and cannot reach it). They
only ever affected the local dev server, never the shipped static bundle. No
feature or behaviour changes — `npm audit` now reports **0 vulnerabilities**.
### Security / dependencies
- **`vite` `^7.3.3` → `^8.0.16`** — the only release line whose `esbuild`
constraint reaches the patched 0.28.1.
- **`@vitejs/plugin-react` `^4.3.0` → `^5.2.0`** — the vite-8-compatible major.
Stays on the 5.x line (peer `vite: ^4 || ^5 || ^6 || ^7 || ^8`); 6.x is the
Rolldown/react-compiler variant and would pull extra peers, so it was avoided.
- **`tsx` `^4.16.0` → `^4.22.4`** — 4.22+ is the first `tsx` on patched
`esbuild ~0.28.0` (resolves to 0.28.1). Used only by `validate:locales` /
`generate:locale`.
- `vitest` 4.1.8 already supports `vite` 8 (peer `^6 || ^7 || ^8`) — unchanged.
- The tree now hoists a single `esbuild@0.28.1`; `npm audit` → 0 high.
### Changed
- **`manualChunks` object form → function form** ([vite.config.ts](vite.config.ts))
— **vite 8 bundles with Rolldown** (replacing Rollup), which only accepts the
function form of `manualChunks` (the object form was a Rollup-only API). The
same three vendor chunks (`react`, `router`, `i18n`) are reproduced via
anchored `[\\/]node_modules[\\/]…` regexes so `react-router*` and
`react-i18next` don't get swept into the `react` chunk. This is the only
source change the upgrade required.
### Under the hood
- Full gate chain green on vite 8: `typecheck`, `lint`, `knip`,
`validate:locales` (927/542), `test:run` (**500/500**), `build`. `npm run dev`
(port 5173, matching the Tauri `devUrl`) and `npm run preview` (4173) both
serve. The Tauri-context frontend build (`TAURI_ENV_PLATFORM` set) still
switches `base` to `/` correctly; `tauri.conf.json` `devUrl`/`frontendDist`
are unchanged and compatible.
- Web bundle (Rolldown): entry chunk 165.3 kB / 46.3 kB gzip, `react` 133.4 kB,
`i18n` 57.9 kB, `router` 23.4 kB — all well under the 500 kB budget. Chunk
sizes are not directly comparable to the v0.27.0 Rollup numbers (different
bundler, different chunking heuristics).
- Five manifests bumped 0.27.0 → 0.27.1.
## v0.27.0 — 2026-06-13
Adds a designed, internationalized **error-page system**. A mistyped hash
route used to render a blank screen; now any unknown route shows a full-screen
404, and a non-blocking banner signals lost connectivity (the app is fully
offline-capable, so it never blocks input). The render-crash boundary adopts
the same visual language, and `403 / 419 / 500` pages are route-reachable and
ready for future triggers (a Tauri command failure, a future sync backend).
### Added
- **Error-page system** ([src/components/errors/ErrorPage.tsx](src/components/errors/ErrorPage.tsx), [src/config/error-pages.ts](src/config/error-pages.ts)) — one reusable, router-agnostic component covering six kinds (`notFound`, `forbidden`, `expired`, `serverError`, `offline`, `runtime`) driven by a pure kind→meta config (HTTP code, lucide icon, severity colour, i18n key prefix). Renders a `fullscreen` variant for standalone routes and a `contained` variant for the crash boundary.
- **Standalone error routes + live 404** ([src/App.tsx](src/App.tsx)) — `/#/403`, `/#/419`, `/#/500`, `/#/offline`, plus a catch-all `*` → 404, all rendered **outside** the `AppShell` group so they fill the screen with no Sidebar/Header. The catch-all closes a long-standing gap where unknown hash routes rendered nothing.
- **Offline detection** ([src/hooks/use-online-status.ts](src/hooks/use-online-status.ts), [src/components/errors/OfflineBanner.tsx](src/components/errors/OfflineBanner.tsx)) — a `navigator.onLine` hook (SSR/Tauri-safe) drives a dismissible, non-blocking bottom banner; dismissal hides only the current offline episode, and a toast confirms when the connection returns. The app keeps working offline throughout.
- **120 new locale strings** (20 keys × 6 languages) + [`_schema.json`](src/i18n/locales/_schema.json) — per-kind titles/descriptions, shared action labels, and offline-banner copy across en/vi/ja/es/ko/zh. Validator now expects 927 ui keys per locale (907 → 927).
### Changed
- **ErrorBoundary fallback** ([src/components/ErrorBoundary.tsx](src/components/ErrorBoundary.tsx)) now renders `<ErrorPage kind="runtime" variant="contained" />` instead of a bespoke hardcoded-English card — render crashes share the error-page look and are localized. The boundary still logs the crashing subtree's `label` for bug reports; only the visible copy went generic.
### Under the hood
- **+6 tests (494 → 500)** — [tests/config/error-pages.test.ts](tests/config/error-pages.test.ts) guards the pure config: exactly six kinds, correct HTTP codes, unique key prefixes, the resolver / severity-token mappings, and that every kind's `title` + `description` exists in `en/ui.json` (so the config can't point at a missing key — complements `validate:locales`, which only proves cross-locale key parity).
- `ErrorPage` is **router-agnostic by design** — the root boundary in [src/main.tsx](src/main.tsx) mounts *outside* `<HashRouter>`, so it navigates via `#/` anchors + `history.back()` rather than `useNavigate()`, which would throw in that crash path.
- Web bundle: main chunk 264.0 → 270.8 kB minified (82.0 → 84.2 kB gzip) — the eagerly-bundled ErrorPage + config + icons (must render synchronously in the crash path) and the English error strings account for the delta; still well under Rollup's 500 kB threshold.
- Five manifests bumped 0.26.0 → 0.27.0.
### Security / dependencies
- `npm audit` reports 4 high-severity advisories in **dev-only** `esbuild` (transitive via `vite` / `tsx` / `@vitejs/plugin-react`); the only remedy is a `vite` 7 → 8 major upgrade. They affect the local dev server, not the shipped static bundle. Deferred to a dedicated dependency-upgrade release rather than bundling a breaking change into a feature release.
## v0.26.0 — 2026-06-11
Performance release: locale bundles are now lazy-loaded per language, so
visitors only download the languages they actually use. **Main chunk drops
594.0 → 264.0 kB minified (204.3 → 82.0 kB gzip)** — back under Rollup's
500 kB warning threshold (outstanding since ~v0.23) and the project's
bundle budget. No feature changes.
### Changed
- **Lazy-loaded locale bundles** ([src/i18n/index.ts](src/i18n/index.ts)) — the 10 non-English locale JSONs (5 languages × `ui`/`templates`) left the main chunk and are fetched on first use as Vite async chunks (~27–40 kB min / ~12–17 kB gzip each) via [`i18next-resources-to-backend`](https://github.com/i18next/i18next-resources-to-backend) + a statically-analysable dynamic `import()`. English stays eagerly bundled (`partialBundledLanguages`): it is the `fallbackLng` and the engine's bilingual `tEn` translator, both of which must work synchronously.
- **Generation is gated on bundle readiness** — `getFixedT` for an unloaded language silently serves English fallback strings, which would have let the Output page auto-save a *wrong-language history entry*. A new [`useLanguagesReady`](src/hooks/use-languages-ready.ts) hook holds every reactive generator (output preview, multi-language tabs, social captions, playlist, pinned-comment template, title variants) on a placeholder until the bundle is in memory, and the Batch / Social bulk handlers `await ensureLanguagesLoaded(selectedLangs)` before their multi-language loops.
- **Cold-start preload** ([src/main.tsx](src/main.tsx)) — the persisted UI + output languages are fetched before first paint (capped at 2 s), so a non-English user never sees an English flash; `react: { useSuspense: false }` keeps lazily-ready namespaces from suspending the app shell, which has no Suspense boundary.
- **Failure degrades, never hangs** — a locale chunk that cannot be fetched (offline, stale deploy HTML) is retried once by importing the chunk directly into the resource store (i18next marks a failed language permanently and both `loadLanguages` and `reloadResources` skip it forever after), then logged to the in-app Log page, and the UI falls back to English.
### Under the hood
- **+4 tests (490 → 494)** — [tests/i18n/lazy-locales.test.ts](tests/i18n/lazy-locales.test.ts) pins the contract: `en` available synchronously at import, non-English absent until `ensureLanguagesLoaded`, real strings served after, idempotent reloads.
- [src/utils/platform.ts](src/utils/platform.ts) — `IS_TAURI` now guards `typeof window`, keeping the i18n module importable in vitest's node environment.
- Adding a language no longer touches `src/i18n/index.ts` imports — drop `ui.json`/`templates.json` into `locales/<code>/` and register the code in `SUPPORTED_LANGUAGES` ([docs/I18N.md](docs/I18N.md) checklist simplified).
- Five manifests bumped 0.25.0 → 0.26.0.
## v0.25.0 — 2026-06-10
Adds 41 content warnings, including two new groups — **Dialogue / Language**
and **Internet / Digital life** — plus color phobias, suggestive-imagery
disclosures, body-image phenomena, and an educational-purpose disclosure.
Also backfills the content-inventory docs to the real warning baseline.
### Added
- **2 new content-warning groups + 41 new warnings (207 → 248 across 12 groups)** ([src/engine/types.ts](src/engine/types.ts), [src/config/content-warning-groups.ts](src/config/content-warning-groups.ts)):
- **Dialogue / Language (10)** — what characters *say*, ESRB-descriptor style: `profanity_frequent`, `sexual_innuendo`, `inflammatory_speech`, `verbal_abuse`, `threatening_language`, `slurs_derogatory`, `crude_humor`, `mature_humor`, `dark_humor`, `drug_references`.
- **Internet / Digital life (18)** — 21st-century online phenomena: `cyberbullying`, `doxxing`, `trolling_griefing`, `cancel_culture`, `social_media_addiction`, `doomscrolling`, `fomo`, `fake_news`, `online_scams`, `catfishing`, `deepfake_themes`, `cyberstalking`, `internet_challenges`, `influencer_culture`, `online_radicalization`, `loot_boxes`, `ai_themes`, `data_privacy`.
- **Phobias +5 color phobias (51 → 56)** — `chromophobia` plus per-color `erythrophobia` (all-red rooms), `xanthophobia`, `leukophobia` (stark-white spaces), `melanophobia`.
- **Social phenomena +2 (20 → 22)** — `body_shaming`, `beauty_standards`.
- **Mature / Sensitive +5 suggestive-imagery (61 → 66)** — visuals unsuitable for minors short of explicit content, placed beside `mature_18plus`: `revealing_outfits`, `partial_nudity`, `sexualized_characters`, `fanservice`, `suggestive_poses`.
- **Gameplay disclosure +1 (4 → 5)** — `educational_purpose_only` for games made for education / PSA / propaganda purposes.
- The engine renders all of these automatically (selection-order bullets, bilingual `EN · LOCAL`); cross-post captions inherit them via the shared bullet helper. Vietnamese flag-prone labels follow the v0.21.0 asterisk/euphemism precedent (`t*nh d*c`, `Kh*a th*n`). 504 new locale strings (84 keys × 6 locales) + [`_schema.json`](src/i18n/locales/_schema.json) — validator now expects 907 ui / 542 template keys per locale.
### Docs
- **Content-inventory backfill** ([docs/CONTENT-INVENTORY.md](docs/CONTENT-INVENTORY.md), [docs/i18n/vi/CONTENT-INVENTORY.md](docs/i18n/vi/CONTENT-INVENTORY.md), [README.md](README.md)) — the docs still claimed "187 across 9 groups": the v0.22.0 Audio / Sensory group and the v0.23.0 VFX items were never added (the v0.23.0 entry's "187 → 195" total repeated that stale baseline; the actual progression was 199 → 207). Backfilled to the true 207 baseline, then updated to the new 248 / 12-group totals.
- [docs/FEATURES.md](docs/FEATURES.md) — replaced the stale v0.7-era "Spoiler Warning / 18+ Warning" description-structure lines with the unified Content Warnings block (v0.11+).
### Under the hood
- **+8 tests (482 → 490)** — render/bilingual/VI-masking cases for the new warnings ([tests/engine/description-builder.test.ts](tests/engine/description-builder.test.ts)) and a new `CONTENT_WARNINGS` ↔ groups parity guard ([tests/config/content-warning-groups.test.ts](tests/config/content-warning-groups.test.ts)) that fails if an id is added to the engine list but forgotten from every UI group.
- Five manifests bumped 0.24.2 → 0.25.0. First *published* tag carrying the v0.24.2 Linux AppImage hardening (`APPIMAGE_EXTRACT_AND_RUN=1`, `NO_STRIP=true`) — the v0.24.2 tag itself was never released due to the upstream CDN incident.
- Web bundle: main chunk 568.5 → 594.0 kB minified (191.5 → 204.3 kB gzip) — the 504 statically-imported locale strings account for the whole delta; Rollup's >500 kB chunk warning predates this release.
## v0.24.2 — 2026-06-08
CI-only patch to recover the Linux desktop binaries. **No application code
changes** — identical app to v0.24.1.
### CI
- **Hardened the Linux AppImage build** ([.github/workflows/release-desktop.yml](.github/workflows/release-desktop.yml)) — set `APPIMAGE_EXTRACT_AND_RUN=1` and `NO_STRIP=true` on the `tauri-action` step. `linuxdeploy` (itself an AppImage) needs FUSE to mount, which GitHub-hosted runners don't reliably provide → intermittent `failed to run linuxdeploy`. Extract-and-run sidesteps FUSE; `NO_STRIP` skips a strip pass that also flakes. No-op on Windows / macOS.
- **Rebuilt to ship the Linux binaries** (`.deb` / `.AppImage` / `.rpm`) that v0.24.1 missed when the AppImage tooling download hit a sustained upstream GitHub-CDN `http status: 504` during bundling. v0.24.1 published with Windows + macOS binaries; this tag re-runs the full matrix once the transient outage cleared.
## v0.24.1 — 2026-06-08
Maintenance patch: clears all `npm audit` advisories, drops unused Rust
dependencies, and documents the v0.24.0 cross-post caption generator.
### Security / dependencies
- **react-router / react-router-dom 6.30.3 → 6.30.4** — patches the moderate open-redirect advisory ([GHSA-2j2x-hqr9-3h42](https://github.com/advisories/GHSA-2j2x-hqr9-3h42)). Non-breaking; a HashRouter SPA on static hosting was low-exposure, but patched for hygiene.
- **vitest 3.2.4 → 4.1.8** — clears the critical Vitest-UI-server advisory ([GHSA-5xrq-8626-4rwp](https://github.com/advisories/GHSA-5xrq-8626-4rwp), dev-only — never in a shipped artifact). All 482 tests pass unchanged on the new major; no test or config code needed adjusting. `npm audit` now reports **0 vulnerabilities**.
### Removed
- **Unused `serde` / `serde_json` from `src-tauri/Cargo.toml`** — neither was referenced anywhere in `src-tauri/src/` (Tauri scaffolding leftovers; the `#[tauri::command]` functions only use `String` / `Result`). `cargo check` confirms the crate still compiles without them; `Cargo.lock`'s `yt-desc-gen` entry no longer lists them.
### Docs
- Documented the **cross-post caption generator** (Social tab — TikTok / Instagram Reels / Facebook Reels) in [README.md](README.md) and [docs/FEATURES.md](docs/FEATURES.md).
### Under the hood
- Five manifests bumped 0.24.0 → 0.24.1 (`package.json`, `package-lock.json` root + self-reference, `src-tauri/Cargo.toml`, `src-tauri/Cargo.lock` self-entry, `src-tauri/tauri.conf.json`). Gates green: typecheck, lint, validate:locales, knip, build, 482 tests, `npm audit` clean.
## v0.24.0 — 2026-06-08
Adds a **cross-post caption generator** that re-packages the YouTube
source into TikTok / Instagram Reels / Facebook Reels captions, a
navigation **theme toggle**, an opt-in **translation-quality notice**, and
a **Telegram** social link — plus a fix for a stray validation warning on
the OS Rig field.
### Added
- **Cross-Post Captions** — a new **Social** tab ([src/pages/SocialPage.tsx](src/pages/SocialPage.tsx), [src/engine/social-post-builder.ts](src/engine/social-post-builder.ts), [src/config/social-platforms.ts](src/config/social-platforms.ts), [src/hooks/use-social-posts.ts](src/hooks/use-social-posts.ts)). Re-packages the same editor source that drives the YouTube description into short-form captions for **TikTok (4000)**, **Instagram Reels (2200)**, and **Facebook Reels (2200)**. Each caption pulls Title (badge suppressed), 💻 MY RIG, ⚠️ Content Warnings, 🎁 Thanks, © Copyright, and hashtags (game + primary genre + a curated per-platform popular-hashtag set, deduped case-insensitively). Per-platform char counter + over-limit warning; when a caption overflows, optional blocks are dropped in priority order (warnings → copyright → thanks → rig) — Title + hashtags are never dropped, and there's no mid-string truncation. **Single** mode (platform tabs) and **Bulk** mode (part range × selected languages, reusing the Batch loop) with Copy-All. **JSON import/export** of the generated captions via a new `social` envelope type ([src/utils/file-schema.ts](src/utils/file-schema.ts) `ExportType` / `SCHEMA_VERSIONS` / `isExportType`); import is display-only since captions are derived artifacts. New `tabs.social` + `socialPost.*` locale block across all 6 locales (no new `templates.json` keys — captions reuse existing description/title strings).
- **Dark/Light theme toggle in the header** ([src/components/layout/Header.tsx](src/components/layout/Header.tsx)). A Sun/Moon icon button next to the language picker, reusing the existing `settings.setTheme` action so it stays in sync with the Settings toggle both ways. New `header.toggleTheme` key across 6 locales. No store/persist change — the theme field + setter already existed.
- **Translation-quality notice** ([src/engine/description-builder.ts](src/engine/description-builder.ts), [src/pages/SettingsPage.tsx](src/pages/SettingsPage.tsx)). New opt-in `showTranslationQuality` setting. When on, descriptions generated in a language **outside the trusted set (English / Vietnamese, which are human-reviewed)** get a bilingual `▸ 🌐 ABOUT THIS TRANSLATION` block: an intro naming the trusted languages + caveat bullets (accuracy not 100%, phrasing may be literal/stiff, may not match local style, corrections welcome). English/Vietnamese descriptions skip it. New `description.translationQuality.{header,intro,items.*}` template keys + `settings.showTranslationQuality{,Hint}` UI keys across 6 locales. Additive setting — `healSettings` back-fills the default, so no persist bump.
- **Telegram social link** ([src/config/social-fields.ts](src/config/social-fields.ts)). New `telegram` field (`https://t.me/` prefix, ✈️ icon) in the Social category. `social` is a generic record, so no profile migration. New `social.telegram` label across 6 locales.
### Fixed
- **"Pick a DDR generation" no longer appears on the OS Rig field** ([src/components/editor/RigEditor.tsx](src/components/editor/RigEditor.tsx), [src/utils/rig-validation.ts](src/utils/rig-validation.ts)). `renderComposite` hard-coded the RAM validator for **every** composite dropdown, so selecting an OS — also a composite — ran the RAM check (`"windows||"` parses as size=`"windows"`, ddr=`""`, tripping `ramMissingDdr`). Validator selection moved into a pure `validateCompositeField(fieldId, raw)` helper that only validates RAM; the OS composite (and any future one) shows no spurious badge.
### Under the hood
- **Shared `buildBilingualBulletSection` helper** ([src/engine/description-builder.ts](src/engine/description-builder.ts)). The inline Content-Warnings render block and the standalone Tech-Notes function were collapsed into one exported pure helper (header + intro + `• EN · LOCAL` bullets, U+00B7 separator) — reused by Content Warnings, Tech Notes, the new Translation-Quality notice, and the social-post builder. Description output is byte-for-byte unchanged, guarded by the existing description tests.
- **28 new tests** (454 → 482): 12 in [tests/utils/rig-validation.test.ts](tests/utils/rig-validation.test.ts) (new — RAM/GPU validators + `validateCompositeField` OS-vs-RAM guard), 13 in [tests/engine/social-post-builder.test.ts](tests/engine/social-post-builder.test.ts) (new — hashtag derivation/dedupe/sanitization, rig, bilingual warnings, copyright/sponsor gating, overflow drop-order), 3 translation-quality cases in [tests/engine/description-builder.test.ts](tests/engine/description-builder.test.ts), plus the `settings-heal` complete-payload guard updated for the new field.
- Five manifests bumped 0.23.0 → 0.24.0 (`package.json`, `package-lock.json` root + self-reference, `src-tauri/Cargo.toml`, `src-tauri/Cargo.lock` self-entry, `src-tauri/tauri.conf.json`).
- Pre-release gates run green: lint, typecheck, validate:locales (12/12 files complete; 864 ui + 501 template keys per locale), 482 tests, knip, build.
## v0.23.0 — 2026-05-27
Extends audience-protection coverage with eight VFX-intensity warnings
and unlocks the new OS Rig field (introduced in v0.22.0) for macOS and
Linux creators via a cascading dropdown that adapts its slot semantics
to the chosen OS family.
### Added
- **8 new VFX content warnings in the `photosensitive` group** ([src/engine/types.ts](src/engine/types.ts), [src/config/content-warning-groups.ts](src/config/content-warning-groups.ts)). 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_effects` and the AAA / horror games that ship intense visual-effects passes (bloom, particles, lens flares, post-processing) without ever triggering a strobe-style flash. Total content warnings 187 → 195 across 10 groups (no new group; `photosensitive` 5 → 13). Purely additive — engine renders each warning automatically; existing profiles round-trip unchanged. Fully translated across all 6 locales (`ui.json` short labels + `templates.json` description phrases) with `_schema.json` updated.
- **macOS support in the OS Rig field** ([src/config/rig-fields.ts](src/config/rig-fields.ts) `MACOS_VERSION_OPTIONS`). 7 macOS major versions: `10` (Mojave era), `11 Big Sur`, `12 Monterey`, `13 Ventura`, `14 Sonoma`, `15 Sequoia`, `26 Tahoe`. The intentional 15 → 26 jump matches Apple's 2025 year-aligned marketing-number reset. Stored values carry the human label (e.g. `"macos|15 Sequoia|"`) so the description output reads as a single recognisable string. macOS has no Edition tier, so the third dropdown is hidden when macOS is selected.
- **Linux support in the OS Rig field** ([src/config/rig-fields.ts](src/config/rig-fields.ts) `LINUX_DISTRO_OPTIONS`, `LINUX_VERSION_BY_DISTRO`). 7 distros gameplay creators actually use via Proton: Ubuntu (`20.04 / 22.04 / 24.04 / 26.04 LTS`), Fedora (`40 / 41 / 42`), Debian (`12 Bookworm / 13 Trixie`), Arch (`rolling`), Manjaro (`latest`), Pop!_OS (`22.04 / 24.04 LTS`), Linux Mint (`21 / 22`). When Linux is selected the second slot re-labels to "Distro" and the third slot re-labels to "Version" with a per-distro option list — so Ubuntu's versions don't bleed into Fedora's dropdown.
- **Cascading composite dropdown** ([src/config/rig-fields.ts](src/config/rig-fields.ts) `CompositePart`, `resolveCompositeOptions`, `resolveCompositeLabelKey`). `CompositePart.options` widened from `RigFieldOption[]` to a union with `(previousParts) => RigFieldOption[]` so a part can resolve its option list from previously-selected siblings. New optional `labelKeyResolver` lets a single part swap its i18n key (Version / Distro), and `hiddenWhen` removes a part from both the editor form and the description output. RAM (the existing 2-part static composite) is unaffected — the union accepts arrays unchanged.
- **`editor.os_distro` locale key** across all 6 locales (`Distro` / `Distro` / `ディストリ` / `Distro` / `배포판` / `发行版`) — the new Linux-only second-slot label.
### Changed
- **Editor form resets downstream parts on parent change** ([src/components/editor/RigEditor.tsx](src/components/editor/RigEditor.tsx) `renderComposite`). When a user switches OS name from Windows to macOS, any previously-selected version / edition values are cleared so the form can't end up in an invalid state (e.g. `macOS 11 Pro`). The new `setPart` clears all indices `>` the changed one, so the cascading dropdown is always self-consistent.
### Under the hood
- Composite dropdown `formatRigValue` walks parts with a `previousValues` accumulator now, calls `hiddenWhen` first to skip hidden parts entirely (so they don't leak empty tokens into the joined output), then resolves the option list with the accumulator. Stored shapes are unchanged — v0.22.0's `"windows|11|pro"` round-trips byte-for-byte.
- 9 new tests in [tests/engine/rig-fields.test.ts](tests/engine/rig-fields.test.ts) (24 → 33): 7 OS cascading cases (macOS Sequoia / Tahoe, Linux Ubuntu / Arch / Fedora / Debian, hidden macOS edition fallback, Windows backward-compat guard), 1 empty-name fallback (degenerate input), 1 RAM regression check that confirms the static-array path still works after the union widening.
- Five manifests bumped 0.22.0 → 0.23.0 (`package.json`, `package-lock.json` root + self-reference, `src-tauri/Cargo.toml`, `src-tauri/tauri.conf.json`).
- Pre-release gates run green: lint, typecheck, validate:locales (12/12 files complete; 844 ui + 495 template keys per locale), 454 tests, build.
## v0.22.0 — 2026-05-27
Adds a dedicated **Audio / Sensory** content-warning group, introduces an
opt-in video-style era credit that combines with the rig's Video Editor
field, surfaces a structured **Operating System** dropdown in My Rig, and
drops two stale Settings/About items (Default Genre, Dev Environment).
### Added
- **12 new audio content warnings in a new `audio` group** ([src/engine/types.ts](src/engine/types.ts), [src/config/content-warning-groups.ts](src/config/content-warning-groups.ts)). Splits audio-sensitive triggers out of the `photosensitive` group where they never quite fit. New 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 out of `photosensitive` into this group. Total content warnings 175 → 187 across 9 → 10 groups. Purely additive; engine renders each warning automatically. Fully translated across all 6 locales (`ui.json` short labels + `templates.json` description phrases) with `_schema.json` updated.
- **Video-style era toggle** ([src/config/video-styles.ts](src/config/video-styles.ts), [src/components/editor/VideoSettingsForm.tsx](src/components/editor/VideoSettingsForm.tsx), [src/engine/description-builder.ts](src/engine/description-builder.ts)). New per-video opt-in field `videoStyleEra` on `EditorData` — empty string sentinel for "off", 12 valid eras: `1980s`/`1990s`/`2000s`/`2010s`/`2020s` + `modern`/`cinematic`/`retro`/`vhs`/`film_noir`/`anime_mv`/`documentary`. When set, the description renderer emits a single line at the end of the Video Settings section combining the era with the rig's video editor: `"Edited in 1990s VHS style using DaVinci Resolve 19.1"`. Falls back to an editor-less template (`"Edited in 1990s VHS style"`) when `rig.video_editor` is empty. **Renders even when `skipGraphicsSettings` is on** — 2D / pixel-art creators still edit their footage, so the style credit survives as a standalone one-line section under the same header. New file exports `VIDEO_STYLE_ERAS` literal union + `isVideoStyleEra` type guard. Field shape mirrors the existing `artStyle` / `playthroughStatus` / `difficulty` per-video sentinels — no parallel boolean toggle.
- **Operating System field in My Rig** ([src/config/rig-fields.ts](src/config/rig-fields.ts) `OS_COMPOSITE`). New `composite_dropdown` entry at the top of `RIG_FIELDS` modelled on the existing RAM pattern. Three parts: name → version → edition. Stored as `"windows|11|pro"` → renders `"Windows 11 Pro"` via `formatRigValue`. Windows 10 / 11 + Home / Pro / Enterprise / Education / IoT Enterprise. Pre-v0.22 profiles with no `rig.os` key pass through the existing empty-value filter chain in `description-builder.ts` — no migration needed. New schema keys `editor.os_name`, `editor.os_version`, `editor.os_edition` + `rig.os` across 6 locales.
### Removed
- **Default Genre setting** ([src/pages/SettingsPage.tsx](src/pages/SettingsPage.tsx), [src/store/settings-heal.ts](src/store/settings-heal.ts), [src/store/settings-store.ts](src/store/settings-store.ts), [src/config/defaults.ts](src/config/defaults.ts)). The `ChipGroup` never wired through to the editor — orphan field. Removed UI, `SettingsData.defaultGenres`, `setDefaultGenres` action, `initialSettings.defaultGenres`, `SettingsDefaults.defaultGenres`, `DEFAULTS.settings.defaultGenres`, `extractData` entry, and the v1→v2 migration block in `healSettings` (replaced by a single `delete incoming.defaultGenres` + `delete incoming.defaultGenre` so persisted blobs don't leak the dead field). Two migration tests removed from `settings-heal.test.ts`. `settings.defaultGenre` key removed from 6 `ui.json` + `_schema.json`.
- **Dev Environment section from About** ([src/pages/AboutPage.tsx](src/pages/AboutPage.tsx), [src/config/about.ts](src/config/about.ts)). Hardcoded specs drift on every box upgrade. Removed the entire `<section>` block (~33 lines of JSX + `devEnvRows` constant), `Cpu`/`Monitor` icon imports, `ABOUT.pcSpecDocUrl` and `ABOUT.devEnvDocUrl`, and all `about.devEnvHeading` / `devEnvHelp` / `devEnv.{os,cpu,gpu,ram,ide,toolchains,fullSpecLink,fullDevEnvLink}` keys from 6 `ui.json` + `_schema.json` (10 keys per locale).
### Changed
- **`loud_noises` migrated from `photosensitive` to `audio`.** Sudden-volume / high-frequency triggers affect a different audience than strobe / motion-sickness triggers, so the group split is cleaner. Stored ID unchanged — existing profiles using `loud_noises` round-trip without any per-warning migration.
### Under the hood
- **Editor-store persist version 13 → 14.** Adds `videoStyleEra` field with defensive coercion: unknown / hand-edited / future-downgrade values are coerced back to `""` via the `isVideoStyleEra` type guard so the form `Select` never lands on a missing option. Additive — pre-v0.22 drafts round-trip through the migration with `videoStyleEra` defaulting to off.
- **`healSettings` strips both legacy keys.** Whether the persisted blob carries the v1 shape (`defaultGenre: string`) or the v2 shape (`defaultGenres: GenreId[]`), the heal step now deletes both before the final `{ ...initialSettings, ...incoming }` spread — guarantees the field never resurfaces.
- **B3 "Localize My Rig labels" was a phantom task.** Initial planning assumed the `rig.{cpu,gpu,ram,storage,monitor,capture,motherboard,controller,video_editor}` locale keys didn't exist anywhere; verification showed all 6 locales already had them with proper translations. Only the new `rig.os` key was actually missing — folded into the OS-field work.
- Five manifests bumped 0.21.0 → 0.22.0 (`package.json`, `package-lock.json` root + self-reference, `src-tauri/Cargo.toml`, `src-tauri/tauri.conf.json`).
- Pre-release gates run green: lint, typecheck, validate:locales (12/12 files complete; 835 ui + 487 template keys per locale), 445 tests (was 416 — +5 video-style line render cases in `description-builder.test.ts`, +6 OS composite cases in `rig-fields.test.ts`, –2 deleted default-genre migration tests, plus pre-existing growth), build.
## v0.21.0 — 2026-05-27
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.
### Added
- **12 new content warnings** ([src/engine/types.ts](src/engine/types.ts), [src/config/content-warning-groups.ts](src/config/content-warning-groups.ts)). Extends the **Sensitive** group with method-specific death/violence depictions that YouTube's auto-moderation flags harder than the umbrella `blood_gore` / `war_violence` labels: `hanging_depiction`, `drowning_depiction`, `burning_alive`, `asphyxiation_depiction`, `restraint_torture`, `public_execution`, `decapitation`, `impalement`, `mass_casualty_event`, `vehicular_violence`, `overdose_depiction`, `defenestration`. Total content warnings 175 → 187 across the existing 9 groups. Purely additive — engine renders each warning automatically; existing profiles round-trip unchanged. Fully translated across all 6 locales (`ui.json` short labels + `templates.json` description phrases) with `_schema.json` updated. VI labels follow the v0.21.0 censoring policy (see below).
- **Game-copyright toggle** ([src/store/settings-heal.ts](src/store/settings-heal.ts) `showGameCopyright`, [src/engine/description-builder.ts](src/engine/description-builder.ts) section 4.5, [src/pages/SettingsPage.tsx](src/pages/SettingsPage.tsx)). New Settings → Description toggle (default **off**) that, when enabled with a non-empty `pubDevName`, emits a `© {publisher}. All rights reserved.` line right after the Store Links block. Decoupled from the publisher store-URL — the credit renders based on the studio name alone. Used by creators covering games whose dev/publisher contractually requires attribution in the description. New i18n key `description.sections.gameCopyright` across all 6 locales; new UI keys `settings.showGameCopyright` + `settings.showGameCopyrightHint`. Persists in `GamePreset` so a series spanning many episodes hydrates the studio name + toggle together on preset apply.
- **`pubDevName` promoted to first-class field** ([src/components/editor/GameInfoForm.tsx](src/components/editor/GameInfoForm.tsx), [src/store/preset-store.ts](src/store/preset-store.ts) `GamePreset.pubDevName?`). Previously a side-label that only appeared under a non-empty Publisher store URL; now an always-visible "Studio / Publisher" input in Game Info that also drives the game-copyright section. Removed from [StoreLinkEditor.tsx](src/components/editor/StoreLinkEditor.tsx) lines 140–172. Optional in `GamePreset` so older presets hydrate without breaking.
### Changed
- **Channel copyright line reworded across 6 locales** ([src/i18n/locales/*/templates.json](src/i18n/locales/) `description.sections.copyright`). Old: `© {year} {channelName}. All rights reserved.` (one short line, ambiguous about whether the channel claims the game's IP). New: a 2–3 sentence disclaimer making explicit that the copyright applies only to the video recording, and that the game, characters, music, and related IP belong to their respective owners. Same `{{year}}` / `{{channelName}}` placeholders — no engine change. JA/KO/ZH now ship a proper localised translation instead of falling back to English.
- **VI censoring sweep — consistency + euphemism policy** ([src/i18n/locales/vi/ui.json](src/i18n/locales/vi/ui.json), [src/i18n/locales/vi/templates.json](src/i18n/locales/vi/templates.json)). The Vietnamese warning labels previously used asterisk censoring on some terms (`t* tử`, `b*o h*nh`, `g*ết người`) but left others uncensored (`Bạo lực liên quan chiến tranh`, `Bạo lực từ cảnh sát`) and had a malformed `b* ng*y h*i` for `child_harm`. Sweep unifies them under a 2-tier policy: asterisk for graphic verbs with no natural euphemism (`tự` → `t*`, `giết` → `g*ết`, `treo cổ` → `treo c*`, `bạo hành` → `b*o h*nh`), euphemism for words with a natural softer register (`bạo lực` → `tác động vật lý`, `nổ súng` → `khai hỏa`, `xử bắn` → `hành quyết`). Fixes `child_harm` to use the unambiguous euphemism `chịu tác động`. Proper nouns (game titles, character names) untouched. Goal is to reduce YouTube auto-flag risk on Vietnamese descriptions — purely a static i18n edit, no runtime utility.
### Under the hood
- Persist version unchanged — `showGameCopyright` is additive (`healSettings` back-fills via `{ ...initialSettings, ...incoming }`) and `pubDevName` / `showGameCopyright` on `GamePreset` are optional. No migration step needed.
- Description-builder section ordering: Store Links → **Game Copyright (new)** → Video Settings → … → Channel Copyright. The two `©` lines (channel + game) are intentional when both toggles are on; the Settings help text is explicit so creators don't mistake it for a bug.
- Three test fixtures updated for the new wording / censoring / settings shape ([tests/engine/description-builder.test.ts](tests/engine/description-builder.test.ts), [tests/store/settings-heal.test.ts](tests/store/settings-heal.test.ts)). 435 tests still green.
- Five manifests bumped 0.20.0 → 0.21.0 (`package.json`, `src-tauri/Cargo.toml`, `src-tauri/Cargo.lock` `yt-desc-gen` entry, `src-tauri/tauri.conf.json`).
- Pre-release gates run green: lint, typecheck, validate:locales (12/12 files complete, 814 ui + 461 template keys), 435 tests, build.
## v0.20.0 — 2026-05-23
Fifty new content-warning IDs across three thematic axes — political /
religion / war, social-psychological phenomena (autism, hikikomori,
parasocial, etc.), and weather-related phobias — plus a tag-engine fix
for game names containing comma / semicolon / pipe characters.
### Added
- **50 new content warnings** ([src/engine/types.ts](src/engine/types.ts), [src/config/content-warning-groups.ts](src/config/content-warning-groups.ts)). The **Phobias** group gains 10 weather-related fears — `homichlophobia` (fog), `lilapsophobia` (tornadoes / hurricanes), `ombrophobia` (heavy rain), `nephophobia` (clouds), `ancraophobia` (strong wind), `cryophobia` (extreme cold, distinct from `chionophobia`/snow), `heliophobia` (sunlight), `cymophobia` (large waves), `limnophobia` (lakes), `potamophobia` (rivers); 41 → 51. The **Sensitive** group gains 20 political / religious / 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 (inserted between *Mental health* and *Sensitive*) 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). Purely additive — engine renders each warning automatically; existing profiles / templates round-trip unchanged. Fully translated across all 6 locales (`ui.json` short labels + `templates.json` description phrases) with `_schema.json` updated.
- **1 new locale key × 6 locales**: `editor.contentWarningGroups.social_phenomena` (the new group's heading). Initial-collapse default set in [ContentWarningChecklist.tsx](src/components/editor/ContentWarningChecklist.tsx) so the 20-item group stays scannable until expanded.
### Fixed
- **Tag generator splitting at commas / semicolons / pipes in game names** ([src/engine/tag-generator.ts](src/engine/tag-generator.ts)). YouTube treats `,` as a tag delimiter, so a game title like `Hello, World` previously produced composite tags such as `Hello, World gameplay` that YouTube split into two broken tags (`Hello` + `World gameplay`). New `sanitizeForTag` helper strips `,` `;` `|` from the game name before it enters bare / composite tags and is also called inside `tagFriendlyGameName` (idempotent). Title / description / hashtag paths still read `input.gameName` verbatim — the original punctuation is preserved for human-facing copy, only the tag list is cleaned. Nine new test cases in [tests/engine/tag-generator.test.ts](tests/engine/tag-generator.test.ts) cover the comma / semicolon / pipe paths plus idempotence.
### Under the hood
- **Documentation count sweep.** `README.md` content-warning total bumped 125 → 175 and group count 8 → 9; `docs/CONTENT-INVENTORY.md` heading updated, three group sections regenerated (Phobias 41 → 51, Sensitive 29 → 49, new Social phenomena 20), Vietnamese mirror at `docs/i18n/vi/CONTENT-INVENTORY.md` kept in lock-step.
- Persist version unchanged — this release adds no new persisted fields. Existing `contentWarnings: ContentWarning[]` profiles widen the allowed enum but reject nothing.
- Five manifests bumped 0.19.0 → 0.20.0 (`package.json`, `package-lock.json` root + self-reference, `src-tauri/Cargo.toml`, `src-tauri/Cargo.lock` `yt-desc-gen` entry, `src-tauri/tauri.conf.json`).
- Pre-release gates run green: lint, typecheck, validate:locales (12/12 files complete), 435 tests, knip, build, `npm audit` (zero vulnerabilities).
## v0.19.0 — 2026-05-20
Twenty-eight new content-warning IDs (twenty-five clinical phobias plus
three discrimination themes) + a scroll-to-top button + a moderate-severity
security patch + a dead-code sweep backed by new `knip` tooling + a
documentation accuracy pass.
### Added
- **28 new content warnings** ([src/engine/types.ts](src/engine/types.ts), [src/config/content-warning-groups.ts](src/config/content-warning-groups.ts)). The **Phobias** group gains 25 clinically-recognised fears relevant to gameplay / horror content — automatonophobia (animatronics), megalophobia (giant objects), submechanophobia (submerged man-made objects), necrophobia, spectrophobia, demonophobia, selachophobia (sharks), mysophobia, emetophobia, scopophobia, monophobia, musophobia, chiroptophobia, ornithophobia, ichthyophobia, herpetophobia, katsaridaphobia, apiphobia, astraphobia, agoraphobia, enochlophobia, chionophobia, nosocomephobia, aichmophobia, pnigophobia — 16 → 41. The **Sensitive** group gains 3 bigotry-content warnings — `homophobia`, `transphobia`, `xenophobia` — placed next to `discrimination` / `hate_speech`. These are prejudices, not involuntary fear responses, so they are deliberately kept out of the Phobias group. Total content warnings 97 → 125. Purely additive — the engine auto-renders each warning, no persist migration. Fully translated across all 6 locales (`ui.json` short labels + `templates.json` description phrases) with `_schema.json` updated.
- **Scroll-to-top button** ([src/components/layout/ScrollToTopButton.tsx](src/components/layout/ScrollToTopButton.tsx)). A floating up-arrow fixed to the bottom-right of the viewport that fades in once the page is scrolled past 300 px and smooth-scrolls back on click. The scroll target is the `<main>` element — the app's real scroll container, not `window` — which `AppShell` now passes down as a ref. Honors `prefers-reduced-motion`, uses a 44 px touch target with a focus ring, sits at `z-40` so toasts render above it, and re-checks visibility on route change. New `common.scrollToTop` locale key across all 6 locales.
- **`knip` dead-code tooling** ([knip.json](knip.json) + `npm run knip`). Authoritative cross-file detection of unused files, exports, and dependencies — coverage TypeScript strict mode (in-file only) cannot provide. Configured so `scripts/` and `tests/` are recognised entry points.
### Fixed
- **`brace-expansion` moderate-severity DoS** ([advisory GHSA-jxxr-4gwj-5jf2](https://github.com/advisories/GHSA-jxxr-4gwj-5jf2)). `npm audit fix` bumped the transitive dependency (reached through `@typescript-eslint`) 5.0.5 → 5.0.6. A dev/lint-time dependency only — no effect on shipped web or desktop binaries. `npm audit` now reports zero vulnerabilities.
### Removed
- **Dead-code sweep** (knip-driven). Deleted the unused `use-debounce.ts` hook plus ~13 unreferenced exports across config / engine / store / utils (`findGpuSeries`, `formatSingleEndingForTitle`, `PlaylistOutput`, `loadFile`, `exportToJsonFile`, `importFromJsonFile`, `EnglishTranslationFn`, `PlatformId`, `SocialFieldId`, `SocialCategory`, `VietnameseBank`, `RigFieldId`, `SupportedLanguageId`). A further ~12 symbols were tightened from `export` to module-private and the settings layer's redundant type re-exports were trimmed. No behaviour change — all 426 tests still pass.
### Under the hood
- **Documentation accuracy pass.** `TECH-SPEC.md` package version (`0.1.0` → `0.19.0`) and CI Node version (`20` → `22`); `ROADMAP.md` corrected a never-built `TabBar` component reference to `Sidebar`; `FEATURES.md` video-type / genre / language counts refreshed, with the stale duplicate tables replaced by links to `CONTENT-INVENTORY.md` (the maintained source of truth); `CONTENT-INVENTORY.md` and its Vietnamese mirror updated for the new warning counts; `README.md` content-warning count corrected (91 → 125).
- Persist version unchanged — this release adds no new persisted fields.
- Five dependencies knip flagged as unused are intentionally kept and listed under `knip.json` `ignoreDependencies`: the three Tauri plugin packages cannot be safely verified without a desktop build, and `@testing-library/*` is documented test infrastructure.
## v0.18.0 — 2026-05-15
Vietnamese-bank dropdown for the donate form + two persistence-layer
bug fixes (UI language reverting to English after relaunch, Settings
export bundling unrelated stores) + one cleanup (Open Folder button
removed) + a new content-inventory documentation page (EN + VI).
### Added
- **Vietnamese bank dropdown** in `VietnameseDonateEditor` ([src/components/editor/VietnameseDonateEditor.tsx](src/components/editor/VietnameseDonateEditor.tsx), [src/config/vietnamese-banks.ts](src/config/vietnamese-banks.ts)). When the output language is Vietnamese, the "Bank name" field upgrades from a plain text input to a `<Select>` listing 30 of Vietnam's most-used banks (Big 4 state-owned + top 22 joint-stock commercial banks by retail presence + 4 foreign banks with the strongest Vietnam footprint). Sourced from the State Bank of Vietnam's 2026 register via [bankervn.com](https://bankervn.com/danh-sach-ngan-hang/). Picking "Khác (nhập tay)" reveals an inline text input so unlisted / digital-only / regional banks still work. Persisted shape is unchanged — `vnBankName` stays a plain string — so saved profiles and exports round-trip cleanly. When the output language is not Vietnamese, the field falls back to the legacy text input.
- **`docs/CONTENT-INVENTORY.md`** + **Vietnamese mirror** ([docs/i18n/vi/CONTENT-INVENTORY.md](docs/i18n/vi/CONTENT-INVENTORY.md)). Static, hand-maintained manifest of every video type (20), game genre (41), and content warning (96 across 8 groups) the editor surfaces. Linked from the main `README.md` Documentation table. Transparency aid for anyone evaluating the editor's coverage without reading source.
- **2 new locale keys × 6 locales**: `editor.vnBankNameSelectPlaceholder`, `editor.vnBankNameOther`. Localised for VI; left in English for JA/KO/ZH/ES to match the existing convention for VN-donate fields. Schema (`src/i18n/locales/_schema.json`) updated accordingly.
### Fixed
- **UI language reverts to English after app relaunch** ([src/App.tsx](src/App.tsx)). i18next initialises synchronously with `fallbackLng: "en"` while Zustand's persist middleware rehydrates `appLanguage` either synchronously (localStorage) or asynchronously (Tauri `settings.json`). Neither path bridged the persisted value back to i18n, so the UI rendered English even when the saved setting was Vietnamese / Japanese / etc. App.tsx now reads `appLanguage` at mount and calls `i18n.changeLanguage` once, then subscribes to subsequent store changes so the async Tauri rehydrate (and any future external mutation) propagate to i18n automatically.
- **Settings JSON export was a multi-store dump** ([src/pages/SettingsPage.tsx](src/pages/SettingsPage.tsx)). The pre-v0.18.0 "Export Settings" button copied the whole on-disk `settings.json` — which the storage adapter writes as a gross dump of every Zustand store (settings + profiles + presets + templates + history). The new exporter writes only the Settings data through `exportTypedToJsonFile("settings", …)` — the same envelope-typed flow the Profiles tab already uses. Importer is the matching `importParsedFromJsonFile` + `resolveForType("settings")` chain, with an explicit reject for the legacy multi-store dump (friendly toast instead of silent profile-store pollution). `extractData` was promoted from a private helper in `settings-store` to a named export for this. The IS_TAURI gate stays — surfacing the buttons on the web build is out of scope for this release.
### Removed
- **"Open Folder" button** in Settings → top bar ([src/pages/SettingsPage.tsx](src/pages/SettingsPage.tsx)). Niche utility — most users never opened the app-data folder, and Tauri-only meant web builds never saw it. The `ensure_dir` Tauri command stays in the Rust side for the export/import paths that still rely on it. ~25 LOC removed including the unused `FolderOpen` icon import.
### Under the hood
- `App.tsx` mount effect now subscribes to `useSettingsStore` for `appLanguage` changes — Header and SettingsPage still call `i18n.changeLanguage` directly when the user switches, which is now redundant but harmless. Cleanup deferred to a future PR.
- Persist version unchanged — this release adds no new persisted fields.
- Bundle: under the 500 KB cap. The bank list is a 33-entry static array, negligible weight; the new envelope flow is a net-negative on SettingsPage size (Tauri dialog + ensure_dir + read_from_file paths replaced with one browser-API call).
### Migration notes
- **Pre-v0.18.0 settings export files (multi-store dump)** are rejected with a friendly "Legacy export format from v0.17.x or earlier is no longer supported" toast on import. Re-export from v0.18.0+ to get a clean settings-only envelope file.
- **Profiles, presets, templates, history** export/import flows on the Profiles tab are unchanged. v0.17.x exports of those types still import unmodified.
- **Saved `vnBankName` values** that don't match any of the 30 preset banks auto-detect as "custom" on first render — the dropdown shows "Khác" and the inline text input is pre-filled with the saved value. No persisted data is lost.
## v0.17.1 — 2026-05-15
Per-video Output selector — 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.
### Added
- **`endingVideoIndex` field on `EditorData`** (1-indexed, default 1). Stored on the editor (vs. recomputed per render) 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 ([src/components/editor/EndingsEditor.tsx](src/components/editor/EndingsEditor.tsx)). Renders `endingVideoCount` options labelled `"Video N (X–Y)"` where X–Y are the matching ending-range bounds. Changing it pipes `endingVideoIndex` into the engine, which slices `endings[]` for both title (via `buildStructuredEndingLabel`) and description (via `sliceEndingsForVideo`).
- **"Previewing Video X of Y — Endings A–B" banner** at the top of the Output page when in case C ([src/pages/OutputPage.tsx](src/pages/OutputPage.tsx)). Persistent reminder so a creator flipping through videos doesn't forget which slice they're looking at.
- **3 new locale keys × 6 locales**: `editor.endings.videoIndexLabel`, `editor.endings.videoIndexHint`, `output.previewingVideo`. All 718/718 ui keys per locale (up from 715).
### Changed
- **`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", keeping the input cleaner for tests.
- **`EndingsEditor.setVideoCount`** now 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`.
### Tests
- 4 new tests in `editor-store.endings.test.ts` for the v12 → v13 migration (default back-fill, valid value preserved, clamp above max, clamp below 1). Total 426/426 pass.
### Under the hood
- The banner copy is locale-aware and pluralised inline via i18next interpolation (`{{index}} / {{total}} / {{from}} / {{to}}`).
- `OutputPage` selects `endingVideoCount`, `endingVideoIndex`, `endingVideoRanges` as individual store slices so the page only re-renders when those specific fields change — no broader subscription drag.
- Bundle: index 473.91 KB (+3 KB for Select + banner + migration). Under the 500 KB cap.
## v0.17.0 — 2026-05-14
Combined release: logging overhaul + the deferred ending title piece
+2 -2
View File
@@ -7,7 +7,7 @@
- **Repository**: `github.com/poli0981/youtube-generator`
- **License**: Apache-2.0 (see `LICENSE` + `NOTICE`)
- **Primary Language**: TypeScript
- **Stack**: React 18 + Vite 7 + Tailwind CSS 3 + Zustand + Tauri 2 (desktop)
- **Stack**: React 18 + Vite 8 + Tailwind CSS 3 + Zustand + Tauri 2 (desktop)
- **Target Platforms**: Web (GitHub Pages), Desktop (Windows/macOS/Linux via Tauri)
## Tech Stack
@@ -15,7 +15,7 @@
| Layer | Technology | Why |
|-------|-----------|-----|
| Framework | React 18 | Familiar from F2P tracker dashboard |
| Build | Vite 5 | Fast HMR, clean config |
| Build | Vite 8 | Fast HMR, Rolldown bundler |
| Language | TypeScript (strict) | Type safety for template engine |
| Styling | Tailwind CSS 3 | Utility-first, fast iteration |
| State | Zustand + persist middleware | Simple, localStorage/file persistence |
+2
View File
@@ -50,6 +50,8 @@ YouTube oEmbed, the Steam store API, Twitch helix, and similar services are **no
The web version uses **`localStorage`**, not cookies. No cookie is set by the application. GitHub Pages itself may issue a session cookie at the platform level — that is GitHub's, not ours, and is governed by [GitHub's Privacy Statement](https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement).
The first-run consent acknowledgement (added in v0.28.0) is recorded **inside the existing settings record** — a `legalConsentVersion` number plus a local timestamp — not as a separate cookie or storage key. It never leaves your device.
## Children's Privacy
This application is not directed at children under 13 and does not knowingly process any personal data from anyone.
+18 -5
View File
@@ -2,7 +2,7 @@
**YouTube Gameplay Description Generator** — an offline-first template engine for Gameplay No Commentary YouTube channels.
Generate YouTube titles, descriptions, and tags in six languages with one click. Save channel, rig, and game presets to skip repetitive data entry. Works in the browser (GitHub Pages) or as a ~8 MB native desktop app (Tauri).
Generate YouTube titles, descriptions, and tags in six languages with one click. Save channel, rig, and game presets to skip repetitive data entry. Works in the browser (GitHub Pages), as a ~8 MB native desktop app (Windows / macOS / Linux), or as an installable Android APK — all from one Tauri 2 codebase.
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](./LICENSE)
[![Node](https://img.shields.io/badge/node-%E2%89%A522-brightgreen)](./docs/DEVELOPMENT.md)
@@ -24,14 +24,16 @@ Built for the gameplay no-commentary niche — especially horror / scary games
- **20 video types** — Full Gameplay, Part, Boss Fight, Boss No-Hit, Ending, Speedrun, 100%, DLC, NG+, Challenge, Side Quest, Secret, Comparison, Guide, Mods, Collectibles, Livestream, Gacha Quest, Demo, Demo Part.
- **6 UI languages** — English, Vietnamese, Japanese, Spanish, Korean, Chinese. *(VI authored by a native speaker; JA / ES / KO / ZH AI-translated — see [DISCLAIMER.md](./DISCLAIMER.md).)*
- **40+ game genres** — across action, RPG, FPS, horror, soulslike, indie, simulation, fighting, and more.
- **91 content-warning IDs** across 8 groups — phobias, photosensitive, mental health, sensitive themes, horror-specific, playstyle, and gameplay disclosure (mods / cheats / glitches / guide-assisted). Sets viewer expectations before they hit play.
- **248 content-warning IDs** across 12 groups — spoilers, photosensitive/VFX, audio, dialogue/language, phobias (incl. color phobias), mental health, social phenomena, internet/digital life, sensitive themes (incl. method-specific death/violence and suggestive imagery), horror-specific, playstyle, and gameplay disclosure (mods / cheats / glitches / guide-assisted / educational purpose). Sets viewer expectations before they hit play.
- **Profile system** — save channel / social / rig info once, reuse across every video.
- **Game presets** — save game name + store links once, reuse across the entire part series.
- **Snapshot templates** — save full-form configurations and recall in one click.
- **Smart tag generation** — combines genre pool, platform, quality tier, multilingual hooks, and trending terms; auto-dedup and 500-char-limit aware.
- **Character counters** — real-time limits for title (100), description (5000), tags (500).
- **Batch mode** — generate metadata for all parts of a series in one pass.
- **Desktop app** — Windows & macOS native binaries via Tauri (~8 MB).
- **Cross-post captions** — a dedicated **Social** tab re-packages the same YouTube source into short-form captions for **TikTok** (4,000-char), **Instagram Reels**, and **Facebook Reels** — title, rig, content warnings, copyright, thanks, and hashtags (game + genre + curated per-platform popular tags). Single + bulk modes, per-platform character limits with smart overflow trimming, and JSON import/export.
- **Desktop app** — Windows, macOS & Linux native binaries via Tauri (~8 MB).
- **Android app** — installable, sideloadable `.apk` built from the same Tauri 2 codebase. **Requires Android 11+** (tested 11–16; real-device test on Android 12). Grab it from [Releases](https://github.com/poli0981/youtube-generator/releases) and enable "Install unknown apps" to sideload.
- **Mobile-responsive web** — drawer navigation, touch-sized controls, iOS-safe text-input behavior. Tested down to 360 × 640.
- **100% offline** — no server, no telemetry, no account. See [PRIVACY.md](./PRIVACY.md).
@@ -51,6 +53,16 @@ npm run tauri:build
# Output: src-tauri/target/release/bundle/{msi,deb,dmg,app}
```
Android build (`.apk`) — requires the Android SDK + NDK + a JDK:
```bash
cargo tauri android init # one-time; generates src-tauri/gen/android
cargo tauri android build --apk
# Output: src-tauri/gen/android/app/build/outputs/apk/universal/release/
```
See [`docs/PACKAGING.md`](./docs/PACKAGING.md#android-apk-packaging) for the SDK/NDK setup and signing steps.
Full development setup, IDE config, and troubleshooting: see [`docs/DEVELOPMENT.md`](./docs/DEVELOPMENT.md). Vietnamese version: [`docs/i18n/vi/DEVELOPMENT.md`](./docs/i18n/vi/DEVELOPMENT.md).
## Use Cases
@@ -67,7 +79,7 @@ Nothing leaves your device. No analytics, no telemetry, no tracking. The web ver
## Tech Stack
React 18 · TypeScript (strict) · Vite 7 · Tailwind CSS 3 · Zustand · i18next · Tauri 2 (Rust stable).
React 18 · TypeScript (strict) · Vite 8 · Tailwind CSS 3 · Zustand · i18next · Tauri 2 (Rust stable).
Architecture overview: [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md).
@@ -78,10 +90,11 @@ Architecture overview: [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md).
| [Development Guide](./docs/DEVELOPMENT.md) | Toolchain, IDE setup, build commands, troubleshooting. *(Also: [Vietnamese](./docs/i18n/vi/DEVELOPMENT.md).)* |
| [Architecture](./docs/ARCHITECTURE.md) | Layer model, data flow, engine design. |
| [Features](./docs/FEATURES.md) | Full feature matrix. |
| [Content Inventory](./docs/CONTENT-INVENTORY.md) | Every video type, genre, and content warning the editor surfaces. *(Also: [Vietnamese](./docs/i18n/vi/CONTENT-INVENTORY.md).)* |
| [Roadmap](./docs/ROADMAP.md) | Development phases. |
| [Tech Spec](./docs/TECH-SPEC.md) | Implementation details and configs. |
| [i18n Guide](./docs/I18N.md) | Adding new locales. |
| [Packaging](./docs/PACKAGING.md) | Tauri release builds and signing. |
| [Packaging](./docs/PACKAGING.md) | Tauri desktop + Android release builds and signing. |
| [Contributing](./CONTRIBUTING.md) | PR process, commit conventions, auto-ignore rules. |
| [Security](./SECURITY.md) | Reporting vulnerabilities. |
| [Privacy](./PRIVACY.md) | Data handling (TL;DR: none). |
+11 -1
View File
@@ -46,6 +46,14 @@
└──────────────────────────────────────────────────────────────┘
```
**Error pages (v0.27):** `components/errors/` holds a reusable `ErrorPage`
(404/403/419/500/offline/runtime) driven by the pure `config/error-pages.ts`
map. The dedicated error routes (`/403`, `/419`, `/500`, `/offline`, catch-all
`*`) are declared as **siblings of the `AppShell` route group** in `App.tsx`, so
they render full-screen with no Sidebar/Header. `ErrorPage` is router-agnostic
(hash anchors + `history.back()`) so the root `ErrorBoundary` — mounted outside
`HashRouter` in `main.tsx` — can reuse it as its crash fallback.
## 2. Core Engine Design
Engine module chứa toàn bộ logic generate — **zero framework dependency**. Mọi function đều pure: input → string.
@@ -278,6 +286,8 @@ i18n/locales/
**Adding a new language** = 2 JSON files + 1 line registration. See docs/I18N.md.
**Lazy loading (v0.26+)**: only English is bundled into the main chunk — it is the `fallbackLng` and the engine's bilingual `tEn` translator, both of which must resolve synchronously. Every other language is fetched on first use as a Vite async chunk via `i18next-resources-to-backend` + dynamic `import()`. Generation paths gate on bundle readiness (`useLanguagesReady` hook / `ensureLanguagesLoaded`): an unloaded language would otherwise silently render English fallback output. A chunk that fails to fetch degrades to English and logs to the in-app Log page — it never hangs the UI.
**UI language vs Output language**: These are independent. User can browse the app in English but generate descriptions in Japanese. UI language follows `SettingsStore.defaultLanguage`, output language follows `EditorStore.language`.
## 5. Desktop Packaging (Tauri)
@@ -313,7 +323,7 @@ Tauri advantages over Electron:
| What | How to Extend | Files to Touch |
|------|--------------|----------------|
| New language | Add `locales/{code}/ui.json` + `templates.json`, register in `i18n/index.ts` | 3 files |
| New language | Add `locales/{code}/ui.json` + `templates.json`, register in `SUPPORTED_LANGUAGES` (lazy-loaded automatically) | 3 files |
| New genre | Add entry to `config/genres.ts`, add tag pool to `engine/tag-generator.ts` | 2 files |
| New video type | Add to `config/video-types.ts`, add patterns to all `templates.json` | 1 + N locale files |
| New platform/store | Add entry to `config/platforms.ts` | 1 file |
+161
View File
@@ -0,0 +1,161 @@
# Content Inventory
A static manifest of every video type, game genre, and content warning surfaced in YTDescGen's editor. Maintained manually — when adding a new option to one of the source files below, **add a row here too** in the same PR.
This file exists for **transparency** — anyone curious about what the editor can describe (without installing the app or reading the source) can scan it in one minute.
**Vietnamese mirror:** [`docs/i18n/vi/CONTENT-INVENTORY.md`](./i18n/vi/CONTENT-INVENTORY.md).
**Source of truth:**
- Video types: [`src/config/video-types.ts`](../src/config/video-types.ts)
- Game genres: [`src/config/genres.ts`](../src/config/genres.ts)
- Content warnings: [`src/config/content-warning-groups.ts`](../src/config/content-warning-groups.ts)
---
## 1. Video types (20)
Each video type drives a dedicated description template + title structure + tag bias. The "Extra fields" column lists fields the editor reveals when this type is selected.
| Icon | Type | Extra fields |
|---|---|---|
| 🎮 | Full Gameplay | — |
| 📂 | Gameplay Part | Part Number |
| 🎬 | Full Demo | — |
| 🎞 | Demo Part | Part Number |
| 👹 | Boss Fight | Boss Name |
| 💀 | Boss No Hit | Boss Name |
| 🏁 | Ending / All Endings | — |
| ⚡ | Speedrun | — |
| 💯 | 100% Completion | — |
| 📦 | DLC Content | DLC Name |
| 🔄 | New Game+ | — |
| 🏆 | Challenge Run | Challenge Name |
| 📌 | Side Quests | — |
| 🔍 | Secrets / Hidden | — |
| ⚖️ | Graphics Comparison | — |
| 📘 | Silent Guide | — |
| 🧩 | Modded Gameplay | Mod Name |
| ⭐ | All Collectibles | — |
| 🔴 | Livestream | Live URL, Scheduled Time |
| 🎴 | Gacha Quest | Quest Type, Chapter Name, Quest Name, Part Number |
---
## 2. Game genres (41)
Selected genres feed the title format, the tag pool, and (when configured in Settings → Genre Playlists) the pinned-comment recommendation.
Bulk-select groups available in the editor: **All RPGs** (rpg + jrpg + action_rpg + crpg), **All Shooters** (fps + arena_shooter + tactical_fps + boomer_shooter + extraction_shooter + shmup), **All Horror** (horror + survival_horror + psychological_horror).
| Icon | Genre |
|---|---|
| ⚔️ | Action / Adventure |
| 🗡 | Hack & Slash |
| 👊 | Beat 'em Up |
| 🦘 | Platformer |
| 👻 | Horror / Survival |
| 🧟 | Survival Horror |
| 🧠 | Psychological Horror |
| 🛡 | RPG |
| 🎎 | JRPG |
| 🏹 | Action RPG |
| 📜 | CRPG / Isometric |
| 🔫 | FPS / Shooter |
| 🎯 | Arena Shooter |
| 🎖 | Tactical FPS |
| 💥 | Boomer Shooter |
| 🎒 | Extraction Shooter |
| 🛸 | SHMUP / Bullet Hell |
| 🌍 | Open World / Sandbox |
| 🕹 | Indie |
| 💀 | Souls-like |
| 🏎 | Racing / Sports |
| 📖 | Story / Narrative |
| 🏗 | Simulation / Strategy |
| 🏙 | City Builder |
| 🥊 | Fighting |
| 🥷 | Stealth / Espionage |
| ⛏ | Survival / Crafting |
| 🎲 | Roguelike / Roguelite |
| 🗺 | Metroidvania |
| 🌐 | MMO / Online |
| 🎵 | Rhythm / Music |
| 🧩 | Puzzle |
| 🏰 | Tower Defense |
| 🃏 | Card Game |
| 🎴 | Deck Builder |
| 🤖 | Auto Battler |
| 🏆 | Battle Royale |
| ♟ | Tactical / Turn-based |
| 🚀 | Space / Sci-Fi |
| 🌾 | Farming / Life Sim |
| 🎬 | FMV / Interactive Movie |
| 💬 | Visual Novel |
---
## 3. Content warnings (248, grouped)
Selected warnings are appended to a `⚠ CONTENT WARNINGS` block in the description, ahead of timestamps. Each group is collapsible in the editor; warnings render in description order = user's selection order.
### Spoilers (6)
Story / ending spoilers · Ending spoilers · True-ending spoilers · Post-game / NG+ spoilers · Secret-ending spoilers · DLC story spoilers
### Photosensitive / Health (13)
Flashing lights · Motion sickness · Migraine trigger · Strobe lighting · Heavy screen shake · Lens flare / sun glare · Excessive bloom / overblown highlights · Dense particle effects · Flashing HUD / UI overlays · Extreme color saturation · Heavy motion blur · Aggressive depth of field · Intense post-processing
### Audio / Sensory (13)
Loud / sudden sounds · Ear-piercing / high-pitched · Audio jumpscares · Sudden volume changes · Distorted / clipping audio · Screeching / metallic sounds · Persistent high-pitched tones · Audio glitches / artifacts · Heavy bass / sub-bass rumble · Sustained screaming · Glass breaking / shattering · Mic pops / breath noise · White noise / static
### Dialogue / Language (10)
Frequent profanity · Sexual innuendo / suggestive dialogue · Inflammatory / inciting dialogue · Verbal abuse · Threats / intimidation · Slurs / derogatory terms · Crude / toilet humor · Mature / adult humor · Dark / morbid humor · Drug / alcohol references
### Phobias (56)
Jumpscares · Heights (acrophobia) · Holes / clusters (trypophobia) · Deep water (thalassophobia) · Confined spaces (claustrophobia) · Spiders (arachnophobia) · Insects (entomophobia) · Snakes (ophidiophobia) · Dogs (cynophobia) · Darkness (nyctophobia) · Fire (pyrophobia) · Dolls (pediophobia) · Blood (hemophobia) · Clowns (coulrophobia) · Drowning / water immersion (ablutophobia) · Live burial (taphophobia) · Animatronics / mannequins (automatonophobia) · Large objects (megalophobia) · Submerged man-made objects (submechanophobia) · Corpses (necrophobia) · Ghosts (spectrophobia) · Demons (demonophobia) · Sharks (selachophobia) · Germs / contamination (mysophobia) · Vomiting (emetophobia) · Being watched (scopophobia) · Isolation (monophobia) · Mice / rats (musophobia) · Bats (chiroptophobia) · Birds (ornithophobia) · Fish (ichthyophobia) · Reptiles (herpetophobia) · Cockroaches (katsaridaphobia) · Bees / wasps (apiphobia) · Thunder / lightning (astraphobia) · Open spaces (agoraphobia) · Crowds (enochlophobia) · Snow / extreme cold (chionophobia) · Hospitals (nosocomephobia) · Sharp objects (aichmophobia) · Choking / suffocation (pnigophobia) · Fog / mist (homichlophobia) · Tornadoes / hurricanes (lilapsophobia) · Heavy rain (ombrophobia) · Clouds (nephophobia) · Strong wind (ancraophobia) · Extreme cold (cryophobia) · Sunlight (heliophobia) · Large waves (cymophobia) · Lakes / still water (limnophobia) · Rivers / currents (potamophobia) · Colors / vivid color scenes (chromophobia) · Red / all-red scenes (erythrophobia) · Yellow color (xanthophobia) · White / all-white spaces (leukophobia) · Black color (melanophobia)
### Mental health (17)
Anxiety-inducing scenes · Depression themes · Eating disorders · Substance use · Self-harm / suicide · PTSD content · Needles · Body fluids · Pregnancy / birth horror · Illness / infection · Bipolar themes · OCD themes · Panic attacks · Dissociation · Paranoia · Intrusive thoughts · Medical horror
### Social phenomena (22)
Autism / neurodivergence themes · ADHD / executive dysfunction · Hikikomori / social withdrawal · NEET themes · Social anxiety themes · Social isolation / loneliness · Schizophrenia / psychosis · Burnout / overwork · Survivor guilt · Abandonment themes · Parasocial relationships · Gaslighting · Stockholm syndrome · Gaming / gambling addiction · Existential / nihilistic themes · Impostor syndrome · Midlife crisis · Quarter-life crisis · Workplace harassment · Gender-role pressure · Body shaming / appearance mockery · Unrealistic beauty standards
### Internet / Digital life (18)
Cyberbullying / online harassment · Doxxing / privacy exposure · Trolling / griefing · Cancel culture / public shaming · Social media addiction · Doomscrolling · FOMO (fear of missing out) · Fake news / misinformation · Online scams / phishing · Catfishing / fake identity · Deepfakes / synthetic media · Cyberstalking · Dangerous viral challenges · Influencer culture / clout chasing · Online radicalization / echo chambers · Loot boxes / gacha mechanics · AI / artificial intelligence themes · Data privacy / mass surveillance
### Mature / Sensitive content (66)
Blood and gore · Mature 18+ · Revealing / skimpy outfits · Partial nudity · Sexualized character designs · Fan service / ecchi · Suggestive poses / camera angles · Disturbing imagery · Animal cruelty · Violence against minors · Domestic violence · Sexual assault references · Torture · Religious themes · War violence · Discrimination · State / police violence · Smoking / drinking · Detailed killing · Cult / occult · Psychological manipulation · Loss / grief · Kidnapping · Hate speech · Historical atrocities · Slavery themes · Terrorism themes · Bullying themes · Human experimentation · Cannibalism · Nuclear / radiation · Homophobia / anti-LGBTQ+ · Transphobia / anti-trans · Xenophobia / anti-foreigner · Political extremism · Religious extremism / fundamentalism · Genocide / ethnic cleansing · Holy war / sectarian conflict · Holocaust themes · Civil war · Mass / school shootings · Colonialism / imperialism · State propaganda · Surveillance / dystopian state · Conspiracy theories · Censorship themes · Ethnic / racial conflict · Refugee crisis · Revolution / uprising · Political assassination · Coup d'état · Inquisition / religious persecution · Forced labor · Ultranationalism · Hanging / strangulation · Drowning scene · Burning alive / immolation · Asphyxiation / suffocation · Bound / restrained victim · Public execution · Decapitation · Impalement · Mass-casualty event · Vehicular violence · Overdose scene · Falling from height (intentional)
### Heavy horror (12)
Eyes / eyeball clusters · Body horror (flesh distortion) · Distorted / mutilated faces · Cosmic / eldritch horror · Extreme gore / dismemberment · Decay, rot, maggots · Mutilation / amputation · Liminal spaces · Analog horror / VHS · Unreality / distortion · Pursuit / chase · Entity / SCP horror
### Playstyle disclosures (10)
Blind playthrough · No spoilers in chat · Casual / story mode · Hardcore / max difficulty · Permadeath / Iron Man · Speedrun attempt · 100% completionist · Still learning mechanics · First time playing · Returning / NG+
### Gameplay disclosure (5)
Mods used · Cheats / debug · Glitches used · Guide-assisted · Educational / PSA purpose
---
## 4. Maintenance
When adding a new item to any of the source files:
1. **Video types** → append to [`src/config/video-types.ts`](../src/config/video-types.ts) AND add a row in section 1 above.
2. **Genres** → append to [`src/config/genres.ts`](../src/config/genres.ts) AND add a row in section 2.
3. **Content warnings** → append to the relevant group in [`src/config/content-warning-groups.ts`](../src/config/content-warning-groups.ts) AND add the label to the right group in section 3 — keep the group count in the heading accurate.
4. Update the Vietnamese mirror at [`docs/i18n/vi/CONTENT-INVENTORY.md`](./i18n/vi/CONTENT-INVENTORY.md) in the same PR.
Mismatch between this file and the source files is treated as a documentation bug — open an issue or PR.
+5 -1
View File
@@ -23,7 +23,7 @@ Install in this order:
| Tool | Version | Why |
| --- | --- | --- |
| **Node.js** | `>= 22.0.0` | Vite 7 dropped support for older Node. Use [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm). |
| **Node.js** | `>= 22.12.0` | Vite 8 requires Node `^20.19` or `>= 22.12`. Use [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm). |
| **npm** | bundled with Node 22 | The project uses npm; `pnpm` and `yarn` are not tested. |
| **Rust** | stable, `>= 1.78` | Required for the Tauri desktop build. Install via [rustup](https://rustup.rs/). |
| **Python** | `3.12` | Optional — only needed for some Tauri platform tooling on Windows. |
@@ -130,6 +130,10 @@ Disable corporate VPNs / proxies that block the npm registry. The lock file is c
Locale JSON is bundled at build time, not watched. Restart the dev server after editing `src/i18n/locales/*`.
Since v0.26, only English ships in the main chunk; the other languages are
lazy-loaded async chunks fetched on first use (see `src/i18n/index.ts` and
docs/I18N.md). The restart advice above still applies to all of them.
### Pre-commit hook fails on `validate:locales` but I didn't touch locales
You probably added a new key to `_schema.json` indirectly via the engine types (`src/engine/types.ts` → `CONTENT_WARNINGS`). New IDs require translations in all 6 locales.
+110 -74
View File
@@ -4,84 +4,40 @@
---
## 🎬 Video Types (14 types)
## 🎬 Video Types (20 types)
| ID | Label (EN) | Label (VI) | Label (JA) | Extra Fields |
|----|-----------|------------|------------|--------------|
| `full` | Full Gameplay | Full Gameplay | フルゲームプレイ | — |
| `part` | Gameplay Part | Gameplay Phần | ゲームプレイ パート | `partNumber` |
| `boss` | Boss Fight | Boss Fight | ボス戦 | `bossName` |
| `boss_nohit` | Boss No Hit | Boss No Hit | ボス ノーヒット | `bossName` |
| `ending` | Ending / All Endings | Kết thúc | エンディング | — |
| `speedrun` | Speedrun | Speedrun | スピードラン | — |
| `100percent` | 100% Completion | 100% Completion | 100%クリア | — |
| `dlc` | DLC Content | Nội dung DLC | DLCコンテンツ | `dlcName` |
| `newgame_plus` | New Game+ | New Game+ | 強くてニューゲーム | — |
| `challenge` | Challenge Run | Challenge Run | チャレンジラン | `challengeName` |
| `side_quest` | Side Quests | Nhiệm vụ phụ | サブクエスト | — |
| `secret` | Secrets / Hidden | Bí mật | 隠し要素 | — |
| `comparison` | Graphics Comparison | So sánh đồ họa | グラフィック比較 | — |
| `guide` | Silent Guide | Hướng dẫn | 攻略ガイド | — |
Twenty video types, each driving a dedicated description template, title
structure, and tag bias. The complete table — every type with its icon and
the extra fields the editor reveals — is in
[Content Inventory](./CONTENT-INVENTORY.md).
## 🌐 Languages (12 languages)
## 🌐 Languages (6 shipped)
All six locales ship today — UI strings and description templates fully
translated and parity-validated by `npm run validate:locales`.
### Launch (Phase 1)
| Code | Language | Native Name | Status |
|------|----------|-------------|--------|
| `en` | English | English | ✅ Ready |
| `vi` | Vietnamese | Tiếng Việt | ✅ Ready |
| `ja` | Japanese | 日本語 | ✅ Ready |
| `en` | English | English | ✅ Shipped |
| `vi` | Vietnamese | Tiếng Việt | ✅ Shipped |
| `ja` | Japanese | 日本語 | ✅ Shipped |
| `es` | Spanish | Español | ✅ Shipped |
| `ko` | Korean | 한국어 | ✅ Shipped |
| `zh` | Chinese (Simplified) | 简体中文 | ✅ Shipped |
### Phase 2
| Code | Language | Native Name |
|------|----------|-------------|
| `es` | Spanish | Español |
| `ko` | Korean | 한국어 |
| `zh` | Chinese (Simplified) | 简体中文 |
### Phase 3+
| Code | Language | Native Name |
|------|----------|-------------|
| `fr` | French | Français |
| `de` | German | Deutsch |
| `pt` | Portuguese | Português |
| `ru` | Russian | Русский |
| `th` | Thai | ภาษาไทย |
| `ar` | Arabic | العربية |
Further locales (French, German, Portuguese, Russian, Thai, Arabic) are
tracked in [Roadmap § 5.3](./ROADMAP.md).
Each language requires:
- `ui.json` — UI labels, buttons, placeholders, error messages
- `templates.json` — Title patterns, description sections, CTA text
## 🎮 Game Genres (25 genres)
## 🎮 Game Genres (41 genres)
| ID | Label | Icon | Tag Keywords (sample) |
|----|-------|------|-----------------------|
| `action` | Action / Adventure | ⚔️ | action game, hack and slash, action adventure |
| `horror` | Horror / Survival | 👻 | horror game, survival horror, scary game, psychological horror |
| `rpg` | RPG / JRPG | 🛡 | RPG, JRPG, action RPG, turn based RPG |
| `fps` | FPS / Shooter | 🔫 | FPS, shooter, tactical shooter, third person shooter |
| `openworld` | Open World / Sandbox | 🌍 | open world, sandbox, free roam, exploration |
| `indie` | Indie / Platformer | 🕹 | indie game, platformer, pixel art |
| `soulslike` | Souls-like | 💀 | souls like, soulsborne, boss fight, no death run |
| `racing` | Racing / Sports | 🏎 | racing game, driving sim, sports game |
| `story` | Story / Visual Novel | 📖 | story game, visual novel, narrative game, interactive drama |
| `simulation` | Simulation / Strategy | 🏗 | simulation, city builder, management, tycoon |
| `fighting` | Fighting | 🥊 | fighting game, combo, versus, arcade |
| `stealth` | Stealth / Espionage | 🥷 | stealth game, stealth gameplay, infiltration |
| `survival_craft` | Survival / Crafting | 🏕 | survival game, crafting, base building |
| `mmo` | MMO / Online | 🌐 | MMO, MMORPG, online game, multiplayer |
| `rhythm` | Rhythm / Music | 🎵 | rhythm game, music game, beat game |
| `puzzle` | Puzzle | 🧩 | puzzle game, brain teaser, logic game |
| `roguelike` | Roguelike / Roguelite | 🎲 | roguelike, roguelite, procedural, permadeath |
| `metroidvania` | Metroidvania | 🗺 | metroidvania, exploration, ability unlock |
| `tower_defense` | Tower Defense | 🏰 | tower defense, TD game, strategy |
| `card_game` | Card / Deck Builder | 🃏 | card game, deck builder, TCG |
| `battle_royale` | Battle Royale | 🏆 | battle royale, last man standing, BR |
| `crpg` | CRPG / Isometric | 📜 | CRPG, isometric RPG, classic RPG |
| `tactical` | Tactical / Turn-based | ♟ | tactical, turn based strategy, XCOM-like |
| `space` | Space / Sci-Fi | 🚀 | space game, sci-fi, space exploration |
| `farming` | Farming / Life Sim | 🌾 | farming sim, life sim, cozy game |
Forty-one genres feed the title format, the tag pool, and (when configured
in Settings → Genre Playlists) the pinned-comment playlist recommendation.
The complete list — with icons and bulk-select groups — is in
[Content Inventory](./CONTENT-INVENTORY.md).
## 🛒 Store Platforms (9 platforms)
@@ -143,16 +99,44 @@ Mỗi ngôn ngữ có description structure như sau (tất cả sections option
4. ─── Store Links ─── (if any platform link provided)
5. ─── Video Settings ─── (resolution / FPS / graphics)
6. ─── My Rig ─── (if any rig field provided)
7. ─── Spoiler Warning ─── (if toggled)
8. ─── 18+ Warning ─── (if toggled)
9. ─── Donate Links ─── (if any provided)
10. ─── Social Links ─── (if any provided)
11. ─── Playlist Link ─── (if provided)
12. ─── Contact Email ─── (if provided)
13. CTA line (Like / Subscribe / Share)
14. Hashtags (3 max, auto-generated)
7. ─── Content Warnings ─── (if any selected — 248 IDs across 12 groups)
8. ─── Donate Links ─── (if any provided)
9. ─── Social Links ─── (if any provided)
10. ─── Playlist Link ─── (if provided)
11. ─── Contact Email ─── (if provided)
12. CTA line (Like / Subscribe / Share)
13. Hashtags (3 max, auto-generated)
```
## 🔁 Cross-Post Captions (Social tab)
A dedicated **Social** tab re-packages the same editor source that drives the
YouTube description into short-form captions for other platforms — no
re-typing. Each caption is derived live from the current form.
| Platform | Caption limit | Popular hashtags appended |
|----------|--------------|----------------------------|
| TikTok | 4,000 | `#fyp #foryou #foryoupage #gaming #gamingtiktok #gameplay #gamer` |
| Instagram Reels | 2,200 | `#reels #reelsinstagram #gaming #gamingreels #gamer #instagaming #videogames` |
| Facebook Reels | 2,200 | `#reels #facebookreels #fbreels #gaming #gameplay #gamingcommunity #videogames` |
Each caption pulls, in order: **Title** (quality badge suppressed for
short-form), **My Rig**, **Content Warnings**, **Thanks / sponsor credit**,
**Copyright**, and **hashtags** (game + primary genre + the curated
per-platform popular set, deduplicated case-insensitively).
- **Overflow handling** — when a caption exceeds the platform limit, optional
blocks are dropped in priority order (warnings → copyright → thanks → rig).
The title and the hashtag line are never dropped, and there is no
mid-string truncation.
- **Single mode** — platform tabs with a live character counter and
over-limit warning.
- **Bulk mode** — generate a part range (e.g. Parts 1–10) across selected
languages in one pass, reusing the Batch loop.
- **Import / Export** — round-trip the generated captions as a typed JSON
bundle (`_type: "social"`); import is display-only since captions are
derived artifacts (the source round-trips via Profiles / Presets).
## 🏷 Tag Generation
### Tag Pools by Category
@@ -266,6 +250,58 @@ interface HistoryEntry {
| Offline | Full functionality without internet |
| Global Hotkey | System-wide hotkey to open app (optional) |
## 📱 Android App (v0.29)
An installable, sideloadable `.apk` built from the same Tauri 2 codebase — no
separate mobile project. Build with `cargo tauri android build --apk`; see
[PACKAGING.md](./PACKAGING.md#android-apk-packaging).
| Feature | Description |
|---------|-------------|
| Same codebase | One Tauri 2 project produces web, desktop, and Android |
| Min version | Android 11+ (minSdk 30); `targetSdk` 36 (Android 16) |
| Tested | Android 11 → 16 (emulators); real device on Android 12 |
| Signed APK | Self-signed release APK for sideloading; CI publishes it to GitHub Releases |
| Responsive UI | Drawer navigation, touch-sized controls, safe-area insets |
| File export | Routed through the WebView download (lands in Downloads) on Android |
| Persistence | App-private data dir (`appDataDir()`) + localStorage; works offline |
| No tray | Desktop-only tray / single-instance are `#[cfg(desktop)]`-gated out |
## 🚦 Error Pages & Offline (v0.27)
A single reusable, fully-localized `ErrorPage` component (`src/components/errors/`)
backed by a pure kind→meta config (`src/config/error-pages.ts`). All copy ships
in every locale (en/vi/ja/es/ko/zh).
| Kind | Route | Trigger |
|------|-------|---------|
| 404 Not found | catch-all `*` | A mistyped / dead hash route (live — was a blank screen before) |
| 403 Forbidden | `/#/403` | Designed page, route-reachable for future triggers |
| 419 Expired | `/#/419` | Designed page, route-reachable for future triggers |
| 500 Server error | `/#/500` | Designed page (covers 408/5xx), route-reachable for future triggers |
| Offline | `/#/offline` + banner | `navigator.onLine` flips false |
| Runtime crash | — | A render error caught by `ErrorBoundary` (shared `contained` variant) |
- **Full-screen, no shell** — dedicated error routes render outside `AppShell`
(no Sidebar/Header), with Home / Back / (Reload) / Report-a-bug actions.
- **Non-blocking offline banner** — a dismissible bottom strip; the app stays
fully usable offline, and a toast confirms when the connection returns.
## ⚖️ Legal & Consent (v0.28)
A first-run **consent gate** (`src/components/ConsentGate.tsx`, backed by the
pure `src/config/legal.ts`) blocks the app until the user reviews the legal
documents and ticks one "I agree" checkbox.
| Aspect | Behaviour |
|--------|-----------|
| Documents | Terms of Use, Privacy Policy, Disclaimer, License — linked to the GitHub-hosted copies (open in the browser); also surfaced in About → Legal |
| Acceptance | One combined checkbox; Continue disabled until checked |
| Persistence | Stored in the existing settings record (`legalConsentVersion` + timestamp) — **no cookie, no new storage key** |
| Re-prompt | Version-based — only when `CURRENT_TERMS_VERSION` is raised (terms changed); also re-shows in fresh / incognito storage |
| Desktop | Same in-app gate on Windows/macOS/Linux, **plus** a license-acceptance page in the Windows MSI/NSIS installer (`bundle.licenseFile`) |
| Layout | Full-screen, non-dismissible, theme- and locale-aware (all 6 languages) |
## 🔌 Future Extension Points
| Extension | Description | Effort |
+10 -12
View File
@@ -17,7 +17,7 @@ These are independent: a Vietnamese user can browse the app in Vietnamese (UI) w
```
src/i18n/
├── index.ts # i18next initialization + language registration
├── index.ts # i18next init + SUPPORTED_LANGUAGES (en eager, others lazy-loaded)
├── locales/
│ ├── _schema.json # JSON Schema defining all required keys
│ ├── en/
@@ -206,25 +206,23 @@ cp -r src/i18n/locales/en src/i18n/locales/es
### Step 4: Register the language
```typescript
// src/i18n/index.ts — add to SUPPORTED_LANGUAGES
// src/i18n/index.ts — add to SUPPORTED_LANGUAGES (the only registration step)
export const SUPPORTED_LANGUAGES = [
{ id: "en", label: "English", flag: "🇬🇧", nativeName: "English" },
{ id: "vi", label: "Vietnamese", flag: "🇻🇳", nativeName: "Tiếng Việt" },
{ id: "ja", label: "Japanese", flag: "🇯🇵", nativeName: "日本語" },
{ id: "es", label: "Spanish", flag: "🇪🇸", nativeName: "Español" }, // ← Add here
] as const;
// Add resource import
import esUI from "./locales/es/ui.json";
import esTemplates from "./locales/es/templates.json";
// Add to i18next resources
resources: {
// ...existing
es: { ui: esUI, templates: esTemplates },
}
```
No import or `resources` edits needed (v0.26+): locales are lazy-loaded
through a dynamic `import("./locales/<code>/<ns>.json")`, so Vite picks the
new files up automatically as async chunks — **the file names must stay
exactly `ui.json` and `templates.json`**. Only English is eagerly bundled
(it's the `fallbackLng` and the engine's bilingual `tEn` source); don't add
static imports for other languages, that would drag them back into the
main chunk.
### Step 5: Add multilingual tag pool
```typescript
+146 -1
View File
@@ -27,7 +27,7 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Tauri CLI
cargo install tauri-cli
# Node.js 20+
# Node.js 22+
# npm already installed from web development
# Platform-specific
@@ -108,6 +108,15 @@ This creates `src-tauri/` directory.
}
```
> **Installer license page (v0.28).** The real `src-tauri/tauri.conf.json`
> sets `bundle.licenseFile: "installer-license.txt"` (path relative to
> `src-tauri/`). Tauri shows that file as an "accept the terms" page in the
> **Windows MSI/NSIS** installers. macOS `.app`/`.dmg` and the Linux packages
> have no interactive license step, so they rely on the app's first-run
> consent gate instead. If a WiX/MSI build ever rejects the `.txt`, switch to
> the per-bundler keys (`bundle.windows.wix.licenseFile` wants `.rtf`,
> `bundle.windows.nsis.licenseFile` accepts `.txt`).
### 3. Rust Backend (src-tauri/src/main.rs)
```rust
@@ -265,6 +274,142 @@ Linux runners install `libwebkit2gtk-4.1-dev`, `libgtk-3-dev`, `libayatana-appin
**Backfill for pre-workflow tags:** `v0.8.0` and `v0.8.1` predate the multi-platform matrix and only have local Windows builds. To attach binaries retroactively, build manually then `gh release create v0.8.0 --notes-file CHANGELOG.md path/to/*.msi …`.
## Android (.apk) Packaging
YTDescGen also builds an installable Android APK from the **same** Tauri 2
codebase — there is no separate mobile project. Tauri 2 ships Android support;
the crate is already `cdylib`/`staticlib` with a `#[cfg_attr(mobile, …)]` entry
point, and the Android launcher icons live in `src-tauri/icons/android/`. The
desktop-only tray / single-instance / hide-to-tray logic in `src-tauri/src/lib.rs`
is gated behind `#[cfg(desktop)]` so the library compiles for Android.
### Requirements & tested versions
| | |
|---|---|
| **Minimum OS** | **Android 11** (API level 30, `minSdk 30`). The APK will not install below this. |
| **Target OS** | **Android 16** (API level 36, `targetSdk 36`). |
| **Architectures** | Universal APK — `arm64-v8a`, `armeabi-v7a`, `x86`, `x86_64`. |
| **Tested** | **Android 11 → 16.** The v0.29.0 build was verified on Android emulators across this range **and on a real device running Android 12** (the maintainer's phone). |
Where the value lives: `bundle.android.minSdkVersion` in
[`src-tauri/tauri.conf.json`](../src-tauri/tauri.conf.json) is the source of
truth used by `tauri android init`; the generated
`gen/android/app/build.gradle.kts` carries the baked `minSdk = 30` — edit that
directly if you change the floor without re-running `init`.
**Why Android 11 is the floor (rationale):**
- **Coverage.** Android 11+ accounts for the large majority of active devices in
2026 (Android 14/15 alone are the two biggest slices, and 11–13 together still
hold a sizeable share). Going lower buys few extra users at growing compat cost.
- **A modern, patched WebView.** The app renders entirely in the system WebView,
whose minimum is Android 10. On Android 11+ the WebView auto-updates via Google
Play, so the rendering/JS engine stays current and patched. This is exactly why
the **real-device test on Android 12 worked**, while a *stale* Android-12
emulator stuck on WebView 91 showed a black screen (the `crypto.randomUUID`
boot crash) — that class of bug is fixed in v0.29.0 and is moot on an
up-to-date WebView.
- **Security upkeep.** Even though Google's *OS-level* monthly security bulletins
for Android 11–13 have ended (Android 12 in 2025, Android 13 in early 2026),
Android 11+ keeps receiving security updates for the components that matter to a
sandboxed WebView app: Google Play system updates (Project Mainline), Google
Play services, and System WebView. Requiring strict OS-bulletin support would
mean Android 14+, which would drop more than half of users.
### Prerequisites
- **Android SDK** — platform-tools, a platform (e.g. `android-34`/`android-36`), build-tools. Install via Android Studio or the command-line tools.
- **Android NDK** — r27 LTS recommended (e.g. `27.3.13750724`).
- **JDK 17** — Android Studio's bundled JBR works (`…/Android Studio/jbr`).
- **Rust android targets**:
```bash
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
```
Set these environment variables before any `android` command (PowerShell shown):
```powershell
$env:ANDROID_HOME = "C:\Users\<you>\AppData\Local\Android\Sdk"
$env:NDK_HOME = "C:\Users\<you>\AppData\Local\Android\Sdk\ndk\27.3.13750724"
$env:JAVA_HOME = "C:\Jetbrains\Android Studio\jbr" # or any JDK 17
```
### Initialize (one-time)
```bash
cargo tauri android init
```
Generates the Gradle project under `src-tauri/gen/android/` — **committed** to
the repo so the signing block and any manifest edits persist. It pulls launcher
icons from `src-tauri/icons/android/` and sets `applicationId =
com.skullmute.ytdescgen`. Treat `init` as a one-time step: re-running it
overwrites hand edits like the signing config below, so only re-run it if a
Tauri upgrade requires regenerating the project (then re-apply the signing edit).
### Signing (one-time)
Sideloaded APKs must be signed. Create a self-signed release keystore and keep
it **outside** the repo:
```powershell
& "$env:JAVA_HOME\bin\keytool.exe" -genkeypair -v `
-keystore C:\keys\ytdescgen-release.jks `
-keyalg RSA -keysize 2048 -validity 10000 -alias ytdescgen
```
> ⚠️ **Back this keystore up.** If you lose it you can never publish an update
> that installs over an existing copy — Android rejects a changed signature.
Create `src-tauri/gen/android/keystore.properties` (gitignored):
```properties
storeFile=C:/keys/ytdescgen-release.jks
storePassword=<store-password>
keyAlias=ytdescgen
keyPassword=<key-password>
```
`app/build.gradle.kts` carries a `release` `signingConfigs` block that reads this
file, guarded by `if (exists())` — a missing keystore yields an *unsigned*
release build rather than a hard failure (handy for contributors).
### Build
```bash
cargo tauri android build --apk
# → src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk
```
- `--apk` produces an APK. **Without it Tauri builds an `.aab`** App Bundle for the Play Store, which cannot be sideloaded.
- `cargo tauri android build --apk --target aarch64` builds an arm64-only APK (smaller download; covers virtually all modern phones).
- The build runs `npm run build` first (the `beforeBuildCommand`), then Gradle. The first build takes several minutes (Rust × up to 4 ABIs + a cold Gradle).
- For on-device iteration with hot reload: `cargo tauri android dev`.
Install on a device: copy the APK over (or `adb install -r <apk>`) and enable
"Install unknown apps" for the source app.
### CI
[.github/workflows/release-android.yml](../.github/workflows/release-android.yml)
builds and signs the APK on a `v*` tag (or `workflow_dispatch`) and attaches it
to the same draft GitHub Release as the desktop binaries. It needs four repo
secrets:
| Secret | Value |
|---|---|
| `ANDROID_KEYSTORE_BASE64` | base64 of the `.jks` (`base64 -w0 ytdescgen-release.jks`) |
| `ANDROID_STORE_PASSWORD` | keystore store password |
| `ANDROID_KEY_PASSWORD` | key password |
| `ANDROID_KEY_ALIAS` | `ytdescgen` |
### App-level changes for Android
- **`src-tauri/src/lib.rs`** — tray / single-instance / hide-to-tray / exit-prevention are `#[cfg(desktop)]`; the dialog/fs/opener/shell plugins and the six file commands run on every platform.
- **`src-tauri/Cargo.toml`** — `tauri-plugin-single-instance` lives in a desktop-only `[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]` table.
- **`src/utils/platform.ts` / `file-ops.ts`** — `IS_MOBILE` routes file export through the WebView blob download on Android (the native save dialog is unreliable under scoped storage). Settings persist via `appDataDir()` (app-private storage) **and** localStorage, both of which work on Android.
## Auto-Update Flow
```
+1 -1
View File
@@ -51,7 +51,7 @@
- [x] editor/ components: StoreLinkEditor, RigEditor, SocialEditor, WarningToggles
- [x] editor/ components: QuickPreview
- [x] output/ components: OutputPreview, CopyButton, CharCounter, CopyAllBar
- [x] layout/ components: AppShell, Header, TabBar
- [x] layout/ components: AppShell, Header, Sidebar
1.7 Pages
- [x] EditorPage (form + quick preview)
+10 -10
View File
@@ -11,7 +11,7 @@
```jsonc
{
"name": "yt-desc-gen",
"version": "0.1.0",
"version": "0.20.0",
"private": true,
"type": "module",
"scripts": {
@@ -317,10 +317,10 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
node-version: 22
cache: npm
- run: npm ci
- run: npm run typecheck
@@ -350,19 +350,19 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
node-version: 22
cache: npm
- run: npm ci
- run: npm run build
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
- uses: actions/configure-pages@v6
- uses: actions/upload-pages-artifact@v5
with:
path: dist
- id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v5
```
## 5. Testing Strategy
+161
View File
@@ -0,0 +1,161 @@
# Danh mục Nội dung
Bản kê khai tĩnh cho mọi loại video, thể loại game, và cảnh báo nội dung trong editor của YTDescGen. Cập nhật thủ công — khi thêm mục mới vào một trong các file nguồn dưới đây, **thêm dòng tương ứng vào đây** trong cùng PR.
File này tồn tại để **minh bạch** — bất kỳ ai tò mò về việc editor có thể mô tả được gì (mà không cần cài app hay đọc source) đều có thể quét trong một phút.
**Bản gốc tiếng Anh:** [`docs/CONTENT-INVENTORY.md`](../../CONTENT-INVENTORY.md).
**Nguồn tham chiếu (source of truth):**
- Loại video: [`src/config/video-types.ts`](../../../src/config/video-types.ts)
- Thể loại game: [`src/config/genres.ts`](../../../src/config/genres.ts)
- Cảnh báo nội dung: [`src/config/content-warning-groups.ts`](../../../src/config/content-warning-groups.ts)
---
## 1. Loại video (20)
Mỗi loại video kéo theo một template description, cấu trúc title, và tag bias riêng. Cột "Trường bổ sung" liệt kê các trường editor sẽ hiển thị khi chọn loại video tương ứng.
| Icon | Loại | Trường bổ sung |
|---|---|---|
| 🎮 | Gameplay đầy đủ | — |
| 📂 | Gameplay theo phần | Số phần |
| 🎬 | Demo đầy đủ | — |
| 🎞 | Demo theo phần | Số phần |
| 👹 | Đấu trùm | Tên trùm |
| 💀 | Đấu trùm không trúng đòn | Tên trùm |
| 🏁 | Kết thúc / Toàn bộ Ending | — |
| ⚡ | Speedrun | — |
| 💯 | Hoàn thành 100% | — |
| 📦 | Nội dung DLC | Tên DLC |
| 🔄 | New Game+ | — |
| 🏆 | Thử thách | Tên thử thách |
| 📌 | Nhiệm vụ phụ | — |
| 🔍 | Bí mật / Ẩn | — |
| ⚖️ | So sánh đồ họa | — |
| 📘 | Hướng dẫn không lời | — |
| 🧩 | Chơi với Mod | Tên Mod |
| ⭐ | Toàn bộ vật phẩm sưu tầm | — |
| 🔴 | Livestream | URL Live, Thời gian dự kiến |
| 🎴 | Nhiệm vụ Gacha | Loại nhiệm vụ, Tên chapter, Tên quest, Số phần |
---
## 2. Thể loại game (41)
Thể loại được chọn ảnh hưởng đến định dạng title, tag pool, và (khi cấu hình ở Settings → Genre Playlists) gợi ý playlist trong pinned comment.
Các nhóm bulk-select trong editor: **All RPGs** (rpg + jrpg + action_rpg + crpg), **All Shooters** (fps + arena_shooter + tactical_fps + boomer_shooter + extraction_shooter + shmup), **All Horror** (horror + survival_horror + psychological_horror).
| Icon | Thể loại |
|---|---|
| ⚔️ | Hành động / Phiêu lưu |
| 🗡 | Hack & Slash |
| 👊 | Beat 'em Up |
| 🦘 | Platformer |
| 👻 | Kinh dị / Sinh tồn |
| 🧟 | Kinh dị Sinh tồn |
| 🧠 | Kinh dị Tâm lý |
| 🛡 | RPG |
| 🎎 | JRPG |
| 🏹 | Action RPG |
| 📜 | CRPG / Góc nhìn từ trên |
| 🔫 | FPS / Bắn súng |
| 🎯 | Bắn súng Arena |
| 🎖 | Bắn súng Chiến thuật |
| 💥 | Boomer Shooter |
| 🎒 | Extraction Shooter |
| 🛸 | SHMUP / Bullet Hell |
| 🌍 | Thế giới mở / Sandbox |
| 🕹 | Indie |
| 💀 | Souls-like |
| 🏎 | Đua xe / Thể thao |
| 📖 | Cốt truyện |
| 🏗 | Mô phỏng / Chiến thuật |
| 🏙 | Xây thành |
| 🥊 | Đối kháng |
| 🥷 | Lén lút / Gián điệp |
| ⛏ | Sinh tồn / Chế tạo |
| 🎲 | Roguelike / Roguelite |
| 🗺 | Metroidvania |
| 🌐 | MMO / Trực tuyến |
| 🎵 | Âm nhạc / Nhịp điệu |
| 🧩 | Giải đố |
| 🏰 | Tower Defense |
| 🃏 | Bài / Card |
| 🎴 | Deck Builder |
| 🤖 | Auto Battler |
| 🏆 | Battle Royale |
| ♟ | Chiến thuật theo lượt |
| 🚀 | Không gian / Sci-Fi |
| 🌾 | Nông trại / Life Sim |
| 🎬 | FMV / Phim tương tác |
| 💬 | Visual Novel |
---
## 3. Cảnh báo nội dung (248, chia nhóm)
Cảnh báo được chọn sẽ thêm vào khối `⚠ CONTENT WARNINGS` trong description, trước phần timestamp. Mỗi nhóm có thể thu gọn trong editor; cảnh báo hiển thị theo thứ tự người dùng chọn.
### Spoiler (6)
Spoiler cốt truyện / ending · Spoiler ending · Spoiler ending thật · Spoiler hậu game / NG+ · Spoiler ending bí mật · Spoiler cốt truyện DLC
### Sức khỏe / Quang nhạy (13)
Hiệu ứng chớp sáng · Say game / camera nhanh · Có thể đau nửa đầu · Đèn nhấp nháy · Rung màn hình mạnh · Loé sáng / lens flare · Bloom quá đà / sáng cháy · Hiệu ứng hạt dày đặc · HUD / overlay nhấp nháy · Màu sắc quá rực / loè loẹt · Motion blur nặng · Depth of field gắt · Post-processing đậm đặc
### Âm thanh / Cảm âm (13)
Âm thanh đột ngột · Âm chói tai / tần số cao · Jumpscare bằng âm thanh · Thay đổi âm lượng đột ngột · Âm thanh méo / vỡ · Tiếng ken két / kim loại · Tiếng cao kéo dài · Lỗi âm thanh / glitch · Bass nặng / sub-bass rung · Tiếng la hét kéo dài · Tiếng kính vỡ / va đập · Tạp âm mic / tiếng thở · Tiếng nhiễu / tĩnh điện
### Lời thoại / Ngôn từ (10)
Văng tục dày đặc · Lời thoại ẩn ý t*nh d*c · Lời thoại kích động · Lăng mạ / sỉ nhục bằng lời · Lời đe dọa / uy hiếp · Từ ngữ miệt thị / xúc phạm · Hài thô tục · Hài người lớn · Hài đen / u tối · Nhắc đến chất kích thích / đồ có cồn
### Ám ảnh / Phobia (56)
Jumpscare · Sợ độ cao (acrophobia) · Sợ lỗ / cụm (trypophobia) · Sợ nước sâu (thalassophobia) · Sợ không gian kín (claustrophobia) · Sợ nhện (arachnophobia) · Sợ côn trùng (entomophobia) · Sợ rắn (ophidiophobia) · Sợ chó (cynophobia) · Sợ bóng tối (nyctophobia) · Sợ lửa (pyrophobia) · Sợ búp bê (pediophobia) · Sợ máu (hemophobia) · Sợ chú hề (coulrophobia) · Sợ chết đuối (ablutophobia) · Sợ bị chôn sống (taphophobia) · Hình nhân máy (automatonophobia) · Vật thể khổng lồ (megalophobia) · Vật nhân tạo dưới nước (submechanophobia) · Xác chết (necrophobia) · Ma quỷ (spectrophobia) · Quỷ dữ (demonophobia) · Cá mập (selachophobia) · Vi trùng / ô nhiễm (mysophobia) · Nôn mửa (emetophobia) · Bị nhìn chằm chằm (scopophobia) · Cô lập (monophobia) · Chuột (musophobia) · Dơi (chiroptophobia) · Chim (ornithophobia) · Cá (ichthyophobia) · Bò sát (herpetophobia) · Gián (katsaridaphobia) · Ong (apiphobia) · Sấm sét (astraphobia) · Không gian rộng (agoraphobia) · Đám đông (enochlophobia) · Tuyết / giá lạnh (chionophobia) · Bệnh viện (nosocomephobia) · Vật sắc nhọn (aichmophobia) · Nghẹt thở (pnigophobia) · Sương mù (homichlophobia) · Lốc xoáy / bão (lilapsophobia) · Mưa lớn (ombrophobia) · Mây / trời u ám (nephophobia) · Gió mạnh (ancraophobia) · Cực lạnh (cryophobia) · Ánh nắng gay gắt (heliophobia) · Sóng lớn (cymophobia) · Hồ / nước tĩnh (limnophobia) · Sông / dòng chảy (potamophobia) · Sợ màu sắc / cảnh màu chói (chromophobia) · Sợ màu đỏ / cảnh toàn đỏ (erythrophobia) · Sợ màu vàng (xanthophobia) · Sợ màu trắng / không gian toàn trắng (leukophobia) · Sợ màu đen (melanophobia)
### Sức khỏe tâm thần (17)
Cảnh gây lo âu · Trầm cảm · Rối loạn ăn uống · Sử dụng chất kích thích · Tự hại / tự tử · PTSD · Kim tiêm · Dịch cơ thể · Mang thai / sinh nở kinh dị · Bệnh tật / nhiễm trùng · Lưỡng cực · OCD · Hoảng loạn · Phân ly · Hoang tưởng · Suy nghĩ xâm nhập · Y khoa kinh dị
### Hiện tượng tâm lý — xã hội (22)
Tự kỷ / thần kinh đa dạng · ADHD / rối loạn tập trung · Hikikomori / ẩn dật xã hội · NEET (không học không làm) · Lo âu xã hội · Cô lập xã hội / cô đơn · Tâm thần phân liệt / loạn thần · Burnout / kiệt sức · Mặc cảm sống sót · Bị bỏ rơi / sang chấn · Quan hệ parasocial · Gaslighting / thao túng · Hội chứng Stockholm · Nghiện game / cờ bạc · Khủng hoảng hiện sinh · Hội chứng kẻ mạo danh · Khủng hoảng tuổi trung niên · Khủng hoảng tuổi 1/4 · Quấy rối nơi làm việc · Áp lực vai trò giới · Miệt thị ngoại hình (body shaming) · Chuẩn mực ngoại hình phi thực tế
### Internet / Đời sống số (18)
Bắt nạt / quấy rối qua mạng · Doxxing / phơi bày thông tin cá nhân · Trolling / phá game · Văn hóa tẩy chay / bêu rếu công khai · Nghiện mạng xã hội · Lướt tin tiêu cực vô độ (doomscrolling) · Hội chứng sợ bỏ lỡ (FOMO) · Tin giả / thông tin sai lệch · Lừa đảo trực tuyến / phishing · Giả mạo danh tính trên mạng (catfishing) · Deepfake / nội dung giả mạo bằng AI · Theo dõi / rình rập qua mạng · Trào lưu / thử thách nguy hiểm trên mạng · Văn hóa influencer / câu tương tác · Cực đoan hóa qua mạng / buồng vang thông tin · Loot box / cơ chế gacha · Chủ đề AI / trí tuệ nhân tạo · Riêng tư dữ liệu / giám sát diện rộng
### Nội dung nhạy cảm / 18+ (66)
Máu me · 18+ · Trang phục hở hang · Kh*a th*n một phần · Tạo hình nhân vật bị t*nh d*c hóa · Yếu tố fan service · Tư thế / góc quay gợi cảm · Hình ảnh gây khó chịu · B*o h*nh động vật · Trẻ em chịu tác động · B*o h*nh gia đình · Tham chiếu x*m h*i t*nh d*c · Tra tấn · Tôn giáo · Tác động vật lý chiến tranh · Phân biệt đối xử · Tác động vật lý từ chính quyền · Hút thuốc / uống rượu · G*ết người chi tiết · Tà giáo / huyền bí · Thao túng tâm lý · Mất mát / đau buồn · Bắt cóc · Phát ngôn thù hận · Tội ác lịch sử · Nô lệ · Khủng bố · Bắt nạt · Thử nghiệm trên người · Ăn thịt người · Hạt nhân / phóng xạ · Kỳ thị người đồng tính / LGBTQ+ (homophobia) · Kỳ thị người chuyển giới (transphobia) · Bài ngoại (xenophobia) · Cực đoan chính trị · Cực đoan tôn giáo / cuồng tín · Diệt chủng / thanh trừng sắc tộc · Thánh chiến / xung đột tôn giáo · Đại nạn Holocaust · Nội chiến · Xả súng hàng loạt / xả súng trường học · Chủ nghĩa thực dân / đế quốc · Tuyên truyền nhà nước · Nhà nước giám sát / dystopia · Thuyết âm mưu · Kiểm duyệt / cấm phát ngôn · Xung đột sắc tộc / chủng tộc · Khủng hoảng tị nạn · Cách mạng / nổi dậy · Ám sát chính trị · Đảo chính · Toà án dị giáo / săn phù thủy · Lao động cưỡng bức · Chủ nghĩa dân tộc cực đoan · Treo c* / siết c* · Cảnh ch*t đuối · Cảnh thiêu s*ng · Cảnh ngạt th* · Bị trói / cầm tù tra tấn · Cảnh hành quyết công khai · Cảnh chặt đầu · Cảnh đâm xuyên cơ thể · Thương vong hàng loạt · Tác động vật lý bằng phương tiện · Cảnh sử dụng quá liều · Ngã / nhảy từ trên cao
### Kinh dị nặng (12)
Mắt / cụm mắt · Body horror (biến dạng cơ thể) · Mặt biến dạng / cắt xén · Kinh dị vũ trụ · Máu me / phân thây cực độ · Phân hủy, thối rữa, dòi bọ · Cắt xẻo / cụt chi · Liminal space · Analog horror / VHS · Phi thực tế / méo mó · Truy đuổi · Thực thể / SCP
### Thông tin về playstyle (10)
Lần đầu chơi (blind) · Không spoiler trong chat · Chế độ easy / story · Chế độ khó cao · Permadeath / Iron Man · Thử speedrun · 100% completionist · Đang học cơ chế · Chơi lần đầu · Chơi lại / NG+
### Thông tin về gameplay (5)
Dùng mod · Bật cheat / debug · Dùng glitch · Có guide hỗ trợ · Game mục đích giáo dục / tuyên truyền
---
## 4. Bảo trì
Khi thêm mục mới vào bất kỳ file nguồn nào:
1. **Loại video** → thêm vào [`src/config/video-types.ts`](../../../src/config/video-types.ts) VÀ thêm dòng vào mục 1 ở trên.
2. **Thể loại** → thêm vào [`src/config/genres.ts`](../../../src/config/genres.ts) VÀ thêm dòng vào mục 2.
3. **Cảnh báo nội dung** → thêm vào nhóm phù hợp ở [`src/config/content-warning-groups.ts`](../../../src/config/content-warning-groups.ts) VÀ thêm label vào đúng nhóm ở mục 3 — giữ số đếm trong tiêu đề chính xác.
4. Cập nhật cả bản gốc EN tại [`docs/CONTENT-INVENTORY.md`](../../CONTENT-INVENTORY.md) trong cùng PR.
Sai lệch giữa file này và file nguồn được xem là lỗi tài liệu — mở issue hoặc PR.
+5 -1
View File
@@ -25,7 +25,7 @@ Cài theo thứ tự:
| Công cụ | Phiên bản | Lý do |
| --- | --- | --- |
| **Node.js** | `>= 22.0.0` | Vite 7 đã bỏ hỗ trợ Node cũ. Dùng [nvm](https://github.com/nvm-sh/nvm) hoặc [fnm](https://github.com/Schniz/fnm). |
| **Node.js** | `>= 22.12.0` | Vite 8 yêu cầu Node `^20.19` hoặc `>= 22.12`. Dùng [nvm](https://github.com/nvm-sh/nvm) hoặc [fnm](https://github.com/Schniz/fnm). |
| **npm** | đi kèm Node 22 | Dự án dùng npm; `pnpm` và `yarn` chưa test. |
| **Rust** | stable, `>= 1.78` | Bắt buộc cho build Tauri. Cài qua [rustup](https://rustup.rs/). |
| **Python** | `3.12` | Tùy chọn — chỉ cần cho một số tooling Tauri trên Windows. |
@@ -132,6 +132,10 @@ Tắt VPN/proxy doanh nghiệp chặn npm registry. Lock file đã commit; insta
Locale JSON bundle vào lúc build, không được watch. Restart dev server sau khi sửa `src/i18n/locales/*`.
Từ v0.26, chỉ tiếng Anh nằm trong main chunk; các ngôn ngữ khác là async
chunk lazy-load, tải khi dùng lần đầu (xem `src/i18n/index.ts` và
docs/I18N.md). Lời khuyên restart ở trên vẫn áp dụng cho tất cả.
### Pre-commit hook fail ở `validate:locales` mà mình không động đến locale
Có thể bạn vô tình thêm key mới vào `_schema.json` thông qua `src/engine/types.ts` → `CONTENT_WARNINGS`. ID mới cần dịch ở cả 6 locale.
+14
View File
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/knip@6/schema.json",
"entry": ["scripts/*.ts", "tests/**/*.test.ts"],
"project": ["src/**/*.{ts,tsx}", "scripts/**/*.ts", "tests/**/*.ts"],
"ignoreExportsUsedInFile": true,
"ignoreDependencies": [
"@tauri-apps/plugin-fs",
"@tauri-apps/plugin-opener",
"@tauri-apps/plugin-shell",
"@testing-library/jest-dom",
"@testing-library/react"
],
"ignoreBinaries": ["tauri"]
}
+1742 -597
View File
File diff suppressed because it is too large. Load diff
+8 -5
View File
@@ -1,6 +1,6 @@
{
"name": "yt-desc-gen",
"version": "0.17.0",
"version": "0.29.1",
"private": true,
"license": "Apache-2.0",
"type": "module",
@@ -13,6 +13,7 @@
"test:coverage": "vitest run --coverage",
"lint": "eslint src/",
"lint:fix": "eslint src/ --fix",
"knip": "knip",
"typecheck": "tsc --noEmit",
"format": "prettier --write \"src/**/*.{ts,tsx,json,css}\"",
"validate:locales": "tsx scripts/validate-locales.ts",
@@ -29,6 +30,7 @@
"@tauri-apps/plugin-shell": "^2.0.0",
"clsx": "^2.1.0",
"i18next": "^23.15.0",
"i18next-resources-to-backend": "^1.2.1",
"lucide-react": "^0.400.0",
"react": "^18.3.0",
"react-dom": "^18.3.0",
@@ -43,18 +45,19 @@
"@testing-library/react": "^16.0.0",
"@types/react": "^18.3.0",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.0",
"@vitejs/plugin-react": "^5.2.0",
"autoprefixer": "^10.4.0",
"eslint": "^9.0.0",
"eslint-plugin-react-hooks": "^5.0.0",
"knip": "^6.14.1",
"postcss": "^8.5.14",
"prettier": "^3.3.0",
"prettier-plugin-tailwindcss": "^0.6.0",
"tailwindcss": "^3.4.0",
"tsx": "^4.16.0",
"tsx": "^4.22.4",
"typescript": "^5.5.0",
"typescript-eslint": "^8.0.0",
"vite": "^7.3.3",
"vitest": "^3.2.4"
"vite": "^8.0.16",
"vitest": "^4.1.8"
}
}
+1 -3
View File
@@ -5535,10 +5535,8 @@ dependencies = [
[[package]]
name = "yt-desc-gen"
version = "0.17.0"
version = "0.29.1"
dependencies = [
"serde",
"serde_json",
"tauri",
"tauri-build",
"tauri-plugin-dialog",
+6 -3
View File
@@ -1,6 +1,6 @@
[package]
name = "yt-desc-gen"
version = "0.17.0"
version = "0.29.1"
description = "YouTube Gameplay Description Generator"
authors = ["poli0981"]
edition = "2021"
@@ -19,6 +19,9 @@ tauri-plugin-dialog = "2"
tauri-plugin-fs = "2"
tauri-plugin-opener = "2"
tauri-plugin-shell = "2"
# Desktop-only: single-instance is unsupported on mobile and must not be
# compiled into the Android/iOS library. cfg(not(any(android, ios))) is the
# canonical Tauri "desktop" target table.
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-single-instance = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
+12
View File
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
+19
View File
@@ -0,0 +1,19 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
build
/captures
.externalNativeBuild
.cxx
local.properties
key.properties
/.tauri
/tauri.settings.gradle
+6
View File
@@ -0,0 +1,6 @@
/src/main/**/generated
/src/main/jniLibs/**/*.so
/src/main/assets/tauri.conf.json
/tauri.build.gradle.kts
/proguard-tauri.pro
/tauri.properties
@@ -0,0 +1,92 @@
import java.util.Properties
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("rust")
}
val tauriProperties = Properties().apply {
val propFile = file("tauri.properties")
if (propFile.exists()) {
propFile.inputStream().use { load(it) }
}
}
// Release signing. `keystore.properties` is gitignored and created out-of-band
// (locally by the maintainer, or written from CI secrets). When it is absent
// the release build is left unsigned instead of failing, so debug builds and
// contributor checkouts without a keystore still work.
val keystorePropertiesFile = rootProject.file("keystore.properties")
val keystoreProperties = Properties().apply {
if (keystorePropertiesFile.exists()) {
keystorePropertiesFile.inputStream().use { load(it) }
}
}
android {
compileSdk = 36
namespace = "com.skullmute.ytdescgen"
defaultConfig {
manifestPlaceholders["usesCleartextTraffic"] = "false"
applicationId = "com.skullmute.ytdescgen"
minSdk = 30
targetSdk = 36
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
}
signingConfigs {
create("release") {
if (keystorePropertiesFile.exists()) {
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
storeFile = file(keystoreProperties["storeFile"] as String)
storePassword = keystoreProperties["storePassword"] as String
}
}
}
buildTypes {
getByName("debug") {
manifestPlaceholders["usesCleartextTraffic"] = "true"
isDebuggable = true
isJniDebuggable = true
isMinifyEnabled = false
packaging { jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so")
jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so")
jniLibs.keepDebugSymbols.add("*/x86/*.so")
jniLibs.keepDebugSymbols.add("*/x86_64/*.so")
}
}
getByName("release") {
isMinifyEnabled = true
proguardFiles(
*fileTree(".") { include("**/*.pro") }
.plus(getDefaultProguardFile("proguard-android-optimize.txt"))
.toList().toTypedArray()
)
signingConfig = signingConfigs.getByName("release")
}
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
buildConfig = true
}
}
rust {
rootDirRel = "../../../"
}
dependencies {
implementation("androidx.webkit:webkit:1.14.0")
implementation("androidx.appcompat:appcompat:1.7.1")
implementation("androidx.activity:activity-ktx:1.10.1")
implementation("com.google.android.material:material:1.12.0")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.4")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
}
apply(from = "tauri.build.gradle.kts")
+21
View File
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<!-- AndroidTV support -->
<uses-feature android:name="android.software.leanback" android:required="false" />
<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.yt_desc_gen"
android:usesCleartextTraffic="${usesCleartextTraffic}">
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
android:launchMode="singleTask"
android:label="@string/main_activity_title"
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<!-- AndroidTV support -->
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>
@@ -0,0 +1,11 @@
package com.skullmute.ytdescgen
import android.os.Bundle
import androidx.activity.enableEdgeToEdge
class MainActivity : TauriActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge()
super.onCreate(savedInstanceState)
}
}
@@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@@ -0,0 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.yt_desc_gen" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Customize your theme here. -->
</style>
</resources>
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
</resources>
@@ -0,0 +1,4 @@
<resources>
<string name="app_name">YTDescGen</string>
<string name="main_activity_title">YTDescGen</string>
</resources>
@@ -0,0 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.yt_desc_gen" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Customize your theme here. -->
</style>
</resources>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="my_images" path="." />
<cache-path name="my_cache_images" path="." />
</paths>
+22
View File
@@ -0,0 +1,22 @@
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:8.11.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
tasks.register("clean").configure {
delete("build")
}
@@ -0,0 +1,23 @@
plugins {
`kotlin-dsl`
}
gradlePlugin {
plugins {
create("pluginsForCoolKids") {
id = "rust"
implementationClass = "RustPlugin"
}
}
}
repositories {
google()
mavenCentral()
}
dependencies {
compileOnly(gradleApi())
implementation("com.android.tools.build:gradle:8.11.0")
}
@@ -0,0 +1,68 @@
import java.io.File
import org.apache.tools.ant.taskdefs.condition.Os
import org.gradle.api.DefaultTask
import org.gradle.api.GradleException
import org.gradle.api.logging.LogLevel
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.TaskAction
open class BuildTask : DefaultTask() {
@Input
var rootDirRel: String? = null
@Input
var target: String? = null
@Input
var release: Boolean? = null
@TaskAction
fun assemble() {
val executable = """cargo""";
try {
runTauriCli(executable)
} catch (e: Exception) {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
// Try different Windows-specific extensions
val fallbacks = listOf(
"$executable.exe",
"$executable.cmd",
"$executable.bat",
)
var lastException: Exception = e
for (fallback in fallbacks) {
try {
runTauriCli(fallback)
return
} catch (fallbackException: Exception) {
lastException = fallbackException
}
}
throw lastException
} else {
throw e;
}
}
}
fun runTauriCli(executable: String) {
val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null")
val target = target ?: throw GradleException("target cannot be null")
val release = release ?: throw GradleException("release cannot be null")
val args = listOf("tauri", "android", "android-studio-script");
project.exec {
workingDir(File(project.projectDir, rootDirRel))
executable(executable)
args(args)
if (project.logger.isEnabled(LogLevel.DEBUG)) {
args("-vv")
} else if (project.logger.isEnabled(LogLevel.INFO)) {
args("-v")
}
if (release) {
args("--release")
}
args(listOf("--target", target))
}.assertNormalExitValue()
}
}
@@ -0,0 +1,85 @@
import com.android.build.api.dsl.ApplicationExtension
import org.gradle.api.DefaultTask
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.get
const val TASK_GROUP = "rust"
open class Config {
lateinit var rootDirRel: String
}
open class RustPlugin : Plugin<Project> {
private lateinit var config: Config
override fun apply(project: Project) = with(project) {
config = extensions.create("rust", Config::class.java)
val defaultAbiList = listOf("arm64-v8a", "armeabi-v7a", "x86", "x86_64");
val abiList = (findProperty("abiList") as? String)?.split(',') ?: defaultAbiList
val defaultArchList = listOf("arm64", "arm", "x86", "x86_64");
val archList = (findProperty("archList") as? String)?.split(',') ?: defaultArchList
val targetsList = (findProperty("targetList") as? String)?.split(',') ?: listOf("aarch64", "armv7", "i686", "x86_64")
extensions.configure<ApplicationExtension> {
@Suppress("UnstableApiUsage")
flavorDimensions.add("abi")
productFlavors {
create("universal") {
dimension = "abi"
ndk {
abiFilters += abiList
}
}
defaultArchList.forEachIndexed { index, arch ->
create(arch) {
dimension = "abi"
ndk {
abiFilters.add(defaultAbiList[index])
}
}
}
}
}
afterEvaluate {
for (profile in listOf("debug", "release")) {
val profileCapitalized = profile.replaceFirstChar { it.uppercase() }
val buildTask = tasks.maybeCreate(
"rustBuildUniversal$profileCapitalized",
DefaultTask::class.java
).apply {
group = TASK_GROUP
description = "Build dynamic library in $profile mode for all targets"
}
tasks["mergeUniversal${profileCapitalized}JniLibFolders"].dependsOn(buildTask)
for (targetPair in targetsList.withIndex()) {
val targetName = targetPair.value
val targetArch = archList[targetPair.index]
val targetArchCapitalized = targetArch.replaceFirstChar { it.uppercase() }
val targetBuildTask = project.tasks.maybeCreate(
"rustBuild$targetArchCapitalized$profileCapitalized",
BuildTask::class.java
).apply {
group = TASK_GROUP
description = "Build dynamic library in $profile mode for $targetArch"
rootDirRel = config.rootDirRel
target = targetName
release = profile == "release"
}
buildTask.dependsOn(targetBuildTask)
tasks["merge$targetArchCapitalized${profileCapitalized}JniLibFolders"].dependsOn(
targetBuildTask
)
}
}
}
}
}
+24
View File
@@ -0,0 +1,24 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonFinalResIds=false
Binary file not shown.
@@ -0,0 +1,6 @@
#Tue May 10 19:22:52 CST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
+185
View File
@@ -0,0 +1,185 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"
+89
View File
@@ -0,0 +1,89 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
+3
View File
@@ -0,0 +1,3 @@
include ':app'
apply from: 'tauri.settings.gradle'
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+30
View File
@@ -0,0 +1,30 @@
YTDescGen — Installation & Terms Notice
=======================================
By installing and using YTDescGen, you confirm that you have read and agree
to the following documents:
Terms of Use: https://github.com/poli0981/youtube-generator/blob/main/TERMS.md
Privacy Policy: https://github.com/poli0981/youtube-generator/blob/main/PRIVACY.md
Disclaimer: https://github.com/poli0981/youtube-generator/blob/main/DISCLAIMER.md
License: https://github.com/poli0981/youtube-generator/blob/main/LICENSE
In short:
* YTDescGen is free, open-source software, provided AS IS, WITHOUT WARRANTY
OF ANY KIND. You use it at your own risk (see the Disclaimer and License
sections 7-8).
* It works fully offline. It does not collect, transmit, or sell any
personal data; your profiles, history, and generated text stay on your
device (see the Privacy Policy).
* You are responsible for ensuring the titles, descriptions, and tags you
generate comply with YouTube's policies and applicable law (see the
Terms of Use).
* YTDescGen is an independent project and is not affiliated with, endorsed
by, or sponsored by YouTube, Google, or any game publisher.
The software itself is licensed under the Apache License, Version 2.0. The
full license text is included with this distribution and is available at the
License URL above.
If you do not agree to these terms, do not install or use the software.
+106 -83
View File
@@ -1,6 +1,13 @@
// The tray icon, single-instance enforcement, hide-to-tray and
// exit-prevention machinery below are desktop-only. None of these APIs exist
// (or make sense) on mobile, so gate the imports too — otherwise the Android
// build fails with unresolved imports / unused-import warnings.
#[cfg(desktop)]
use std::sync::atomic::{AtomicBool, Ordering};
#[cfg(desktop)]
use std::sync::Arc;
#[cfg(desktop)]
use tauri::{
menu::{Menu, MenuItem},
tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent},
@@ -91,83 +98,16 @@ fn delete_file(path: String) -> Result<(), String> {
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
// Flag that signals the user has requested a full quit (via tray menu).
// When false, closing the window hides it to the tray; when true,
// the app is allowed to exit.
let quitting = Arc::new(AtomicBool::new(false));
let quitting_menu = quitting.clone();
let quitting_window = quitting.clone();
let quitting_run = quitting.clone();
tauri::Builder::default()
// Single-instance MUST be the first plugin registered (v0.12). Without
// it, every launch spawns a fresh process — which then builds its own
// tray icon in `setup()`, stacking duplicates in the system tray and
// leaving orphan processes in Task Manager. The callback runs in the
// *first* (already-running) instance when a second launch is attempted:
// we surface its window instead of letting the second process boot.
.plugin(tauri_plugin_single_instance::init(|app, _argv, _cwd| {
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.unminimize();
let _ = window.set_focus();
}
}))
// Plugins and commands shared by every platform (desktop + Android). The
// dialog/fs/opener/shell plugins all support mobile, and the six file
// commands use std::fs which works against the app's private data dir on
// Android. Desktop-only pieces (single-instance, tray, hide-to-tray,
// exit-prevention) are layered on below behind #[cfg(desktop)].
let builder = tauri::Builder::default()
.plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_fs::init())
.plugin(tauri_plugin_opener::init())
.plugin(tauri_plugin_shell::init())
.setup(move |app| {
let show = MenuItem::with_id(app, "show", "Show YTDescGen", true, None::<&str>)?;
let quit = MenuItem::with_id(app, "quit", "Quit", true, None::<&str>)?;
let menu = Menu::with_items(app, &[&show, &quit])?;
let _tray = TrayIconBuilder::with_id("ytdescgen-tray")
.tooltip("YTDescGen — YouTube Description Generator")
.menu(&menu)
.on_menu_event(move |app, event| match event.id.as_ref() {
"show" => {
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.unminimize();
let _ = window.set_focus();
}
}
"quit" => {
quitting_menu.store(true, Ordering::SeqCst);
app.exit(0);
}
_ => {}
})
.on_tray_icon_event(|tray, event| {
if let TrayIconEvent::Click {
button: MouseButton::Left,
button_state: MouseButtonState::Up,
..
} = event
{
let app = tray.app_handle();
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.unminimize();
let _ = window.set_focus();
}
}
})
.build(app)?;
Ok(())
})
.on_window_event(move |window, event| {
if let WindowEvent::CloseRequested { api, .. } = event {
// If the user asked to quit via the tray menu, let the
// window close normally so the app can exit.
if !quitting_window.load(Ordering::SeqCst) {
let _ = window.hide();
api.prevent_close();
}
}
})
.invoke_handler(tauri::generate_handler![
save_to_file,
read_from_file,
@@ -175,15 +115,98 @@ pub fn run() {
append_to_file,
list_dir,
delete_file
])
.build(tauri::generate_context!())
.expect("error while building tauri application")
.run(move |_app_handle, event| {
if let RunEvent::ExitRequested { api, .. } = event {
// Only prevent exit when the user hasn't explicitly asked to quit.
if !quitting_run.load(Ordering::SeqCst) {
api.prevent_exit();
]);
#[cfg(desktop)]
{
// Flag that signals the user has requested a full quit (via tray menu).
// When false, closing the window hides it to the tray; when true,
// the app is allowed to exit.
let quitting = Arc::new(AtomicBool::new(false));
let quitting_menu = quitting.clone();
let quitting_window = quitting.clone();
let quitting_run = quitting.clone();
builder
// Single-instance MUST be the first desktop plugin registered (v0.12).
// Without it, every launch spawns a fresh process — which then builds
// its own tray icon in `setup()`, stacking duplicates in the system
// tray and leaving orphan processes in Task Manager. The callback runs
// in the *first* (already-running) instance when a second launch is
// attempted: we surface its window instead of letting the second boot.
.plugin(tauri_plugin_single_instance::init(|app, _argv, _cwd| {
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.unminimize();
let _ = window.set_focus();
}
}
});
}))
.setup(move |app| {
let show = MenuItem::with_id(app, "show", "Show YTDescGen", true, None::<&str>)?;
let quit = MenuItem::with_id(app, "quit", "Quit", true, None::<&str>)?;
let menu = Menu::with_items(app, &[&show, &quit])?;
let _tray = TrayIconBuilder::with_id("ytdescgen-tray")
.tooltip("YTDescGen — YouTube Description Generator")
.menu(&menu)
.on_menu_event(move |app, event| match event.id.as_ref() {
"show" => {
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.unminimize();
let _ = window.set_focus();
}
}
"quit" => {
quitting_menu.store(true, Ordering::SeqCst);
app.exit(0);
}
_ => {}
})
.on_tray_icon_event(|tray, event| {
if let TrayIconEvent::Click {
button: MouseButton::Left,
button_state: MouseButtonState::Up,
..
} = event
{
let app = tray.app_handle();
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.unminimize();
let _ = window.set_focus();
}
}
})
.build(app)?;
Ok(())
})
.on_window_event(move |window, event| {
if let WindowEvent::CloseRequested { api, .. } = event {
// If the user asked to quit via the tray menu, let the
// window close normally so the app can exit.
if !quitting_window.load(Ordering::SeqCst) {
let _ = window.hide();
api.prevent_close();
}
}
})
.build(tauri::generate_context!())
.expect("error while building tauri application")
.run(move |_app_handle, event| {
if let RunEvent::ExitRequested { api, .. } = event {
// Only prevent exit when the user hasn't explicitly asked to quit.
if !quitting_run.load(Ordering::SeqCst) {
api.prevent_exit();
}
}
});
}
// Mobile (Android): no tray, single-instance, or hide-to-tray — just run.
#[cfg(not(desktop))]
builder
.run(tauri::generate_context!())
.expect("error while building tauri application");
}
+5 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-cli/schema.json",
"productName": "YTDescGen",
"version": "0.17.0",
"version": "0.29.1",
"identifier": "com.skullmute.ytdescgen",
"build": {
"beforeBuildCommand": "npm run build",
@@ -35,6 +35,7 @@
},
"bundle": {
"active": true,
"licenseFile": "installer-license.txt",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
@@ -43,6 +44,9 @@
"icons/icon.ico"
],
"targets": "all",
"android": {
"minSdkVersion": 30
},
"windows": {
"webviewInstallMode": {
"type": "downloadBootstrapper"
+76 -1
View File
@@ -4,12 +4,16 @@ import { Toaster } from "react-hot-toast";
import toast from "react-hot-toast";
import { AppShell } from "@components/layout/AppShell";
import { ErrorBoundary } from "@components/ErrorBoundary";
import { ErrorPage } from "@components/errors/ErrorPage";
import { OfflineBanner } from "@components/errors/OfflineBanner";
import { ConsentGate } from "@components/ConsentGate";
import { needsConsent } from "@config/legal";
import { EditorPage } from "@pages/EditorPage";
import { OutputPage } from "@pages/OutputPage";
import { checkDataFileHealth } from "@utils/storage-adapter";
import { hydrateLogStore } from "@store/log-store";
import { useSettingsStore } from "@store/settings-store";
import "@i18n/index";
import i18n from "@i18n/index";
const ProfilesPage = lazy(() =>
import("@pages/ProfilesPage").then((m) => ({ default: m.ProfilesPage })),
@@ -23,6 +27,9 @@ const SettingsPage = lazy(() =>
const BatchPage = lazy(() =>
import("@pages/BatchPage").then((m) => ({ default: m.BatchPage })),
);
const SocialPage = lazy(() =>
import("@pages/SocialPage").then((m) => ({ default: m.SocialPage })),
);
const PlaylistPage = lazy(() =>
import("@pages/PlaylistPage").then((m) => ({ default: m.PlaylistPage })),
);
@@ -68,6 +75,60 @@ export default function App() {
void hydrateLogStore(retentionDays);
}, []);
// v0.18.0: bridge the persisted `appLanguage` setting back to i18next.
//
// i18n is initialised synchronously at module load with `fallbackLng:
// "en"` and no `lng` field — so on a fresh app boot the UI renders in
// English even when localStorage / settings.json contain a non-English
// preference. Zustand's persist middleware rehydrates the store
// synchronously from localStorage *before* React mounts, and the
// storage-adapter then *asynchronously* reads the Tauri `settings.json`
// and may overwrite the value again. We cover both paths:
//
// 1. Read the current `appLanguage` at mount time and push it into
// i18n — handles the synchronous localStorage hydrate.
// 2. Subscribe to subsequent changes so the async Tauri rehydrate
// (and any future user-driven switch via Header / SettingsPage)
// also propagates. The Header/SettingsPage callsites still call
// `i18n.changeLanguage` directly, which is now redundant but
// harmless — the subscribe is the single source of truth.
useEffect(() => {
const initialLang = useSettingsStore.getState().appLanguage;
if (initialLang && i18n.language !== initialLang) {
void i18n.changeLanguage(initialLang);
}
const unsub = useSettingsStore.subscribe((state, prev) => {
if (state.appLanguage !== prev.appLanguage) {
void i18n.changeLanguage(state.appLanguage);
}
});
return () => unsub();
}, []);
// v0.28.0: first-run legal consent gate. Until the user accepts the current
// terms version, render the gate INSTEAD of the router so nothing in the app
// is reachable. The whole tree stays inside the root ErrorBoundary
// (main.tsx), so a gate render error still degrades to the error page.
const legalConsentVersion = useSettingsStore((s) => s.legalConsentVersion);
if (needsConsent(legalConsentVersion)) {
return (
<>
<ConsentGate />
<Toaster
position="bottom-right"
toastOptions={{
style: {
background: "var(--surface-2)",
color: "var(--text-primary)",
border: "1px solid var(--border)",
},
}}
/>
</>
);
}
return (
<>
<HashRouter>
@@ -105,6 +166,10 @@ export default function App() {
path="batch"
element={<PageBoundary label="Batch"><BatchPage /></PageBoundary>}
/>
<Route
path="social"
element={<PageBoundary label="Social"><SocialPage /></PageBoundary>}
/>
<Route
path="playlist"
element={<PageBoundary label="Playlist"><PlaylistPage /></PageBoundary>}
@@ -118,7 +183,17 @@ export default function App() {
element={<PageBoundary label="About"><AboutPage /></PageBoundary>}
/>
</Route>
{/* Designed error pages — siblings of the AppShell group so they
render full-screen with no Sidebar/Header. `403/419/500` are
route-reachable for future triggers; `*` is the live 404 for
any mistyped hash path. */}
<Route path="/403" element={<ErrorPage kind="forbidden" />} />
<Route path="/419" element={<ErrorPage kind="expired" />} />
<Route path="/500" element={<ErrorPage kind="serverError" />} />
<Route path="/offline" element={<ErrorPage kind="offline" />} />
<Route path="*" element={<ErrorPage kind="notFound" />} />
</Routes>
<OfflineBanner />
</HashRouter>
<Toaster
position="bottom-right"
+74
View File
@@ -0,0 +1,74 @@
import { useState } from "react";
import { useTranslation } from "react-i18next";
import { ExternalLink, ShieldCheck } from "lucide-react";
import { Button } from "@components/ui/Button";
import { Checkbox } from "@components/ui/Checkbox";
import { useDocumentTitle } from "@hooks/use-document-title";
import { useSettingsStore } from "@store/settings-store";
import { LEGAL_DOCS } from "@config/legal";
/**
* First-run legal consent gate. Rendered full-screen and **non-dismissible**
* (no ESC / backdrop / X — deliberately NOT the {@link import("@components/ui/Modal").Modal})
* in place of the router until the user accepts the current terms version.
*
* Layout mirrors the v0.27.0 ErrorPage fullscreen pattern. Acceptance is
* recorded in the settings store (`acceptLegalConsent`), which dual-writes to
* localStorage + the Tauri settings file; the gate then yields to the app.
* Re-shows automatically when CURRENT_TERMS_VERSION is bumped, and in fresh /
* incognito storage.
*/
export function ConsentGate() {
const { t } = useTranslation("ui");
const [agreed, setAgreed] = useState(false);
useDocumentTitle(t("consentGate.title"));
const onContinue = (): void => {
if (!agreed) return;
useSettingsStore.getState().acceptLegalConsent();
};
return (
<div
role="dialog"
aria-modal="true"
aria-labelledby="consent-title"
className="flex min-h-screen flex-col items-center justify-center gap-6 bg-surface-0 px-6 py-12 text-center"
>
<ShieldCheck className="h-14 w-14 text-accent" aria-hidden />
<div className="max-w-md space-y-2">
<h1 id="consent-title" className="text-2xl font-semibold text-text-primary">
{t("consentGate.title")}
</h1>
<p className="text-sm text-text-secondary">{t("consentGate.intro")}</p>
</div>
<div className="grid w-full max-w-md gap-2 sm:grid-cols-2">
{LEGAL_DOCS.map((doc) => (
<a
key={doc.id}
href={doc.url}
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-3 rounded-lg border border-border bg-surface-1 px-3 py-2.5 text-sm text-text-primary transition-colors hover:border-accent hover:bg-surface-2"
>
<span className="flex-1 truncate text-left">{t(doc.labelKey)}</span>
<ExternalLink className="h-3.5 w-3.5 shrink-0 text-text-muted" />
</a>
))}
</div>
<div className="w-full max-w-md rounded-lg border border-border bg-surface-1 p-4">
<Checkbox checked={agreed} onChange={setAgreed} label={t("consentGate.agreeLabel")} />
</div>
<div className="flex flex-col items-center gap-2">
<Button variant="primary" onClick={onContinue} disabled={!agreed}>
{t("consentGate.continue")}
</Button>
{!agreed && <p className="text-xs text-text-muted">{t("consentGate.mustAgree")}</p>}
</div>
</div>
);
}
+10 -42
View File
@@ -1,5 +1,5 @@
import { Component, type ErrorInfo, type ReactNode } from "react";
import { AlertTriangle, RotateCcw } from "lucide-react";
import { ErrorPage } from "@components/errors/ErrorPage";
interface ErrorBoundaryProps {
/** Children to render normally. The boundary only kicks in on render
@@ -77,51 +77,19 @@ export class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundarySt
this.setState({ error: null });
};
private handleReload = (): void => {
window.location.reload();
};
render(): ReactNode {
if (!this.state.error) return this.props.children;
const label = this.props.label ?? "this section";
// The visible copy is now generic + localized via the shared ErrorPage
// (contained variant). The `label` is still logged in componentDidCatch
// so bug reports keep the "which subtree crashed" context.
return (
<div className="flex min-h-[200px] items-center justify-center p-6">
<div className="w-full max-w-md rounded-lg border border-danger/40 bg-surface-2 p-5 shadow-md shadow-black/10">
<div className="mb-3 flex items-center gap-2 text-danger">
<AlertTriangle className="h-4 w-4" />
<h2 className="text-sm font-semibold">
Something went wrong in {label}
</h2>
</div>
<p className="mb-3 text-xs text-text-secondary">
The app caught a render error before it could crash the page.
Your data is safe — the error has been logged to the Logs
tab.
</p>
<pre className="mb-4 max-h-32 overflow-auto whitespace-pre-wrap rounded bg-surface-3 p-2 text-[11px] text-text-muted">
{this.state.error.message}
</pre>
<div className="flex flex-wrap gap-2">
<button
type="button"
onClick={this.handleReset}
className="inline-flex items-center gap-1.5 rounded bg-accent px-3 py-1.5 text-xs font-semibold text-white hover:bg-accent-hover"
>
<RotateCcw className="h-3.5 w-3.5" />
Try again
</button>
<button
type="button"
onClick={this.handleReload}
className="inline-flex items-center gap-1.5 rounded border border-border bg-surface-2 px-3 py-1.5 text-xs font-semibold text-text-primary hover:bg-surface-3"
>
Reload page
</button>
</div>
</div>
</div>
<ErrorPage
kind="runtime"
variant="contained"
onReset={this.handleReset}
detail={this.state.error.message}
/>
);
}
}
@@ -31,6 +31,7 @@ export function ContentWarningChecklist() {
photosensitive: false,
phobias: false,
mental_health: false,
social_phenomena: false,
sensitive: false,
horror_specific: false,
}));
+27 -2
View File
@@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next";
import { Plus, Minus, AlertTriangle } from "lucide-react";
import { Input } from "@components/ui/Input";
import { Button } from "@components/ui/Button";
import { Select } from "@components/ui/Select";
import {
useEditorStore,
computeContiguousRanges,
@@ -50,6 +51,7 @@ export function EndingsEditor() {
const endings = useEditorStore((s) => s.endings);
const endingVideoCount = useEditorStore((s) => s.endingVideoCount);
const endingVideoRanges = useEditorStore((s) => s.endingVideoRanges);
const endingVideoIndex = useEditorStore((s) => s.endingVideoIndex);
const timestamps = useEditorStore((s) => s.timestamps);
const set = useEditorStore((s) => s.set);
@@ -99,12 +101,17 @@ export function EndingsEditor() {
/** Update the multi-video count (case C). Recomputes default ranges
* on change unless the creator has already customised them — we
* always reset on count change because a manual override at the old
* count is unlikely to make sense at the new one. */
* count is unlikely to make sense at the new one. Also clamps
* `endingVideoIndex` so a shrink doesn't leave us previewing a
* video that no longer exists. */
const setVideoCount = (next: number) => {
if (count === 0) return;
const clamped = Math.max(1, Math.min(count, Math.floor(next)));
set("endingVideoCount", clamped);
set("endingVideoRanges", computeContiguousRanges(count, clamped));
if (endingVideoIndex > clamped) {
set("endingVideoIndex", clamped);
}
};
/** Update one video's `from` / `to` bound (case C). Doesn't enforce
@@ -369,8 +376,26 @@ export function EndingsEditor() {
))}
</ul>
)}
{/* v0.17.1: preview-video selector. Lets the creator
* pick which video's slice the Output renders. Engine
* already respects `endingVideoIndex` for both title +
* description; this just exposes the knob. */}
<Select
label={t("editor.endings.videoIndexLabel")}
options={Array.from({ length: endingVideoCount }, (_, i) => {
const r = endingVideoRanges[i];
const rangeLabel = r ? ` (${r.from}–${r.to})` : "";
return {
value: String(i + 1),
label: `${t("editor.endings.videoLabel")} ${i + 1}${rangeLabel}`,
};
})}
value={String(Math.min(endingVideoIndex, endingVideoCount))}
onChange={(v) => set("endingVideoIndex", Number(v) || 1)}
/>
<p className="text-xs text-text-muted">
{t("editor.endings.multiVideoOutputNote")}
{t("editor.endings.videoIndexHint")}
</p>
</>
)}
+15
View File
@@ -39,6 +39,21 @@ export function GameInfoForm() {
value={store.platform}
onChange={(v) => store.set("platform", v)}
/>
{/*
* Dev/publisher name. v0.21.0 promoted this from a side-label
* under the Publisher store link to a first-class field — it now
* drives the optional `© {publisher}` description line (Settings →
* "Show game studio copyright") and persists in GamePresets,
* which is the common case for series where the publisher
* requires credit across many episodes.
*/}
<Input
label={t("editor.pubDevName")}
placeholder={t("editor.pubDevNamePlaceholder")}
value={store.pubDevName ?? ""}
onChange={(e) => store.set("pubDevName", e.target.value)}
autoComplete="off"
/>
</div>
);
}
+57 -16
View File
@@ -6,6 +6,8 @@ import {
RIG_FIELDS,
parseCascadingValue,
parseCompositeValue,
resolveCompositeOptions,
resolveCompositeLabelKey,
type RigField,
type CompositePart,
} from "@config/rig-fields";
@@ -13,7 +15,7 @@ import { GPU_CUSTOM_BRAND_ID, findGpuBrand } from "@config/gpu-catalog";
import { useEditorStore } from "@store/editor-store";
import {
validateGpuValue,
validateRamValue,
validateCompositeField,
type RigValidationIssue,
} from "@utils/rig-validation";
@@ -136,22 +138,71 @@ export function RigEditor() {
if (!field.composite) return null;
const raw = rig[field.id] ?? "";
const { parts: storedParts } = parseCompositeValue(raw);
const issue = validateRamValue(raw);
// Validate per field — only RAM has size/DDR semantics. Running the
// RAM validator on the OS composite mis-fired "Pick a DDR generation."
const issue = validateCompositeField(field.id, raw);
const partValues = field.composite.parts.map(
(_p, i) => storedParts[i] ?? "",
);
// v0.23.0: setting a part also resets all downstream parts to "" so
// a cascading parent change can't leave the form with a stale child
// value that no longer exists in the new option list (e.g. switching
// OS name from Windows to macOS clears any leftover "11" / "Pro").
const setPart = (index: number, next: string) => {
const updated = [...partValues];
updated[index] = next;
for (let j = index + 1; j < updated.length; j++) {
updated[j] = "";
}
setNested("rig", field.id, joinComposite(updated));
};
const renderPart = (part: CompositePart, index: number) => {
// Walk parts in declaration order; each part's resolvers see the
// previously-rendered values so cascading option lists / dynamic
// labels / hidden-when predicates work cleanly.
const previousValues: string[] = [];
const renderedParts: React.ReactNode[] = [];
field.composite.parts.forEach((part, index) => {
const stored = partValues[index] ?? "";
// hiddenWhen short-circuits BEFORE we render — and we still push
// the stored value into previousValues so a later visible part
// sees the full history (though in practice, parts after a
// hidden one are rare).
if (part.hiddenWhen?.(previousValues)) {
previousValues.push(stored);
return;
}
renderedParts.push(renderPart(part, index, previousValues, setPart));
previousValues.push(stored);
});
return (
<div key={field.id} className="col-span-2 flex flex-col gap-2">
<span className="text-sm font-medium text-text-secondary">{t(field.labelKey)}</span>
<div className="grid grid-cols-2 gap-2">
{renderedParts}
</div>
{renderValidationBadge(issue)}
</div>
);
// Inner closure — needs access to `t`, `partValues`, and the part-
// local mutators. Defined as a function so the forEach above stays
// readable; not hoisted out because it captures lexical state.
function renderPart(
part: CompositePart,
index: number,
previousValues: readonly string[],
setPart: (index: number, next: string) => void,
) {
const stored = partValues[index] ?? "";
const isCustom = part.allowCustom && stored.startsWith(CUSTOM_PREFIX);
const customText = isCustom ? stored.slice(CUSTOM_PREFIX.length) : "";
const selectValue = isCustom ? "custom" : stored;
const options = resolveCompositeOptions(part.options, previousValues);
const labelKey = resolveCompositeLabelKey(part, previousValues);
const onSelectChange = (next: string) => {
if (next === "custom" && part.allowCustom) {
@@ -167,9 +218,9 @@ export function RigEditor() {
return (
<div key={part.id} className="flex flex-col gap-1">
<Select
label={t(part.labelKey)}
label={t(labelKey)}
value={selectValue}
options={part.options}
options={options}
onChange={onSelectChange}
/>
{isCustom && part.allowCustom && (
@@ -187,17 +238,7 @@ export function RigEditor() {
)}
</div>
);
};
return (
<div key={field.id} className="col-span-2 flex flex-col gap-2">
<span className="text-sm font-medium text-text-secondary">{t(field.labelKey)}</span>
<div className="grid grid-cols-2 gap-2">
{field.composite.parts.map((p, i) => renderPart(p, i))}
</div>
{renderValidationBadge(issue)}
</div>
);
}
};
const renderDropdownWithVersion = (field: RigField) => {
+5 -20
View File
@@ -2,7 +2,6 @@ import { useMemo, useState } from "react";
import type { ClipboardEvent } from "react";
import { useTranslation } from "react-i18next";
import toast from "react-hot-toast";
import { Input } from "@components/ui/Input";
import { ValidatedInput } from "@components/ui/ValidatedInput";
import { Select } from "@components/ui/Select";
import { PLATFORMS } from "@config/platforms";
@@ -27,7 +26,6 @@ export function StoreLinkEditor() {
const storeLinks = useEditorStore((s) => s.storeLinks);
const storeLinkTypes = useEditorStore((s) => s.storeLinkTypes);
const gameName = useEditorStore((s) => s.gameName);
const pubDevName = useEditorStore((s) => s.pubDevName);
const setField = useEditorStore((s) => s.set);
const setNested = useEditorStore((s) => s.setNested);
const setStoreLinkType = useEditorStore((s) => s.setStoreLinkType);
@@ -131,14 +129,11 @@ export function StoreLinkEditor() {
{PLATFORMS.map((platform) => {
const currentType = storeLinkTypes[platform.id] ?? "paid";
const url = storeLinks[platform.id] ?? "";
// Publisher / Developer site is the only platform that pairs
// with a free-text name field (rendered below the URL once the
// URL is non-empty). The name becomes a YouTube tag — see
// tag-generator.ts. Keeping the input in this same grid (via
// `col-span-2`) preserves vertical rhythm with the rest of
// the platform rows.
const showPubDevName =
platform.id === "publisher" && url.trim().length > 0;
// v0.21.0: the inline `pubDevName` input that previously
// appeared under the Publisher store link has been promoted
// to a first-class field in `GameInfoForm`, so it can drive
// the optional game-copyright description line independently
// of whether the publisher URL is filled.
return (
<div
key={platform.id}
@@ -161,16 +156,6 @@ export function StoreLinkEditor() {
options={typeOptions}
onChange={(v) => setStoreLinkType(platform.id, v as StoreLinkType)}
/>
{showPubDevName && (
<div className="col-span-2">
<Input
label={t("editor.pubDevName")}
placeholder={t("editor.pubDevNamePlaceholder")}
value={pubDevName ?? ""}
onChange={(e) => setField("pubDevName", e.target.value)}
/>
</div>
)}
</div>
);
})}
+22 -1
View File
@@ -22,6 +22,7 @@ import {
coerceUpscaleQuality,
coerceFrameGenMultiplier,
} from "@engine/graphics-vendor";
import { VIDEO_STYLE_ERA_IDS, type VideoStyleEra } from "@config/video-styles";
const RESOLUTION_OPTIONS = [
{ value: "720p", label: "720p" },
@@ -56,6 +57,18 @@ export function VideoSettingsForm() {
label: t(`editor.frameGenVendorOptions.${v}`),
}));
// v0.22.0 — video-style era opt-in. Renders independently of
// `skipGraphicsSettings`, so we wire it above the toggle: 2D / pixel-art
// creators still edit their footage and may want the style credit even
// when the in-game graphics block is suppressed.
const videoStyleOptions = [
{ value: "", label: t("editor.videoStyleOff") },
...VIDEO_STYLE_ERA_IDS.map((id) => ({
value: id,
label: t(`editor.videoStyleOptions.${id}`),
})),
];
// v0.11: vendor-filtered option lists. NVIDIA exposes DLAA + 4 quality
// tiers, AMD exposes FSR Native AA + 4, Intel exposes XeSS Native AA +
// Ultra Quality + 4. None falls back to the vendor-agnostic ladder so
@@ -100,7 +113,7 @@ export function VideoSettingsForm() {
<div className="flex flex-col gap-3">
<span className="text-sm font-medium text-text-secondary">{t("editor.videoSettings")}</span>
<div className="grid grid-cols-3 gap-3">
<div className="grid grid-cols-1 gap-3 sm:grid-cols-3">
<Select
label={t("editor.resolution")}
options={RESOLUTION_OPTIONS}
@@ -130,6 +143,14 @@ export function VideoSettingsForm() {
/>
)}
<Select
label={t("editor.videoStyle")}
options={videoStyleOptions}
value={store.videoStyleEra}
onChange={(v) => store.set("videoStyleEra", v as VideoStyleEra)}
/>
<p className="-mt-1 text-xs text-text-muted">{t("editor.videoStyleHelp")}</p>
<Toggle
label={t("editor.skipGraphicsSettings")}
checked={store.skipGraphicsSettings}
@@ -1,6 +1,13 @@
import { useState } from "react";
import { useTranslation } from "react-i18next";
import { Input } from "@components/ui/Input";
import { Select } from "@components/ui/Select";
import { useEditorStore } from "@store/editor-store";
import {
VIETNAMESE_BANKS,
VIETNAMESE_BANK_OTHER,
isCustomVietnameseBank,
} from "@config/vietnamese-banks";
/**
* Vietnam-specific donate fields — bank transfer + e-wallets. The
@@ -13,10 +20,45 @@ import { useEditorStore } from "@store/editor-store";
* output language — we don't want creators to have to flip language
* just to fill in their bank info, and the data is preserved in the
* draft either way.
*
* v0.18.0: when the output language is Vietnamese, the bank-name field
* upgrades to a dropdown sourced from
* {@link VIETNAMESE_BANKS}. Picking "Khác" (Other) reveals an inline
* text input so the field still accepts unlisted / digital-only / less
* common banks. The persisted shape is unchanged — `vnBankName` is
* still a `string` — so saved profiles and exports keep round-tripping.
*/
export function VietnameseDonateEditor() {
const { t } = useTranslation("ui");
const store = useEditorStore();
const language = useEditorStore((s) => s.language);
const vnBankName = useEditorStore((s) => s.vnBankName);
const isVi = language === "vi";
// Sticky flag for the "user explicitly chose Other from the dropdown"
// case. We can't derive it purely from `vnBankName` because the user
// might pick "Other" with the field still empty — at that point the
// value is `""`, which the auto-detector would treat as "use the
// dropdown placeholder". The initial value still uses the auto-detect
// (any non-preset saved name lights up custom mode on mount), so a
// reload of e.g. "Citibank Vietnam" renders correctly without the
// sticky flag needing to be hydrated.
const [otherSticky, setOtherSticky] = useState(
() => isVi && isCustomVietnameseBank(vnBankName ?? ""),
);
const customMode =
isVi && (otherSticky || isCustomVietnameseBank(vnBankName ?? ""));
const selectValue = customMode
? VIETNAMESE_BANK_OTHER
: (vnBankName ?? "");
const bankOptions = [
{ value: "", label: t("editor.vnBankNameSelectPlaceholder") },
...VIETNAMESE_BANKS.map((b) => ({ value: b, label: b })),
{ value: VIETNAMESE_BANK_OTHER, label: t("editor.vnBankNameOther") },
];
return (
<div className="flex flex-col gap-3">
@@ -28,12 +70,39 @@ export function VietnameseDonateEditor() {
</div>
<div className="grid grid-cols-2 gap-3">
<Input
label={t("editor.vnBankName")}
placeholder={t("editor.vnBankNamePlaceholder")}
value={store.vnBankName ?? ""}
onChange={(e) => store.set("vnBankName", e.target.value)}
/>
{isVi ? (
<div className="flex flex-col gap-2">
<Select
label={t("editor.vnBankName")}
options={bankOptions}
value={selectValue}
onChange={(v) => {
if (v === VIETNAMESE_BANK_OTHER) {
// Keep any value the creator already had — pre-existing
// free-form names should survive a Khác re-selection.
setOtherSticky(true);
} else {
setOtherSticky(false);
store.set("vnBankName", v);
}
}}
/>
{customMode && (
<Input
placeholder={t("editor.vnBankNamePlaceholder")}
value={vnBankName ?? ""}
onChange={(e) => store.set("vnBankName", e.target.value)}
/>
)}
</div>
) : (
<Input
label={t("editor.vnBankName")}
placeholder={t("editor.vnBankNamePlaceholder")}
value={vnBankName ?? ""}
onChange={(e) => store.set("vnBankName", e.target.value)}
/>
)}
<Input
label={t("editor.vnBankAccount")}
placeholder={t("editor.vnBankAccountPlaceholder")}
+151
View File
@@ -0,0 +1,151 @@
import { useTranslation } from "react-i18next";
import { House, ArrowLeft, RotateCw, RotateCcw, Bug } from "lucide-react";
import clsx from "clsx";
import { Button } from "@components/ui/Button";
import { useDocumentTitle } from "@hooks/use-document-title";
import { ABOUT } from "@config/about";
import { resolveErrorMeta, severityTextClass, type ErrorKind } from "@config/error-pages";
interface ErrorPageProps {
/** Which designed error to render. */
kind: ErrorKind;
/** `fullscreen` (default) for standalone routes — no app shell. `contained`
* for the in-place {@link import("@components/ErrorBoundary").ErrorBoundary}
* fallback card. */
variant?: "fullscreen" | "contained";
/** Reset handler for the `contained` boundary fallback ("Try again"). */
onReset?: () => void;
/** Optional technical detail (error message) shown in the contained card. */
detail?: string;
}
/**
* Shared presentational error page, dispatching to a full-screen route page or
* the contained boundary card.
*
* Intentionally **router-agnostic**: the root ErrorBoundary in `main.tsx`
* mounts *outside* `<HashRouter>`, so calling `useNavigate()` here would throw
* "useNavigate may be used only in the context of a Router" inside the very
* crash path it is meant to handle. Navigation is therefore plain hash anchors
* (`#/`) + `history.back()`, which work whether or not a Router is above.
*
* The dispatcher itself calls no hooks, so each variant component owns its own
* unconditional hook calls (no hook-order hazard across the branch).
*/
export function ErrorPage(props: ErrorPageProps) {
return props.variant === "contained" ? (
<ContainedError {...props} />
) : (
<FullscreenError {...props} />
);
}
function FullscreenError({ kind }: ErrorPageProps) {
const { t } = useTranslation("ui");
const meta = resolveErrorMeta(kind);
const Icon = meta.icon;
const colour = severityTextClass(meta.severity);
const title = t(`errorPages.${meta.keyPrefix}.title`);
const description = t(`errorPages.${meta.keyPrefix}.description`);
const canReload = kind === "serverError" || kind === "runtime";
useDocumentTitle(title);
return (
<div className="flex min-h-screen flex-col items-center justify-center gap-6 bg-surface-0 px-6 py-12 text-center">
<Icon className={clsx("h-16 w-16", colour)} aria-hidden />
{meta.code !== null && (
<p className={clsx("font-mono text-6xl font-bold leading-none tabular-nums", colour)}>
{meta.code}
</p>
)}
<div className="max-w-md space-y-2">
<h1 className="text-2xl font-semibold text-text-primary">{title}</h1>
<p className="text-sm text-text-secondary">{description}</p>
</div>
<div className="flex flex-wrap items-center justify-center gap-3">
<Button
variant="primary"
onClick={() => {
window.location.hash = "#/";
}}
>
<House className="h-4 w-4" />
{t("errorPages.actions.home")}
</Button>
<Button variant="secondary" onClick={() => window.history.back()}>
<ArrowLeft className="h-4 w-4" />
{t("errorPages.actions.back")}
</Button>
{canReload && (
<Button variant="secondary" onClick={() => window.location.reload()}>
<RotateCw className="h-4 w-4" />
{t("errorPages.actions.reload")}
</Button>
)}
<ReportBugLink />
</div>
</div>
);
}
function ContainedError({ kind, onReset, detail }: ErrorPageProps) {
const { t } = useTranslation("ui");
const meta = resolveErrorMeta(kind);
const Icon = meta.icon;
const colour = severityTextClass(meta.severity);
const title = t(`errorPages.${meta.keyPrefix}.title`);
const description = t(`errorPages.${meta.keyPrefix}.description`);
return (
<div className="flex min-h-[200px] items-center justify-center p-6">
<div className="w-full max-w-md rounded-lg border border-danger/40 bg-surface-2 p-5 shadow-md shadow-black/10">
<div className={clsx("mb-3 flex items-center gap-2", colour)}>
<Icon className="h-4 w-4" />
<h2 className="text-sm font-semibold">{title}</h2>
</div>
<p className="mb-3 text-xs text-text-secondary">{description}</p>
{detail && (
<pre className="mb-4 max-h-32 overflow-auto whitespace-pre-wrap rounded bg-surface-3 p-2 text-[11px] text-text-muted">
{detail}
</pre>
)}
<div className="flex flex-wrap items-center gap-2">
{onReset && (
<Button variant="primary" size="sm" onClick={onReset}>
<RotateCcw className="h-3.5 w-3.5" />
{t("errorPages.actions.retry")}
</Button>
)}
<Button variant="secondary" size="sm" onClick={() => window.location.reload()}>
<RotateCw className="h-3.5 w-3.5" />
{t("errorPages.actions.reload")}
</Button>
<ReportBugLink size="sm" />
</div>
</div>
</div>
);
}
/** External "report a bug" link, styled to match the `ghost` Button. */
function ReportBugLink({ size = "md" }: { size?: "sm" | "md" }) {
const { t } = useTranslation("ui");
const sizeClass =
size === "sm" ? "min-h-[36px] px-2.5 py-1 text-xs" : "min-h-touch px-4 py-2 text-sm";
const iconClass = size === "sm" ? "h-3.5 w-3.5" : "h-4 w-4";
return (
<a
href={ABOUT.bugReportUrl}
target="_blank"
rel="noopener noreferrer"
className={clsx(
"inline-flex items-center justify-center gap-2 rounded-lg font-medium text-text-secondary transition-colors hover:bg-surface-2 hover:text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50",
sizeClass,
)}
>
<Bug className={iconClass} />
{t("errorPages.actions.reportBug")}
</a>
);
}
+55
View File
@@ -0,0 +1,55 @@
import { useEffect, useRef, useState } from "react";
import { Link } from "react-router-dom";
import toast from "react-hot-toast";
import { useTranslation } from "react-i18next";
import { WifiOff, X } from "lucide-react";
import { useOnlineStatus } from "@hooks/use-online-status";
/**
* Non-blocking offline indicator.
*
* The app works fully offline (everything is client-side), so losing the
* network must never block input — this is a dismissible bottom strip, not a
* takeover page. Dismiss only hides the *current* offline episode; the next
* online→offline transition shows it again. A transient toast confirms when
* the connection returns (reusing the app-level `<Toaster/>`).
*/
export function OfflineBanner() {
const { t } = useTranslation("ui");
const online = useOnlineStatus();
const [dismissed, setDismissed] = useState(false);
const wasOnline = useRef(online);
useEffect(() => {
if (!wasOnline.current && online) {
toast.success(t("errorPages.offlineBanner.backOnline"));
}
if (wasOnline.current && !online) {
setDismissed(false);
}
wasOnline.current = online;
}, [online, t]);
if (online || dismissed) return null;
return (
<div
role="status"
className="fixed inset-x-0 bottom-0 z-50 flex items-center justify-center gap-3 border-t border-warning/40 bg-surface-2 px-4 py-2 text-sm text-text-primary shadow-md shadow-black/20"
>
<WifiOff className="h-4 w-4 shrink-0 text-warning" aria-hidden />
<span>{t("errorPages.offlineBanner.message")}</span>
<Link to="/offline" className="font-medium text-accent hover:text-accent-hover">
{t("errorPages.offlineBanner.details")}
</Link>
<button
type="button"
onClick={() => setDismissed(true)}
aria-label={t("common.dismiss")}
className="ml-1 rounded p-1 text-text-muted transition-colors hover:bg-surface-3 hover:text-text-primary"
>
<X className="h-4 w-4" />
</button>
</div>
);
}
+5 -2
View File
@@ -1,7 +1,8 @@
import { useState } from "react";
import { useRef, useState } from "react";
import { Outlet } from "react-router-dom";
import { Header } from "./Header";
import { Sidebar, SidebarNavList } from "./Sidebar";
import { ScrollToTopButton } from "./ScrollToTopButton";
import { Drawer } from "@components/ui/Drawer";
import { ShortcutHelpModal } from "@components/ui/ShortcutHelpModal";
import { useKeyboardShortcuts } from "@hooks/use-keyboard-shortcuts";
@@ -11,6 +12,7 @@ import { useSettingsStore } from "@store/settings-store";
export function AppShell() {
const [showShortcuts, setShowShortcuts] = useState(false);
const [mobileNavOpen, setMobileNavOpen] = useState(false);
const mainRef = useRef<HTMLElement>(null);
const setSetting = useSettingsStore((s) => s.setSetting);
const collapsed = useSettingsStore((s) => s.sidebarCollapsed);
@@ -25,7 +27,7 @@ export function AppShell() {
<Sidebar />
<div className="flex min-w-0 flex-1 flex-col">
<Header onOpenMobileNav={() => setMobileNavOpen(true)} />
<main className="min-h-0 flex-1 overflow-y-auto">
<main ref={mainRef} className="min-h-0 flex-1 overflow-y-auto">
<Outlet />
</main>
</div>
@@ -38,6 +40,7 @@ export function AppShell() {
<SidebarNavList collapsed={false} onItemClick={() => setMobileNavOpen(false)} />
</Drawer>
<ShortcutHelpModal open={showShortcuts} onClose={() => setShowShortcuts(false)} />
<ScrollToTopButton scrollRef={mainRef} />
</div>
);
}
+15 -2
View File
@@ -1,6 +1,6 @@
import { useState, useRef, useEffect } from "react";
import { useTranslation } from "react-i18next";
import { ChevronDown, Heart, Menu } from "lucide-react";
import { ChevronDown, Heart, Menu, Moon, Sun } from "lucide-react";
import { SUPPORTED_LANGUAGES } from "@i18n/index";
import { useSettingsStore } from "@store/settings-store";
import { PRIMARY_DONATE_URL } from "@config/donate";
@@ -13,7 +13,7 @@ interface HeaderProps {
export function Header({ onOpenMobileNav }: HeaderProps) {
const { t, i18n } = useTranslation("ui");
const { appLanguage, setAppLanguage } = useSettingsStore();
const { appLanguage, setAppLanguage, theme, setTheme } = useSettingsStore();
const [open, setOpen] = useState(false);
const dropdownRef = useRef<HTMLDivElement>(null);
@@ -72,6 +72,19 @@ export function Header({ onOpenMobileNav }: HeaderProps) {
<Heart className="h-4 w-4 sm:h-3.5 sm:w-3.5" />
<span className="hidden md:inline">{t("header.donate")}</span>
</a>
<button
type="button"
onClick={() => setTheme(theme === "dark" ? "light" : "dark")}
className="rounded-lg p-2 text-text-secondary transition-colors hover:bg-surface-2 hover:text-text-primary"
title={t("header.toggleTheme")}
aria-label={t("header.toggleTheme")}
>
{theme === "dark" ? (
<Moon className="h-4 w-4" />
) : (
<Sun className="h-4 w-4" />
)}
</button>
<div className="relative" ref={dropdownRef}>
<button
onClick={() => setOpen(!open)}
@@ -0,0 +1,77 @@
import { useEffect, useState, type RefObject } from "react";
import { useLocation } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { ArrowUp } from "lucide-react";
import clsx from "clsx";
interface ScrollToTopButtonProps {
/** The scrollable container to watch and scroll back to the top. */
scrollRef: RefObject<HTMLElement>;
}
/** Scroll distance (px) past which the button fades in. */
const SHOW_AFTER_PX = 300;
/**
* Floating "back to top" button, fixed to the bottom-right of the
* viewport. Fades in once the app's scroll container is scrolled past
* {@link SHOW_AFTER_PX} and smooth-scrolls back on click.
*
* The scroll container is the `<main>` element (see AppShell), not the
* window — so the listener and `scrollTo` both target the passed ref.
*/
export function ScrollToTopButton({ scrollRef }: ScrollToTopButtonProps) {
const { t } = useTranslation("ui");
const location = useLocation();
const [visible, setVisible] = useState(false);
useEffect(() => {
const el = scrollRef.current;
if (!el) return;
let ticking = false;
const update = () => {
setVisible(el.scrollTop > SHOW_AFTER_PX);
ticking = false;
};
const onScroll = () => {
if (ticking) return;
ticking = true;
requestAnimationFrame(update);
};
// Re-evaluate on mount and whenever the route changes — the same
// <main> persists across tabs, so scrollTop does not reset itself.
update();
el.addEventListener("scroll", onScroll, { passive: true });
return () => el.removeEventListener("scroll", onScroll);
}, [scrollRef, location.pathname]);
function scrollToTop() {
const el = scrollRef.current;
if (!el) return;
const reduceMotion = window.matchMedia(
"(prefers-reduced-motion: reduce)",
).matches;
el.scrollTo({ top: 0, behavior: reduceMotion ? "auto" : "smooth" });
}
return (
<button
type="button"
onClick={scrollToTop}
aria-label={t("common.scrollToTop")}
aria-hidden={!visible}
tabIndex={visible ? 0 : -1}
className={clsx(
"fixed bottom-6 right-6 z-40 flex h-touch w-touch items-center justify-center",
"rounded-full border border-border bg-surface-1 text-text-primary shadow-lg",
"transition-opacity duration-200 hover:bg-surface-2",
"focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",
visible ? "opacity-100" : "pointer-events-none opacity-0",
)}
>
<ArrowUp className="h-5 w-5" />
</button>
);
}
+2
View File
@@ -7,6 +7,7 @@ import {
Clock,
Settings,
Layers,
Share2,
ListVideo,
ScrollText,
Info,
@@ -30,6 +31,7 @@ const tabs: readonly TabItem[] = [
{ to: "/", labelKey: "tabs.editor", icon: Pencil },
{ to: "/output", labelKey: "tabs.output", icon: FileText },
{ to: "/batch", labelKey: "tabs.batch", icon: Layers },
{ to: "/social", labelKey: "tabs.social", icon: Share2 },
{ to: "/profiles", labelKey: "tabs.profiles", icon: User },
{ to: "/history", labelKey: "tabs.history", icon: Clock },
{ to: "/playlist", labelKey: "tabs.playlist", icon: ListVideo },
+8 -1
View File
@@ -4,6 +4,7 @@ import i18n from "i18next";
import { useEditorStore } from "@store/editor-store";
import { useSettingsStore } from "@store/settings-store";
import { useCurrentGeneratorInput } from "@hooks/use-current-generator-input";
import { useLanguagesReady } from "@hooks/use-languages-ready";
import { buildPinnedComment } from "@engine/pinned-comment-builder";
import { GENRES } from "@config/genres";
import type { Genre } from "@engine/types";
@@ -40,8 +41,13 @@ export function OutputExtras() {
return map;
}, [t]);
// Lazy-loaded locales (v0.26): the OutputPage flow normally has this
// language loaded already, but the component is standalone by design —
// gate it rather than rely on the page.
const ready = useLanguagesReady([input.language]);
const templateText = useMemo(() => {
if (!showPinnedCommentTemplate) return "";
if (!ready || !showPinnedCommentTemplate) return "";
const tFn = i18n.getFixedT(input.language, "templates");
return buildPinnedComment(input, tFn, {
includeAskNextGame,
@@ -50,6 +56,7 @@ export function OutputExtras() {
genreLabels,
});
}, [
ready,
showPinnedCommentTemplate,
input,
includeAskNextGame,
+7 -1
View File
@@ -5,6 +5,7 @@ import { Modal } from "@components/ui/Modal";
import { CopyButton } from "./CopyButton";
import { CharCounter } from "./CharCounter";
import { buildTitleVariants } from "@engine/title-variants";
import { useLanguagesReady } from "@hooks/use-languages-ready";
import { useEditorStore } from "@store/editor-store";
import { useSettingsStore } from "@store/settings-store";
import { YT_LIMITS, type GeneratorInput } from "@engine/types";
@@ -24,8 +25,12 @@ export function VariantPicker({ open, onClose }: VariantPickerProps) {
const state = useEditorStore();
const showQualityBadge = useSettingsStore((s) => s.showQualityBadge);
// Lazy-loaded locales (v0.26): only request the bundle while the modal
// is actually open; the list fills in on the ready flip.
const ready = useLanguagesReady(open ? [state.language] : []);
const variants = useMemo(() => {
if (!open) return [];
if (!open || !ready) return [];
const input: GeneratorInput = {
videoType: state.videoType,
language: state.language,
@@ -52,6 +57,7 @@ export function VariantPicker({ open, onClose }: VariantPickerProps) {
return buildTitleVariants(input, tFn, showQualityBadge);
}, [
open,
ready,
showQualityBadge,
state.videoType,
state.language,
+12 -3
View File
@@ -4,6 +4,7 @@ import { Upload, Pencil, Trash2 } from "lucide-react";
import { Button } from "@components/ui/Button";
import { ConfirmDialog } from "@components/ui/ConfirmDialog";
import { useEditorStore } from "@store/editor-store";
import { useSettingsStore } from "@store/settings-store";
import { usePresetStore, type GamePreset } from "@store/preset-store";
import { GENRES } from "@config/genres";
import { PresetSaveForm } from "./PresetSaveForm";
@@ -15,6 +16,7 @@ interface PresetCardProps {
export function PresetCard({ preset }: PresetCardProps) {
const { t } = useTranslation("ui");
const loadPreset = useEditorStore((s) => s.loadPreset);
const setSetting = useSettingsStore((s) => s.setSetting);
const deletePreset = usePresetStore((s) => s.deletePreset);
const [showDelete, setShowDelete] = useState(false);
const [showEdit, setShowEdit] = useState(false);
@@ -28,7 +30,14 @@ export function PresetCard({ preset }: PresetCardProps) {
storeLinks: { ...preset.storeLinks },
spoilerWarning: preset.spoilerWarning,
matureWarning: preset.matureWarning,
pubDevName: preset.pubDevName ?? "",
});
// v0.21.0: same pattern as PresetSelector — only flip the setting
// when the preset explicitly carries it, so older presets don't
// silently reset a user's preference on first load.
if (preset.showGameCopyright !== undefined) {
setSetting("showGameCopyright", preset.showGameCopyright);
}
};
const genreDefs = preset.genres
@@ -37,8 +46,8 @@ export function PresetCard({ preset }: PresetCardProps) {
return (
<>
<div className="flex items-center justify-between rounded-lg border border-border-strong bg-surface-2 p-4 shadow-md shadow-black/10 transition-colors hover:border-accent/30">
<div className="flex-1">
<div className="flex flex-col gap-3 rounded-lg border border-border-strong bg-surface-2 p-4 shadow-md shadow-black/10 transition-colors hover:border-accent/30 sm:flex-row sm:items-center sm:justify-between">
<div className="min-w-0 flex-1">
<h3 className="text-sm font-semibold text-text-primary">{preset.gameName}</h3>
<div className="mt-1.5 flex flex-wrap items-center gap-1.5 text-xs text-text-muted">
{genreDefs.map((g) => (
@@ -49,7 +58,7 @@ export function PresetCard({ preset }: PresetCardProps) {
<span>{preset.platform}</span>
</div>
</div>
<div className="flex items-center gap-1.5">
<div className="flex shrink-0 items-center gap-1.5">
<Button variant="primary" size="sm" onClick={handleLoad}>
<Upload className="h-3.5 w-3.5" />
{t("presets.loadPreset")}
@@ -4,6 +4,7 @@ import { Modal } from "@components/ui/Modal";
import { Button } from "@components/ui/Button";
import { Input } from "@components/ui/Input";
import { useEditorStore } from "@store/editor-store";
import { useSettingsStore } from "@store/settings-store";
import { usePresetStore, type GamePreset } from "@store/preset-store";
interface PresetSaveFormProps {
@@ -15,6 +16,7 @@ interface PresetSaveFormProps {
export function PresetSaveForm({ open, onClose, editPreset }: PresetSaveFormProps) {
const { t } = useTranslation("ui");
const editor = useEditorStore();
const showGameCopyrightSetting = useSettingsStore((s) => s.showGameCopyright);
const { addPreset, updatePreset } = usePresetStore();
const [gameName, setGameName] = useState(editPreset?.gameName ?? editor.gameName);
@@ -28,6 +30,8 @@ export function PresetSaveForm({ open, onClose, editPreset }: PresetSaveFormProp
storeLinks: editPreset?.storeLinks ?? { ...editor.storeLinks },
spoilerWarning: editPreset?.spoilerWarning ?? editor.spoilerWarning,
matureWarning: editPreset?.matureWarning ?? editor.matureWarning,
pubDevName: editPreset?.pubDevName ?? editor.pubDevName,
showGameCopyright: editPreset?.showGameCopyright ?? showGameCopyrightSetting,
};
if (editPreset) {
+10
View File
@@ -2,11 +2,13 @@ import { useTranslation } from "react-i18next";
import { Select } from "@components/ui/Select";
import { usePresetStore } from "@store/preset-store";
import { useEditorStore } from "@store/editor-store";
import { useSettingsStore } from "@store/settings-store";
export function PresetSelector() {
const { t } = useTranslation("ui");
const presets = usePresetStore((s) => s.presets);
const loadPreset = useEditorStore((s) => s.loadPreset);
const setSetting = useSettingsStore((s) => s.setSetting);
if (presets.length === 0) return null;
@@ -27,7 +29,15 @@ export function PresetSelector() {
storeLinks: { ...preset.storeLinks },
spoilerWarning: preset.spoilerWarning,
matureWarning: preset.matureWarning,
pubDevName: preset.pubDevName ?? "",
});
// v0.21.0: pull the per-preset toggle into the global setting so the
// description re-renders with the right credit obligation. Missing
// means "leave the user's setting alone" — older presets don't carry
// this field.
if (preset.showGameCopyright !== undefined) {
setSetting("showGameCopyright", preset.showGameCopyright);
}
};
return <Select label={t("presets.selectPreset")} options={options} value="" onChange={handleSelect} />;
+4 -4
View File
@@ -43,16 +43,16 @@ export function ProfileCard({ profile }: ProfileCardProps) {
return (
<>
<div className="flex items-center justify-between rounded-lg border border-border-strong bg-surface-2 p-4 shadow-md shadow-black/10 transition-colors hover:border-accent/30">
<div className="flex-1">
<div className="flex flex-col gap-3 rounded-lg border border-border-strong bg-surface-2 p-4 shadow-md shadow-black/10 transition-colors hover:border-accent/30 sm:flex-row sm:items-center sm:justify-between">
<div className="min-w-0 flex-1">
<h3 className="text-sm font-semibold text-text-primary">{profile.name}</h3>
<p className="mt-0.5 text-xs text-text-secondary">{profile.channelName || "No channel"}</p>
<div className="mt-1.5 flex gap-3 text-xs text-text-muted">
<div className="mt-1.5 flex flex-wrap gap-3 text-xs text-text-muted">
{socialCount > 0 && <span>{socialCount} social links</span>}
{rigCount > 0 && <span>{rigCount} rig fields</span>}
</div>
</div>
<div className="flex items-center gap-1.5">
<div className="flex shrink-0 items-center gap-1.5">
<Button variant="primary" size="sm" onClick={handleLoad}>
<Upload className="h-3.5 w-3.5" />
{t("profiles.loadProfile")}
+4 -4
View File
@@ -35,16 +35,16 @@ export function TemplateCard({ template }: TemplateCardProps) {
return (
<>
<div className="flex items-center justify-between rounded-lg border border-border-strong bg-surface-2 p-4 shadow-md shadow-black/10 transition-colors hover:border-accent/30">
<div className="flex-1">
<div className="flex flex-col gap-3 rounded-lg border border-border-strong bg-surface-2 p-4 shadow-md shadow-black/10 transition-colors hover:border-accent/30 sm:flex-row sm:items-center sm:justify-between">
<div className="min-w-0 flex-1">
<h3 className="text-sm font-semibold text-text-primary">{template.name}</h3>
<div className="mt-1.5 flex items-center gap-2 text-xs text-text-muted">
<div className="mt-1.5 flex flex-wrap items-center gap-2 text-xs text-text-muted">
<span>{template.snapshot.gameName || "—"}</span>
<span>·</span>
<span>{date}</span>
</div>
</div>
<div className="flex items-center gap-1.5">
<div className="flex shrink-0 items-center gap-1.5">
<Button variant="primary" size="sm" onClick={handleApply}>
<Upload className="h-3.5 w-3.5" />
{t("templates.loadTemplate")}
+52
View File
@@ -0,0 +1,52 @@
import { type ReactNode, useId } from "react";
import { Check } from "lucide-react";
import clsx from "clsx";
interface CheckboxProps {
checked: boolean;
onChange: (checked: boolean) => void;
/** Visible label — accepts rich content (e.g. inline links). */
label: ReactNode;
className?: string;
id?: string;
}
/**
* Accessible square checkbox. A real `<input type="checkbox">` (visually
* hidden as a `peer`) keeps native keyboard + screen-reader semantics, while
* the styled box mirrors its state. Tailwind tokens only, so it tracks the
* dark/light theme. Distinct from {@link import("./Toggle").Toggle}, which is
* a `role="switch"` on/off pill — a checkbox is the right control for a
* one-time "I agree" acknowledgement.
*/
export function Checkbox({ checked, onChange, label, className, id }: CheckboxProps) {
const autoId = useId();
const inputId = id ?? autoId;
return (
<label
htmlFor={inputId}
className={clsx("group flex min-h-touch cursor-pointer items-start gap-3 text-left", className)}
>
<input
id={inputId}
type="checkbox"
checked={checked}
onChange={(e) => onChange(e.target.checked)}
className="peer sr-only"
/>
<span
aria-hidden
className={clsx(
"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded border transition-colors",
"peer-focus-visible:ring-2 peer-focus-visible:ring-accent/50",
checked
? "border-accent bg-accent text-white"
: "border-border bg-surface-1 text-transparent group-hover:border-border-strong",
)}
>
<Check className="h-3.5 w-3.5" strokeWidth={3} />
</span>
<span className="text-sm leading-snug text-text-primary">{label}</span>
</label>
);
}
+1 -1
View File
@@ -35,7 +35,7 @@ export function Modal({ open, onClose, title, children, footer, className }: Mod
>
<div
className={clsx(
"mx-4 flex max-h-[85vh] w-full max-w-lg flex-col rounded-xl border border-border bg-surface-1 shadow-2xl",
"mx-4 flex max-h-[85vh] w-[calc(100%-2rem)] max-w-lg flex-col rounded-xl border border-border bg-surface-1 shadow-2xl",
className,
)}
>
-6
View File
@@ -20,12 +20,6 @@ export const ABOUT = {
discussionsUrl: "https://github.com/poli0981/youtube-generator/discussions",
licenseUrl: "https://github.com/poli0981/youtube-generator/blob/main/LICENSE",
githubAuthor: "https://github.com/poli0981",
// v0.14: pc_spec.md + dev_env.md merged into DEVELOPMENT.md.
// The two URL fields are kept for backwards compatibility with the About
// page layout — `pcSpecDocUrl` now points to the EN guide, `devEnvDocUrl`
// to the VI mirror.
pcSpecDocUrl: "https://github.com/poli0981/youtube-generator/blob/main/docs/DEVELOPMENT.md",
devEnvDocUrl: "https://github.com/poli0981/youtube-generator/blob/main/docs/i18n/vi/DEVELOPMENT.md",
socials: {
youtube: "https://www.youtube.com/@SkullMute",
x: "https://x.com/SkullMute0011",
+183 -2
View File
@@ -39,9 +39,52 @@ export const CONTENT_WARNING_GROUPS: readonly ContentWarningGroup[] = [
"flashing_lights",
"motion_sickness",
"migraine_trigger",
"loud_noises",
"strobe_effects",
"screen_shake_intense",
// v0.23.0: VFX intensity — share the photosensitive audience.
"lens_flare_intense",
"bloom_excessive",
"particle_effects_dense",
"screen_overlay_flashing",
"color_saturation_extreme",
"motion_blur_heavy",
"depth_of_field_aggressive",
"post_processing_intense",
],
},
{
id: "audio",
labelKey: "editor.contentWarningGroups.audio",
items: [
"loud_noises",
"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",
],
},
{
id: "dialogue",
labelKey: "editor.contentWarningGroups.dialogue",
items: [
"profanity_frequent",
"sexual_innuendo",
"inflammatory_speech",
"verbal_abuse",
"threatening_language",
"slurs_derogatory",
"crude_humor",
"mature_humor",
"dark_humor",
"drug_references",
],
},
{
@@ -64,6 +107,46 @@ export const CONTENT_WARNING_GROUPS: readonly ContentWarningGroup[] = [
"coulrophobia",
"ablutophobia",
"taphophobia",
"automatonophobia",
"megalophobia",
"submechanophobia",
"necrophobia",
"spectrophobia",
"demonophobia",
"selachophobia",
"mysophobia",
"emetophobia",
"scopophobia",
"monophobia",
"musophobia",
"chiroptophobia",
"ornithophobia",
"ichthyophobia",
"herpetophobia",
"katsaridaphobia",
"apiphobia",
"astraphobia",
"agoraphobia",
"enochlophobia",
"chionophobia",
"nosocomephobia",
"aichmophobia",
"pnigophobia",
"homichlophobia",
"lilapsophobia",
"ombrophobia",
"nephophobia",
"ancraophobia",
"cryophobia",
"heliophobia",
"cymophobia",
"limnophobia",
"potamophobia",
"chromophobia",
"erythrophobia",
"xanthophobia",
"leukophobia",
"melanophobia",
],
},
{
@@ -89,12 +172,69 @@ export const CONTENT_WARNING_GROUPS: readonly ContentWarningGroup[] = [
"medical_horror",
],
},
{
id: "social_phenomena",
labelKey: "editor.contentWarningGroups.social_phenomena",
items: [
"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",
"body_shaming",
"beauty_standards",
],
},
{
id: "internet_digital",
labelKey: "editor.contentWarningGroups.internet_digital",
items: [
"cyberbullying",
"doxxing",
"trolling_griefing",
"cancel_culture",
"social_media_addiction",
"doomscrolling",
"fomo",
"fake_news",
"online_scams",
"catfishing",
"deepfake_themes",
"cyberstalking",
"internet_challenges",
"influencer_culture",
"online_radicalization",
"loot_boxes",
"ai_themes",
"data_privacy",
],
},
{
id: "sensitive",
labelKey: "editor.contentWarningGroups.sensitive",
items: [
"blood_gore",
"mature_18plus",
"revealing_outfits",
"partial_nudity",
"sexualized_characters",
"fanservice",
"suggestive_poses",
"disturbing_imagery",
"animal_abuse",
"child_harm",
@@ -119,6 +259,41 @@ export const CONTENT_WARNING_GROUPS: readonly ContentWarningGroup[] = [
"human_experimentation",
"cannibalism",
"nuclear_themes",
"homophobia",
"transphobia",
"xenophobia",
"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",
"hanging_depiction",
"drowning_depiction",
"burning_alive",
"asphyxiation_depiction",
"restraint_torture",
"public_execution",
"decapitation",
"impalement",
"mass_casualty_event",
"vehicular_violence",
"overdose_depiction",
"defenestration",
],
},
{
@@ -158,6 +333,12 @@ export const CONTENT_WARNING_GROUPS: readonly ContentWarningGroup[] = [
{
id: "gameplay_disclosure",
labelKey: "editor.contentWarningGroups.gameplay_disclosure",
items: ["mods_used", "cheats_enabled", "glitch_exploits", "assisted_run"],
items: [
"mods_used",
"cheats_enabled",
"glitch_exploits",
"assisted_run",
"educational_purpose_only",
],
},
] as const;
+7 -2
View File
@@ -8,6 +8,7 @@ import type {
UpscaleQuality,
ArtStyle,
} from "./graphics-settings";
import type { VideoStyleEra } from "./video-styles";
import { DEFAULT_GACHA_QUEST_TYPE, type GachaQuestType } from "./gacha-quest-types";
import type {
SupportedLanguage,
@@ -63,6 +64,8 @@ export interface EditorDefaults {
frameGenMultiplier: FrameGenMultiplier;
upscaleQuality: UpscaleQuality;
artStyle: ArtStyle;
/** v0.22.0 opt-in. Empty string = no style line in the description. */
videoStyleEra: VideoStyleEra;
versionInfo: string;
timestamps: string;
playlistLink: string;
@@ -104,6 +107,8 @@ export interface EditorDefaults {
endingVideoCount: number;
/** Per-video ending range (v0.16.0). */
endingVideoRanges: EndingVideoRange[];
/** Which per-video slice the Output previews (v0.17.1). */
endingVideoIndex: number;
/** Language-patch enum for Playthrough Notes section (v0.12). */
languagePatch: LanguagePatch;
/** Free-form label when `languagePatch` is `"official_other"` or `"custom"`. */
@@ -131,7 +136,6 @@ export interface EditorDefaults {
export interface SettingsDefaults {
theme: "dark" | "light";
defaultLanguage: string;
defaultGenres: GenreId[];
}
export const DEFAULTS = {
@@ -167,6 +171,7 @@ export const DEFAULTS = {
frameGenMultiplier: "none",
upscaleQuality: "none",
artStyle: "none",
videoStyleEra: "" satisfies VideoStyleEra,
versionInfo: "",
timestamps: "",
playlistLink: "",
@@ -187,6 +192,7 @@ export const DEFAULTS = {
endings: [],
endingVideoCount: 1,
endingVideoRanges: [],
endingVideoIndex: 1,
languagePatch: "none",
languagePatchCustom: "",
gameVersion: "full_release",
@@ -207,6 +213,5 @@ export const DEFAULTS = {
settings: {
theme: "dark",
defaultLanguage: "en",
defaultGenres: ["action"],
} satisfies SettingsDefaults,
} as const;
+71
View File
@@ -0,0 +1,71 @@
import {
SearchX,
ShieldX,
Clock,
ServerCrash,
WifiOff,
TriangleAlert,
type LucideIcon,
} from "lucide-react";
/**
* The set of error "kinds" the app can present.
*
* YTDescGen is a pure-client SPA (HashRouter, no backend), so `forbidden` /
* `expired` / `serverError` never arise from the app's own logic today — they
* exist as designed, route-reachable pages (`/#/403`, `/#/419`, `/#/500`)
* ready to be wired to future triggers (a Tauri command failure, a future
* sync backend). The kinds that *do* fire:
* - `notFound` — the catch-all `*` route (a mistyped hash path)
* - `offline` — `navigator.onLine` flips false (see use-online-status)
* - `runtime` — a render crash caught by ErrorBoundary
*/
export type ErrorKind =
| "notFound"
| "forbidden"
| "expired"
| "serverError"
| "offline"
| "runtime";
type ErrorSeverity = "accent" | "danger" | "warning";
export interface ErrorPageMeta {
/** HTTP-style status shown large on the page, or `null` for the non-HTTP
* states (offline / runtime crash) that have no meaningful code. */
readonly code: number | null;
/** lucide icon rendered above the code. */
readonly icon: LucideIcon;
/** i18n key prefix under `ui:errorPages.*` for `.title` / `.description`. */
readonly keyPrefix: string;
/** Drives the icon/code colour token — see {@link severityTextClass}. */
readonly severity: ErrorSeverity;
}
/**
* `serverError` deliberately covers 408 + the whole 5xx family — one design,
* one locale set. Kept exhaustive over {@link ErrorKind} via `satisfies` so a
* newly-added kind fails the build until it is mapped here.
*/
export const ERROR_PAGES = {
notFound: { code: 404, icon: SearchX, keyPrefix: "notFound", severity: "accent" },
forbidden: { code: 403, icon: ShieldX, keyPrefix: "forbidden", severity: "danger" },
expired: { code: 419, icon: Clock, keyPrefix: "expired", severity: "warning" },
serverError: { code: 500, icon: ServerCrash, keyPrefix: "serverError", severity: "danger" },
offline: { code: null, icon: WifiOff, keyPrefix: "offline", severity: "warning" },
runtime: { code: null, icon: TriangleAlert, keyPrefix: "runtime", severity: "danger" },
} as const satisfies Record<ErrorKind, ErrorPageMeta>;
/** Look up the presentation metadata for an error kind. */
export function resolveErrorMeta(kind: ErrorKind): ErrorPageMeta {
return ERROR_PAGES[kind];
}
/** Map a severity to its Tailwind text-colour token. */
export function severityTextClass(severity: ErrorPageMeta["severity"]): string {
return severity === "danger"
? "text-danger"
: severity === "warning"
? "text-warning"
: "text-accent";
}
+2 -11
View File
@@ -24,7 +24,7 @@
* "gaming GPUs" in the discrete-card sense.
*/
export interface GpuSeries {
interface GpuSeries {
/** Stable id used in the storage tuple (`<brandId>|<seriesId>|<model>`). */
readonly id: string;
readonly label: string;
@@ -253,13 +253,4 @@ export const GPU_CUSTOM_BRAND_ID = "custom";
*/
export function findGpuBrand(brandId: string): GpuBrand | undefined {
return GPU_CATALOG.find((b) => b.id === brandId);
}
/**
* Lookup a series within a known brand. Returns `undefined` for both
* unknown brand and unknown series; the caller decides whether to clear
* the downstream model selection or preserve it.
*/
export function findGpuSeries(brandId: string, seriesId: string): GpuSeries | undefined {
return findGpuBrand(brandId)?.series.find((s) => s.id === seriesId);
}
}
Loaded 100 of 172 files, more files were not shown because too many files have changed in this diff. Show more