Compare commits

...
Author SHA1 Message Date
poli0981andClaude Opus 5.5 cc66d9ecd9 chore(deps): fold this week's updates; async-executor 1.14.1
npm, the newest releases published before 2026-11-10 (the same 7-day
cooldown Dependabot uses): react-i18next 17.1.13, lucide-react 1.70,
zustand 5.1.0, simple-icons 16.37, vite 8.3.7 (rolldown 1.2.18),
@vitejs/plugin-react 6.3.0, tailwindcss and @tailwindcss/postcss 4.3.5,
typescript-eslint 8.72.2, knip 6.44.2, and the exact pins marked 18.2.0
and wrangler 4.159.0 (miniflare 5.20261109.0-beta, workerd 1.20261109.1).
THIRD_PARTY_NOTICES regenerated. No lock entry moved backwards.

Rust: async-executor 1.14.0 -> 1.14.1. 1.14.0 was yanked, and the weekly
cargo-deny run warned about it.

Held back, still inside the cooldown: eslint 10.15 / typescript-eslint
8.73 (they move to minimatch 11, the fix for the medium, dev-only alert
#50) and Tauri 2.12.6.

Closes #251, #252, #253, #255, #256.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 10:17:38 +07:00
poli0981 b7cfdec142 Merge pull request #254 from poli0981/dependabot/github_actions/actions-cbbf7163c1
ci: bump the actions group with 3 updates
2026-11-17 10:12:21 +07:00
dependabot[bot] b3d6190d06 ci: bump the actions group with 3 updates
Bumps the actions group with 3 updates: [SonarSource/sonarqube-scan-action](https://github.com/sonarsource/sonarqube-scan-action), [amannn/action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request) and [actions/setup-java](https://github.com/actions/setup-java).


Updates `SonarSource/sonarqube-scan-action` from 8.4.0 to 8.4.1
- [Release notes](https://github.com/sonarsource/sonarqube-scan-action/releases)
- [Commits](https://github.com/sonarsource/sonarqube-scan-action/compare/4d1dc0c91ee400dcf8a6dddf2f705ac36542e304...e805d875275f728fac1885b413934be6d7c63f65)

Updates `amannn/action-semantic-pull-request` from 6.1.1 to 6.1.2
- [Release notes](https://github.com/amannn/action-semantic-pull-request/releases)
- [Changelog](https://github.com/amannn/action-semantic-pull-request/blob/main/CHANGELOG.md)
- [Commits](https://github.com/amannn/action-semantic-pull-request/compare/48f256284bd46cdaab1048c3721360e808335d50...2252a14e810aa9b85c2d560bd7070c802206ecf6)

Updates `actions/setup-java` from 6.1.0 to 6.2.0
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/b843ebf9b913146b38da2eaa7aeddf76074ae1ad...77dd5b2ce225ea11469928ac317850245a74ae78)

---
updated-dependencies:
- dependency-name: SonarSource/sonarqube-scan-action
  dependency-version: 8.4.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: amannn/action-semantic-pull-request
  dependency-version: 6.1.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: actions/setup-java
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-16 13:46:39 +00:00
poli0981 0297209cff Merge pull request #249 from poli0981/chore/release-1.5.2
chore(release): v1.5.2
2026-11-10 06:03:11 +07:00
poli0981andClaude Fable 5.2 653cf829af chore(release): v1.5.2
Maintenance (#245, #248): Tauri 2.12.5 with the fixes its window,
webview and single-instance layers collected since 2.12.4, and this
week's dependency updates; i18next stays on 26.6.x to keep the initial
load inside its budget.

- CHANGELOG v1.5.2, ROADMAP entry and status
- docs: TECH-SPEC's package.json listing follows the real file again
  and notes the i18next hold
- version references: ARCHITECTURE, TECH-SPEC, PACKAGING, FEATURES,
  DISCLAIMER + Vietnamese, the bug-report and accessibility templates
- six manifests 1.5.1 -> 1.5.2

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 05:58:06 +07:00
poli0981 d0d22ef679 Merge pull request #248 from poli0981/chore/deps-2026-11-10
chore(deps): fold this week's updates; tauri 2.12.5; hold i18next at 26.6
2026-11-10 05:57:44 +07:00
poli0981andClaude Fable 5.2 8a76e98eea chore(deps): fold this week's updates; tauri 2.12.5; hold i18next at 26.6
Folds Dependabot's #242, #243, #244, #246 and #247 into one change.
Each failed the required `check` job the same way (a new version makes
THIRD_PARTY_NOTICES.md stale) and they conflict with each other in
package-lock.json and the notices.

npm, installed with `npm update --before=2026-11-03`, the 7-day
cooldown Dependabot uses:

- i18next 26.5.11 -> 26.6.0, react-i18next 17.1.9 -> 17.1.11,
  i18next-resources-to-backend 1.2.3 -> 1.2.4
- lucide-react 1.64.0 -> 1.66.0, react-router-dom 7.18.4 -> 7.18.5,
  simple-icons 16.35.0 -> 16.36.0
- vite 8.3.4 -> 8.3.5 (rolldown 1.2.16), @vitejs/plugin-react 6.1.2 ->
  6.2.1, tailwindcss 4.3.3 -> 4.3.4, postcss 8.5.32, autoprefixer
  10.6.2, marked 18.1.1 -> 18.1.3
- eslint 10.13.0 -> 10.14.0, typescript-eslint 8.72.1, knip 6.44.1,
  @types/node 26.6.6
- wrangler 4.152.0 -> 4.156.2 (miniflare 5.20261102.0-beta)

i18next stops at 26.6.x (`~26.6.0` plus a Dependabot ignore for
26.7.x): 26.7 adds the debug-mode warnings for the move to v27, about
1.9 KB gzip in the i18n chunk, which takes the initial load from 279.0
to 280.9 KB, over the 280 KB budget, for code the app never runs.

The undici override is gone: miniflare 5.20261102.0-beta depends on
undici 7.30.1 itself (alert #49 stays fixed).

Rust: tauri 2.12.4 -> 2.12.5, tauri-build / -macros / -codegen 2.7.4,
tauri-runtime-wry 2.12.3, wry 0.57.1, tao 0.37.2, tauri-plugin-dialog
2.8.4 (rfd 0.17), tauri-plugin-single-instance 2.5.5. All older than
the cooldown. THIRD_PARTY_NOTICES regenerated.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 05:51:26 +07:00
poli0981 dfe5f827dd Merge pull request #245 from poli0981/dependabot/github_actions/actions-34703ed004
ci: bump the actions group with 2 updates
2026-11-10 05:39:03 +07:00
dependabot[bot] ae3f729c4e ci: bump the actions group with 2 updates
Bumps the actions group with 2 updates: [SonarSource/sonarqube-scan-action](https://github.com/sonarsource/sonarqube-scan-action) and [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action).


Updates `SonarSource/sonarqube-scan-action` from 8.3.0 to 8.4.0
- [Release notes](https://github.com/sonarsource/sonarqube-scan-action/releases)
- [Commits](https://github.com/sonarsource/sonarqube-scan-action/compare/d209202bc7d53ff1cc128f7f907dac145c9d6ae9...4d1dc0c91ee400dcf8a6dddf2f705ac36542e304)

Updates `zizmorcore/zizmor-action` from 0.8.0 to 0.8.1
- [Release notes](https://github.com/zizmorcore/zizmor-action/releases)
- [Commits](https://github.com/zizmorcore/zizmor-action/compare/53290badfa369cb0bf7ad16342cb62c2fa47ac7b...45d7276c9ca790aabd705e31ca99c6185c3e76dd)

---
updated-dependencies:
- dependency-name: SonarSource/sonarqube-scan-action
  dependency-version: 8.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.8.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-09 13:46:31 +00:00
poli0981 df92c80bcf Merge pull request #240 from poli0981/chore/release-1.5.1
chore(release): v1.5.1
2026-11-09 20:22:41 +07:00
poli0981andClaude Opus 5.5 5fd28e336c chore(release): v1.5.1
Accessibility (#238, #239): AA contrast, generated text marked with its
language, page names read out after a navigation, the single-key
shortcut switch, desktop zoom hotkeys, and ACCESSIBILITY.md in the repo,
the Legal Center and on the website.

- CHANGELOG v1.5.1, ROADMAP entry and status
- docs: ARCHITECTURE (RouteAnnouncer, settings, capabilities), TECH-SPEC
  (singleKeyShortcuts, contrast test, test count), PACKAGING (zoom
  hotkeys and permission), FEATURES
- version references: DISCLAIMER + Vietnamese, the bug-report template
- six manifests 1.5.0 -> 1.5.1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 20:19:21 +07:00
poli0981 754b669f4d Merge pull request #239 from poli0981/docs/accessibility-statement
feat(legal): accessibility statement — ACCESSIBILITY.md, Legal Center page, issue form
2026-11-09 20:19:16 +07:00
poli0981andClaude Opus 5.5 a45a06fad7 feat(legal): accessibility statement — ACCESSIBILITY.md, Legal Center page, issue form
- ACCESSIBILITY.md (+ docs/i18n/vi): goal (WCAG 2.2 AA, not a conformance
  claim), what works with a keyboard, screen readers, zoom, motion and touch,
  how it is checked, supported environments, known limitations, how to
  report a barrier (severity, response), and a checklist for contributors.
- In the Legal Center (consent: false, English + Vietnamese) and as
  /legal/accessibility on the website; the Turnstile page's footer links it
  in all eight languages.
- .github: Accessibility barrier issue form (label `accessibility`), an
  Accessibility option in the feature request scope, an accessibility
  checklist in the PR template.
- README, CONTRIBUTING, DEVELOPMENT (+vi), FEATURES and CLAUDE.md point to
  it; SECURITY.md's supported versions move from 1.3.x to 1.5.x.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 20:12:25 +07:00
poli0981 806201721c Merge pull request #238 from poli0981/feat/accessibility-pass
feat(a11y): contrast to AA, output language, page announcements, single-key shortcut switch, desktop zoom
2026-11-09 20:10:35 +07:00
poli0981andClaude Opus 5.5 68dc48ea53 feat(a11y): AA contrast, output language, page announcements, single-key shortcut switch, desktop zoom
- Colour tokens reach WCAG AA: lighter muted text and accent in the dark
  theme, darker muted/success/warning/danger/donate in the light theme, and
  new accent-solid / danger-solid fills for buttons with white text.
  tests/styles/contrast.test.ts checks every text token on every surface.
- Generated text carries its language (lang) on Output, the YouTube and
  quick previews, History, Batch, Social and Playlist, so screen readers read
  Japanese output with a Japanese voice.
- RouteAnnouncer reads the new page's name after a navigation; focus stays.
- Toast region and close button are translated; Alt+T is in the shortcut list.
- Endings table inputs and the custom bank name get accessible names; the
  From/To headers are translated.
- Settings > Editor > Single-key shortcuts turns the bare ? off (WCAG 2.1.4).
- Text inputs use outline-hidden so the focus outline shows in Windows High
  Contrast; the genre remove button is 24px, small close/dismiss buttons
  grow on touch screens.
- Desktop: zoomHotkeysEnabled (Ctrl/Cmd + = / -), with the
  set-webview-zoom permission for the macOS/Linux polyfill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 20:02:37 +07:00
poli0981 d6cfea8449 Merge pull request #236 from poli0981/chore/release-1.5.0
chore(release): v1.5.0
2026-11-08 00:44:38 +07:00
poli0981andClaude Opus 5.5 8628991390 chore(release): v1.5.0
Upscaled video (#235): "Upscaled from" in Video settings, the
[4K Upscaled] title badge, the Upscale line in VIDEO SETTINGS and an
automatic tech note about upscaled detail.

- CHANGELOG v1.5.0, ROADMAP entry and status
- docs: FEATURES, CONTENT-INVENTORY (+ Vietnamese), ARCHITECTURE and
  TECH-SPEC (upscale.ts, store v21, test count), CLAUDE.md
- version references: PACKAGING, DISCLAIMER + Vietnamese, the
  bug-report template
- six manifests 1.4.0 -> 1.5.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 00:41:56 +07:00
poli0981 06e0d9ae3d Merge pull request #235 from poli0981/feat/upscaled-video
feat(editor): upscaled video — [4K Upscaled] badge, upscale line and warning
2026-11-08 00:41:47 +07:00
poli0981andClaude Opus 5.5 941a1fad4f feat(editor): upscaled video — [4K Upscaled] badge, upscale line and warning
Video settings gain "Upscaled from" next to Resolution: footage recorded
at 1440p and exported at 4K in the video editor is now declared as such.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 00:38:08 +07:00
poli0981 8cc9a46167 Merge pull request #233 from poli0981/ci/macos-15-runner
ci(release): build the macOS app on macos-15
2026-11-06 22:51:53 +07:00
poli0981andClaude Opus 5.5 cf9934e25f ci(release): build the macOS app on macos-15
GitHub retired the macOS 14 runner image on 2026-11-02. The v1.4.0 tag's
Release Desktop run had its macOS job cancelled before any step ran
("The configuration 'macos-14-arm64-us-default' is not supported"); the
Windows and Linux builds went through. macos-15 is the direct Apple
silicon successor.

The macOS .app.tar.gz for v1.4.0 will come from the workflow's manual
`workflow_dispatch` re-run with tag v1.4.0, which takes the job matrix
from main and checks out the tag's code. PACKAGING's runner table and
the v1.4.0 CHANGELOG entry say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 22:44:25 +07:00
poli0981 09f50362a2 Merge pull request #232 from poli0981/chore/release-1.4.0
docs: v1.4.0 — LUT field, boss name tag; bump to 1.4.0
2026-11-06 22:28:33 +07:00
poli0981andClaude Opus 5.5 d2519ccaef chore(release): v1.4.0
A LUT field in My Rig (#230), the boss's name as a tag in boss videos
(#231), and this week's dependency updates (#228, #229).

- CHANGELOG v1.4.0, ROADMAP entry and status
- version references: ARCHITECTURE, TECH-SPEC (+ test count), PACKAGING,
  FEATURES, DISCLAIMER + Vietnamese, the bug-report template
- six manifests 1.3.2 -> 1.4.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 22:26:22 +07:00
poli0981 b216d71591 Merge pull request #231 from poli0981/feat/boss-name-tag
feat(tags): the boss name as a tag in boss videos
2026-11-06 22:25:08 +07:00
poli0981 b7d357ce4c Merge pull request #230 from poli0981/feat/rig-lut
feat(rig): add a LUT field under the video editor
2026-11-06 22:23:13 +07:00
poli0981andClaude Opus 5.5 0789a11a39 feat(tags): the boss name as a tag in boss videos
Boss Fight and Boss No Hit videos get the boss's name as a tag of its
own, right after the game's name, so fitting the list to 500 characters
never drops it.

bossNameTag cleans the Boss Name field the way a search term reads:
- NFC first; everything but letters (any script), marks, digits,
  whitespace and in-word ' ' - becomes a space: , : ; ! ? quotes,
  brackets, &, the CJK brackets and dots, (TM), emoji.
- A dot stays between digits ("Phase 2.0"), goes between initials
  ("S.T.A.L.K.E.R." -> "STALKER") and is a space anywhere else
  ("Mr.X" -> "Mr X"). Done per word in code: a lookbehind would be a
  syntax error in the macOS 11-13 webview and stop the chunk loading.
- Over 30 characters, the name before its title ("Loretta, Knight of
  the Haligtree" -> "Loretta"), else the leading words that fit; the
  word fit is now a helper shared with tagFriendlyGameName (same result
  there).

Only the video types whose extraFields include bossName add it, so a
boss name left in the draft after switching to Full Gameplay is not
tagged. Docs: FEATURES, ARCHITECTURE 2.3, TECH-SPEC.

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

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

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 22:17:44 +07:00
poli0981 c14698c704 Merge pull request #229 from poli0981/chore/deps-2026-11-06
chore(deps): fold this week's Dependabot updates
2026-11-06 22:14:05 +07:00
poli0981andClaude Opus 5.5 78abb6f354 chore(deps): fold this week's Dependabot updates
Folds #223-#227 into one change. Each of them failed the required
`check` job the same way: a new version makes THIRD_PARTY_NOTICES.md
stale, and merged one by one they would conflict with each other in
package-lock.json and the notices.

- i18next 26.5.3 -> 26.5.11, react-i18next 17.1.0 -> 17.1.9
- lucide-react 1.59.0 -> 1.64.0, zustand 5.0.15 -> 5.0.16
- knip 6.42.1 -> 6.44.0
- wrangler 4.151.2 -> 4.152.0 (miniflare 5.20261019.2-beta)
- @tauri-apps/cli 2.12.3 -> 2.12.4 (matches the tauri 2.12.4 crate)

Installed with `npm install --before=2026-10-30`, the same 7-day
cooldown Dependabot uses; lucide-react and knip land on the newest
releases past it (1.64.0, 6.44.0) rather than Dependabot's 1.61.0 and
6.43.0. The undici override stays: miniflare 5.20261019.2-beta still
pins undici 7.29.1. THIRD_PARTY_NOTICES regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 22:09:22 +07:00
poli0981 842b9d2a36 Merge pull request #228 from poli0981/dependabot/github_actions/actions-d480c5930a
ci: bump the actions group with 2 updates
2026-11-06 22:03:37 +07:00
dependabot[bot] 931d7d8f8e ci: bump the actions group with 2 updates
Bumps the actions group with 2 updates: [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) and [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action).


Updates `Swatinem/rust-cache` from 2.9.2 to 2.9.3
- [Release notes](https://github.com/swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/swatinem/rust-cache/compare/6323deb102c322ba6fcbdcafc7e3dddab59af2b6...d1527c8f67ef9af357290475d4af4b0fab8f12e0)

Updates `zizmorcore/zizmor-action` from 0.7.1 to 0.8.0
- [Release notes](https://github.com/zizmorcore/zizmor-action/releases)
- [Commits](https://github.com/zizmorcore/zizmor-action/compare/85b2b9fb8e3325e7a23d7d0a9d7ba5ae0f999e3e...53290badfa369cb0bf7ad16342cb62c2fa47ac7b)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-version: 2.9.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-02 13:47:23 +00:00
poli0981 a40044e8e3 Merge pull request #221 from poli0981/chore/release-1.3.2
docs: v1.3.2 — rate limiting for the website; bump to 1.3.2
2026-10-27 06:36:51 +07:00
poli0981andClaude Opus 5.5 f102f1a6ba chore(release): v1.3.2
Rate limiting for the website: Workers Rate Limiting bindings in front
of the gate, behind a WAF rate limiting rule at the zone (#220).

- CHANGELOG v1.3.2, ROADMAP entry and status
- version references: ARCHITECTURE, TECH-SPEC (+ test count), PACKAGING,
  FEATURES, DISCLAIMER + Vietnamese, the bug-report template
- six manifests 1.3.1 -> 1.3.2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 06:34:21 +07:00
poli0981 5a10739c07 Merge pull request #220 from poli0981/feat/worker-rate-limit
feat(worker): rate-limit every client before the gate
2026-10-27 06:31:08 +07:00
poli0981andClaude Opus 5.5 bdaf15d835 feat(worker): rate-limit every client before the gate
Two Workers Rate Limiting bindings in wrangler.jsonc, checked first in
the router so a flood costs no siteverify call, HMAC check or asset
fetch:

- RATE_LIMIT: 120 requests a minute for everything the Worker handles
  (gate page, app shell, legal pages, /__gate/*, any method).
- VERIFY_RATE_LIMIT: 10 a minute for POST /__gate/verify on top.

Clients are keyed by IPv4 address or IPv6 /64. Over the limit: 429 with
Retry-After: 60 (plain text, or JSON for the verify call). Like the
gate, it fails open when a binding is missing or limit() throws, and
logs that once per isolate. A test keeps wrangler.jsonc's bindings and
period in step with the code.

HOSTING documents both layers and the zone's WAF rate limiting rule
(Free plan: one rule, per IP, 10 s) as the first one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 06:28:19 +07:00
poli0981 5da7ff0e0f Merge pull request #218 from poli0981/chore/release-1.3.1
docs: v1.3.1 — changelog and version references; bump to 1.3.1
2026-10-26 12:58:52 +07:00
poli0981andClaude Opus 5.5 a403e2fc89 chore(release): v1.3.1
Tauri 2.12.4, the desktop's Save / Open dialogs off the async workers
(#216), SonarCloud in CI (#215) and this week's dependency updates with
alert #49 closed (#217).

- CHANGELOG v1.3.1, ROADMAP entry and status
- version references: ARCHITECTURE, TECH-SPEC, PACKAGING, FEATURES,
  DISCLAIMER + Vietnamese, the bug-report template
- six manifests 1.3.0 -> 1.3.1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:51:41 +07:00
poli0981 dae48b591a Merge pull request #217 from poli0981/chore/deps-2026-10-26
chore(deps): fold this week's updates; override undici for alert #49
2026-10-26 12:51:31 +07:00
poli0981andClaude Opus 5.5 f3cad7c1d9 chore(deps): fold this week's updates; override undici for alert #49
- undici 7.30.1 through `overrides` (alert #49, GHSA-xjj6-f33q-929c,
  dev only): miniflare pins undici exactly, so Dependabot's security
  job fails with security_update_not_possible. The note in
  dependabot.yml says when to drop the override.
- npm, newest releases at least seven days old (the Dependabot
  cooldown): react + react-dom 19.3.1, i18next 26.5.3,
  react-i18next 17.1.0, lucide-react 1.59.0, simple-icons 16.35.0,
  eslint 10.13.0, typescript-eslint 8.72.0, knip 6.42.1,
  postcss 8.5.31, @types/node 26.6.5, wrangler 4.151.2
- tauri crates to match @tauri-apps/api 2.12.4: tauri 2.12.4,
  tauri-build 2.7.3, tauri-plugin-dialog 2.8.3, -opener 2.7.2,
  -single-instance 2.5.4, -fs 2.7.1
- THIRD_PARTY_NOTICES regenerated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:44:50 +07:00
poli0981 49ff940b72 Merge pull request #216 from poli0981/fix/rust-blocking-dialog-io
fix(desktop): run the file dialogs and their file I/O on the blocking pool
2026-10-24 09:11:03 +07:00
poli0981andClaude Opus 5.5 2cecc20fac docs: blocking work in async Tauri commands goes through spawn_blocking
PACKAGING (the dialog commands, the unit tests) and CLAUDE.md's design decision on paths say how the dialog commands run, so the next command doesn't bring rust:S7493 back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 09:08:14 +07:00
poli0981andClaude Opus 5.5 e8cd1aabca fix(desktop): run the file dialogs and their file I/O on the blocking pool
SonarCloud's first CI analysis of main, the first one that reads Rust,
flagged rust:S7493 in export_text_file: a blocking fs::write inside an
async command holds one of the async runtime's worker threads. Waiting
for the native Save / Open dialog blocks the same way, for as long as
the user takes to choose.

Both commands now validate the filter first, then run the dialog and the
file I/O through tauri::async_runtime::spawn_blocking. Writing the
picked file moves into write_picked, next to read_picked, with a test.
The dialogs' blocking API only needs to stay off the main thread, which
the blocking pool is, as the runtime's workers were.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 09:04:21 +07:00
poli0981 fd06bcd916 Merge pull request #215 from poli0981/ci/sonarcloud-ci-analysis
ci(sonarcloud): switch to CI-based analysis with Vitest coverage
2026-10-24 08:52:20 +07:00
poli0981andClaude Opus 5.5 42bc2d31dc docs(development): keep the coverage row short so the command table keeps its width
The coverage scope is spelled out in TECH-SPEC, vitest.config.ts and sonar-project.properties; the table row only says what the command does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 08:49:09 +07:00
poli0981andClaude Opus 5.5 191e8cf89a docs(tech-spec): binary files are left out of the SonarCloud analysis
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 08:46:43 +07:00
poli0981andClaude Opus 5.5 adc2426507 ci(sonarcloud): leave binary files out of the analysis
The scanner indexed every PNG, ICO, ICNS and the Gradle wrapper's jar and warned about each one it read as UTF-8 text (about seventy warnings per run). There is nothing in them to analyse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 08:45:41 +07:00
poli0981andClaude Opus 5.5 d7a86d581e ci(sonarcloud): switch to CI-based analysis with Vitest coverage
SonarCloud's Automatic Analysis is off. The new `sonarcloud` job in
ci.yml runs SonarSource/sonarqube-scan-action v8.3.0 after `check`, with
the LCOV report that `check` now uploads; it never installs npm packages,
so SONAR_TOKEN never shares a job with them, and it fails with the
quality gate. Fork and Dependabot PRs skip it (no repository secrets).

sonar-project.properties analyses the tests as tests, imports the
coverage and excludes from it everything Vitest does not measure. Vitest
now also measures src/config, src/store and src/utils, next to the
engine, the Worker and the build plugins. The job passes package.json's
version as sonar.projectVersion, so the "previous version" new-code
period starts again at every release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 08:38:24 +07:00
poli0981 1858df90e5 Merge pull request #213 from poli0981/docs/v1.3.0
docs: v1.3.0 — toolchain docs and changelog; bump to 1.3.0
2026-10-22 15:12:32 +07:00
poli0981andClaude Opus 5.5 f472c1e760 docs: v1.3.0 — toolchain docs and changelog; bump to 1.3.0
- CHANGELOG v1.3.0; ROADMAP (v1.3.0 shipped, ES2026 next)
- DEVELOPMENT + vi: Node 26 / npm 11, TypeScript 7 with the 6.0 API alias,
  and the IDE setting that follows from it
- TECH-SPEC: package.json, tsconfig, the Vite target, toolchain notes
  (TypeScript aliases, Node 26 web storage, npm ci --ignore-scripts)
- PACKAGING: supported WebViews, Android cloud backups off, Node 26, the
  tauri.conf.json excerpt
- HOSTING, ARCHITECTURE, README (node >= 26, TypeScript 7), FEATURES, I18N,
  CONTENT-INVENTORY + vi, DISCLAIMER + vi, SECURITY (1.3.x), the bug-report
  template, CLAUDE.md (TypeScript 7, the browser-floor lib, linear regexes,
  SonarCloud, npm aliases)
- Six manifests bumped 1.2.0 -> 1.3.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 15:11:17 +07:00
poli0981 e33462b462 Merge pull request #212 from poli0981/fix/sonarcloud
fix(quality): clear the 44 open SonarCloud issues
2026-10-22 15:09:24 +07:00
poli0981andClaude Opus 5.5 886d25b588 fix(quality): clear the 44 open SonarCloud issues
Regexes with super-linear backtracking (S8786 x16) are rewritten to stay
linear on long runs; each new pattern gives the same results as the old one
on 150k-450k fuzzed inputs (except where noted) and finishes adversarial
50k-character inputs in under 3 ms:
- tag-generator QUALIFIER_SUFFIX_RE starts just before a `:`/space run
  (`(^|[^:\s])…` + "$1"), never inside one
- timeline-parser matches `line.trimEnd()` with a greedy label, and renders
  with trimEnd(); cleanCpuName collapses whitespace before the patterns
- editor-store endings, Google Play urlPattern (lookahead for `id=`),
  channel-phrase punctuation, SPDX OR/AND split, legal-docs slug and link
  stripping (link text/URL may not contain `[`), base64url padding, and a
  loop for trailing slashes in the worker router

Others:
- S2871: sorts take the shared code-unit comparator (same order as before;
  THIRD_PARTY_NOTICES is unchanged)
- S4822: ErrorBoundary catches the logger import with .catch(), which a
  try/catch never could
- S3516: migrateProfilesState returns a new object
- S7773: Number.parseInt (x10)
- S9379: Modal takes an initialFocusRef (Radix onOpenAutoFocus), so the
  shortcut search box gets focus without an autoFocus attribute
- S2245: generateId drops the Math.random fallback; getRandomValues exists
  everywhere the app runs, and a non-random ID is worse than an error
- S4036: NOSONAR on the dev script's `git` call (PATH lookup by design)
- S6505/S8543: every workflow installs with `npm ci --ignore-scripts`, and CI
  runs `npm run cf:check` instead of `npx wrangler …`
- S6358: Android sets allowBackup="false" — app data is no longer copied to
  Google Drive backups; Backup & Restore moves it to a new phone

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 15:05:16 +07:00
poli0981 abfcd96eb5 Merge pull request #211 from poli0981/refactor/react-19-refs
refactor(ui): take refs as a prop instead of forwardRef
2026-10-22 15:05:08 +07:00
144 changed files with 4336 additions and 1659 deletions

No files matched your search

+123
View File
@@ -0,0 +1,123 @@
name: Accessibility barrier
description: Something stops or slows you down when you use a keyboard, a screen reader, zoom, high contrast, voice control or a touch screen.
title: "[A11y]: "
labels: ["accessibility", "triage"]
body:
- type: markdown
attributes:
value: |
Thanks for telling us. You don't need to know what causes the problem — describe what you tried and what happened.
Prefer not to post in public? Email **contact@poli0981.dev** with `[Accessibility]` at the start of the subject.
How reports are handled: [ACCESSIBILITY.md](https://github.com/poli0981/youtube-generator/blob/main/ACCESSIBILITY.md#reporting-a-barrier).
- type: textarea
id: barrier
attributes:
label: What happened?
description: What were you trying to do, and what got in the way?
placeholder: e.g. "With NVDA, the Copy Title button is announced only as 'button'."
validations:
required: true
- type: textarea
id: repro
attributes:
label: Steps to reproduce
description: The page, then numbered steps — keys you pressed, gestures or voice commands.
placeholder: |
1. Open Output
2. Press Tab until the Copy Title button
3. Listen to what the screen reader says
validations:
required: true
- type: textarea
id: expected
attributes:
label: What did you expect?
validations:
required: true
- type: dropdown
id: assistive-tech
attributes:
label: Assistive technology or setting
description: Pick everything you were using.
multiple: true
options:
- Keyboard only
- Narrator (Windows)
- NVDA
- JAWS
- VoiceOver (macOS / iOS)
- TalkBack (Android)
- Orca (Linux)
- Screen magnifier / browser zoom
- Speech input / voice control
- High contrast / forced colours
- Reduce motion
- Switch access
- Other (say which below)
validations:
required: true
- type: input
id: assistive-tech-version
attributes:
label: Version of that tool (if you know it)
placeholder: e.g. NVDA 2026.3, VoiceOver on macOS 26
- type: dropdown
id: severity
attributes:
label: How much does it stop you?
description: The levels are explained in ACCESSIBILITY.md.
options:
- Critical — I can't finish a core task (write, generate, copy, save, get past the website check)
- High — I can finish it, but only with real difficulty or a workaround
- Medium — it works, but inconsistently or confusingly
- Low — a minor annoyance
validations:
required: true
- type: input
id: version
attributes:
label: App version
description: From the About page. Example `v1.5.2`.
placeholder: v1.5.2
validations:
required: true
- type: dropdown
id: surface
attributes:
label: Where are you running YTDescGen?
options:
- Web (ytgenerator.stream)
- Desktop — Windows (Tauri)
- Desktop — macOS (Tauri)
- Desktop — Linux (Tauri)
- Android (APK)
- Local dev (npm run dev)
validations:
required: true
- type: input
id: os
attributes:
label: Operating system and browser
description: e.g. Windows 11 25H2 + Edge 141, macOS 26 + Safari 26, Android 15. Leave the browser out for the desktop and Android apps.
validations:
required: true
- type: dropdown
id: language
attributes:
label: App language
options:
- English (en)
- Tiếng Việt (vi)
- 日本語 (ja)
- Español (es)
- 한국어 (ko)
- 简体中文 (zh)
- Português (BR) (pt-BR)
- Bahasa Indonesia (id)
validations:
required: true
- type: textarea
id: recording
attributes:
label: Screen recording, screenshot or screen reader output (optional)
description: Drag and drop files here, or paste what the screen reader said.
+2 -2
View File
@@ -12,8 +12,8 @@ body:
id: version
attributes:
label: App version
description: From the About page. Example `v1.2.0`.
placeholder: v1.2.0
description: From the About page. Example `v1.5.2`.
placeholder: v1.5.2
validations:
required: true
- type: dropdown
@@ -40,6 +40,7 @@ body:
- Backup & restore
- i18n / locales
- Settings
- Accessibility (keyboard, screen readers, zoom, contrast)
- Web app (ytgenerator.stream)
- Desktop (Tauri)
- Android
+14
View File
@@ -42,6 +42,20 @@ If this PR touches the UI, attach screenshots or short recordings at:
Otherwise delete this section.
-->
## Accessibility
<!--
If this PR touches the UI, check each item (see ACCESSIBILITY.md#for-contributors).
Otherwise delete this section.
-->
- [ ] Works with the keyboard alone: logical focus order, visible focus, Esc closes, no focus trap
- [ ] Every control has a name and every field a label (`Field`, `IconButton`); new `aria-label` text is in all 8 locales
- [ ] Errors and status changes are announced (alert banner, toast or live region)
- [ ] Colour is not the only signal; design tokens only, and the contrast test passes
- [ ] New animation respects reduced motion; targets are at least 24 × 24 px
- [ ] Checked once with a screen reader (Narrator, VoiceOver, NVDA or Orca)
## AI-Assisted Contribution
- [ ] Yes — AI tool used: <!-- e.g. Claude Code (Claude Opus 5.5), Cursor, GitHub Copilot -->
+13
View File
@@ -21,6 +21,16 @@
# other long-standing one, left the tree in v1.0.0 when tauri 2.12 dropped
# kuchikiki.)
#
# The npm side holds one package back on purpose: `i18next` stays on 26.6.x
# (`~26.6.0` in package.json). 26.7, the last 26.x minor, adds the debug-mode
# warnings that prepare the move to v27 — about 1.9 KB gzip in the i18n chunk,
# which takes the initial load from 279.0 KB to 280.9 KB, over the 280 KB
# budget (`npm run check:bundle`), for code the app never runs. Remove the
# ignore and the tilde with the planned i18next 27 migration.
#
# (`undici`, overridden in package.json for alert #49 until v1.5.1, needs no
# override any more: miniflare >= 5.20261101 depends on undici 7.30.1 itself.)
#
# Tauri moves in lockstep: the tauri CLI refuses to build when the
# @tauri-apps/* npm packages and the tauri crates differ in major.minor. When
# the `tauri` npm group arrives, run `cargo update -p tauri` (and the plugin
@@ -99,6 +109,9 @@ updates:
# patch.
- dependency-name: "*"
update-types: ["version-update:semver-major"]
# Bundle budget — see the note at the top.
- dependency-name: "i18next"
versions: ["26.7.x"]
- package-ecosystem: "cargo"
directory: "/src-tauri"
+62 -4
View File
@@ -6,8 +6,9 @@ on:
pull_request:
branches: [main]
# Least privilege. The job only reads the repo — it publishes nothing, comments
# nowhere. Declaring it explicitly also silences CodeQL's
# Least privilege. The jobs only read the repo — they publish nothing on
# GitHub and comment nowhere (SonarCloud's own GitHub app reports on PRs, with
# its own permissions). Declaring it explicitly also silences CodeQL's
# `actions/missing-workflow-permissions`, which otherwise flags the implicit
# (and much wider) default token scope.
permissions:
@@ -35,7 +36,10 @@ jobs:
with:
node-version-file: .node-version
cache: npm
- run: npm ci
# No dependency lifecycle scripts, in every workflow. The only packages
# that have one (esbuild, workerd, fsevents) take their native binary
# from optionalDependencies; the script only double-checks it.
- run: npm ci --ignore-scripts
# `tsc` must be TypeScript 7 (@typescript/native). The `typescript` alias
# (@typescript/typescript6, the API typescript-eslint loads) pulls in
# TypeScript 6 as @typescript/old, which ships a `tsc` too — npm links the
@@ -58,6 +62,14 @@ jobs:
# Coverage thresholds for src/engine and worker live in vitest.config.ts.
- name: Test (with coverage thresholds)
run: npm run test:coverage
# The LCOV report the `sonarcloud` job hands to SonarCloud.
- name: Keep the coverage report for SonarCloud
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: coverage
path: coverage/lcov.info
if-no-files-found: error
retention-days: 1
# --- consistency ------------------------------------------------------
- name: Check formatting
@@ -100,4 +112,50 @@ jobs:
# Validates wrangler.jsonc and bundles the Worker exactly as Workers
# Builds will — without deploying anything.
- name: Dry-run the Cloudflare deploy
run: npx wrangler deploy --dry-run --outdir .wrangler/dry-run
run: npm run cf:check
# SonarCloud, CI-based: issues, duplication and the coverage from `check`,
# judged by the quality gate (settings in sonar-project.properties).
# Automatic Analysis is off in the project's settings, so this is the only
# analysis. A job of its own so that SONAR_TOKEN never shares a job with
# npm packages: it only checks out, takes the coverage report and runs the
# scanner.
#
# PRs from forks and from Dependabot get no repository secrets (Dependabot
# PRs get the Dependabot secrets, which hold no SONAR_TOKEN), so they skip
# it and main is analysed once they merge. The PR author, not
# `github.actor`, decides — the actor can be spoofed (zizmor: bot-conditions).
sonarcloud:
needs: check
if: >-
github.event_name == 'push' ||
(github.event.pull_request.head.repo.full_name == github.repository &&
github.event.pull_request.user.login != 'dependabot[bot]')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# Full history: SonarCloud tells new code from old by git blame.
fetch-depth: 0
persist-credentials: false
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: coverage
path: coverage
# New code is "since the previous version": each release starts a new
# period, and SonarCloud learns the version from here.
- name: Read the app version
id: version
run: |
version="$(jq -r .version package.json)"
if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "::error::package.json version \"$version\" is not X.Y.Z"
exit 1
fi
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: SonarCloud scan
uses: SonarSource/sonarqube-scan-action@e805d875275f728fac1885b413934be6d7c63f65 # v8.4.1
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: -Dsonar.projectVersion=${{ steps.version.outputs.version }}
+1 -1
View File
@@ -35,7 +35,7 @@ jobs:
permissions:
pull-requests: read
steps:
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
- uses: amannn/action-semantic-pull-request@2252a14e810aa9b85c2d560bd7070c802206ecf6 # v6.1.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
+3 -4
View File
@@ -29,7 +29,7 @@ jobs:
# Release artifacts are built from a clean install: a cache written
# by any other workflow must not be able to feed into them.
package-manager-cache: false
- run: npm ci
- run: npm ci --ignore-scripts
- run: npm run typecheck
- run: npm run test:run
- run: npm run check:version
@@ -63,7 +63,7 @@ jobs:
# by any other workflow must not be able to feed into them.
package-manager-cache: false
- uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
- uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0
with:
distribution: temurin
java-version: "17"
@@ -79,8 +79,7 @@ jobs:
toolchain: stable
targets: aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android
- run: npm ci
- run: npm ci --ignore-scripts
- name: Install Tauri CLI
run: cargo install tauri-cli --version "^2" --locked
+7 -3
View File
@@ -33,7 +33,7 @@ jobs:
# Release artifacts are built from a clean install: a cache written
# by any other workflow must not be able to feed into them.
package-manager-cache: false
- run: npm ci
- run: npm ci --ignore-scripts
- run: npm run typecheck
- run: npm run test:run
- run: npm run check:version
@@ -64,7 +64,11 @@ jobs:
target: x86_64-pc-windows-msvc
# Default Windows bundles: MSI + NSIS (.exe). Both ship.
bundleArgs: ""
- os: macos-14
# Apple silicon. GitHub retired the macOS 14 image on 2026-11-02
# (`macos-14` jobs are cancelled: "The configuration
# 'macos-14-arm64-us-default' is not supported"); macos-15 is
# its direct successor.
- os: macos-15
target: aarch64-apple-darwin
# macOS DMG bundling on hosted runners flakes inside
# `bundle_dmg.sh` (the AppleScript that sets icon
@@ -114,7 +118,7 @@ jobs:
libayatana-appindicator3-dev \
librsvg2-dev \
patchelf
- run: npm ci
- run: npm ci --ignore-scripts
- uses: tauri-apps/tauri-action@1deb371b0cd8bd54025b384f1cd735e725c4060f # v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+2 -2
View File
@@ -43,7 +43,7 @@ jobs:
with:
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
with:
workspaces: src-tauri
# tauri::generate_context!() embeds the frontend at compile time, so
@@ -52,7 +52,7 @@ jobs:
with:
node-version-file: .node-version
cache: npm
- run: npm ci
- run: npm ci --ignore-scripts
- run: npm run build
- name: rustfmt
working-directory: src-tauri
+1 -1
View File
@@ -48,7 +48,7 @@ jobs:
with:
args: -color
- name: zizmor
uses: zizmorcore/zizmor-action@85b2b9fb8e3325e7a23d7d0a9d7ba5ae0f999e3e # v0.7.1
uses: zizmorcore/zizmor-action@45d7276c9ca790aabd705e31ca99c6185c3e76dd # v0.8.1
with:
# Report in the log and fail the job; no SARIF upload, so findings
# are fixed in the PR instead of piling up as code-scanning alerts.
+127
View File
@@ -0,0 +1,127 @@
# Accessibility
**Last updated:** 2026-11-09
YTDescGen should work for everyone who makes videos, including people who use a keyboard instead of a mouse, a screen reader, zoom or magnification, high-contrast modes, voice control or a touch screen. This statement says what works today, how it is checked, what doesn't work yet, and how to tell us about a barrier.
It covers the website at [ytgenerator.stream](https://ytgenerator.stream), the desktop apps (Windows, macOS, Linux) and the Android app. They share one interface, so what is said here applies to all of them unless a platform is named.
## Our goal
We aim for [WCAG 2.2](https://www.w3.org/TR/WCAG22/) level **AA**. That is a goal, not a claim of conformance: YTDescGen is a solo open-source project and has not had an independent audit. When we find something that falls short, it is fixed or listed under [Known limitations](#known-limitations).
## What works today
### Keyboard
- Every page, menu and dialog works with the keyboard alone. **Skip to content** is the first stop on the app's pages, and a visible outline shows where the focus is.
- Dialogs keep the focus inside while they are open, close with **Esc**, and give the focus back to the control that opened them.
- Shortcuts work on every page:
- **Ctrl/⌘ + K**: command palette (any page, copy, profiles, presets, templates, theme, languages).
- **Ctrl/⌘ + G** or **Ctrl/⌘ + Enter**: Output.
- **Ctrl/⌘ + Shift + C**: Copy All.
- **Ctrl/⌘ + S**: save to History.
- **Ctrl/⌘ + B**: sidebar.
- **Alt + T**: notifications.
- **Ctrl/⌘ + /** (or **?**): the full list.
- The single-key **?** shortcut can be turned off in **Settings › Editor › Single-key shortcuts**, for speech input and stray key presses.
### Screen readers
- Every control has a name, including icon-only buttons, and every field has a label. Hints and errors are tied to their field.
- Confirmations and errors are announced ("Copied!", "Saved to History", why something can't be copied), and so are Strict Mode problems.
- After you open another page, its name is read out. The focus stays on the link you used.
- Each page has its own title and a single main heading, and the page language follows the interface language you pick (eight languages).
- Generated titles, descriptions and tags are marked with the language they were written in, so a Japanese description is read with a Japanese voice even when the interface is in English.
### Vision
- Dark and light themes, both at WCAG AA contrast for text (4.5:1) on every background. A test keeps them there ([tests/styles/contrast.test.ts](tests/styles/contrast.test.ts)).
- The layout reflows from wide screens down to phone width, so zooming in moves content into one column instead of off the screen.
- The desktop apps zoom with **Ctrl/⌘ + =** and **Ctrl/⌘ + −** (Ctrl + mouse wheel works on Windows too). On Android, pinch to zoom.
- In Windows High Contrast (forced colours), the focus outline stays visible.
- **Settings › Appearance › Hide scrollbars** removes the scrollbars; scrolling still works with the keyboard, mouse wheel and touch.
### Motion
- With **Reduce motion** turned on in your operating system, animations and smooth scrolling are switched off.
### Touch
- On touch screens, buttons and fields grow to about 44 px, and so do small close and dismiss buttons.
### The website's check page
- The Cloudflare Turnstile check before the website usually finishes on its own. Its status ("Checking your browser…", errors) is announced, and it works with the keyboard. See [Known limitations](#known-limitations) if Cloudflare asks you to solve a challenge.
## How it is checked
- **By hand.** The maintainer uses YTDescGen with the keyboard alone (mouse unplugged) and with Windows Narrator, through the main flows: editor, output, copying, profiles, presets, templates, History, Settings and backups.
- **Automatically.** A unit test checks the contrast of every colour token in both themes.
- **Design rules.** Interface parts come from accessible building blocks (Radix primitives). An icon-only button can't be built without a name, and every field gets its label and error wiring from one shared component.
The app has **not** been tested yet with NVDA, JAWS, VoiceOver (macOS), TalkBack (Android) or Orca (Linux). Reports from people who use them are very welcome.
## Supported environments
| Platform | Runs on | Screen reader |
| --- | --- | --- |
| Windows: desktop app, or the website in Edge / Chrome | Windows 10 or 11 with WebView2; Chrome or Edge 111+ | Narrator: tested |
| Website on other browsers | Firefox 114+, Safari 16.4+ | Not tested yet |
| macOS desktop app | macOS 11 or later, Apple silicon | VoiceOver: not tested yet |
| Linux desktop app | WebKitGTK 2.40 or later | Orca: not tested yet |
| Android app | Android 11 or later, current Android System WebView | TalkBack: not tested yet |
## Known limitations
- **Cloudflare's challenge on the website.** If Turnstile asks you to solve a challenge instead of passing on its own, that challenge is Cloudflare's, and its accessibility is theirs to fix. If it stops you, the desktop and Android apps have no check page at all, or [email us](#reporting-a-barrier).
- **Field borders are faint.** The outline of an empty text field is about 1.2–1.3:1 against the page, under the 3:1 that WCAG asks for. Fields are still marked by their labels, and the focused field gets an accent border and ring.
- **The Continue button on the first-run screen** uses the brand gradient. White text on its lighter violet end is 3.96:1.
- **Character counters are not read out as you type.** That would interrupt every keystroke. When a field is over YouTube's limit, copying it is refused with a message that says why, and Strict Mode lists the problem in an announced banner.
- **No automated accessibility linting yet.** `eslint-plugin-jsx-a11y` does not support ESLint 10, which the project uses, and the unit tests run without a browser DOM. Checks are manual (see above) apart from the contrast test.
- **Translations.** Interface languages other than English and Vietnamese were translated with AI assistance (see the [Disclaimer](DISCLAIMER.md)). Some labels may sound unnatural when read aloud.
- **Emoji in descriptions.** Generated descriptions use a few emoji as section markers (for example 👍 and 🔔), and screen readers on YouTube read them out by name.
## Reporting a barrier
If something in YTDescGen gets in your way, please tell us. You don't need to know what causes it.
- **Preferred:** open an [accessibility issue](https://github.com/poli0981/youtube-generator/issues/new?template=accessibility.yml). The form asks for the platform, the assistive technology you use and what happened.
- **Not comfortable posting publicly?** Email **contact@poli0981.dev** with `[Accessibility]` at the start of the subject.
- **Quick question?** Ask on [Discord](https://discord.gg/kDM9GMu5vm).
### Severity
| Level | Meaning |
| --- | --- |
| **Critical** | You can't finish a core task: write, generate, copy, save, or get past the website's check. |
| **High** | You can finish it, but only with real difficulty or a workaround. |
| **Medium** | It works, but inconsistently or confusingly. |
| **Low** | A minor annoyance that doesn't stop you. |
### How we respond
- We reply within **7 days**, and we will take your report at face value.
- **Critical** barriers are fixed in the next patch release. Others are planned like any other bug, with the more severe first.
- If there is a workaround, we tell you while the fix is on its way.
- When the fix ships, we'll ask you to check it if you're willing.
This is a one-person project, so timelines are honest estimates, not guarantees. If one slips, we'll say so in the issue.
## For contributors
Changes to the interface should keep everything above true. Before opening a pull request that touches the UI:
- **Keyboard.** Everything works with the keyboard: the focus order makes sense, the focus outline is visible, **Esc** closes what you opened, and nothing traps the focus.
- **Names.** Use the shared `Field` (label, hint and error wiring) and `IconButton` (which can't be rendered without a `label`) components. `aria-label` text goes through `t()` like any other string, in all eight locales.
- **Errors and status.** They are announced: `Banner` with `alert`, a toast, or an existing live region.
- **Colour.** Colour is never the only signal. Use the design tokens only, and run `npm run test:run`. The contrast test fails if a token drops under AA, and white text belongs on the `*-solid` fills.
- **Motion.** New animation respects reduced motion. Motion's components do this already, and CSS animations are covered by the global rule in `globals.css`.
- **Targets.** Anything clickable is at least 24 × 24 px and grows on touch screens.
- **Screen reader.** Try the change once with a screen reader: Narrator (Win + Ctrl + Enter), VoiceOver (⌘ + F5), NVDA or Orca.
The pull request template has the same checklist.
## Feedback on this statement
Ideas for improving this statement or the way accessibility is handled are welcome in [GitHub Discussions](https://github.com/poli0981/youtube-generator/discussions). Please report barriers through the [reporting process](#reporting-a-barrier) so they can be tracked.
+184
View File
@@ -2,6 +2,190 @@
All notable changes to YTDescGen ship as tagged releases on `main`.
## v1.5.2 — 2026-11-10
A maintenance release: the desktop and Android apps move to **Tauri 2.12.5**, with the fixes its window, webview and single-instance layers collected since 2.12.4, and this week's dependency updates are folded in. What the app generates does not change. Web, desktop and Android all ship as 1.5.2.
### Fixed
- **Windows: starting the app a second time.** A second copy started while the first was still starting up could miss the first one's window and stay open instead of handing over and exiting (tauri-plugin-single-instance 2.5.5). A hidden window — the app sitting in the tray — no longer flashes when it leaves the maximized state (tao 0.37.2).
- **macOS: dragging onto the window.** No abort when a drag enters or is dropped on the window, and no panic while the dragged file paths are collected (tao 0.37.2, wry 0.57.1).
- **Android:** the webview runs Tauri's start-up scripts once per page instead of twice (wry 0.57.1).
- **Windows installer:** the NSIS installer blocks a downgrade over a newer MSI installation in silent, passive and update modes too (Tauri 2.12.5).
### Under the hood
- **Tauri 2.12.4 → 2.12.5**: tauri-build, tauri-macros and tauri-codegen 2.7.4, tauri-runtime-wry 2.12.3, wry 0.57.1, tao 0.37.2, tauri-plugin-dialog 2.8.4 (rfd 0.17), tauri-plugin-single-instance 2.5.5.
- **Dependencies**, the newest releases at least a week old (the same cooldown Dependabot uses): i18next 26.6.0, react-i18next 17.1.11, i18next-resources-to-backend 1.2.4, lucide-react 1.66, react-router-dom 7.18.5, simple-icons 16.36, vite 8.3.5 (rolldown 1.2.16), @vitejs/plugin-react 6.2.1, tailwindcss 4.3.4, postcss 8.5.32, autoprefixer 10.6.2, marked 18.1.3, eslint 10.14, typescript-eslint 8.72.1, knip 6.44.1, @types/node 26.6.6, wrangler 4.156.2. Workflows: sonarqube-scan-action 8.4.0, zizmor-action 0.8.1. THIRD_PARTY_NOTICES regenerated.
- **i18next stays on 26.6.x** (`~26.6.0` and a Dependabot ignore for 26.7.x). 26.7, the last 26.x minor, adds the debug-mode warnings that prepare the move to v27: about 1.9 KB gzip in the i18n chunk, which would take the initial load from 279.0 to 280.9 KB — over the 280 KB budget — for code the app never runs. Both go with the i18next 27 migration.
- **The `undici` override from v1.3.1 is gone**: miniflare 5.20261102.0-beta (under wrangler, development only) depends on undici 7.30.1 itself, so alert #49 stays fixed without it.
- **Docs**: TECH-SPEC's `package.json` listing follows the real file again (its dependency versions were several releases old) and notes the i18next hold; ROADMAP, version references.
- typecheck, typecheck:all, lint, format:check, validate:locales, knip, check:version, check:tauri, check:licenses, check:copyright, **1131 tests**, build, cf:check and `cargo fmt` / `clippy` / `test` / `deny` all pass; initial load 279.0 of 280 KB gzip. Verified live: `wrangler dev` on 4.156.2 serves the gate page, `/legal/accessibility` and `robots.txt`, and refuses a verify without a token; the desktop app (`tauri dev` with a separate test identifier) answers its commands, writes, lists, reads and deletes a backup, and opens and cancels the native Save and Open dialogs on the new dialog plugin.
- Six manifests bumped 1.5.1 → 1.5.2.
## v1.5.1 — 2026-11-09
An **accessibility** release. YTDescGen already worked with the keyboard alone and with Narrator; this release adds an accessibility statement and fixes what an audit against WCAG 2.2 AA turned up — colour contrast, the language of generated text, page changes a screen reader didn't hear, a single-key shortcut that couldn't be turned off, and zoom in the desktop app. Web, desktop and Android all ship as 1.5.1.
### Added
- **[ACCESSIBILITY.md](ACCESSIBILITY.md)** — what works with a keyboard, screen readers, zoom, reduced motion and touch, how it is checked, the supported environments, known limitations, how to report a barrier (severity levels, a reply within 7 days, Critical fixes in the next patch) and a checklist for contributors. Also in Vietnamese, in the app's **Legal Center**, at `ytgenerator.stream/legal/accessibility`, and linked from the website's check page in all eight languages.
- **Accessibility barrier** issue form on GitHub (assistive technology, severity, platform), an _Accessibility_ option in feature requests, and an accessibility checklist in the pull request template.
- **Settings › Editor › Single-key shortcuts** — on by default; turning it off stops the bare `?` from opening the shortcut list (for speech input and stray key presses), and Ctrl/⌘ + / still opens it. Travels with backups.
- **Zoom in the desktop app** — Ctrl/⌘ + = and Ctrl/⌘ + − (and Ctrl + mouse wheel on Windows).
- **The page's name is read out** after you open another page; the focus stays on the link you used.
- **Alt + T** (go to the notifications) in the shortcut list.
### Changed
- **Colours reach WCAG AA (4.5:1) for text** in both themes: secondary "muted" text (hints, placeholders, counters) is lighter in the dark theme and darker in the light theme; the dark theme's accent is a little lighter; filled buttons with white text use a deeper purple and red; the light theme's success, warning, danger and donate colours are darker. A test now checks every colour token against every background.
- Generated titles, descriptions, tags, captions and playlist text are marked with the **language they were written in**, so a screen reader reads Japanese output with a Japanese voice while the interface is in English or Vietnamese — on Output, the On YouTube and Quick previews, History, Batch, Social and Playlist.
- The Legal Center's intro mentions accessibility.
### Fixed
- The notifications area and its close button were announced in English ("Notifications alt+T", "Close toast") whatever the interface language.
- The Endings table's number and name fields and the per-video From / To fields had no accessible name, and the From / To column headers were always English; the bank name typed under _Other_ had only a placeholder.
- In Windows High Contrast, text fields showed no focus outline.
- The genre chips' remove button was 20 px (now 24 px); dialog close and banner dismiss buttons grow on touch screens.
- `SECURITY.md` still listed 1.3.x as the supported version.
### Under the hood
- New tokens `accent-solid`, `accent-solid-hover`, `danger-solid`, `danger-solid-hover`; `tests/styles/contrast.test.ts` reads both palettes from `globals.css` (text tokens on surface-0 to 2, muted also on surface-3, accent on its own tint, white on the solid fills, 3:1 for marks on `accent`). It found the light theme's donate colour at 4.26:1 on the first run.
- `RouteAnnouncer` listens for `ytdescgen:page-title`, which `useDocumentTitle` fires in a microtask after the commit's effects, so pages rendered in the same commit and lazy pages are both heard and a language switch stays silent.
- `singleKeyShortcuts` is an additive setting, healed (anything but a boolean → `true`) without a store version bump, like `hideScrollbars`.
- Text controls use Tailwind's `outline-hidden` instead of `outline-none`. `zoomHotkeysEnabled` on the main window, plus `core:webview:allow-set-webview-zoom` for Tauri's macOS / Linux zoom polyfill.
- Legal Center doc `accessibility` (`consent: false`, English + Vietnamese); `GateStrings.accessibility` in the Worker; the `accessibility` label on GitHub. New keys in all eight locales and `_schema.json`.
- **Docs**: ACCESSIBILITY.md (+ Vietnamese), README, CONTRIBUTING, DEVELOPMENT (+ Vietnamese), FEATURES (accessibility section, shortcuts, settings), ARCHITECTURE, TECH-SPEC, PACKAGING, ROADMAP, CLAUDE.md, SECURITY, version references.
- typecheck, typecheck:all, lint, format:check, validate:locales, knip, check:version, check:tauri, check:licenses, check:copyright, **1131 tests** (was 1093), build, cf:check and `cargo fmt` / `clippy` / `test` all pass; initial load 279.0 of 280 KB gzip. Verified in the dev server: Settings → Output announces "Settings", then "Output", without moving the focus, and switching to Vietnamese doesn't announce; the notifications region reads "Thông báo (Alt+T)" in Vietnamese; Japanese output under a Vietnamese interface carries `lang="ja"`; with the switch off `?` does nothing and leaves the list while Ctrl + / still opens it; `/legal/accessibility` in both languages with every in-page link resolving. In the desktop app (`tauri dev`, WebView2): Ctrl + = zooms to 110 %, Ctrl + − back to 100 %.
- Six manifests bumped 1.5.0 → 1.5.1.
## v1.5.0 — 2026-11-08
A feature release for videos **upscaled in the editor**: recorded at 1440p, exported at 4K — the title says `[4K Upscaled]`, the description says what was upscaled to what and warns that fine detail may look different from the original image. Web, desktop and Android all ship as 1.5.0.
### Added
- **Upscaled from** (Video settings), next to Resolution — the resolution the footage was recorded at, when the video editor upscaled it to the video's resolution. Only lower resolutions are offered (none at 720p); lowering the resolution to or below the source sets it back to _Not upscaled_. Like resolution and FPS, it is saved with the channel profile. With it set:
- **Title** — the quality badge reads `[4K Upscaled]`, `[2K Upscaled]` (1440p), `[4K Upscaled 120FPS]`, the word in the output language (`Upscale` in Vietnamese, Portuguese and Indonesian, `アップスケール`, `업스케일`, `超分`, `Reescalado`). Badge position, case and _Show quality badge_ work as before; 1080p 60fps still has no badge, upscaled or not.
- **🖥 VIDEO SETTINGS** — a line right under the resolution, the editor taken from My Rig (left out when My Rig has none):
```
Video: 4K - 60 FPS
Upscale: 1440p → 4K (DaVinci Resolve Studio 21.2)
```
It stays when _This game has no in-game graphics settings_ is on, like the video-style line.
- **▸ 🛠 TECH NOTES** — a note of its own, after the ones you picked and bilingual like them: _Upscaled to a higher resolution in editing — fine detail is reconstructed, so text, textures and edges may look slightly different from the original image._ It isn't in the checklist, so it can't be forgotten, and it goes away with the upscale. The DLSS / FSR / XeSS note is unchanged.
- The collapsed Video settings section reads `1440p → 4K · 60 FPS`.
### Under the hood
- `src/engine/upscale.ts`: `validUpscaleSource` is the one rule the title, the description and the form share — anything other than a known resolution below the video's is ignored. `VIDEO_RESOLUTIONS`, `UPSCALED_FROM_OPTIONS` and `isUpscaledFrom` live in `src/config/graphics-settings.ts`.
- `AUTO_TECH_NOTES` (`editor_upscaled`) holds the engine's own notes: never stored in `techNotes`, their bullets share `description.techNotes.items`; the tech-note parity test checks the checklist and the bullets separately.
- Editor store v20 → v21: `upscaledFrom` back-fills to `""` and an unknown value becomes `""`; an applied profile or template and a restored backup read one the same way. `Profile.upscaledFrom` is optional, so the profile store stays at v3. New keys in all eight locales and `_schema.json`.
- **Docs**: FEATURES (upscaled video, the badge setting, the profile row), CONTENT-INVENTORY (+ Vietnamese: the automatic note), ARCHITECTURE and TECH-SPEC (`upscale.ts`, the field, store v21, test count), ROADMAP, CLAUDE.md, version references.
- typecheck, typecheck:all, lint, format:check, validate:locales, knip, check:version, check:tauri, check:licenses, check:copyright, **1093 tests** (was 1065), build all pass; initial load 277.8 of 280 KB gzip. Verified in the dev server: Elden Ring at 4K upscaled from 1440p with DaVinci Resolve Studio 21.2 in My Rig gives `Elden Ring — [4K Upscaled] — Gameplay No Commentary`, the Upscale line under `Video: 4K - 60 FPS` and the note; Vietnamese output gives `[4K Upscale]` and the `EN · VI` note; 1080p sets the field back to _Not upscaled_, 720p disables it; hidden graphics settings keep the Upscale line; the four selects sit in one column at 375 px, 2 × 2 at 1024 px and in a row at 1440 px.
- Six manifests bumped 1.4.0 → 1.5.0.
## v1.4.0 — 2026-11-06
A feature release for the description and the tags: a **LUT** field in My Rig, printed on its own line under the video editor, and the **boss's name as a tag** in boss videos — plus this week's dependency updates. Web, desktop and Android all ship as 1.4.0.
### Added
- **LUT** (My Rig) — the LUT you grade with, on its own line right under the video editor, in the description and the social captions:
```
Video Editor: DaVinci Resolve Studio 21.2
LUT: Arri Alexa LogC to Rec709
```
Typing offers 14 LUTs that come with DaVinci Resolve, named the way its LUT menu shows them (Arri Alexa LogC to Rec709, the Rec709 Kodak 2383 and Fujifilm 3513DI film looks, HDR 1000 nits to Gamma 2.4, …); any other name is printed as typed. A pasted file name or path — Explorer's _Copy as path_ included — is cut down to the LUT's name: `"C:\…\Arri\Arri Alexa LogC to Rec709.dat"` → `Arri Alexa LogC to Rec709`. Like the rest of the rig, it is saved with the channel profile. Left empty, there is no line.
- **The boss's name as a tag** — Boss Fight and Boss No Hit videos get the Boss Name field as a tag of its own, right after the game's name, so fitting the tags to 500 characters never drops it. Marks that add nothing to a search are left out: "Gael, Slave Knight" → `Gael Slave Knight`, "Mr. X" → `Mr X`, "S.T.A.L.K.E.R." → `STALKER`, "「マレニア」" → `マレニア`; apostrophes and hyphens inside a word stay ("Mergo's Wet Nurse", "T-103"), and so does a dot between digits ("Phase 2.0"). Over 30 characters (YouTube's per-tag limit here), the name before its title is used: "Loretta, Knight of the Haligtree" → `Loretta`. A boss name left in the draft after switching to another video type is not tagged.
### Fixed
- A **CPU name pasted from Windows** ("Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz") is tidied in the output too, not only once you leave the field — Ctrl/⌘+Shift+C or Ctrl/⌘+S pressed with the cursor still in it copied or saved the raw name. The new LUT field works the same way.
### Under the hood
- **Dependencies**, the newest releases at least a week old (Dependabot's cooldown): i18next 26.5.11, react-i18next 17.1.9, lucide-react 1.64, zustand 5.0.16, knip 6.44, wrangler 4.152 (miniflare 5.20261019.2-beta), @tauri-apps/cli 2.12.4. Dependabot's five npm PRs (#223–#227) were folded into one change: each failed CI alone because it left THIRD_PARTY_NOTICES stale (regenerated), and they would have conflicted with each other. GitHub Actions: Swatinem/rust-cache 2.9.3, zizmor-action 0.8.0. The undici override stays — miniflare still pins undici 7.29.1.
- Dependabot alert #50 (minimatch, development tools only, through eslint and typescript-eslint) stays open for now: its fix is minimatch 11, a new matching engine outside eslint's `^10` range, and the issue needs attacker-controlled glob patterns, which lint never reads.
- `RigField` gains `clean` (CPU, LUT) and `wide`; `formatRigValue` runs a field's cleaner; a test now holds the `rig.*` and `description.rigLabels.*` keys of all eight locales to `RIG_FIELDS`. `bossNameTag` in `tag-generator.ts` uses linear regexes and no lookbehind (the macOS 11–13 desktop webview is older WebKit, which rejects one); its word fit is shared with `tagFriendlyGameName`.
- **Docs**: FEATURES (11 rig fields, the LUT, the boss name tag), ARCHITECTURE (tag priority), TECH-SPEC (rig block, tag order, test count), ROADMAP, version references.
- typecheck, typecheck:all, lint, format:check, validate:locales, knip, check:version, check:tauri, check:licenses, check:copyright, **1065 tests** (was 1017), build, cf:check all pass; initial load 277.2 of 280 KB gzip. Verified in the dev server: the LUT field sits under Video Editor across both columns with its suggestions, a quoted Explorer path becomes the LUT's name when the field loses focus, and Quick Preview prints `LUT: Arri Alexa LogC to Rec709` right after `Video Editor: DaVinci Resolve Studio 21.2`; Boss Fight with "Gael, Slave Knight" puts `Gael Slave Knight` second in the tags, Full Gameplay drops it. `wrangler dev` on 4.152 serves the gate page.
- Six manifests bumped 1.3.2 → 1.4.0.
- **The macOS app is built on the `macos-15` runner.** GitHub retired the macOS 14 image on 2026-11-02, so the tag's first desktop run lost its macOS job ("The configuration 'macos-14-arm64-us-default' is not supported"); the Windows and Linux builds were unaffected. The macOS `.app.tar.gz` comes from a manual re-run of the desktop workflow for `v1.4.0`, which builds the tag's code.
## v1.3.2 — 2026-10-27
A hosting release: the website now **rate-limits** each visitor's address, so a script hammering ytgenerator.stream gets a cheap `429 Too Many Requests` instead of the gate, the app or a Turnstile check. Nothing a person does in normal use comes near the limits. The desktop and Android apps are unchanged apart from the version number. Web, desktop and Android all ship as 1.3.2.
### Added
- **Rate limiting for the website**, in two layers:
- **In the Worker** (Workers Rate Limiting bindings in `wrangler.jsonc`, checked before anything else): 120 requests a minute per address for everything the Worker serves — the gate page, the app shell, the legal pages, the gate's own endpoints — and 10 a minute for the gate's verification call, each of which costs a call to Cloudflare Turnstile. An IPv6 address counts by its /64, the block one connection usually holds. Over the limit: `429` with `Retry-After: 60`; the gate page shows its usual "try again" message.
- **At the zone**: a WAF rate limiting rule (60 requests per 10 seconds per address, build output and verified search-engine bots left out) stops a fast burst at Cloudflare's edge, before the Worker runs. It is set in the Cloudflare dashboard; [HOSTING.md](docs/HOSTING.md#waf-rate-limiting-rule-one-time) has the steps.
- Like the Turnstile gate, the Worker's limiter fails open: if it is missing or fails, the site stays reachable and the Worker logs it.
### Under the hood
- `worker/rate-limit.ts` (client key, the check, the `429`), wired in first in `worker/router.ts`; a test keeps the `ratelimits` bindings and their period in step with the code.
- **Docs**: HOSTING (both layers, the WAF rule step by step, changing a limit, burst checks against production), TECH-SPEC, ARCHITECTURE, CLAUDE.md, ROADMAP, version references.
- typecheck, typecheck:all, lint, format:check, validate:locales, knip, check:version, check:tauri, check:licenses, check:copyright, **1017 tests** (was 984), build, cf:check all pass; initial load 276.3 of 280 KB gzip. Verified live with `wrangler dev` (10 verification calls then `429`, 120 requests a minute then `429`, back to normal a minute later) and on ytgenerator.stream after the deploy: page loads at four a second, under the WAF rule, got 121 × `200` then the Worker's `429` with `Retry-After: 60`; verification calls got 11 × `403` (foreign origin) then `429`; a fast burst was stopped by the WAF rule (Cloudflare's `429`, error 1015) within about a second.
- Six manifests bumped 1.3.1 → 1.3.2.
## v1.3.1 — 2026-10-26
A maintenance release: the desktop and Android apps move to **Tauri 2.12.4**, the desktop's Save and Open dialogs stop holding up the app's background work, and this week's dependency updates close the one open security alert. What the app generates does not change. Web, desktop and Android all ship as 1.3.1.
### Fixed
- **Desktop: saving and opening files.** The native Save / Open dialogs (exporting and importing text files, backups to a file) and their file read or write now run on Tauri's blocking pool. Before, each one held one of the async runtime's worker threads for as long as the dialog stayed open. Same dialogs, same results.
- **Tauri 2.12.0 → 2.12.4**, with upstream fixes that reach the app: no panic in the IPC and asset handlers on a request with an empty path; on Android, a plugin call that answers after its caller gave up no longer aborts the app; `Channel` messages keep arriving after a handler throws; a `once` event listener no longer panics when two events arrive together. Plugins: dialog 2.8.3, opener 2.7.2, single-instance 2.5.4, fs 2.7.1.
- **Security (development tools only — nothing here ships in the app):** undici 7.30.1 — alert #49 (denial of service through too many content encodings), used by `wrangler dev` through miniflare. miniflare pins undici exactly, so Dependabot's security update could not land; an npm `overrides` entry lifts it, and `.github/dependabot.yml` says when to remove it.
### Under the hood
- **SonarCloud runs in CI** instead of Automatic Analysis: the `sonarcloud` job reads the coverage report from `check`, counts tests as tests, and analyses the Rust code for the first time — which is how the dialog issue above was found. Quality gate green, 0 open issues.
- **Dependencies**, the newest releases at least a week old (the same cooldown Dependabot uses): react 19.3.1, i18next 26.5.3, react-i18next 17.1.0, lucide-react 1.59, simple-icons 16.35, eslint 10.13, typescript-eslint 8.72, knip 6.42.1, postcss 8.5.31, @types/node 26.6.5, wrangler 4.151.2; tauri 2.12.4, tauri-build 2.7.3. THIRD_PARTY_NOTICES regenerated.
- **Docs**: CLAUDE.md and PACKAGING (blocking work in an `async` Tauri command goes through `spawn_blocking`), DEVELOPMENT + Vietnamese, TECH-SPEC and CONTRIBUTING (the SonarCloud job and its coverage scope), ROADMAP, version references.
- typecheck, typecheck:all, lint, format:check, validate:locales, knip, check:version, check:tauri, check:licenses, check:copyright, **984 tests**, build, cf:check and `cargo fmt` / `clippy` / `test` (15 tests) all pass; initial load 276.3 of 280 KB gzip. Verified live: `wrangler dev` serves the gate page on the new undici; the desktop app (`tauri dev` with a separate test identifier) answers its commands, writes, reads and deletes a backup, and opens and cancels the native Save dialog.
- Six manifests bumped 1.3.0 → 1.3.1.
## v1.3.0 — 2026-10-22
A toolchain release: **TypeScript 7**, **Node 26**, two rounds of dependency updates that close five security alerts, and every open **SonarCloud** issue fixed. What the app generates does not change. Web, desktop and Android all ship as 1.3.0.
### Changed
- **Android keeps your data out of cloud backups.** The app now sets `android:allowBackup="false"`, so Android's backup to Google Drive no longer copies your profiles, presets, templates, history and settings — they stay on the phone, as the Privacy Policy says. To move to a new phone, use **Settings › Backup & restore**: back up to a file, then restore it there.
- **Supported WebViews.** The desktop and Android apps are built for the same engines as the website — Chromium 111, Safari 16.4, Firefox 114 (Vite's `baseline-widely-available`) — instead of being lowered to ES2020. In practice: WebView2 on Windows (it updates itself), macOS 11 or later with current Safari updates, WebKitGTK 2.40+ on Linux, and on Android 11+ a System WebView kept current through Google Play. An older WebView already showed the app unstyled. The macOS app now states its minimum, macOS 11 (it is Apple silicon only).
- **Security policy**: 1.3.x is the supported version.
- **Docs**: DEVELOPMENT + Vietnamese (Node 26, TypeScript 7 and the IDE setting), TECH-SPEC (package.json, tsconfig, the toolchain notes), PACKAGING (supported WebViews, Android backups), HOSTING, ARCHITECTURE, ROADMAP, README, FEATURES, I18N, CONTENT-INVENTORY, DISCLAIMER + Vietnamese, CLAUDE.md, the bug-report template.
### Fixed
- **Security (development tools only — nothing here ships in the app):**
- vite 8.3.4 — `launch-editor` alerts #41, #42, #43 (command execution and Windows path checks in the dev server's open-in-editor).
- vitest 4.1.12 brings `@vitest/mocker` 4.1.12 — alerts #44, #45 (manual-mock code injection, Windows redirect traversal). Dependabot's own security update could not land: vitest 4.1.11 pins the old mocker.
- The error boundary now really falls back to the browser console when the in-app logger can't load — a `try/catch` around the asynchronous import never caught that.
- **SonarCloud: 44 open issues → 0** (the 45th, a Gradle lockfile for the Tauri-generated Android project, is accepted). Sixteen regular expressions could backtrack quadratically on long runs of spaces, colons or slashes (CPU names, timestamps, edition suffixes, endings, the Google Play link, license expressions, the Worker's cookie and paths); each is rewritten to run in linear time with the same results. Also: sorts with an explicit comparator, `Number.parseInt`, a profile migration that returns a new object, the shortcut dialog's search box focused through the dialog instead of `autoFocus`, and IDs that never fall back to `Math.random`.
### Under the hood
- **TypeScript 7.0** (the native compiler) type-checks the code — about six times faster. TypeScript 7.0 has no JavaScript API yet, so typescript-eslint keeps using TypeScript 6.0 through an npm alias (`typescript` → `@typescript/typescript6`, Microsoft's documented setup), and CI fails if `tsc` is ever anything but 7.x. Target **ES2025** (ES2026 comes with TypeScript 7.1); the app's `lib` stays at ES2022 — the browsers' floor, since Vite never polyfills — while tests, scripts, the Worker and the build plugins get ES2025. `baseUrl` is gone, and `erasableSyntaxOnly` / `verbatimModuleSyntax` are on.
- **Node 26** everywhere (`.node-version`, `engines`, Workers Builds). Vitest runs its workers with `--no-experimental-webstorage`: Node 25+ defines a `localStorage` that is `undefined`, which made 39 store tests crash.
- **React 19 refs**: Button, IconButton, Input, Select and Textarea take `ref` as an ordinary prop — no more `forwardRef`, which React plans to deprecate.
- **CI**: every workflow installs with `npm ci --ignore-scripts`; CI runs `npm run cf:check` instead of `npx wrangler`.
- **Dependencies**: eslint 10.12, typescript-eslint 8.71.2, knip 6.41, prettier 3.9.10, vite 8.3.4, @vitejs/plugin-react 6.1.2, vitest 4.1.12, marked 18.1.1, postcss 8.5.30, i18next 26.4.5, lucide-react 1.57, radix-ui 1.8.1, @tauri-apps/api 2.12.4 / plugin-opener 2.7.2 / cli 2.12.3; actions setup-node 7.1, setup-java 6.1, upload-artifact 7.0.2, scorecard 2.5, zizmor 0.7.1. THIRD_PARTY_NOTICES names the real package behind an npm alias.
- typecheck, typecheck:all, lint, format:check, validate:locales, knip, check:version, check:tauri, check:licenses, check:copyright, **984 tests**, build and `cargo fmt` / `clippy` / `test` all pass; initial load 276.1 of 280 KB gzip. Verified live in the browser: tooltips, the History export popover (focus returns to its button), dialogs and the command palette after the ref change, and the shortcut dialog's focus.
- Six manifests bumped 1.2.0 → 1.3.0.
## v1.2.0 — 2026-10-12
Say when a game is **made with AI**: a new group of content warnings for AI-generated game content, three more disclosures, and the docs, notices and wiki brought back in line with the app. Web, desktop and Android all ship as 1.2.0.
+27 -16
View File
@@ -11,18 +11,19 @@
## Tech Stack
| Layer | Technology |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| UI | React 19, TypeScript (strict), Radix primitives (`radix-ui`), Motion (LazyMotion), cmdk, sonner, lucide-react + simple-icons |
| Build | Vite 8 (Rolldown); config imports need `.ts` extensions |
| Styling | Tailwind CSS 4, CSS-first `@theme` tokens in `src/styles/globals.css` |
| State | Zustand 5 + `persist` (localStorage) — the only store on every platform |
| Routing | React Router 7 — `BrowserRouter` on the web, `HashRouter` in Tauri |
| i18n | i18next + react-i18next, 8 locales (en, vi, ja, es, ko, zh, pt-BR, id); `en` bundled, others lazy |
| Desktop / Android | Tauri 2 (Rust) — see `src-tauri/` |
| Web hosting | Cloudflare Workers (`worker/`, `wrangler.jsonc`), Turnstile, Web Analytics |
| Tests | Vitest (node environment; Worker tests included) |
| Quality | ESLint, Prettier, knip, coverage thresholds, bundle budget, licence allow-list, copyright years, REUSE, actionlint/zizmor, cargo fmt/clippy/deny |
| Layer | Technology |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| UI | React 19, TypeScript 7 (strict), Radix primitives (`radix-ui`), Motion (LazyMotion), cmdk, sonner, lucide-react + simple-icons |
| Build | Vite 8 (Rolldown); config imports need `.ts` extensions; Node 26 (`.node-version`) |
| Type checking | TypeScript 7 `tsc` (`@typescript/native`); `typescript` is an npm alias for `@typescript/typescript6`, the 6.0 API typescript-eslint loads |
| Styling | Tailwind CSS 4, CSS-first `@theme` tokens in `src/styles/globals.css` |
| State | Zustand 5 + `persist` (localStorage) — the only store on every platform |
| Routing | React Router 7 — `BrowserRouter` on the web, `HashRouter` in Tauri |
| i18n | i18next + react-i18next, 8 locales (en, vi, ja, es, ko, zh, pt-BR, id); `en` bundled, others lazy |
| Desktop / Android | Tauri 2 (Rust) — see `src-tauri/` |
| Web hosting | Cloudflare Workers (`worker/`, `wrangler.jsonc`), Turnstile, Web Analytics |
| Tests | Vitest (node environment; Worker tests included) |
| Quality | ESLint, Prettier, knip, coverage thresholds, bundle budget, licence allow-list, copyright years, REUSE, actionlint/zizmor, cargo fmt/clippy/deny, SonarCloud (CI-based) |
## Project Structure
@@ -39,7 +40,8 @@ src/
channel-phrase.ts # drops "on {{channel}}" when there is no channel name
types.ts # GeneratorInput, CONTENT_WARNINGS, TECH_NOTES, option lists
rig-block.ts, limits.ts, social-post-builder.ts, pinned-comment-builder.ts, playlist-builder.ts,
endings-format.ts, graphics-vendor.ts
endings-format.ts, graphics-vendor.ts, upscale.ts (upscaled in the editor: one rule for title,
description and form)
config/ # static data: video types, genres, platforms (stores),
# social fields/platforms, GPU catalog, rig fields,
# content-warning-groups / tech-note-groups (editor groups),
@@ -60,7 +62,7 @@ src/
file-ops.ts # save/open text files on every platform
validation.ts, url-extractors.ts, log-storage.ts, …
hooks/, components/, pages/, i18n/, styles/
worker/ # Cloudflare Worker: gate, cookies, headers, routing
worker/ # Cloudflare Worker: gate, cookies, headers, rate limits, routing
build-plugins/ # legal pages at build time; web-only extras
src-tauri/src/ # lib.rs (plugins, tray), storage.rs (name-only file
# commands), file_dialog.rs (native Save/Open)
@@ -83,6 +85,10 @@ LICENSES/ # license texts for REUSE
- Strict mode; no `any` — use `unknown` + type guards.
- Prefer `interface` for object shapes; `as const` for static config arrays.
- `src/` is typed against `lib` ES2022 — the browsers' floor (Chrome 111, Safari 16.4, Firefox 114), because Vite never polyfills. Don't reach for newer built-ins in the app without raising that floor; tests, scripts, worker and build plugins get ES2025 (`tsconfig.check.json`). `target` is ES2025 (ES2026 waits for TypeScript 7.1).
- Erasable syntax only (`erasableSyntaxOnly`, `verbatimModuleSyntax`): no enums, namespaces or parameter properties; `import type` for types.
- React 19: `ref` is an ordinary prop — no `forwardRef`.
- Regexes must stay linear (SonarCloud S8786): no unbounded quantifier that can restart inside its own run (`\s+$`, a leading `\s+` in an unanchored pattern, `\s*` next to `\s*`) — trim first, anchor, bound the run, or use a loop.
### React
@@ -97,7 +103,9 @@ LICENSES/ # license texts for REUSE
### Styling
- Tailwind utilities and the design tokens (`bg-surface-1`, `text-text-muted`, `accent`, …) — no hard-coded colours, no inline styles.
- Dark by default, light via class; touch targets grow on coarse pointers.
- Dark by default, light via class; touch targets grow on coarse pointers (`pointer-coarse:`), nothing clickable under 24 px.
- Contrast is WCAG AA in both themes and `tests/styles/contrast.test.ts` checks every token: text tokens on surfaces, white text only on the `*-solid` fills (`bg-accent-solid`, `bg-danger-solid`), never on `bg-accent`.
- Focus: the global `:focus-visible` outline; a control that swaps it for a ring uses `outline-hidden` (stays visible in forced colours), not `outline-none`.
- Watch Tailwind 4 specificity: a base `inline-flex` beats a plain `hidden` — wrap responsive visibility in an element.
### i18n
@@ -122,7 +130,7 @@ LICENSES/ # license texts for REUSE
3. **Profiles vs presets vs templates**: profile = channel (rarely changes), preset = game (reused across parts), template = the whole form. The field lists live in `src/config/library-fields.ts`.
4. **Tags are generated**, then trimmed to YouTube's own length count.
5. **Your data stays on your device.** localStorage is the only store; backups are files the user controls (plus automatic backups in the desktop app's data folder).
6. **The desktop webview never names a path**: Rust commands take file names under the app data folder or open the native dialog themselves.
6. **The desktop webview never names a path**: Rust commands take file names under the app data folder or open the native dialog themselves. Blocking work in an `async` command (a dialog, file I/O) goes through `tauri::async_runtime::spawn_blocking` — SonarCloud flags it otherwise (`rust:S7493`).
7. **The web app is gated** by Turnstile, verified server-side in the Worker; the gate fails open if its secret is missing.
## Development Commands
@@ -173,5 +181,8 @@ npm run generate:brand # favicon, PWA icons, link-preview card from assets/
- New video type: `src/config/video-types.ts` + every `templates.json` (titles, intros, pinned-comment greetings).
- New content warning / tech note: the id in `CONTENT_WARNINGS` / `TECH_NOTES` (`src/engine/types.ts`), a group in `src/config/content-warning-groups.ts` / `tech-note-groups.ts`, the editor label (`ui.json`) and description line (`templates.json`) in all 8 locales and `_schema.json` — tests fail on any gap — and the row in `docs/CONTENT-INVENTORY.md` (+ vi). Don't repeat a fact that has its own field (language patch, game version, difficulty, the Video settings upscaler).
- New store platform: `src/config/platforms.ts` (URL pattern, `tagName`), optionally a name extractor in `src/utils/url-extractors.ts`.
- UI changes follow the accessibility checklist in `ACCESSIBILITY.md` (#for-contributors): keyboard, names via `Field` / `IconButton`, announced errors, tokens only, reduced motion, 24 px targets. Generated text gets `lang` (the output language); pages name themselves with `useDocumentTitle`, which `RouteAnnouncer` reads out. Update ACCESSIBILITY.md (+ `docs/i18n/vi/`) when what it promises changes.
- Never commit `note.txt`, `warning.txt` or `__pycache__/`; never put real secrets in files (`.dev.vars` holds Cloudflare's public Turnstile test keys only).
- SonarCloud (project `poli0981_youtube-generator`) is CI-based: the `sonarcloud` job in `ci.yml` scans every PR from this repository and every push to `main`, with the coverage from `check`; settings in `sonar-project.properties`; Automatic Analysis is off. Keep it at 0 open issues and the quality gate (Sonar way: A ratings, reviewed hotspots, ≤ 3 % duplication, ≥ 80 % coverage on new code) green — the job fails with the gate. Coverage covers what `coverage.include` in `vitest.config.ts` lists (the logic layers); everything else is in `sonar.coverage.exclusions`, because a file missing from the LCOV report counts as 0 % — a new source folder goes into one list or the other. The version passed to the scanner starts each release's new-code period. Fork and Dependabot PRs skip the scan (no `SONAR_TOKEN`). Check a PR with `https://sonarcloud.io/api/issues/search?componentKeys=poli0981_youtube-generator&pullRequest=<n>&resolved=false` and its gate with `https://sonarcloud.io/api/qualitygates/project_status?projectKey=poli0981_youtube-generator&pullRequest=<n>`. Workflows install with `npm ci --ignore-scripts` and call local binaries (`npm run …`), never `npx` for a package that isn't installed.
- TypeScript bumps may be manual: `@typescript/native` (`npm:typescript@^7`) and `typescript` (`npm:@typescript/typescript6@^6`) are npm aliases Dependabot may not follow. Stop the dev server before `npm ci` on Windows — it locks native modules (EPERM).
- The Cloudflare dashboard, publishing releases and repository settings are the maintainer's; ask before touching them.
+7 -2
View File
@@ -33,17 +33,22 @@ Use the templates in `.github/ISSUE_TEMPLATE/`:
- **Bug report** — only if you can reproduce on the latest release.
- **Feature request** — only with a concrete use case, not abstract requests.
- **Accessibility barrier** — anything that gets in the way with a keyboard, a screen reader, zoom, high contrast, voice control or touch. No reproduction on the latest release needed, and you don't need to know the cause. See [ACCESSIBILITY.md](./ACCESSIBILITY.md#reporting-a-barrier).
### Pull Requests
- Branch from `main` (`feat/…`, `fix/…`, `docs/…`) and open the PR against `main`. Every merge to `main` deploys the web app, so `main` stays releasable.
- Commit format and **PR title**: `type(scope): message` — e.g. `feat(engine): add Spanish template support`. Types: `feat`, `fix`, `refactor`, `docs`, `test`, `ci`, `chore`. CI checks the PR title.
- Required checks: `check`, `dependency-review`, `workflow-lint`, `reuse`, `pr-title`. When `src-tauri/` changes, the Rust workflow's `lint-and-test` and `cargo-deny` run too, and GitHub's CodeQL code scanning runs on every PR. Commits on `main` are signed.
- Required checks: `check`, `dependency-review`, `workflow-lint`, `reuse`, `pr-title`. When `src-tauri/` changes, the Rust workflow's `lint-and-test` and `cargo-deny` run too, and GitHub's CodeQL code scanning runs on every PR. SonarCloud analyses PRs opened from this repository — its quality gate wants A ratings, reviewed security hotspots, at most 3 % duplication and at least 80 % test coverage on new code in the layers Vitest measures (PRs from forks get no secrets and skip it; the maintainer's merge runs it on `main`). Commits on `main` are signed.
- PR titles start with a lower-case letter after the colon (`feat(editor): add …`, not `feat(editor): Add …`).
- One logical change per PR. Don't bundle unrelated refactors.
- All locale files must stay in lock-step — see the i18n section below.
- AI-assisted contributions are welcome but **must be disclosed** in the PR description.
### Accessibility
UI changes keep YTDescGen usable with the keyboard alone and with screen readers. Run through the checklist in [ACCESSIBILITY.md](./ACCESSIBILITY.md#for-contributors) (the PR template repeats it); the contrast test (`tests/styles/contrast.test.ts`) fails if a colour token drops under WCAG AA.
### i18n Contributions
If your change adds or removes any user-facing string:
@@ -85,7 +90,7 @@ The following are closed without review and may result in a contributor ban —
## Contact
Questions about contributing or conduct: `code@poli0981.dev`. Security issues go through [SECURITY.md](./SECURITY.md), never a public issue.
Questions about contributing or conduct: `code@poli0981.dev`. Security issues go through [SECURITY.md](./SECURITY.md), never a public issue. Accessibility barriers you'd rather not post publicly: `contact@poli0981.dev`, subject starting with `[Accessibility]`.
## License
+1 -1
View File
@@ -4,7 +4,7 @@
YTDescGen is a personal project built by a single maintainer (`@poli0981`) for use with the [`@SkullMute`](https://www.youtube.com/@SkullMute) YouTube channel and shared publicly as open source. It is **not a commercial product** and there is no support obligation.
Code, documentation, locale translations, and design decisions in this repository were **co-authored with the assistance of Anthropic's Claude Code (Claude Opus models; v1.0.0 through v1.2.0 with Claude Opus 5.5)**. All commits, releases, and architectural decisions are reviewed and approved by the maintainer before merging.
Code, documentation, locale translations, and design decisions in this repository were **co-authored with the assistance of Anthropic's Claude Code (Claude Opus models; v1.0.0 through v1.5.1 with Claude Opus 5.5, v1.5.2 with Claude Fable 5.2)**. All commits, releases, and architectural decisions are reviewed and approved by the maintainer before merging.
This disclosure applies to:
+5 -3
View File
@@ -7,7 +7,7 @@
Generate YouTube titles, descriptions and tags in eight languages. Save your channel as a profile and each game as a preset, and every new video is a few clicks.
[![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)
[![Node](https://img.shields.io/badge/node-%E2%89%A526-brightgreen)](./docs/DEVELOPMENT.md)
[![Latest release](https://img.shields.io/github/v/release/poli0981/youtube-generator?include_prereleases)](https://github.com/poli0981/youtube-generator/releases)
[![Last commit](https://img.shields.io/github/last-commit/poli0981/youtube-generator)](https://github.com/poli0981/youtube-generator/commits)
@@ -39,7 +39,8 @@ Built for the gameplay no-commentary niche — especially horror / scary games
- **Command palette** (Ctrl/⌘ + K) and keyboard shortcuts.
- **Contact emails by purpose** — one contact line, or separate lines for contact, advertising, game keys & playtest and copyright / DMCA, each purpose address checked for a word that says what it is for (`sponsor@…`, `keys@…`, `dmca@…`).
- **Guardrails** — length caps on every field and an opt-in **Strict Mode** that blocks copy and export while a field has an error.
- **Dark and light themes**, larger controls on touch screens, and an option to hide every scrollbar.
- **Dark and light themes** at WCAG AA contrast, larger controls on touch screens, and an option to hide every scrollbar.
- **Accessible** — works with the keyboard alone and with screen readers (generated text is marked with its language), respects reduce motion, zooms on desktop; see [ACCESSIBILITY.md](./ACCESSIBILITY.md).
- **Desktop app** — Windows, macOS & Linux via Tauri; **Android app** — Android 11+, sideloaded from [Releases](https://github.com/poli0981/youtube-generator/releases).
## Quick Start
@@ -89,7 +90,7 @@ Full details: [PRIVACY.md](./PRIVACY.md), also at [ytgenerator.stream/legal/priv
## Tech Stack
React 19 · TypeScript (strict) · Vite 8 · Tailwind CSS 4 · Radix · Motion · Zustand 5 · i18next · Tauri 2 (Rust) · Cloudflare Workers.
React 19 · TypeScript 7 (strict) · Vite 8 · Tailwind CSS 4 · Radix · Motion · Zustand 5 · i18next · Tauri 2 (Rust) · Cloudflare Workers.
Architecture overview: [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md).
@@ -109,6 +110,7 @@ Architecture overview: [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md).
| [Packaging](./docs/PACKAGING.md) | Tauri desktop + Android release builds and signing. |
| [Contributing](./CONTRIBUTING.md) | PR process, commit conventions, required checks. |
| [Security](./SECURITY.md) | Reporting vulnerabilities. |
| [Accessibility](./ACCESSIBILITY.md) | What works with a keyboard, screen readers and zoom, known gaps, how to report a barrier. _(Also: [Vietnamese](./docs/i18n/vi/ACCESSIBILITY.md).)_ |
| [Privacy](./PRIVACY.md) | What is stored where, and what Cloudflare processes. |
| [Terms of Use](./TERMS.md) | Acceptable use, license compliance, DMCA. |
| [Disclaimer](./DISCLAIMER.md) | AI-assistance and translation-quality disclosure. _(Also: [Vietnamese](./docs/i18n/vi/DISCLAIMER.md).)_ |
+2 -2
View File
@@ -6,8 +6,8 @@ Only the latest released version of YTDescGen receives security updates, and the
| Version | Supported |
| ------- | --------- |
| 1.2.x | ✅ |
| < 1.2 | ❌ |
| 1.5.x | ✅ |
| < 1.5 | ❌ |
## Reporting a Vulnerability
+27 -27
View File
@@ -18,18 +18,18 @@ Bundled into the web app and the desktop / Android apps.
| `@tauri-apps/plugin-opener` | 2.7.2 | MIT OR Apache-2.0 | <https://github.com/tauri-apps/plugins-workspace> |
| `clsx` | 2.1.1 | MIT | <https://github.com/lukeed/clsx> |
| `cmdk` | 1.1.1 | MIT | <https://github.com/pacocoursey/cmdk> |
| `i18next` | 26.4.5 | MIT | <https://github.com/i18next/i18next> |
| `i18next-resources-to-backend` | 1.2.3 | MIT | <https://github.com/i18next/i18next-resources-to-backend> |
| `lucide-react` | 1.57.0 | ISC | <https://github.com/lucide-icons/lucide> |
| `i18next` | 26.6.0 | MIT | <https://github.com/i18next/i18next> |
| `i18next-resources-to-backend` | 1.2.4 | MIT | <https://github.com/i18next/i18next-resources-to-backend> |
| `lucide-react` | 1.70.0 | ISC | <https://github.com/lucide-icons/lucide> |
| `motion` | 13.5.1 | MIT | <https://github.com/motiondivision/motion> |
| `radix-ui` | 1.8.1 | MIT | <https://github.com/radix-ui/primitives> |
| `react` | 19.3.0 | MIT | <https://github.com/react/react> |
| `react-dom` | 19.3.0 | MIT | <https://github.com/react/react> |
| `react-i18next` | 17.0.16 | MIT | <https://github.com/i18next/react-i18next> |
| `react-router-dom` | 7.18.4 | MIT | <https://github.com/remix-run/react-router> |
| `simple-icons` | 16.33.0 | CC0-1.0 | <https://simpleicons.org> |
| `react` | 19.3.1 | MIT | <https://github.com/react/react> |
| `react-dom` | 19.3.1 | MIT | <https://github.com/react/react> |
| `react-i18next` | 17.1.13 | MIT | <https://github.com/i18next/react-i18next> |
| `react-router-dom` | 7.18.5 | MIT | <https://github.com/remix-run/react-router> |
| `simple-icons` | 16.37.0 | CC0-1.0 | <https://simpleicons.org> |
| `sonner` | 2.0.8 | MIT | <https://github.com/emilkowalski/sonner> |
| `zustand` | 5.0.15 | MIT | <https://github.com/pmndrs/zustand> |
| `zustand` | 5.1.0 | MIT | <https://github.com/pmndrs/zustand> |
## Build and development tools
@@ -39,31 +39,31 @@ Used to build, test and check YTDescGen. Not shipped to users.
| --- | --- | --- | --- |
| `@eslint/js` | 10.0.1 | MIT | <https://github.com/eslint/eslint> |
| `@resvg/resvg-js` | 2.6.2 | MPL-2.0 | — |
| `@tailwindcss/postcss` | 4.3.3 | MIT | <https://github.com/tailwindlabs/tailwindcss> |
| `@tauri-apps/cli` | 2.12.3 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/tauri> |
| `@tailwindcss/postcss` | 4.3.5 | MIT | <https://github.com/tailwindlabs/tailwindcss> |
| `@tauri-apps/cli` | 2.12.4 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/tauri> |
| `@testing-library/jest-dom` | 7.0.1 | MIT | <https://github.com/testing-library/jest-dom> |
| `@testing-library/react` | 16.3.3 | MIT | <https://github.com/testing-library/react-testing-library> |
| `@types/node` | 26.6.3 | MIT | <https://github.com/DefinitelyTyped/DefinitelyTyped> |
| `@types/node` | 26.6.6 | MIT | <https://github.com/DefinitelyTyped/DefinitelyTyped> |
| `@types/react` | 19.3.0 | MIT | <https://github.com/DefinitelyTyped/DefinitelyTyped> |
| `@types/react-dom` | 19.3.0 | MIT | <https://github.com/DefinitelyTyped/DefinitelyTyped> |
| `@typescript/typescript6` | 6.0.2 | Apache-2.0 | <https://github.com/microsoft/TypeScript> |
| `@vitejs/plugin-react` | 6.1.2 | MIT | <https://github.com/vitejs/vite-plugin-react> |
| `@vitejs/plugin-react` | 6.3.0 | MIT | <https://github.com/vitejs/vite-plugin-react> |
| `@vitest/coverage-v8` | 4.1.12 | MIT | <https://github.com/vitest-dev/vitest> |
| `autoprefixer` | 10.6.1 | MIT | <https://github.com/postcss/autoprefixer> |
| `eslint` | 10.12.0 | MIT | <https://github.com/eslint/eslint> |
| `autoprefixer` | 10.6.2 | MIT | <https://github.com/postcss/autoprefixer> |
| `eslint` | 10.14.0 | MIT | <https://github.com/eslint/eslint> |
| `eslint-plugin-react-hooks` | 7.1.1 | MIT | <https://github.com/facebook/react> |
| `knip` | 6.41.0 | ISC | <https://github.com/webpro-nl/knip> |
| `marked` | 18.1.1 | MIT | <https://github.com/markedjs/marked> |
| `postcss` | 8.5.30 | MIT | <https://github.com/postcss/postcss> |
| `knip` | 6.44.2 | ISC | <https://github.com/webpro-nl/knip> |
| `marked` | 18.2.0 | MIT | <https://github.com/markedjs/marked> |
| `postcss` | 8.5.32 | MIT | <https://github.com/postcss/postcss> |
| `prettier` | 3.9.10 | MIT | <https://github.com/prettier/prettier> |
| `prettier-plugin-tailwindcss` | 0.8.1 | MIT | <https://github.com/tailwindlabs/prettier-plugin-tailwindcss> |
| `tailwindcss` | 4.3.3 | MIT | <https://github.com/tailwindlabs/tailwindcss> |
| `tailwindcss` | 4.3.5 | MIT | <https://github.com/tailwindlabs/tailwindcss> |
| `tsx` | 4.23.15 | MIT | <https://github.com/privatenumber/tsx> |
| `typescript` | 7.0.2 | Apache-2.0 | <https://github.com/microsoft/TypeScript> |
| `typescript-eslint` | 8.71.2 | MIT | <https://github.com/typescript-eslint/typescript-eslint> |
| `vite` | 8.3.4 | MIT | <https://github.com/vitejs/vite> |
| `typescript-eslint` | 8.72.2 | MIT | <https://github.com/typescript-eslint/typescript-eslint> |
| `vite` | 8.3.7 | MIT | <https://github.com/vitejs/vite> |
| `vitest` | 4.1.12 | MIT | <https://github.com/vitest-dev/vitest> |
| `wrangler` | 4.149.0 | MIT OR Apache-2.0 | <https://github.com/cloudflare/workers-sdk> |
| `wrangler` | 4.159.0 | MIT OR Apache-2.0 | <https://github.com/cloudflare/workers-sdk> |
## Desktop and Android shell (Rust crates)
@@ -72,11 +72,11 @@ Direct dependencies of `src-tauri/`. Transitive crates are checked in CI by `car
| Crate | Version | License | Project |
| --- | --- | --- | --- |
| `serde` | 1.0.228 | MIT OR Apache-2.0 | <https://github.com/serde-rs/serde> |
| `tauri` | 2.12.0 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/tauri> |
| `tauri-build` | 2.7.0 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/tauri> |
| `tauri-plugin-dialog` | 2.8.0 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/plugins-workspace> |
| `tauri-plugin-opener` | 2.7.0 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/plugins-workspace> |
| `tauri-plugin-single-instance` | 2.5.1 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/plugins-workspace> |
| `tauri` | 2.12.5 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/tauri> |
| `tauri-build` | 2.7.4 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/tauri> |
| `tauri-plugin-dialog` | 2.8.4 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/plugins-workspace> |
| `tauri-plugin-opener` | 2.7.2 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/plugins-workspace> |
| `tauri-plugin-single-instance` | 2.5.5 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/plugins-workspace> |
## Fonts and icons
+20 -10
View File
@@ -79,17 +79,24 @@ export function rewriteHref(href: string, fromFile: string): string {
* hyphen, which also rules out any markup ending up in an attribute.
*/
function slugify(text: string): string {
return text
.toLowerCase()
.replace(/[^\p{L}\p{N}]+/gu, "-")
.replace(/^-+|-+$/g, "");
return (
text
.toLowerCase()
.replace(/[^\p{L}\p{N}]+/gu, "-")
// The line above leaves at most one hyphen in a row.
.replace(/^-|-$/g, "")
);
}
function stripInlineMarkdown(text: string): string {
return text
.replace(/[`*_~]/g, "")
.replace(/\[([^\]]+)\]\([^)]*\)/g, "$1")
.trim();
return (
text
.replace(/[`*_~]/g, "")
// Neither part may contain `[`, so a failed match is never re-scanned
// from a later `[` inside it (linear even on unbalanced brackets).
.replace(/\[([^[\]]+)\]\([^)[]*\)/g, "$1")
.trim()
);
}
export function renderMarkdown(source: string, fromFile: string): { title: string; html: string } {
@@ -204,6 +211,8 @@ const DOC_SUMMARIES: Readonly<Record<LegalDocId, string>> = {
license: "The Apache License 2.0 the source code is released under.",
"third-party": "Open-source libraries, fonts and services YTDescGen relies on.",
security: "How to report a vulnerability privately, and what is in scope.",
accessibility:
"What works with a keyboard, screen readers and zoom, known gaps, and how to report a barrier.",
notice: "The Apache-2.0 NOTICE file with copyright and attribution.",
conduct: "Contributor Covenant rules for the project's community spaces.",
};
@@ -252,6 +261,7 @@ const TITLE_BY_ID: Record<LegalDocId, string> = {
license: "License (Apache-2.0)",
"third-party": "Third-Party Notices",
security: "Security Policy",
accessibility: "Accessibility",
notice: "NOTICE",
conduct: "Code of Conduct",
};
@@ -289,10 +299,10 @@ function indexPage(): string {
return pageShell({
title: "Legal",
canonicalPath: "/legal",
description: "Terms, privacy, licensing and security information for YTDescGen.",
description: "Terms, privacy, licensing, security and accessibility information for YTDescGen.",
activeId: null,
lang: "en",
body: `<article><h1>Legal</h1><p>Terms, privacy, licensing and security information for YTDescGen — the same documents the app shows in its Legal Center.</p><div class="cards">${cards}</div></article>`,
body: `<article><h1>Legal</h1><p>Terms, privacy, licensing, security and accessibility information for YTDescGen — the same documents the app shows in its Legal Center.</p><div class="cards">${cards}</div></article>`,
});
}
+22 -19
View File
@@ -2,7 +2,7 @@
## YTDescGen — Technical Architecture
Reflects **v1.2.0**. Implementation details (configs, interfaces, file formats, CI) are in [TECH-SPEC.md](TECH-SPEC.md); desktop and Android builds in [PACKAGING.md](PACKAGING.md); running the web deployment in [HOSTING.md](HOSTING.md).
Reflects **v1.5.2**. Implementation details (configs, interfaces, file formats, CI) are in [TECH-SPEC.md](TECH-SPEC.md); desktop and Android builds in [PACKAGING.md](PACKAGING.md); running the web deployment in [HOSTING.md](HOSTING.md).
---
@@ -32,7 +32,7 @@ Reflects **v1.2.0**. Implementation details (configs, interfaces, file formats,
│ ├─ description-builder ── rig-block · timeline-parser │
│ │ channel-phrase · endings-format │
│ └─ tag-generator │
│ Also: title-variants · limits · social-post-builder │
│ Also: title-variants · limits · social-post-builder · upscale │
│ pinned-comment-builder · playlist-builder · graphics-vendor │
├────────────────────────────────────────────────────────────────────┤
│ Infrastructure Layer │
@@ -53,7 +53,7 @@ The same source ships two ways:
│ Web — ytgenerator.stream │ │ Tauri 2 — desktop and Android │
│ BrowserRouter (real paths) │ │ HashRouter (asset protocol) │
│ Build adds: static /legal pages, │ │ Build (TAURI_ENV_PLATFORM set): │
│ security.txt, analytics beacon │ │ es2020 target, no analytics │
│ security.txt, analytics beacon │ │ no static pages or analytics │
│ Cloudflare Worker (worker/): │ │ Rust core (src-tauri/): │
│ Turnstile gate · headers · │ │ name-only file commands, │
│ /legal/* · static assets │ │ native dialogs, tray (desktop) │
@@ -66,7 +66,7 @@ The same source ships two ways:
**Route tree.** `/legal` and `/legal/:docId` (the Legal Center) sit outside the consent guard, so the consent screen can open each document. Everything else is inside `ConsentGuard`, a layout route that renders `ConsentGate` until the user has accepted the current terms version (`CURRENT_TERMS_VERSION` = 2 since v1.0.0). Inside it, `AppShell` holds the pages: the Editor (index route) stays in the entry bundle; Output, Profiles, History, Settings, Batch, Social, Playlist, Logs and About are `React.lazy` chunks, each wrapped in its own `ErrorBoundary` + `Suspense` so a crash on one page cannot blank the app. On the web, `/legal/<id>` loaded directly is the Worker's static page; navigated to inside the app, it is the Legal Center — the same URL either way.
**App shell.** `AppShell` combines a collapsible `Sidebar`, the `Header` top bar (output and interface languages, theme), `MobileNav` (a bottom bar on phones, with a "More" drawer), and three lazily loaded pieces: the ⌘/Ctrl + K `CommandPalette` (cmdk), the shortcut help and the backup `RestoreDialog`, mounted only while a restore is pending. UI primitives in `components/ui/` wrap Radix (Dialog, AlertDialog, Popover, Tooltip, Tabs, Switch, Checkbox, ToggleGroup); animation is Motion behind `LazyMotion` (its feature bundle loads after first paint, and `MotionConfig reducedMotion="user"` honours the OS setting); toasts are sonner.
**App shell.** `AppShell` combines a collapsible `Sidebar`, the `Header` top bar (output and interface languages, theme), `MobileNav` (a bottom bar on phones, with a "More" drawer), and three lazily loaded pieces: the ⌘/Ctrl + K `CommandPalette` (cmdk), the shortcut help and the backup `RestoreDialog`, mounted only while a restore is pending. UI primitives in `components/ui/` wrap Radix (Dialog, AlertDialog, Popover, Tooltip, Tabs, Switch, Checkbox, ToggleGroup); animation is Motion behind `LazyMotion` (its feature bundle loads after first paint, and `MotionConfig reducedMotion="user"` honours the OS setting); toasts are sonner, with translated region and close labels. `RouteAnnouncer` (v1.5.1) is a polite live region that reads out the new page's name after a navigation: every page names itself with `useDocumentTitle`, which fires `ytdescgen:page-title` once the commit's effects have run, and focus stays where it was. Accessibility as a whole: [ACCESSIBILITY.md](../ACCESSIBILITY.md).
**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 error routes (`/403`, `/419`, `/500`, `/offline`, catch-all `*`) are **siblings of the `AppShell` route group** inside the consent guard, so they render full-screen without the shell. `ErrorPage` is router-agnostic — Home is a plain location change (`/` on the web, `#/` in Tauri) and Back is `history.back()` — so the root `ErrorBoundary`, mounted in `main.tsx` outside the router, reuses it as its crash fallback.
@@ -93,6 +93,7 @@ The engine holds all generation logic with **zero framework dependency**: no Rea
| `channel-phrase.ts` | Drops "on {{channelName}}" (per language) when the channel name is empty |
| `rig-block.ts` | The rig as localised `Label: value` lines in a fixed order (description and social captions) |
| `endings-format.ts`, `graphics-vendor.ts` | Endings lists split across videos; valid upscaler / frame-generation options per vendor |
| `upscale.ts` | Upscaled in the editor (v1.5.0): `validUpscaleSource` — the one rule the title badge, the Upscale line and the automatic tech note share |
| `limits.ts` | Over-limit status per field, Copy All rules, `<` / `>` detection |
| `social-post-builder.ts` | Captions for TikTok, YouTube Shorts, Instagram Reels, Facebook Reels, X (weighted count), Threads, Bluesky |
| `pinned-comment-builder.ts`, `playlist-builder.ts` | Pinned comment; playlist title, description and comment |
@@ -139,8 +140,8 @@ interface GeneratorInput {
// Video-type specific: partNumber, bossName, dlcName, challengeName, modName, modList,
// liveUrl, scheduledTime, gacha quest fields …
// Video settings: resolution, fps, graphicsPreset, ray tracing, frame generation,
// upscaling, artStyle, videoStyleEra, versionInfo …
// Video settings: resolution, upscaledFrom, fps, graphicsPreset, ray tracing,
// frame generation, upscaling, artStyle, videoStyleEra, versionInfo …
// Content: timestamps, playlistLink, emails, music, sponsor, publisher, content warnings,
// tech notes, playthrough notes, endings, playtest, community links …
@@ -219,14 +220,15 @@ generateTags(input, { includeMultilingualTags, includeTrendingTags, year })
priority pool source
1 game name bare tag (≤ 30 chars) + a shorter form for composites
2 core CORE_TAGS_BY_LANG[language]
3 genre GENRE_TAG_REGISTRY[genre], for every selected genre
4 video type VIDEO_TYPE_TAGS[videoType]
5 platform PLATFORMS[].tagName ("Steam", "itch.io", …)
6 quality resolution / fps
7 multilingual MULTILINGUAL_TAGS[language] (setting)
8 trending year-based, first genre only (setting)
9 publisher/developer pubDevName, as a bare tag
2 boss name bossNameTag(bossName) — Boss Fight / Boss No Hit only
3 core CORE_TAGS_BY_LANG[language]
4 genre GENRE_TAG_REGISTRY[genre], for every selected genre
5 video type VIDEO_TYPE_TAGS[videoType]
6 platform PLATFORMS[].tagName ("Steam", "itch.io", …)
7 quality resolution / fps
8 multilingual MULTILINGUAL_TAGS[language] (setting)
9 trending year-based, first genre only (setting)
10 publisher/developer pubDevName, as a bare tag
│
▼
de-duplicate (case-insensitive) · drop tags over 30 characters
@@ -256,7 +258,7 @@ export const GENRE_TAG_REGISTRY: Record<string, (gameName: string) => string[]>
```
┌────────────────────────────────────────────────────────────────────┐
│ EditorStore — "ytdescgen-editor-draft", v20 │
│ EditorStore — "ytdescgen-editor-draft", v21 │
│ - the draft: every form field (EditorData) + setter actions │
│ - persists data only (editorDataOf); migrateEditorState │
├────────────────────────────────────────────────────────────────────┤
@@ -274,7 +276,8 @@ export const GENRE_TAG_REGISTRY: Record<string, (gameName: string) => string[]>
│ - capped by the History Limit setting (10–500, default 100) │
├────────────────────────────────────────────────────────────────────┤
│ SettingsStore — "ytdescgen-settings", v12 │
│ - theme · hideScrollbars · appLanguage · titleFormat │
│ - theme · hideScrollbars · singleKeyShortcuts · appLanguage │
│ - titleFormat │
│ - description toggles · strictMode · copyAllIncludesTags · … │
│ - healSettings on every load; consent and UI state never exported │
├────────────────────────────────────────────────────────────────────┤
@@ -296,7 +299,7 @@ Every persisted store uses Zustand `persist` with `createJSONStorage(() => local
`src/config/library-fields.ts` is the one list of which editor fields each kind of library item carries — the save forms, Apply, backups and imports all read it:
- **Profile** = the channel: `PROFILE_FIELDS` (channel name, emails, social, rig, resolution / fps / graphics preset, ad text, Vietnamese donate fields, community links).
- **Profile** = the channel: `PROFILE_FIELDS` (channel name, emails, social, rig, resolution (+ upscaled from) / fps / graphics preset, ad text, Vietnamese donate fields, community links).
- **Preset** = the game: `PRESET_FIELDS` (names, genres, platform, store links and their types, publisher, content warnings, language patch, game version, art style, the skip-graphics-settings switch, playlist link).
- **Template** = the whole form (every field since v1.0.0).
- `PER_VIDEO_FIELDS` is what belongs to one video only (boss, chapter, timestamps, pinned comment, endings, …).
@@ -388,7 +391,7 @@ Export: `ExportBackupDialog` → `collectBackup(chosen sections)` → `saveTextF
## 6. Web Delivery
The web build is served at <https://ytgenerator.stream> by a Cloudflare Worker (`worker/`, configured by `wrangler.jsonc`) that Cloudflare Workers Builds deploys from `main`. The Worker puts a Turnstile check in front of the app (verified server-side; a signed `HttpOnly` `__Host-ytg_gate` cookie remembers the pass for 24 hours), serves the prerendered legal pages at `/legal/*` to everyone, and sets the security headers (a CSP per page type). Agreeing to the terms on the gate page sets the `ytg_terms` cookie, which the app reads so a web visitor meets one blocking screen, not two. Build-time extras for the web only — static legal pages, `/.well-known/security.txt`, the cookieless Web Analytics beacon — come from `build-plugins/`. The desktop and Android builds use none of this and contain no analytics. Request flow, cookies, headers and operations: [HOSTING.md](HOSTING.md).
The web build is served at <https://ytgenerator.stream> by a Cloudflare Worker (`worker/`, configured by `wrangler.jsonc`) that Cloudflare Workers Builds deploys from `main`. The Worker puts a Turnstile check in front of the app (verified server-side; a signed `HttpOnly` `__Host-ytg_gate` cookie remembers the pass for 24 hours), serves the prerendered legal pages at `/legal/*` to everyone, sets the security headers (a CSP per page type), and answers `429` to a client that sends too many requests (Workers Rate Limiting bindings, behind a WAF rate limiting rule at the zone). Agreeing to the terms on the gate page sets the `ytg_terms` cookie, which the app reads so a web visitor meets one blocking screen, not two. Build-time extras for the web only — static legal pages, `/.well-known/security.txt`, the cookieless Web Analytics beacon — come from `build-plugins/`. The desktop and Android builds use none of this and contain no analytics. Request flow, cookies, headers and operations: [HOSTING.md](HOSTING.md).
## 7. Desktop Packaging (Tauri)
@@ -419,7 +422,7 @@ React app (src/), built with TAURI_ENV_PLATFORM set
- Android: universal .apk
```
**The webview never names a path.** Since v1.0.0 the Rust side exposes only name-only commands for its own files (`backup_*` and `log_*` under the app data directory, `recover_legacy_data`) and two commands that open the native Save / Open dialog themselves (`export_text_file`, `import_text_file`: text formats only, imports capped at 20 MB). The capability file grants the webview only `core:default` and `opener:default`; the fs and shell plugins are gone. The JavaScript bridge is `src/utils/native.ts`, used by `file-ops.ts` (exports and imports on every platform), `log-storage.ts` and `utils/backup/`. Details: [PACKAGING.md](PACKAGING.md).
**The webview never names a path.** Since v1.0.0 the Rust side exposes only name-only commands for its own files (`backup_*` and `log_*` under the app data directory, `recover_legacy_data`) and two commands that open the native Save / Open dialog themselves (`export_text_file`, `import_text_file`: text formats only, imports capped at 20 MB). The capability file grants the webview only `core:default`, `opener:default` and (v1.5.1, for the zoom hotkeys' macOS/Linux polyfill) `core:webview:allow-set-webview-zoom`; the fs and shell plugins are gone. The JavaScript bridge is `src/utils/native.ts`, used by `file-ops.ts` (exports and imports on every platform), `log-storage.ts` and `utils/backup/`. Details: [PACKAGING.md](PACKAGING.md).
Tauri advantages over Electron:
+3 -1
View File
@@ -1,6 +1,6 @@
# Content Inventory
A static manifest of every video type, game genre, content warning, tech note, store, link field and cross-post platform surfaced in YTDescGen's editor (as of v1.2.0). Maintained manually — when adding a new option to one of the source files below, **add a row here too** in the same PR.
A static manifest of every video type, game genre, content warning, tech note, store, link field and cross-post platform surfaced in YTDescGen's editor (as of v1.3.0). 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.
@@ -166,6 +166,8 @@ The game itself is made or run with generative AI — a story _about_ AI is "AI
Selected notes are rendered in a `▸ 🛠 TECH NOTES` block right after the content warnings, in the order you picked them. They describe the recording, not the game. Facts that have their own field — difficulty, endings shown, language patch, game version, the upscaler and frame generation in Video settings — are not repeated here.
When **Upscaled from** is set in Video settings (v1.5.0), one more note is added on its own, after yours: _Upscaled to a higher resolution in editing — fine detail is reconstructed, so text, textures and edges may look slightly different from the original image._ It is not in the checklist below; the Upscale line in Video settings says what was upscaled to what.
### Audio (5)
Some sections muted (copyright) · Volume reduced (copyright) · Game music replaced (copyright) · Cutscene audio muted only · Original audio kept (claim risk)
+11 -9
View File
@@ -21,13 +21,13 @@ macOS and Linux work for development. Tauri release builds are cross-compiled or
Install in this order:
| Tool | Version | Why |
| ----------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Node.js** | **22** — the version in `.node-version` | CI, the release workflows and Cloudflare Workers Builds all read `.node-version`. Vite 8 needs Node `^20.19` or `>= 22.12` and wrangler needs `>= 22`, so use 22.12 or newer. Use [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm) (fnm reads `.node-version`). |
| **npm** | bundled with Node 22 | The project uses npm; `pnpm` and `yarn` are not tested. |
| **Rust** | stable, `>= 1.90` | Required for the Tauri desktop and Android builds (Tauri 2.12 needs Rust 1.90). Install via [rustup](https://rustup.rs/); its default profile includes `rustfmt` and `clippy`. |
| **Python** | `3.12` | Optional — only needed for some Tauri platform tooling on Windows. |
| **Tauri prerequisites** | per OS | See <https://v2.tauri.app/start/prerequisites/>. |
| Tool | Version | Why |
| ----------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Node.js** | **26** — the version in `.node-version` | CI, the release workflows and Cloudflare Workers Builds all read `.node-version`, and `package.json` declares `engines.node >= 26`. Use [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm) (fnm reads `.node-version`). |
| **npm** | 11, bundled with Node 26 | The project uses npm; `pnpm` and `yarn` are not tested. |
| **Rust** | stable, `>= 1.90` | Required for the Tauri desktop and Android builds (Tauri 2.12 needs Rust 1.90). Install via [rustup](https://rustup.rs/); its default profile includes `rustfmt` and `clippy`. |
| **Python** | `3.12` | Optional — only needed for some Tauri platform tooling on Windows. |
| **Tauri prerequisites** | per OS | See <https://v2.tauri.app/start/prerequisites/>. |
### Windows specifics
@@ -51,7 +51,7 @@ The reference workflow uses **JetBrains 2026.x** IDEs (WebStorm or RustRover) as
- Enable the **Tailwind CSS** plugin.
- Enable the **i18next** plugin (or rely on `src/i18n/locales/_schema.json` for autocomplete).
- Settings → Languages → TypeScript → "Use TypeScript from `node_modules/typescript`".
- Settings → Languages → TypeScript → keep the IDE's bundled TypeScript service. `node_modules/typescript` is not the compiler: it is an npm alias for `@typescript/typescript6`, the TypeScript 6.0 API that typescript-eslint loads. The project type-checks with TypeScript 7 (`tsc`, from `@typescript/native`) — `npm run typecheck` is the source of truth.
- Settings → Code Style → Prettier → Run on save (`{src,tests,scripts,worker,build-plugins}/**/*.{ts,tsx,css}` — the same files `npm run format` covers).
### VS Code
@@ -86,6 +86,7 @@ The dev server is the app alone: no Turnstile gate and no analytics. To run the
- Branch from `main` (`feat/…`, `fix/…`, `docs/…`, `chore/…`) and open the pull request against `main`. There is no other long-lived branch, and every merge to `main` deploys the web app.
- PR titles use the commit format `type(scope): message`; CI checks them.
- Every PR runs the `check` job (below), `dependency-review`, `workflow-lint`, `reuse` and `pr-title`; the Rust jobs `lint-and-test` and `cargo-deny` run when `src-tauri/` changes.
- After `check`, the `sonarcloud` job sends the code and the coverage report to [SonarCloud](https://sonarcloud.io/project/overview?id=poli0981_youtube-generator) (settings in `sonar-project.properties`) and fails when its quality gate does: new code needs A ratings, reviewed security hotspots, at most 3 % duplication and at least 80 % coverage. PRs from forks and from Dependabot skip it — they get no `SONAR_TOKEN` — and `main` is analysed after every merge.
Full rules: [CONTRIBUTING.md](../CONTRIBUTING.md).
@@ -115,7 +116,7 @@ Full rules: [CONTRIBUTING.md](../CONTRIBUTING.md).
| `npm run validate:locales` | Enforces all 8 locales match `_schema.json` exactly. **Must pass before any locale-touching PR merges.** |
| `npm run test` | Vitest watch mode. |
| `npm run test:run` | Vitest single-run. |
| `npm run test:coverage` | Single run with a coverage report into `coverage/`; fails below the thresholds for `src/engine/` and `worker/` set in `vitest.config.ts`. This is what CI runs. |
| `npm run test:coverage` | Single run with a coverage report into `coverage/` — the logic layers, and `lcov.info` goes to SonarCloud; fails below the thresholds for `src/engine/` and `worker/` set in `vitest.config.ts`. This is what CI runs. |
| `npm run check:version` | Asserts all **six** version fields agree (`package.json`, both `package-lock.json` entries, `tauri.conf.json`, `Cargo.toml`, `Cargo.lock`). The only thing that notices a missed one. |
| `npm run check:tauri` | The `@tauri-apps/*` npm packages and the Tauri crates must share major.minor. The Tauri CLI refuses to build otherwise, and CI never runs a Tauri build. |
| `npm run check:licenses` | Every bundled package has an allowed license, and `THIRD_PARTY_NOTICES.md` matches what is installed. |
@@ -245,3 +246,4 @@ docs/I18N.md). The restart advice above still applies to all of them.
- [PACKAGING.md](./PACKAGING.md) — Tauri release builds and signing.
- [Top-level CONTRIBUTING.md](../CONTRIBUTING.md) — PR process, commit conventions, auto-ignore rules.
- [Top-level SECURITY.md](../SECURITY.md) — reporting vulnerabilities.
- [Top-level ACCESSIBILITY.md](../ACCESSIBILITY.md) — what works with assistive technology, and the checklist for UI changes.
+94 -33
View File
@@ -1,6 +1,6 @@
# Complete Feature List
## YTDescGen — All Features (v1.2.0 + Planned)
## YTDescGen — All Features (v1.5.2 + Planned)
---
@@ -142,7 +142,7 @@ is now "X (Twitter)" (same `twitter` id, so saved links still load).
Bank, Cake by VPBank and Timo; a profile saved with OceanBank, CBBank or
DongA Bank is offered the new name in one click.
## 💻 Rig Fields (10 fields)
## 💻 Rig Fields (11 fields)
Printed in this order, with labels in the output language.
@@ -158,6 +158,13 @@ Printed in this order, with labels in the output language.
| `capture` | Capture Software | Text | OBS Studio 31 |
| `controller` | Controller | Text | DualSense / Xbox Wireless Controller |
| `video_editor` | Video Editor | Dropdown + version | DaVinci Resolve Studio 19.1 |
| `lut` | LUT | Text with suggestions (DaVinci Resolve's own LUTs) — v1.4.0 | Arri Alexa LogC to Rec709 |
**LUT (v1.4.0)** — the LUT you grade with, on its own line right under the
video editor. The suggestions are LUTs that come with DaVinci Resolve, named
the way its LUT menu shows them; any other name is printed as typed. A pasted
file name or path (Explorer's _Copy as path_) is cut down to the LUT's name:
`"C:\…\Arri\Arri Alexa LogC to Rec709.dat"` → `Arri Alexa LogC to Rec709`.
**GPU catalog (v1.0.0)** — 198 models in 29 groups: NVIDIA GeForce (desktop
and laptop), AMD Radeon (including integrated), Intel Arc and integrated,
@@ -179,11 +186,11 @@ Every block is optional and skipped when empty. In order:
6. 🎮 Store links (heading depends on paid vs. free / demo links)
7. © Game copyright line (opt-in)
8. 🧪 Playtest / early access (when a playtest link is set)
9. 🖥 Video settings (skipped for games without graphics settings)
9. 🖥 Video settings (games without graphics settings keep only the upscale and video-style lines)
10. 💻 My rig
11. 🧩 Mod list (Modded Gameplay only)
12. ⚠️ Content warnings (257 IDs across 13 groups, incl. AI-generated content — v1.2.0)
13. 🛠 Tech notes (25 IDs across 5 groups)
13. 🛠 Tech notes (25 IDs across 5 groups, plus an automatic note for an upscaled video — v1.5.0)
14. Translation-quality note (opt-in; not for English or Vietnamese)
15. 🎁 Sponsor credit (opt-in)
16. 🤝 Sponsors & partners (opt-in)
@@ -201,6 +208,25 @@ Every block is optional and skipped when empty. In order:
27. Hashtags (1–3, auto-generated)
```
**Upscaled video (v1.5.0)** — Video settings › **Upscaled from** is for
footage recorded at a lower resolution and upscaled in the video editor
(1440p → 4K, say). The title badge reads `[4K Upscaled]` (`[2K Upscaled]`,
`[4K Upscaled 120FPS]`; the word in the output language), the Video settings
block gets a line under the resolution — the editor taken from My Rig:
```
Video: 4K - 60 FPS
Upscale: 1440p → 4K (DaVinci Resolve Studio 21.2)
```
and Tech notes gets a note of its own: _Upscaled to a higher resolution in
editing — fine detail is reconstructed, so text, textures and edges may look
slightly different from the original image._ It isn't in the checklist and
goes away with the upscale. Only resolutions below the video's are offered;
lowering the resolution to or below the source ends the upscale. 1080p 60fps
still has no badge, and the Upscale line stays when the graphics settings are
hidden. Saved with the channel profile.
With one output language selected, the Output page shows content warnings,
tech notes and playthrough notes bilingually (English · output language)
unless the output is English; with several languages selected, each tab —
@@ -254,6 +280,7 @@ per platform).
| Pool | Triggered By | Sample Output |
| ------------ | --------------------------------- | ------------------------------------------------------------------------ |
| Game name | Always | `[game]` (shortened to fit 30 characters) |
| Boss name | Boss Fight / Boss No Hit (v1.4.0) | `[boss]` — the Boss Name field, without punctuation |
| Core | Always, in the output language | `[game] gameplay`, `[game] no commentary`, `gameplay no commentary` |
| Genre | Each selected genre | `horror game no commentary`, `RPG gameplay no commentary` |
| VideoType | Video type | `[game] boss fight`, `[game] speedrun`, `[game] all endings` |
@@ -276,6 +303,17 @@ per platform).
Game names are cleaned of characters YouTube splits tags on (`,` `;` `|`) and
of ™ / ® / ©.
**Boss name tag (v1.4.0)** — Boss Fight and Boss No Hit videos get the boss's
name as a tag of its own, right after the game's name, so fitting the list to
500 characters never drops it. Marks that add nothing to a search go: `,` `:`
`;` `!` `?` quotes, brackets, `&`, `「」` `・` `、`, ™, emoji. A dot is kept
between digits ("Phase 2.0"), dropped between initials ("S.T.A.L.K.E.R." →
`STALKER`) and a space anywhere else ("Mr. X" / "Mr.X" → `Mr X`); apostrophes
and hyphens stay inside a word ("Mergo's Wet Nurse", "T-103"). "Gael, Slave
Knight" → `Gael Slave Knight`. Over 30 characters, the name before its title is
used ("Loretta, Knight of the Haligtree" → `Loretta`), otherwise the leading
words that fit.
## ⚡ Faster Data Entry (v1.0.0)
- **Quick start** — at the top of the editor, pick a **channel profile** and
@@ -329,19 +367,39 @@ a pasted store link can each be undone from the toast they show.
- Dark and light themes; scrollbars can be hidden (v1.1.0); animated icons
follow the system's _reduce motion_; controls grow on touch screens.
### ♿ Accessibility (v1.5.1)
The statement is [ACCESSIBILITY.md](../ACCESSIBILITY.md) (also in the Legal
Center, in English and Vietnamese). In short:
- **Keyboard** — everything works without a mouse: skip link, visible focus,
dialogs that keep and return focus, the shortcuts below; the bare `?` can
be turned off (Settings › Editor › Single-key shortcuts, WCAG 2.1.4).
- **Screen readers** — named controls and labelled fields, announced
confirmations and errors, the new page's name read out after a navigation
(`RouteAnnouncer`), translated toast labels, and generated text marked with
its language (`lang`) so it is read with the right voice.
- **Vision** — both themes at WCAG AA text contrast, checked by
`tests/styles/contrast.test.ts`; white text sits on the darker
`accent-solid` / `danger-solid` fills; focus stays visible in Windows High
Contrast; desktop zoom with Ctrl/⌘ + = / − (`zoomHotkeysEnabled`).
- **Reporting** — the _Accessibility barrier_ issue form
(`.github/ISSUE_TEMPLATE/accessibility.yml`), or `contact@` with
`[Accessibility]`.
## 💾 Data Persistence
Everything stays on the device: the browser's storage for
`ytgenerator.stream` on the web, the app's own storage on desktop and
Android. There is no account and no server-side copy.
| Item | What it holds | Where |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| **Profile** — the channel | Channel name; contact emails (general, advertising, game keys, copyright); social and donate links; community links; Vietnamese bank / MoMo / ZaloPay details; rig; resolution, FPS and graphics preset; sponsors & partners text | Profiles › Profiles |
| **Game preset** — the game | Game name (+ per-language names); genres; platform; store links and their type (paid / free / demo); publisher / developer; content warnings; language patch; game version; art style; "no graphics settings"; series playlist | Profiles › Game presets |
| **Template** — the whole form | Every editor field | Profiles › Templates |
| **History** | One entry per video — game, video type, language, genres, title, description, tags. Saving the same video again updates its entry (v1.0.0) | History |
| **Draft** | The editor form, saved as you type | — |
| Item | What it holds | Where |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| **Profile** — the channel | Channel name; contact emails (general, advertising, game keys, copyright); social and donate links; community links; Vietnamese bank / MoMo / ZaloPay details; rig; resolution (and what it was upscaled from), FPS and graphics preset; sponsors & partners text | Profiles › Profiles |
| **Game preset** — the game | Game name (+ per-language names); genres; platform; store links and their type (paid / free / demo); publisher / developer; content warnings; language patch; game version; art style; "no graphics settings"; series playlist | Profiles › Game presets |
| **Template** — the whole form | Every editor field | Profiles › Templates |
| **History** | One entry per video — game, video type, language, genres, title, description, tags. Saving the same video again updates its entry (v1.0.0) | History |
| **Draft** | The editor form, saved as you type | — |
The field lists live in `src/config/library-fields.ts`. Profiles, presets and
templates export and import as JSON; History exports as **CSV** or JSON.
@@ -378,32 +436,35 @@ In **Settings › Backup & restore**:
| `Ctrl/⌘+Shift+C` | Copy All — same limits and Strict Mode rules as the Output page |
| `Ctrl/⌘+S` | Save the current output to History |
| `Ctrl/⌘+B` | Collapse / expand the sidebar |
| `Ctrl/⌘+/` or `?` | Show keyboard shortcuts (`?` only outside text fields) |
| `Alt+T` | Go to the notifications (while any are on screen) |
| `Ctrl/⌘+/` or `?` | Show keyboard shortcuts (`?` only outside text fields, while Settings › Editor › Single-key shortcuts is on) |
| `Ctrl/⌘+=` / `Ctrl/⌘+−` | Zoom in / out — desktop app (v1.5.1) |
| `Escape` | Close modal |
## 🔧 Settings
| Setting | Type | Default | Description |
| -------------------------- | ------------------------------- | ---------------- | ---------------------------------------------------------------------------------- |
| Theme | dark / light | dark | App color theme |
| Hide scrollbars | boolean | false | v1.1.0. No scrollbar anywhere in the app; wheel, touch and keyboard still scroll |
| App Language | SupportedLanguage | browser-detected | Language of the interface |
| Default Output Language | SupportedLanguage | browser-detected | Language a new draft starts in (first run, Start over) |
| Show Character Count | boolean | true | Display char counters on output. **Does not** affect copy blocking |
| Compact Tag Display | boolean | false | Tags as comma list vs chip display |
| Copy All includes the tags | boolean | false | v1.0.0. Copy All copies title, description, then tags |
| **Strict Mode** | boolean | **false** | v0.35.0. Blocks Generate / Copy / Export while any field has a hard error |
| Show quality badge | boolean | true | `[2K 60FPS]`-style badge in the title when resolution or FPS is above the defaults |
| Title order | game first / video first | game first | v1.0.0. "Hades — Part 3" or "Part 3 — Hades" |
| Quality badge position | prefix / middle / suffix | middle | Where the badge sits in the title |
| Segment separator | em dash / hyphen / colon / pipe | em dash | Characters come from each locale |
| Badge case | upper / lower | upper | "2K" or "2k" |
| Include Multilingual Tags | boolean | true | Add tags in the output language |
| Include Trending Tags | boolean | true | Add year-based trending tags |
| Hashtag Count | 1-3 | 3 | Number of hashtags to generate |
| Genre Playlists | map | `{}` | One playlist URL per genre (42), collapsed by default |
| History Limit | 10–500 | 100 | Max history entries to keep |
| Log Retention | 1–90 days | 7 | Log files older than this are deleted at boot |
| Setting | Type | Default | Description |
| -------------------------- | ------------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| Theme | dark / light | dark | App color theme |
| Hide scrollbars | boolean | false | v1.1.0. No scrollbar anywhere in the app; wheel, touch and keyboard still scroll |
| App Language | SupportedLanguage | browser-detected | Language of the interface |
| Default Output Language | SupportedLanguage | browser-detected | Language a new draft starts in (first run, Start over) |
| Show Character Count | boolean | true | Display char counters on output. **Does not** affect copy blocking |
| Compact Tag Display | boolean | false | Tags as comma list vs chip display |
| Copy All includes the tags | boolean | false | v1.0.0. Copy All copies title, description, then tags |
| Single-key shortcuts | boolean | true | v1.5.1. `?` opens the shortcut list outside text fields; off leaves Ctrl/⌘ + / only (speech input, stray key presses) |
| **Strict Mode** | boolean | **false** | v0.35.0. Blocks Generate / Copy / Export while any field has a hard error |
| Show quality badge | boolean | true | `[2K 60FPS]`-style badge in the title when resolution or FPS is above the defaults; `[4K Upscaled]` for an upscaled video (v1.5.0) |
| Title order | game first / video first | game first | v1.0.0. "Hades — Part 3" or "Part 3 — Hades" |
| Quality badge position | prefix / middle / suffix | middle | Where the badge sits in the title |
| Segment separator | em dash / hyphen / colon / pipe | em dash | Characters come from each locale |
| Badge case | upper / lower | upper | "2K" or "2k" |
| Include Multilingual Tags | boolean | true | Add tags in the output language |
| Include Trending Tags | boolean | true | Add year-based trending tags |
| Hashtag Count | 1-3 | 3 | Number of hashtags to generate |
| Genre Playlists | map | `{}` | One playlist URL per genre (42), collapsed by default |
| History Limit | 10–500 | 100 | Max history entries to keep |
| Log Retention | 1–90 days | 7 | Log files older than this are deleted at boot |
"Browser-detected" means the browser's language when it is one of the eight,
otherwise English. `Default Genre` and `Auto-save Draft` were removed in
+57 -6
View File
@@ -49,13 +49,52 @@ If `TURNSTILE_SECRET` is missing the gate **fails open** (the site stays up and
- **`/.well-known/security.txt`** (RFC 9116) is regenerated on every build, so `Expires` is always about six months ahead.
- **Legal pages** are rendered from the repository's Markdown at build time, to static `/legal/*.html` and to a lazy chunk for the in-app Legal Center.
## Rate limiting
Two layers, cheapest first. Both count per client IP — before the gate there is no other identity — so the limits are generous enough for several people behind one shared address (mobile carrier NAT, an office, a school).
| Layer | Configured in | Counts | Limit | Over the limit |
| ----------------------------- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------------------ |
| 1. WAF rate limiting rule | Cloudflare dashboard, [by hand](#waf-rate-limiting-rule-one-time) | Every request at the edge except `/assets/*`, per IP; verified bots (search engines) excluded | 60 / 10 s | Cloudflare's own `429` page (error 1015) for 10 s. The Worker never runs, so a blocked flood costs nothing |
| 2. Worker `RATE_LIMIT` | `wrangler.jsonc` › `ratelimits`, checked first in [`worker/rate-limit.ts`](../worker/rate-limit.ts) | Every request the Worker handles — the gate page, the app shell, legal pages, `/__gate/*`, any method — per IPv4 address or IPv6 /64 | 120 / 60 s | `429` plain text, `Retry-After: 60`, `Cache-Control: no-store`, the baseline headers; nothing else runs |
| 2. Worker `VERIFY_RATE_LIMIT` | `wrangler.jsonc` › `ratelimits` | `POST /__gate/verify`, on top of `RATE_LIMIT` | 10 / 60 s | `429` JSON `{"ok":false,"error":"rate-limited"}` before any siteverify call; the gate page shows its "try again" message |
- **Approximate, per location.** The Workers Rate Limiting API keeps its counters per Cloudflare location and updates them asynchronously, so a burst can pass the limit by a little. It turns a flood from one client into cheap `429`s; it is not a quota. Many addresses at once (a botnet) are the job of the WAF, Bot Fight Mode and the Turnstile gate itself.
- **IPv6 by /64.** One connection usually holds a whole /64, so counting single addresses would let a client rotate past the limit.
- **Fails open**, like the gate: a missing binding or a failing `limit()` call lets the request through and logs once per isolate.
- **Not counted by the Worker**: `/assets/*` and the public files that skip the Worker (see [Request flow](#request-flow)). Static-asset requests are free and are not Worker invocations; only the WAF rule sees them.
- **Changing a limit**: edit `limit` in `wrangler.jsonc` and merge. `period` may only be 10 or 60 and must equal `RATE_LIMIT_PERIOD_SECONDS` in [`worker/env.ts`](../worker/env.ts) (it is the `Retry-After`); `namespace_id` must be unique in the Cloudflare account, and changing it starts the counters from zero. `tests/worker/rate-limit.test.ts` checks the bindings against the code.
- **Seeing it work**: the bindings don't appear in the dashboard. The Worker's `429`s are in its logs (Observability); the WAF's blocks are under Security › Events.
### WAF rate limiting rule (one-time)
The zone is on the Free plan, which allows **one** rate limiting rule: counted by IP, over 10 seconds, blocking for 10 seconds, with Cloudflare's default response (a custom response needs Pro). It runs at the edge before the Worker, so it is the first layer.
1. Cloudflare dashboard › `ytgenerator.stream` › **Security** › **Security rules** › **Create rule** › **Rate limiting rules**.
2. **Rule name**: `Flood guard`.
3. **If incoming requests match** › **Edit expression**:
```txt
(not http.request.uri.path contains "/assets/" and not cf.bot_management.verified_bot)
```
In the builder that is _URI Path_ · _does not contain_ · `/assets/` **And** _Verified Bot_ · _equals_ · Off. Content-hashed build output is left out because a first visit fetches dozens of those files at once and a returning browser caches them for a year; verified bots so that search engines are never blocked.
4. **With the same characteristics**: IP (the only choice on Free).
5. **When rate exceeds**: **Requests** `60`, **Period** 10 seconds. A page load is about five counted requests (the page, `theme-init.js`, favicon, manifest, an icon), so 60 is a dozen reloads in ten seconds.
6. **Then take action**: **Block**; **Duration** 10 seconds.
7. **Deploy**.
If the dashboard refuses the expression, match all incoming requests instead and raise **Requests** to `100` — a first visit with an empty cache is about 40 requests once the build output counts (measured on the v1.3.2 build: the page, `theme-init.js` and 33 files under `/assets/`, plus favicon and manifest).
## Configuration and secrets
| Name | Kind | Where |
| -------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `TURNSTILE_SITE_KEY` | public var | `wrangler.jsonc` |
| `GATE_TTL_SECONDS` | public var | `wrangler.jsonc` |
| `TURNSTILE_SECRET` | **Secret** | Cloudflare dashboard (Worker › Settings › Variables and Secrets) or `npx wrangler secret put TURNSTILE_SECRET`. Never committed |
| Name | Kind | Where |
| --------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `TURNSTILE_SITE_KEY` | public var | `wrangler.jsonc` |
| `GATE_TTL_SECONDS` | public var | `wrangler.jsonc` |
| `TURNSTILE_SECRET` | **Secret** | Cloudflare dashboard (Worker › Settings › Variables and Secrets) or `npx wrangler secret put TURNSTILE_SECRET`. Never committed |
| `RATE_LIMIT`, `VERIFY_RATE_LIMIT` | rate limit bindings | `wrangler.jsonc` › `ratelimits` (see [Rate limiting](#rate-limiting)) |
It must be a **Secret**, not a plain-text variable: `wrangler deploy` removes plain-text variables that `wrangler.jsonc` doesn't declare, and keeps secrets.
@@ -65,11 +104,12 @@ The custom domain is declared in `routes` because `wrangler deploy` detaches any
These live in Cloudflare, not in the repository:
1. **Workers Builds** — build command empty (`wrangler.jsonc` runs `npm run build`), deploy command `npx wrangler deploy`, non-production deploy command `npx wrangler versions upload`. Root directory `/`; Node comes from `.node-version`.
1. **Workers Builds** — build command empty (`wrangler.jsonc` runs `npm run build`), deploy command `npx wrangler deploy`, non-production deploy command `npx wrangler versions upload`. Root directory `/`; Node 26 comes from `.node-version`, and the build variable `NODE_VERSION=26` says the same.
2. **Turnstile widget** — hostname `ytgenerator.stream` (add the `workers.dev` subdomain if preview URLs should pass the gate).
3. **Web Analytics** — the manual beacon is used; turn off _automatic setup_ for the hostname so visits aren't counted twice.
4. **Redirect rule** — `www.ytgenerator.stream/*` → `concat("https://ytgenerator.stream", http.request.uri.path)`, 301, preserving the query string.
5. **HSTS** — enabled at the zone with `includeSubDomains` and `preload`.
6. **WAF rate limiting rule** — `Flood guard`, 60 requests per 10 s per IP outside `/assets/`; see [WAF rate limiting rule](#waf-rate-limiting-rule-one-time).
## Local development
@@ -98,3 +138,14 @@ curl -s https://ytgenerator.stream/.well-known/security.txt
curl -sI https://ytgenerator.stream/legal/privacy # public, script-free CSP
curl -sI https://www.ytgenerator.stream/x?y=1 # 301 to https://ytgenerator.stream/x?y=1
```
Rate limits: a burst from one address should turn into `429`s. This locks that address out of the site for up to a minute.
```bash
# Worker layer: about 120 × 200, then 429 with Retry-After: 60
for i in $(seq 1 130); do curl -s -o /dev/null -w "%{http_code}\n" https://ytgenerator.stream/; done | sort | uniq -c
# verify: 403 (foreign Origin) ten times, then 429 — no siteverify call is made
for i in $(seq 1 12); do curl -s -o /dev/null -w "%{http_code}\n" -X POST -H "Origin: https://example.com" -H "Content-Type: application/json" -d "{}" https://ytgenerator.stream/__gate/verify; done | sort | uniq -c
```
With the WAF rule in place, a fast enough burst (more than 60 in 10 s) is stopped at the edge first: Cloudflare's `429` (error 1015) instead of the Worker's.
+1 -1
View File
@@ -341,7 +341,7 @@ npm run typecheck && npm run typecheck:all
## Locale Validation Script
The `scripts/validate-locales.ts` script checks every locale folder against
`_schema.json`. At v1.2.0 (1,264 UI + 584 template keys per locale):
`_schema.json`. At v1.3.0 (1,264 UI + 584 template keys per locale):
```
✓ en/ui.json — 1264/1264 keys
+29 -12
View File
@@ -2,7 +2,7 @@
## YTDescGen — Tauri 2 Desktop and Android Apps
Reflects **v1.2.0**: Windows, macOS (Apple silicon) and Linux desktop apps plus an Android APK, all built from the same Tauri 2 project in `src-tauri/`. The web app is deployed separately — see [HOSTING.md](HOSTING.md).
Reflects **v1.5.2**: Windows, macOS (Apple silicon) and Linux desktop apps plus an Android APK, all built from the same Tauri 2 project in `src-tauri/`. The web app is deployed separately — see [HOSTING.md](HOSTING.md).
---
@@ -22,7 +22,7 @@ The maintainer already knew Rust from the Tauri / build-tooling ecosystem; the s
## Prerequisites
- **Rust** (stable) via [rustup](https://rustup.rs/).
- **Node.js 22** (`.node-version`) and npm.
- **Node.js 26** (`.node-version`) and npm 11.
- **Tauri CLI** — the npm package `@tauri-apps/cli` is a pinned dev dependency, so `npm run tauri …` (or `npm run tauri:dev` / `npm run tauri:build`) needs nothing else. The cargo CLI (`cargo install tauri-cli --version "^2" --locked`, then `cargo tauri …`) works the same way; the Android release job uses it.
- **Platform tools**:
- Windows: Microsoft C++ Build Tools. WebView2 ships with Windows 10/11; the installers bootstrap it where it is missing (`webviewInstallMode: downloadBootstrapper`).
@@ -62,7 +62,7 @@ The icons come from the one brand logo: `npx tauri icon assets/brand/logo.svg` r
{
"$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-cli/schema.json",
"productName": "YTDescGen",
"version": "1.2.0",
"version": "1.5.2",
"identifier": "com.skullmute.ytdescgen",
"build": {
"beforeBuildCommand": "npm run build",
@@ -81,7 +81,8 @@ The icons come from the one brand logo: `npx tauri icon assets/brand/logo.svg` r
"resizable": true,
"maximizable": true,
"fullscreen": false,
"center": true
"center": true,
"zoomHotkeysEnabled": true
}
],
"security": {
@@ -103,6 +104,9 @@ The icons come from the one brand logo: `npx tauri icon assets/brand/logo.svg` r
"android": {
"minSdkVersion": 30
},
"macOS": {
"minimumSystemVersion": "11.0"
},
"windows": {
"webviewInstallMode": {
"type": "downloadBootstrapper"
@@ -135,12 +139,14 @@ Notes:
```json
{
"identifier": "default",
"description": "Default capabilities for YTDescGen. File access goes through the app's own name-only commands and native dialogs run from Rust, so the webview gets no dialog, fs or shell permissions.",
"description": "Default capabilities for YTDescGen. File access goes through the app's own name-only commands and native dialogs run from Rust, so the webview gets no dialog, fs or shell permissions. set-webview-zoom backs the Ctrl/Cmd +/- zoom polyfill Tauri injects on macOS and Linux (zoomHotkeysEnabled).",
"windows": ["main"],
"permissions": ["core:default", "opener:default"]
"permissions": ["core:default", "core:webview:allow-set-webview-zoom", "opener:default"]
}
```
`zoomHotkeysEnabled` (v1.5.1) lets the desktop app zoom with Ctrl/⌘ + = and Ctrl/⌘ + − (WebView2's own zoom control on Windows, which also takes Ctrl + mouse wheel; a polyfill on macOS and Linux that calls `set_webview_zoom`, hence the permission). Android has no zoom hotkeys; pinch zoom works there.
The webview can call Tauri's core APIs, the opener plugin (external links open in the system browser, mail client or dialler) and the app's own commands — nothing else. v1.0.0 removed the `fs` and `shell` plugins and their permissions. `tauri-plugin-dialog` is still a dependency, but only Rust uses it: the webview has no dialog permission and no dialog JavaScript package. (`tauri-plugin-fs` still appears in `Cargo.lock` as a dependency of the dialog plugin; the app does not register it.)
### 3. Rust Backend (src-tauri/src)
@@ -205,10 +211,10 @@ The commands:
What makes them safe:
- **Names, not paths.** `storage.rs` builds every path itself, under Tauri's `app_data_dir()`, from a name that must match `ytdescgen-<lowercase letters, digits, hyphens>.json` (at most 100 bytes) for backups or `ytdescgen-YYYYMMDD.jsonl` for logs. Anything else — `..`, separators, other extensions — is rejected before a path exists.
- **Dialogs run in Rust.** `file_dialog.rs` accepts only the extensions `json`, `jsonl`, `txt`, `csv` and `md`; reduces a suggested name to its file name (`../../x/backup.json` → `backup.json`); makes a saved file end in an allowed extension (`backup` → `backup.json`, `backup.exe` → `backup.exe.json`); and refuses imports over 20 MB or that are not UTF-8 (a byte-order mark is stripped). The chosen path never passes through JavaScript. On desktop the dialog is attached to the app window.
- **Dialogs run in Rust.** `file_dialog.rs` accepts only the extensions `json`, `jsonl`, `txt`, `csv` and `md`; reduces a suggested name to its file name (`../../x/backup.json` → `backup.json`); makes a saved file end in an allowed extension (`backup` → `backup.json`, `backup.exe` → `backup.exe.json`); and refuses imports over 20 MB or that are not UTF-8 (a byte-order mark is stripped). The chosen path never passes through JavaScript. On desktop the dialog is attached to the app window. Both commands are `async` and run the dialog and the file I/O through `tauri::async_runtime::spawn_blocking`: the dialogs' blocking API must stay off the main thread, and blocking work must not hold one of the async runtime's workers (SonarCloud `rust:S7493`).
- **Removed in v1.0.0**: the five commands that read, wrote, appended to, listed and deleted any path the webview sent (`save_to_file`, `read_from_file`, `append_to_file`, `list_dir`, `delete_file`), and the fs and shell plugins.
Both modules have unit tests (`cargo test` in `src-tauri/`): the name rules, path rejection, backup pruning, legacy recovery, dialog filters and the import checks.
Both modules have unit tests (`cargo test` in `src-tauri/`): the name rules, path rejection, backup pruning, legacy recovery, dialog filters, writing the picked file and the import checks.
### 4. Frontend Tauri Integration
@@ -293,7 +299,9 @@ npm run build
npm run tauri:build
```
The Tauri CLI runs `npm run build` first (`beforeBuildCommand`) with `TAURI_ENV_PLATFORM` set, which switches Vite to the Tauri build: `es2020` target, the Legal Center content only, and no static legal pages, `security.txt` or analytics beacon.
The Tauri CLI runs `npm run build` first (`beforeBuildCommand`) with `TAURI_ENV_PLATFORM` set, which switches Vite to the Tauri build: the Legal Center content only, and no static legal pages, `security.txt` or analytics beacon.
**Supported WebViews.** Since v1.3.0 both builds use Vite's default target, `baseline-widely-available` — the same engines the website supports: Chromium 111, Safari 16.4, Firefox 114 (Tauri builds were lowered to `es2020` before; the stylesheet's cascade layers already needed Chromium 99+ / Safari 15.4+, so an older WebView showed the app unstyled anyway). In practice: WebView2 on Windows (it updates itself), macOS 11 or later with current Safari updates (the app is Apple silicon only, and `bundle.macOS.minimumSystemVersion` says 11.0), WebKitGTK 2.40 or later on Linux, and on Android 11+ an Android System WebView kept current through Google Play. TypeScript keeps the app's code to the same floor: `lib` in `tsconfig.json` is ES2022, since Vite lowers syntax but never polyfills built-ins.
Output file names, with the v1.1.0 release sizes:
@@ -327,7 +335,7 @@ The desktop build is a three-platform matrix; `tauri-apps/tauri-action` builds e
| Runner | Target | Output |
| ---------------- | -------------------------- | --------------------------- |
| `windows-latest` | `x86_64-pc-windows-msvc` | `.msi`, `.exe` (NSIS) |
| `macos-14` | `aarch64-apple-darwin` | `.app.tar.gz` |
| `macos-15` | `aarch64-apple-darwin` | `.app.tar.gz` |
| `ubuntu-latest` | `x86_64-unknown-linux-gnu` | `.AppImage`, `.deb`, `.rpm` |
Linux runners install `libwebkit2gtk-4.1-dev`, `libgtk-3-dev`, `libayatana-appindicator3-dev`, `librsvg2-dev` and `patchelf` before building — Tauri's webview and AppImage tooling need them. AppImage bundling runs with `APPIMAGE_EXTRACT_AND_RUN=1` (linuxdeploy needs FUSE, which hosted runners don't reliably provide) and `NO_STRIP=true`.
@@ -337,7 +345,7 @@ Linux runners install `libwebkit2gtk-4.1-dev`, `libgtk-3-dev`, `libayatana-appin
**macOS notes (v0.9.1+):**
- **DMG bundling is skipped** (`--bundles app`). Tauri's DMG bundler runs an AppleScript that flakes intermittently on hosted macOS runners (the headless display can't load Finder fast enough for `osascript` to position icons), so we ship a `.app.tar.gz` instead. Users expand the archive and drag the `.app` into `/Applications`.
- **Intel macOS (`macos-13`) is NOT built.** GitHub started deprecating the `macos-13` free runner pool in 2025; jobs queue indefinitely. If Intel support becomes a priority, switch the macos-14 entry's target to `universal-apple-darwin` (Tauri builds both archs and lipos them into one universal binary) — the runner already has the toolchain capacity.
- **Intel macOS (`macos-13`) is NOT built.** GitHub started deprecating the `macos-13` free runner pool in 2025; jobs queue indefinitely. If Intel support becomes a priority, switch the macos-15 entry's target to `universal-apple-darwin` (Tauri builds both archs and lipos them into one universal binary) — the runner already has the toolchain capacity.
**Code signing is intentionally skipped** for both Windows and macOS — this is an open-source personal tool, and signing certificates carry recurring cost. End users will see the standard "unverified publisher" / "unidentified developer" prompts on first launch. Document the bypass steps in the release notes if needed. (The Android APK is signed — see below.)
@@ -365,6 +373,13 @@ is gated behind `#[cfg(desktop)]` so the library compiles for Android.
| **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). |
**No cloud backup of app data.** `AndroidManifest.xml` sets
`android:allowBackup="false"` (since v1.3.0): Android's backup to Google Drive
never copies the app's data — profiles, presets, templates, history and
settings in the WebView's `localStorage` — so it stays on the device, as the
Privacy Policy says. To move to a new phone, use **Settings › Backup &
restore**: back up to a file, then restore it on the new 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
@@ -382,7 +397,9 @@ directly if you change the floor without re-running `init`.
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.
up-to-date WebView. Since v1.3.0 the app needs a WebView at least as new as
Chromium 111, the same floor as the website, so a WebView that has never
been updated cannot run it.
- **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
+54 -2
View File
@@ -2,7 +2,7 @@
## YTDescGen — Phased Development Plan
> **Status (2026-10-12): v1.2.0 is the current release.** Phases 1–4 are the original
> **Status (2026-11-10): v1.5.2 is the current release.** Phases 1–4 are the original
> plan, kept as a record; notes added beside or under an item say what has
> changed since. Every release is listed in [CHANGELOG.md](../CHANGELOG.md).
> What's next: Phase 5 and the backlog at the end of this page.
@@ -321,6 +321,58 @@ frame-generation artifacts; a test that every warning and tech note is
translated; third-party notices, REUSE and the docs brought in line with the
code — [CHANGELOG.md](../CHANGELOG.md#v120--2026-10-12).
## v1.3.0 — Toolchain ✅ SHIPPED 2026-10-22
TypeScript 7 (target ES2025), Node 26, React 19 refs, two rounds of
dependency updates with five security alerts closed, SonarCloud at 0 open
issues, Android app data kept out of cloud backups —
[CHANGELOG.md](../CHANGELOG.md#v130--2026-10-22). Next for the toolchain:
ES2026 once TypeScript 7.1 is stable.
## v1.3.1 — Maintenance ✅ SHIPPED 2026-10-26
Tauri 2.12.4, the desktop's Save / Open dialogs off the async workers,
SonarCloud in CI with coverage, and this week's dependency updates with the
one open security alert closed —
[CHANGELOG.md](../CHANGELOG.md#v131--2026-10-26).
## v1.3.2 — Rate limiting ✅ SHIPPED 2026-10-27
The website answers floods with `429`: per-client limits in the Cloudflare
Worker (Workers Rate Limiting bindings), behind a WAF rate limiting rule at
the zone —
[CHANGELOG.md](../CHANGELOG.md#v132--2026-10-27).
## v1.4.0 — LUT field, boss name tag ✅ SHIPPED 2026-11-06
A **LUT** field in My Rig, printed on its own line under the video editor
(DaVinci Resolve's own LUTs offered while typing), the **boss's name as a
tag** in Boss Fight and Boss No Hit videos, and this week's dependency
updates — [CHANGELOG.md](../CHANGELOG.md#v140--2026-11-06).
## v1.5.0 — Upscaled video ✅ SHIPPED 2026-11-08
**Upscaled from** in Video settings, for footage upscaled in the video
editor: a `[4K Upscaled]` title badge, an `Upscale: 1440p → 4K (…)` line in
Video settings and an automatic tech note that fine detail may differ from
the original image — [CHANGELOG.md](../CHANGELOG.md#v150--2026-11-08).
## v1.5.1 — Accessibility ✅ SHIPPED 2026-11-09
An accessibility statement ([ACCESSIBILITY.md](../ACCESSIBILITY.md), also in
the Legal Center) and the fixes an audit against WCAG 2.2 AA turned up: AA
contrast in both themes, generated text marked with its language, the page's
name read out after a navigation, a switch for the single-key `?` shortcut,
and zoom hotkeys in the desktop app —
[CHANGELOG.md](../CHANGELOG.md#v151--2026-11-09).
## v1.5.2 — Maintenance ✅ SHIPPED 2026-11-10
Tauri 2.12.5 with the fixes its window, webview and single-instance layers
collected, and this week's dependency updates; i18next stays on 26.6 to keep
the initial load inside its budget —
[CHANGELOG.md](../CHANGELOG.md#v152--2026-11-10).
---
## Phase 5 — Extensions & Ecosystem (Priority: P2-P3)
@@ -398,4 +450,4 @@ Ideas carried over from the v1.0.0 planning — not scheduled.
| Phase 5 | Extensions | Ongoing | — |
**MVP usable after Phase 1** (~3-4 days). Full-featured after Phase 3 (~7-10 days).
**v1.0.0 shipped on 2026-09-30; the current release is v1.2.0 (2026-10-12).**
**v1.0.0 shipped on 2026-09-30; the current release is v1.5.2 (2026-11-10).**
+95 -56
View File
@@ -2,7 +2,7 @@
## YTDescGen — Implementation Details
Reflects **v1.2.0**. The module map and data flow are in [ARCHITECTURE.md](ARCHITECTURE.md), the desktop and Android builds in [PACKAGING.md](PACKAGING.md), and running the web deployment (Cloudflare Worker, Turnstile, secrets, rollback) in [HOSTING.md](HOSTING.md).
Reflects **v1.5.2**. The module map and data flow are in [ARCHITECTURE.md](ARCHITECTURE.md), the desktop and Android builds in [PACKAGING.md](PACKAGING.md), and running the web deployment (Cloudflare Worker, Turnstile, secrets, rollback) in [HOSTING.md](HOSTING.md).
---
@@ -13,10 +13,13 @@ Reflects **v1.2.0**. The module map and data flow are in [ARCHITECTURE.md](ARCHI
```json
{
"name": "yt-desc-gen",
"version": "1.2.0",
"version": "1.5.2",
"private": true,
"license": "Apache-2.0",
"type": "module",
"engines": {
"node": ">=26"
},
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
@@ -50,50 +53,51 @@ Reflects **v1.2.0**. The module map and data flow are in [ARCHITECTURE.md](ARCHI
"dependencies": {
"@fontsource-variable/inter": "^5.3.0",
"@fontsource-variable/jetbrains-mono": "^5.3.0",
"@tauri-apps/api": "^2.12.0",
"@tauri-apps/plugin-opener": "^2.7.0",
"@tauri-apps/api": "^2.12.4",
"@tauri-apps/plugin-opener": "^2.7.2",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"i18next": "^26.4.2",
"i18next-resources-to-backend": "^1.2.3",
"lucide-react": "^1.49.0",
"motion": "^13.4.6",
"radix-ui": "^1.6.7",
"react": "^19.3.0",
"react-dom": "^19.3.0",
"react-i18next": "^17.0.15",
"react-router-dom": "^7.18.4",
"simple-icons": "^16.33.0",
"i18next": "~26.6.0",
"i18next-resources-to-backend": "^1.2.4",
"lucide-react": "^1.66.0",
"motion": "^13.5.1",
"radix-ui": "^1.8.1",
"react": "^19.3.1",
"react-dom": "^19.3.1",
"react-i18next": "^17.1.11",
"react-router-dom": "^7.18.5",
"simple-icons": "^16.36.0",
"sonner": "^2.0.8",
"zustand": "^5.0.15"
"zustand": "^5.0.16"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@resvg/resvg-js": "2.6.2",
"@tailwindcss/postcss": "^4.3.3",
"@tauri-apps/cli": "2.12.0",
"@tailwindcss/postcss": "^4.3.4",
"@tauri-apps/cli": "2.12.4",
"@testing-library/jest-dom": "^7.0.1",
"@testing-library/react": "^16.3.3",
"@types/node": "^26.6.3",
"@types/node": "^26.6.6",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"@vitejs/plugin-react": "^6.1.1",
"@vitest/coverage-v8": "^4.1.11",
"autoprefixer": "^10.6.1",
"eslint": "^10.11.0",
"@typescript/native": "npm:typescript@^7.0.2",
"@vitejs/plugin-react": "^6.2.1",
"@vitest/coverage-v8": "^4.1.12",
"autoprefixer": "^10.6.2",
"eslint": "^10.14.0",
"eslint-plugin-react-hooks": "^7.1.1",
"knip": "^6.38.0",
"marked": "18.0.14",
"postcss": "^8.5.28",
"prettier": "^3.9.9",
"knip": "^6.44.1",
"marked": "18.1.3",
"postcss": "^8.5.32",
"prettier": "^3.9.10",
"prettier-plugin-tailwindcss": "^0.8.1",
"tailwindcss": "^4.3.3",
"tsx": "^4.23.15",
"typescript": "^5.9.3",
"typescript-eslint": "^8.71.0",
"vite": "^8.3.1",
"vitest": "^4.1.11",
"wrangler": "4.144.0"
"typescript": "npm:@typescript/typescript6@^6.0.2",
"typescript-eslint": "^8.72.1",
"vite": "^8.3.5",
"vitest": "^4.1.12",
"wrangler": "4.156.2"
}
}
```
@@ -103,21 +107,37 @@ Notes:
- **UI stack**: React 19, React Router 7, Zustand 5, i18next 26 / react-i18next 17, Radix primitives through the single `radix-ui` package (Dialog, AlertDialog, Popover, Tooltip, Tabs, Switch, Checkbox, ToggleGroup, Slot), Motion (loaded through `LazyMotion`), cmdk for the command palette, sonner for toasts (react-hot-toast is gone), lucide-react 1.x for UI icons and simple-icons (CC0-1.0) for the brand marks lucide 1.x dropped.
- **Tauri on the JavaScript side** is only `@tauri-apps/api` (for `invoke`) and `@tauri-apps/plugin-opener`. There are no dialog, fs or shell plugin packages: file access goes through the app's own Rust commands (see [PACKAGING.md](PACKAGING.md)). `@tauri-apps/cli` is pinned exactly, and `npm run check:tauri` keeps the npm packages on the same major.minor as the crates.
- **Build-time only**: `marked` renders the legal documents and `@resvg/resvg-js` rasterises the brand assets; neither ships in the app. `wrangler` is pinned exactly for `cf:dev` / `cf:check`.
- **i18next stays on 26.6.x** (`~26.6.0`, and a Dependabot ignore for 26.7.x): 26.7 adds the debug-mode warnings for the move to v27 — about 1.9 KB gzip that would take the initial load over its 280 KB budget. The tilde and the ignore go with the i18next 27 migration (`.github/dependabot.yml` has the note).
- **Fonts** are self-hosted: `@fontsource-variable/inter` and `@fontsource-variable/jetbrains-mono` are imported in `src/main.tsx`, and each subset (latin, latin-ext, vietnamese, …) is fetched only when a page uses it.
- **Node 22** comes from `.node-version`, which CI, the release workflows and Cloudflare Workers Builds all read.
- **TypeScript 7** checks types: `@typescript/native` is an npm alias for `typescript@7`, the native compiler, and supplies `tsc`. TypeScript 7.0 ships no JavaScript API, so `typescript` is an alias for `@typescript/typescript6` — the TypeScript 6.0 API that typescript-eslint loads (its peer range stops below 6.1), plus `tsc6`. Both are Microsoft's documented side-by-side setup. `@typescript/typescript6` pulls TypeScript 6 in as `@typescript/old`, which ships a `tsc` too; CI fails if the `tsc` on `PATH` is not 7.x. Dependabot may not follow `npm:` aliases, so TypeScript bumps can be manual.
- **Node 26** comes from `.node-version`, which CI, the release workflows and Cloudflare Workers Builds all read; `engines.node` says `>=26`. Vitest runs its workers with `--no-experimental-webstorage`: Node 25+ defines a `localStorage` global that is `undefined` without `--localstorage-file`, and zustand's `persist` crashes on it instead of falling back to memory.
- **Installs skip lifecycle scripts** in every workflow (`npm ci --ignore-scripts`). The three packages that have one — esbuild, workerd, fsevents — take their native binary from `optionalDependencies`.
### tsconfig.json
```json
```jsonc
{
"compilerOptions": {
"target": "ES2020",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
// The newest ECMAScript year that TypeScript 7.0, esbuild (tsx, wrangler)
// and Vite all understand. ES2026 arrives with TypeScript 7.1.
"target": "ES2025",
// `lib` is the runtime floor, not the syntax target. Vite lowers syntax but
// never polyfills, so a built-in typed here must exist in every engine the
// app supports: Vite's `baseline-widely-available` — Chrome 111, Safari
// 16.4, Firefox 114 (ES2023's copy-array methods need Firefox 115). Raise it
// when that floor moves. Code that runs on Node or workerd gets the newer
// lib in tsconfig.check.json.
"lib": ["ES2022", "DOM"],
// TypeScript 6+ no longer loads every installed @types package. The app
// needs none: `vite/client` comes in through src/vite-env.d.ts.
"types": [],
"module": "ESNext",
"skipLibCheck": true,
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"erasableSyntaxOnly": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",
@@ -128,7 +148,6 @@ Notes:
"noUncheckedIndexedAccess": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@config/*": ["./src/config/*"],
@@ -138,14 +157,14 @@ Notes:
"@components/*": ["./src/components/*"],
"@pages/*": ["./src/pages/*"],
"@utils/*": ["./src/utils/*"],
"@i18n/*": ["./src/i18n/*"]
}
"@i18n/*": ["./src/i18n/*"],
},
},
"include": ["src"]
"include": ["src"],
}
```
`tsconfig.json` covers only `src/` — what `vite build` compiles. `tsconfig.check.json` extends it for `npm run typecheck:all`: it adds `tests`, `scripts`, `worker` and `build-plugins`, plus the `vitest/globals` and `node` types those need.
`tsconfig.json` covers only `src/` — what `vite build` compiles. `tsconfig.check.json` extends it for `npm run typecheck:all`: it adds `tests`, `scripts`, `worker` and `build-plugins`, the `vitest/globals` and `node` types those need, and `lib: ["ES2025", "DOM"]` — they run on Node 26 or workerd, not in the app's browsers. There is no `baseUrl` (TypeScript 7 dropped it); `paths` are relative. `erasableSyntaxOnly` keeps out the TypeScript syntax that only TypeScript can emit (enums, namespaces, parameter properties), which Oxc, esbuild and Node's type stripping all rely on.
### vite.config.ts
@@ -189,8 +208,9 @@ export default defineConfig({
watch: { ignored: ["**/src-tauri/**", "**/.wrangler/**"] },
},
build: {
// Old Android System WebViews choke on Vite's modern default target.
target: isTauri ? "es2020" : undefined,
// No `target`: both builds use Vite's default, `baseline-widely-available`
// (Chrome 111, Safari 16.4, Firefox 114) — the floor tsconfig's `lib` holds.
//
// The Tauri CSP allows only 'self' for images and fonts: no data: URIs.
assetsInlineLimit: 0,
// Full license texts of the bundled packages, linked from the
@@ -223,7 +243,7 @@ What differs between the two builds:
| Legal documents | `virtual:legal-docs` (lazy chunk for the Legal Center) **and** static `dist/legal/<id>.html` (+ `<id>.vi.html`, `index.html`) | `virtual:legal-docs` only |
| `/.well-known/security.txt` | Generated on every build (RFC 9116, `Expires` 180 days ahead) | — |
| Cloudflare Web Analytics beacon | Injected before `</body>` of `index.html` (build only, never in `npm run dev`) | — |
| JS target | Vite default | `es2020` |
| JS target | Vite default (`baseline-widely-available`) | the same (before v1.3.0: `es2020`) |
`build-plugins/legal-docs.ts` renders the repository's legal files (`TERMS.md`, `PRIVACY.md`, `DISCLAIMER.md` + `docs/i18n/vi/DISCLAIMER.md`, `LICENSE`, `THIRD_PARTY_NOTICES.md`, `SECURITY.md`, `NOTICE`, `CODE_OF_CONDUCT.md`; list in `src/config/legal.ts`) with `marked` at build time. `build-plugins/web-only.ts` holds the analytics snippet and the `security.txt` generator.
@@ -288,6 +308,10 @@ The only Cloudflare file in the repository; Workers Builds runs `npx wrangler de
"!/404.html"
]
},
"ratelimits": [
{ "name": "RATE_LIMIT", "namespace_id": "1001", "simple": { "limit": 120, "period": 60 } },
{ "name": "VERIFY_RATE_LIMIT", "namespace_id": "1002", "simple": { "limit": 10, "period": 60 } }
],
"vars": {
"TURNSTILE_SITE_KEY": "0x4AAAAAAFKFAMUx9rQ5H6bQ",
"GATE_TTL_SECONDS": "86400"
@@ -296,9 +320,9 @@ The only Cloudflare file in the repository; Workers Builds runs `npx wrangler de
}
```
Every request goes through the Worker first except content-hashed build output and the public files browsers and crawlers fetch without cookies. `not_found_handling` is `404-page`, not the SPA fallback, so no path can reach `index.html` without passing the gate. `TURNSTILE_SECRET` is a dashboard Secret, never committed. Request flow, cookies, headers and operations: [HOSTING.md](HOSTING.md).
Every request goes through the Worker first except content-hashed build output and the public files browsers and crawlers fetch without cookies. `not_found_handling` is `404-page`, not the SPA fallback, so no path can reach `index.html` without passing the gate. `TURNSTILE_SECRET` is a dashboard Secret, never committed. The two `ratelimits` bindings (Workers Rate Limiting API, v1.3.2) cap each client — an IPv4 address or an IPv6 /64 — at 120 Worker requests and 10 verify calls a minute, behind the zone's WAF rate limiting rule. Request flow, cookies, headers, rate limits and operations: [HOSTING.md](HOSTING.md).
The Worker (`worker/`): `index.ts` (entry; injects the clock, `fetch` and random ids), `router.ts` (routing), `env.ts` (bindings, constants, the gate lifetime clamped to 5 min – 30 days), `turnstile.ts` (siteverify call and verdict: success, hostname, action `enter`, token age ≤ 300 s), `cookie.ts` (the HMAC-signed `__Host-ytg_gate` cookie, key derived from the Turnstile secret, bound to a User-Agent hash), `headers.ts` (CSP per page type and the baseline security headers), `gate-page.ts` + `gate-i18n.ts` (the gate page in the app's eight languages). It uses only standard Web APIs, so it type-checks against the DOM lib and runs under Vitest in Node.
The Worker (`worker/`): `index.ts` (entry; injects the clock, `fetch` and random ids), `router.ts` (routing), `rate-limit.ts` (the per-client limit checked before anything else: client key, fail-open check, the `429`), `env.ts` (bindings, constants, the gate lifetime clamped to 5 min – 30 days), `turnstile.ts` (siteverify call and verdict: success, hostname, action `enter`, token age ≤ 300 s), `cookie.ts` (the HMAC-signed `__Host-ytg_gate` cookie, key derived from the Turnstile secret, bound to a User-Agent hash), `headers.ts` (CSP per page type and the baseline security headers), `gate-page.ts` + `gate-i18n.ts` (the gate page in the app's eight languages). It uses only standard Web APIs, so it type-checks against the DOM lib and runs under Vitest in Node.
## 2. Core Engine Interfaces
@@ -322,7 +346,7 @@ export interface GeneratorInput {
// Video-type specific: partNumber, bossName, dlcName, challengeName, modName, modList,
// liveUrl, scheduledTime, gachaQuestType, chapterName, questName, characterName,
// anniversaryYear, gachaVersion.
// Video settings: resolution, fps, graphicsPreset (+ graphicsPresetCustom),
// Video settings: resolution, upscaledFrom (v1.5.0), fps, graphicsPreset (+ graphicsPresetCustom),
// skipGraphicsSettings, rayTracingModes, frameGenVendor, frameGenMultiplier,
// upscaleQuality, artStyle, videoStyleEra, versionInfo.
// Content: timestamps, playlistLink, contactEmail, adEmail, gameKeyEmail,
@@ -391,12 +415,12 @@ export interface TitleFormatConfig {
**Tag length, counted the way YouTube counts it** (`tag-generator.ts`):
- `youtubeTagsLength(tags)` = the sum of each tag's length, plus 2 for the quotes YouTube puts around any tag containing whitespace, plus one comma between tags. The old measure (length of the `", "`-joined string) ignored the quotes; 15 of 51 real tag sets were over 500 by YouTube's count while showing as under.
- `generateTags` collects, in priority order: the game name (bare, and a shortened form for composites), core tags for the output language, genre tags for every selected genre, video-type tags, platform tags, quality tags, the output language's multilingual tags (setting), trending tags for the first genre (setting), and the publisher/developer name. It then de-duplicates case-insensitively, drops tags over 30 characters, and `trimToCharLimit(tags, 500)` keeps tags in priority order while they fit — a tag that doesn't fit is skipped and the shorter ones after it are still tried.
- `generateTags` collects, in priority order: the game name (bare, and a shortened form for composites), the boss name for the video types whose `extraFields` include `bossName` (v1.4.0 — `bossNameTag`: NFC, every mark but in-word `'` `’` `-` and digit-to-digit `.` removed, dots between initials dropped, the name before its title or the leading words when over 30 characters), core tags for the output language, genre tags for every selected genre, video-type tags, platform tags, quality tags, the output language's multilingual tags (setting), trending tags for the first genre (setting), and the publisher/developer name. It then de-duplicates case-insensitively, drops tags over 30 characters, and `trimToCharLimit(tags, 500)` keeps tags in priority order while they fit — a tag that doesn't fit is skipped and the shorter ones after it are still tried.
- Platform tags use `PlatformConfig.tagName` ("Steam", "Epic Games", "itch.io"), not the id; the publisher's own site has no tag name and adds no platform tags.
**Empty channel name** (`channel-phrase.ts`, used by the description, pinned comment and playlist builders): templates render with `CHANNEL_SLOT` (`@@CHANNEL@@`) in place of an empty channel name. `withoutEmptyChannel(text, language)` then removes the words that go with the channel name in that language ("trên kênh", "による", "en", "no", "di", …) and the English "on" (for English, and for locales that still carry English sentences for newer video types), replaces any slot left over with a neutral fallback ("this channel", "kênh", …) and tidies the spacing before punctuation. "…of Hades on ." no longer happens in any of the eight languages.
**Rig block** (`rig-block.ts`): `buildRigLines(rig, t)` returns `Label: value` lines, shared by the description and the social captions. Labels come from `description.rigLabels.<field>` in the output language, the order is `RIG_FIELDS` (CPU, GPU, RAM, motherboard, storage, OS, monitor, capture, controller, video editor), and values go through `formatRigValue` (`gpu:nvidia-rtx-5080` → "NVIDIA GeForce RTX 5080"). Keys that are no longer rig fields are still printed, after the known ones.
**Rig block** (`rig-block.ts`): `buildRigLines(rig, t)` returns `Label: value` lines, shared by the description and the social captions. Labels come from `description.rigLabels.<field>` in the output language, the order is `RIG_FIELDS` (CPU, GPU, RAM, motherboard, storage, OS, monitor, capture, controller, video editor, LUT), and values go through `formatRigValue` (`gpu:nvidia-rtx-5080` → "NVIDIA GeForce RTX 5080"; a text field's `clean` — `cleanCpuName`, and since v1.4.0 `cleanLutName`, which cuts a pasted path or `.cube` / `.dat` file name down to the LUT's name — runs there as well as when the editor field loses focus). Keys that are no longer rig fields are still printed, after the known ones.
**Chapters** (`timeline-parser.ts`):
@@ -450,7 +474,7 @@ interface EditorActions {
}
/** Bump together with a new step in migrateEditorState. */
export const EDITOR_STORE_VERSION = 20;
export const EDITOR_STORE_VERSION = 21;
export const useEditorStore = create<EditorData & EditorActions>()(
persist(
@@ -484,7 +508,7 @@ export function migrateEditorState(persistedState: unknown, version: number): Ed
| Store | localStorage key | Version | Migration (exported) |
| ------------------ | ------------------------ | ----------------------------- | ---------------------------------------------------------------------------------------------- |
| `useEditorStore` | `ytdescgen-editor-draft` | `EDITOR_STORE_VERSION` = 20 | `migrateEditorState` |
| `useEditorStore` | `ytdescgen-editor-draft` | `EDITOR_STORE_VERSION` = 21 | `migrateEditorState` |
| `useProfileStore` | `ytdescgen-profiles` | `PROFILE_STORE_VERSION` = 3 | `migrateProfilesState` |
| `usePresetStore` | `ytdescgen-presets` | `PRESET_STORE_VERSION` = 2 | `migratePresetsState` |
| `useTemplateStore` | `ytdescgen-templates` | `TEMPLATE_STORE_VERSION` = 2 | `migrateTemplatesState` |
@@ -497,6 +521,10 @@ v1.1.0: editor v20 back-fills `copyrightEmail` (the fourth split contact line) w
v1.2.0: nine content-warning ids and one tech note, and no version bump anywhere — the lists only widen. The backup whitelist (`choiceList` in `src/utils/backup/sanitize.ts`) checks against `CONTENT_WARNINGS` / `TECH_NOTES`, so a 1.1.0 build restoring a 1.2.0 backup keeps everything except the ids it doesn't know.
v1.5.0: editor v21 back-fills `upscaledFrom` (recorded at a lower resolution, upscaled to `resolution` in the video editor) with `""` and turns an unknown value into `""`; `normalizeEditorPatch` does the same for an applied profile or template, and the backup whitelist checks it against `UPSCALED_FROM_OPTIONS`. `Profile.upscaledFrom` is optional, so the profile store stays at v3. The engine's own tech note (`AUTO_TECH_NOTES`, `editor_upscaled`) is never stored, so `techNotes` and its whitelist don't change.
v1.5.1: the settings gain `singleKeyShortcuts` (default `true`: the bare `?` opens the shortcut list) without a version bump, like `hideScrollbars` — `healSettings` back-fills it and turns anything but a boolean into `true`.
Rules:
- **localStorage is the only store**, on the web, desktop and Android. The desktop "mirror" file of earlier versions (`storage-adapter.ts`, `saveSettings`, `checkDataFileHealth`) was removed in v1.0.0; it was written next to the data folder and never read back. [PACKAGING.md](PACKAGING.md) covers how the leftover file is recovered.
@@ -563,7 +591,7 @@ An unknown version is read as 0: every migration step is idempotent, so running
| Workflow | Runs on | Jobs |
| ------------------------------------------------------ | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `ci.yml` (CI) | PRs to and pushes on `main` | `check` — the required status on `main` |
| `ci.yml` (CI) | PRs to and pushes on `main` | `check` — the required status on `main`; `sonarcloud` — the SonarCloud scan with `check`'s coverage (pushes on `main`, PRs from this repository except Dependabot's) |
| `security.yml` (Security) | PRs, pushes on `main`, weekly, manual | `dependency-review` (PRs: fails on a newly added high/critical advisory), `workflow-lint` (actionlint + zizmor, `.github/zizmor.yml`), `scorecard` (OpenSSF Scorecard, informational; not on PRs) |
| `compliance.yml` (Compliance) | PRs, pushes on `main` | `reuse` (REUSE licensing via `REUSE.toml`), `pr-title` (Conventional-Commit PR titles with a lower-case subject) |
| `rust.yml` (Rust) | Changes under `src-tauri/`, weekly, manual | `lint-and-test` (`cargo fmt --all -- --check`, `cargo clippy --all-targets --locked -- -D warnings`, `cargo test --locked`, after `npm run build` because `generate_context!` embeds `dist/`), `cargo-deny` (`check advisories licenses sources`, `src-tauri/deny.toml`) |
@@ -575,13 +603,14 @@ An unknown version is read as 0: every migration step is idempotent, so running
The `check` job, in order:
```yaml
- run: npm ci
- run: npm ci --ignore-scripts
# correctness
- run: npm run typecheck # src/
- run: npm run typecheck:all # + tests/, scripts/, worker/, build-plugins/
- run: npm run lint
- run: npm run validate:locales
- run: npm run test:coverage # thresholds in vitest.config.ts
- uses: actions/upload-artifact # coverage/lcov.info, for the sonarcloud job
# consistency
- run: npm run format:check
- run: npm run knip
@@ -596,13 +625,23 @@ The `check` job, in order:
# build
- run: npm run build
- run: npm run check:bundle # initial load ≤ 280 KB gzip, no JS chunk > 500 KB raw
- run: npx wrangler deploy --dry-run --outdir .wrangler/dry-run
- run: npm run cf:check # wrangler deploy --dry-run
```
Then `sonarcloud` (after `check` succeeds):
```yaml
- uses: actions/checkout # fetch-depth: 0 — new code is told from old by git blame
- uses: actions/download-artifact # the coverage report from check
- run: jq -r .version package.json # → sonar.projectVersion
- uses: SonarSource/sonarqube-scan-action # SONAR_TOKEN, sonar-project.properties
```
- **Bundle budget** (`scripts/check-bundle-size.ts`): the initial load is every script, modulepreload and stylesheet `dist/index.html` references, summed gzip — lazy chunks (pages, locales, legal documents) are excluded. The result is printed as a table and added to the job summary.
- **Licences** (`scripts/lib/third-party.ts`): every package bundled into the app must carry an allowed licence (MIT, ISC, Apache-2.0, BSD-2/3-Clause, 0BSD, CC0-1.0, Unlicense, BlueOak-1.0.0, OFL-1.1, Zlib, MPL-2.0), and `THIRD_PARTY_NOTICES.md` is generated (`npm run generate:third-party`) and checked, not hand-written.
- **Copyright years** (`scripts/lib/copyright.ts`, v1.1.0): NOTICE, REUSE.toml and `bundle.copyright` in `tauri.conf.json` must state `copyrightYears(<year of HEAD's commit>)` from `src/config/brand.ts` — "2026", then "2026-2027" from the first commit of 2027. The commit year rather than the clock keeps old commits green; `npm run update:copyright` rewrites the three files. The `/legal` pages' footer uses the same helper at build time.
- **Wrangler dry run** validates `wrangler.jsonc` and bundles the Worker exactly as Workers Builds will, without deploying.
- **SonarCloud** (CI-based; Automatic Analysis is off in the project's settings): `sonar-project.properties` makes the whole repository main code except the tests (`tests/**` and any `src/**/*.test.ts(x)`, analysed as tests) and the binary files (icons, the Gradle wrapper's jar), imports `coverage/lcov.info` and excludes from coverage everything Vitest does not measure (see [Testing Strategy](#6-testing-strategy)). The scan waits for the quality gate — Sonar way: A security, reliability and maintainability ratings, every security hotspot reviewed, ≤ 3 % duplication and ≥ 80 % coverage on new code — and fails the job when it fails. New code is "since the previous version": the job reads `package.json`'s version into `sonar.projectVersion`, so every release starts a new period. The scan runs in a job of its own so that `SONAR_TOKEN` never shares a job with npm packages. PRs from forks and from Dependabot get no repository secrets and skip it; the condition checks the PR author, not `github.actor` (zizmor's `bot-conditions`).
- Every workflow declares least-privilege `permissions`, checks out with `persist-credentials: false`, and pins actions by commit SHA (Dependabot keeps the SHAs and version comments current). The exceptions are the actionlint Docker image (pinned by version tag) and the maintainer's own `poli0981/.github` reusable workflows (tracked at `main`, allowed in `.github/zizmor.yml`). CI, Security, Compliance and Rust cancel superseded runs through a `concurrency` group, except on `main`, where each commit's result is a record the release process reads back.
**Web deployment is not a GitHub workflow.** Cloudflare Workers Builds builds and deploys the Worker and `dist/` on every push to `main` (preview versions for other branches). The old `deploy-web.yml` (GitHub Pages) is gone; `pages-migration.yml` only serves the moving notice, which hands visitors the data their browser saved on the old address as a `_format: 2` backup file. See [HOSTING.md](HOSTING.md).
@@ -611,7 +650,7 @@ The `check` job, in order:
## 6. Testing Strategy
Vitest runs `tests/**/*.test.{ts,tsx}` and `src/**/*.test.{ts,tsx}` in the **node** environment, with `globals: true`: 984 tests in 51 files at v1.2.0. Directories: `tests/engine`, `store`, `utils` (backup detect / sanitize / restore, quick entry, validation, the migration page), `worker` (router, cookie, Turnstile verdicts, headers, gate language), `build` (legal pages, web-only plugins), `config`, `hooks`, `i18n`, `scripts`. No test renders components: React Testing Library is installed but jsdom is not, so a rendering test would need both jsdom and a `// @vitest-environment jsdom` docblock.
Vitest runs `tests/**/*.test.{ts,tsx}` and `src/**/*.test.{ts,tsx}` in the **node** environment, with `globals: true`: 1131 tests in 54 files at v1.5.2. Directories: `tests/engine`, `store`, `styles` (WCAG AA contrast of the colour tokens), `utils` (backup detect / sanitize / restore, quick entry, validation, the migration page), `worker` (router, rate limits, cookie, Turnstile verdicts, headers, gate language), `build` (legal pages, web-only plugins), `config`, `hooks`, `i18n`, `scripts`. No test renders components: React Testing Library is installed but jsdom is not, so a rendering test would need both jsdom and a `// @vitest-environment jsdom` docblock.
Engine tests build a full `GeneratorInput` and pass a mock translator (`tests/helpers/mock-t.ts`) that reads the real `templates.json` files (en, vi, ja):
@@ -653,14 +692,14 @@ describe("buildTitle", () => {
});
```
`npm run test:coverage` (what CI runs) measures `src/engine/**`, `worker/**` and `build-plugins/**` with V8 and fails below these thresholds — the engine is what the whole app trusts, the Worker is what guards the site:
`npm run test:coverage` (what CI runs) measures the logic layers with V8 — `src/engine/**`, `src/config/**`, `src/store/**`, `src/utils/**`, `worker/**` (except `worker/index.ts`, the runtime wiring) and `build-plugins/**` — and writes `coverage/lcov.info` for SonarCloud. Components, pages and hooks are checked in the running app, `src/i18n` is i18next set-up and `scripts/` is tooling; SonarCloud would count a file missing from the report as 0 % covered, so `sonar.coverage.exclusions` lists all of them, and a new source folder goes into one list or the other. The run fails below these thresholds — the engine is what the whole app trusts, the Worker is what guards the site:
| Scope | Statements | Branches | Functions | Lines |
| ----------------------------------------- | ---------- | -------- | --------- | ----- |
| `src/engine/**` | 88 % | 85 % | 60 % | 88 % |
| `worker/**` (excluding `worker/index.ts`) | 95 % | 85 % | 95 % | 95 % |
Guard tests worth knowing: `tests/hooks/render-options-parity.test.ts` (settings → engine options), `tests/hooks/generator-input-mapping.test.ts` (editor → engine input), `tests/i18n/locale-registration.test.ts` (language registration in both directions), `tests/config/content-warning-groups.test.ts` and `tech-note-groups.test.ts` (every id in exactly one group, with an editor label and a description line in `_schema.json` — v1.2.0), the genre/tag-pool sync in `tests/engine/tag-generator.test.ts`, and `tests/worker/headers.test.ts` (keeps the Worker's baseline headers in step with `public/_headers`). The Rust side has its own `cargo test` suite (name validation, path rejection, pruning, legacy recovery, dialog filters).
Guard tests worth knowing: `tests/hooks/render-options-parity.test.ts` (settings → engine options), `tests/hooks/generator-input-mapping.test.ts` (editor → engine input), `tests/i18n/locale-registration.test.ts` (language registration in both directions), `tests/config/content-warning-groups.test.ts` and `tech-note-groups.test.ts` (every id in exactly one group, with an editor label and a description line in `_schema.json` — v1.2.0), the genre/tag-pool sync in `tests/engine/tag-generator.test.ts`, `tests/worker/headers.test.ts` (keeps the Worker's baseline headers in step with `public/_headers`), and `tests/styles/contrast.test.ts` (v1.5.1: every text token reaches 4.5:1 on the surfaces in both themes, white text on the `*-solid` fills, 3:1 for marks on `accent`). The Rust side has its own `cargo test` suite (name validation, path rejection, pruning, legacy recovery, dialog filters).
## 7. YouTube Character Limits Reference
+129
View File
@@ -0,0 +1,129 @@
# Khả năng tiếp cận
> **Lưu ý dịch thuật:** Tiếng Anh là phiên bản chính ([`ACCESSIBILITY.md` ở root](../../../ACCESSIBILITY.md)). Bản tiếng Việt này có thể chậm cập nhật một vài commit.
**Cập nhật lần cuối:** 2026-11-09
YTDescGen hướng tới việc ai làm video cũng dùng được, kể cả người dùng bàn phím thay chuột, trình đọc màn hình, phóng to hoặc kính lúp, chế độ tương phản cao, điều khiển bằng giọng nói hay màn hình cảm ứng. Văn bản này nói rõ những gì đang hoạt động, cách kiểm tra, những gì chưa ổn, và cách báo cho chúng tôi khi bạn gặp rào cản.
Văn bản áp dụng cho trang web [ytgenerator.stream](https://ytgenerator.stream), ứng dụng desktop (Windows, macOS, Linux) và ứng dụng Android. Các bản này dùng chung một giao diện, nên mọi điều dưới đây áp dụng cho tất cả, trừ khi có nêu tên nền tảng.
## Mục tiêu
Chúng tôi hướng tới [WCAG 2.2](https://www.w3.org/TR/WCAG22/) mức **AA**. Đây là mục tiêu, không phải tuyên bố đã đạt chuẩn: YTDescGen là dự án mã nguồn mở do một người duy trì và chưa được kiểm định độc lập. Khi phát hiện chỗ chưa đạt, chỗ đó sẽ được sửa hoặc ghi vào mục [Hạn chế đã biết](#hạn-chế-đã-biết).
## Những gì đang hoạt động
### Bàn phím
- Mọi trang, menu và hộp thoại đều dùng được chỉ bằng bàn phím. **Chuyển đến nội dung** là điểm dừng đầu tiên trên các trang của ứng dụng, và một đường viền hiện rõ vị trí đang được focus.
- Hộp thoại giữ focus bên trong khi đang mở, đóng bằng **Esc**, rồi trả focus về đúng nút đã mở nó.
- Phím tắt dùng được trên mọi trang:
- **Ctrl/⌘ + K**: command palette (mở trang bất kỳ, sao chép, profile, preset, template, đổi theme và ngôn ngữ).
- **Ctrl/⌘ + G** hoặc **Ctrl/⌘ + Enter**: sang trang Kết quả.
- **Ctrl/⌘ + Shift + C**: Sao chép tất cả.
- **Ctrl/⌘ + S**: lưu vào Lịch sử.
- **Ctrl/⌘ + B**: thu gọn/mở thanh bên.
- **Alt + T**: tới vùng thông báo.
- **Ctrl/⌘ + /** (hoặc **?**): danh sách đầy đủ.
- Phím tắt một phím **?** có thể tắt ở **Cài đặt › Trình soạn › Phím tắt một phím**, dành cho người nhập bằng giọng nói hoặc hay bấm nhầm phím.
### Trình đọc màn hình
- Mọi nút đều có tên, kể cả nút chỉ có biểu tượng, và mọi ô nhập đều có nhãn. Gợi ý và thông báo lỗi được gắn với đúng ô của nó.
- Các xác nhận và lỗi đều được đọc lên ("Đã sao chép!", "Đã lưu vào lịch sử", lý do không sao chép được), các vấn đề của Strict Mode cũng vậy.
- Khi bạn mở trang khác, tên trang được đọc lên. Focus vẫn ở liên kết bạn vừa dùng.
- Mỗi trang có tiêu đề riêng và một tiêu đề chính duy nhất. Ngôn ngữ của trang theo ngôn ngữ giao diện bạn chọn (tám ngôn ngữ).
- Tiêu đề, mô tả và tag được tạo ra đều gắn ngôn ngữ mà chúng được viết, nên mô tả tiếng Nhật được đọc bằng giọng tiếng Nhật kể cả khi giao diện đang là tiếng Việt.
### Thị giác
- Có theme tối và theme sáng, cả hai đều đạt độ tương phản WCAG AA cho chữ (4.5:1) trên mọi nền. Một test giữ cho điều này không bị phá ([tests/styles/contrast.test.ts](../../../tests/styles/contrast.test.ts)).
- Bố cục co giãn từ màn hình rộng xuống bề rộng điện thoại, nên khi phóng to, nội dung dồn thành một cột thay vì tràn ra ngoài màn hình.
- Ứng dụng desktop phóng to/thu nhỏ bằng **Ctrl/⌘ + =** và **Ctrl/⌘ + −** (trên Windows dùng được cả Ctrl + con lăn chuột). Trên Android, dùng hai ngón tay để phóng to.
- Ở chế độ High Contrast của Windows (forced colours), đường viền focus vẫn hiện.
- **Cài đặt › Giao diện › Ẩn thanh cuộn** bỏ các thanh cuộn; vẫn cuộn được bằng bàn phím, con lăn chuột và cảm ứng.
### Chuyển động
- Khi bật **Giảm chuyển động** (Reduce motion) trong hệ điều hành, các hiệu ứng động và cuộn mượt được tắt.
### Cảm ứng
- Trên màn hình cảm ứng, nút và ô nhập lớn lên khoảng 44 px, các nút đóng/bỏ qua nhỏ cũng vậy.
### Trang kiểm tra của website
- Bước kiểm tra Cloudflare Turnstile trước khi vào website thường tự xong. Trạng thái của nó ("Đang kiểm tra trình duyệt…", lỗi) được đọc lên, và dùng được bằng bàn phím. Xem [Hạn chế đã biết](#hạn-chế-đã-biết) nếu Cloudflare yêu cầu bạn giải thử thách.
## Cách kiểm tra
- **Thủ công.** Người duy trì dùng YTDescGen chỉ bằng bàn phím (rút chuột) và bằng Windows Narrator, qua các luồng chính: trình soạn, kết quả, sao chép, profile, preset, template, Lịch sử, Cài đặt và sao lưu.
- **Tự động.** Một unit test kiểm tra độ tương phản của mọi token màu ở cả hai theme.
- **Quy tắc thiết kế.** Các thành phần giao diện dựng từ những khối có sẵn khả năng tiếp cận (Radix primitives). Nút chỉ có biểu tượng không thể tạo ra mà thiếu tên, và mọi ô nhập lấy nhãn và phần nối lỗi từ cùng một component dùng chung.
Ứng dụng **chưa** được thử với NVDA, JAWS, VoiceOver (macOS), TalkBack (Android) hay Orca (Linux). Rất mong nhận được phản hồi từ những ai đang dùng các công cụ này.
## Môi trường hỗ trợ
| Nền tảng | Chạy trên | Trình đọc màn hình |
| --- | --- | --- |
| Windows: ứng dụng desktop, hoặc website trên Edge / Chrome | Windows 10 hoặc 11 với WebView2; Chrome hoặc Edge 111+ | Narrator: đã thử |
| Website trên trình duyệt khác | Firefox 114+, Safari 16.4+ | Chưa thử |
| Ứng dụng desktop macOS | macOS 11 trở lên, Apple silicon | VoiceOver: chưa thử |
| Ứng dụng desktop Linux | WebKitGTK 2.40 trở lên | Orca: chưa thử |
| Ứng dụng Android | Android 11 trở lên, Android System WebView bản mới | TalkBack: chưa thử |
## Hạn chế đã biết
- **Thử thách của Cloudflare trên website.** Nếu Turnstile bắt bạn giải thử thách thay vì tự qua, thử thách đó do Cloudflare quản lý và khả năng tiếp cận của nó do họ sửa. Nếu nó chặn bạn, hãy dùng ứng dụng desktop hoặc Android (không có trang kiểm tra), hoặc [gửi email cho chúng tôi](#báo-một-rào-cản).
- **Viền ô nhập mờ.** Viền của ô nhập trống chỉ khoảng 1.2–1.3:1 so với nền, dưới mức 3:1 mà WCAG yêu cầu. Ô nhập vẫn được nhận biết qua nhãn, và ô đang focus có viền và vầng màu nhấn.
- **Nút Tiếp tục ở màn hình chạy lần đầu** dùng gradient của thương hiệu. Chữ trắng trên đầu màu tím nhạt hơn của gradient chỉ đạt 3.96:1.
- **Bộ đếm ký tự không được đọc lên khi bạn gõ**, vì như vậy sẽ chen ngang mỗi lần gõ phím. Khi một trường vượt giới hạn của YouTube, việc sao chép bị từ chối kèm thông báo lý do, và Strict Mode liệt kê vấn đề trong một banner được đọc lên.
- **Chưa có lint khả năng tiếp cận tự động.** `eslint-plugin-jsx-a11y` chưa hỗ trợ ESLint 10 mà dự án đang dùng, và unit test chạy không có DOM của trình duyệt. Ngoài test độ tương phản, việc kiểm tra là thủ công (xem ở trên).
- **Bản dịch.** Các ngôn ngữ giao diện ngoài tiếng Anh và tiếng Việt được dịch với sự hỗ trợ của AI (xem [Tuyên bố miễn trừ](DISCLAIMER.md)). Một số nhãn có thể nghe không tự nhiên khi được đọc lên.
- **Emoji trong mô tả.** Mô tả được tạo dùng vài emoji làm dấu mục (ví dụ 👍 và 🔔), và trình đọc màn hình trên YouTube sẽ đọc tên của chúng.
## Báo một rào cản
Nếu có điều gì trong YTDescGen cản trở bạn, hãy cho chúng tôi biết. Bạn không cần biết nguyên nhân kỹ thuật.
- **Nên dùng:** mở một [issue về khả năng tiếp cận](https://github.com/poli0981/youtube-generator/issues/new?template=accessibility.yml). Biểu mẫu sẽ hỏi nền tảng, công nghệ hỗ trợ bạn dùng và chuyện gì đã xảy ra.
- **Không muốn đăng công khai?** Gửi email tới **contact@poli0981.dev**, tiêu đề bắt đầu bằng `[Accessibility]`.
- **Câu hỏi nhanh?** Hỏi trên [Discord](https://discord.gg/kDM9GMu5vm).
### Mức độ nghiêm trọng
| Mức | Ý nghĩa |
| --- | --- |
| **Critical** | Bạn không làm xong được việc chính: soạn, tạo, sao chép, lưu, hoặc qua được bước kiểm tra của website. |
| **High** | Bạn làm xong được, nhưng rất vất vả hoặc phải dùng cách vòng. |
| **Medium** | Vẫn dùng được, nhưng thất thường hoặc khó hiểu. |
| **Low** | Phiền nhỏ, không cản bạn. |
### Cách chúng tôi phản hồi
- Chúng tôi trả lời trong vòng **7 ngày** và tin vào những gì bạn báo.
- Rào cản **Critical** được sửa trong bản vá kế tiếp. Các mức khác được lên kế hoạch như mọi lỗi khác, mức nặng hơn làm trước.
- Nếu có cách tạm thời, chúng tôi sẽ cho bạn biết trong lúc chờ bản sửa.
- Khi bản sửa ra, chúng tôi sẽ nhờ bạn kiểm tra lại nếu bạn sẵn lòng.
Đây là dự án một người làm, nên các mốc thời gian là ước tính thật lòng, không phải cam kết. Nếu trễ, chúng tôi sẽ nói rõ trong issue.
## Dành cho người đóng góp
Thay đổi giao diện cần giữ đúng mọi điều ở trên. Trước khi mở pull request có đụng tới UI:
- **Bàn phím.** Mọi thứ dùng được bằng bàn phím: thứ tự focus hợp lý, đường viền focus hiện rõ, **Esc** đóng thứ bạn vừa mở, và không có chỗ nào giữ chặt focus.
- **Tên gọi.** Dùng các component dùng chung `Field` (nối nhãn, gợi ý và lỗi) và `IconButton` (không thể render nếu thiếu `label`). Chữ trong `aria-label` đi qua `t()` như mọi chuỗi khác, đủ tám locale.
- **Lỗi và trạng thái.** Phải được đọc lên: `Banner` với `alert`, một toast, hoặc một live region có sẵn.
- **Màu sắc.** Màu không bao giờ là tín hiệu duy nhất. Chỉ dùng token thiết kế, và chạy `npm run test:run`. Test độ tương phản sẽ báo lỗi nếu một token tụt dưới AA, và chữ trắng phải nằm trên các nền `*-solid`.
- **Chuyển động.** Hiệu ứng mới phải tôn trọng giảm chuyển động. Các component của Motion đã làm sẵn, và animation CSS được quy tắc chung trong `globals.css` xử lý.
- **Kích thước.** Mọi thứ bấm được tối thiểu 24 × 24 px và lớn lên trên màn hình cảm ứng.
- **Trình đọc màn hình.** Thử thay đổi một lần bằng trình đọc màn hình: Narrator (Win + Ctrl + Enter), VoiceOver (⌘ + F5), NVDA hoặc Orca.
Mẫu pull request có cùng danh sách kiểm tra này.
## Góp ý cho văn bản này
Mọi ý tưởng để cải thiện văn bản này hay cách xử lý khả năng tiếp cận đều được hoan nghênh trên [GitHub Discussions](https://github.com/poli0981/youtube-generator/discussions). Còn rào cản thì hãy báo qua [quy trình báo lỗi](#báo-một-rào-cản) để được theo dõi.
+3 -1
View File
@@ -1,6 +1,6 @@
# Danh mục Nội dung
Bản kê khai tĩnh cho mọi loại video, thể loại game, cảnh báo nội dung, ghi chú kỹ thuật, cửa hàng, trường link và nền tảng đăng chéo trong editor của YTDescGen (tính đến v1.2.0). 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.
Bản kê khai tĩnh cho mọi loại video, thể loại game, cảnh báo nội dung, ghi chú kỹ thuật, cửa hàng, trường link và nền tảng đăng chéo trong editor của YTDescGen (tính đến v1.3.0). 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.
@@ -166,6 +166,8 @@ Bản thân game được làm hoặc chạy bằng AI tạo sinh — còn game
Ghi chú được chọn hiển thị trong khối `▸ 🛠 TECH NOTES` (`▸ 🛠 GHI CHÚ KỸ THUẬT` khi output là tiếng Việt) ngay sau cảnh báo nội dung, theo thứ tự người dùng chọn. Chúng nói về bản quay, không phải về game. Những thông tin đã có trường riêng — độ khó, ending đã chiếu, language patch, phiên bản game, upscaler và frame generation trong Video settings — không lặp lại ở đây.
Khi chọn **Upscaled from** trong Video settings (v1.5.0), một ghi chú nữa tự thêm vào sau các ghi chú bạn chọn: _Đã upscale lên độ phân giải cao hơn khi dựng — chi tiết nhỏ được tái tạo, nên chữ, texture và đường viền có thể hơi khác so với hình gốc._ Ghi chú này không có trong danh sách bên dưới; dòng Upscale trong Video settings cho biết upscale từ đâu lên đâu.
### Âm thanh (5)
Tắt tiếng (bản quyền) · Giảm volume (bản quyền) · Thay nhạc (bản quyền) · Chỉ tắt cutscene · Giữ audio gốc (rủi ro claim)
+11 -9
View File
@@ -23,13 +23,13 @@ macOS và Linux đều dùng được để phát triển. Build release Tauri
Cài theo thứ tự:
| Công cụ | Phiên bản | Lý do |
| ----------------------- | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Node.js** | **22** — đúng phiên bản trong `.node-version` | CI, các workflow release và Cloudflare Workers Builds đều đọc `.node-version`. Vite 8 cần Node `^20.19` hoặc `>= 22.12`, còn wrangler cần `>= 22`, nên hãy dùng 22.12 trở lên. Dùng [nvm](https://github.com/nvm-sh/nvm) hoặc [fnm](https://github.com/Schniz/fnm) (fnm đọc được `.node-version`). |
| **npm** | đi kèm Node 22 | Dự án dùng npm; `pnpm` và `yarn` chưa test. |
| **Rust** | stable, `>= 1.90` | Bắt buộc cho bản build Tauri desktop và Android (Tauri 2.12 cần Rust 1.90). Cài qua [rustup](https://rustup.rs/); profile mặc định đã có sẵn `rustfmt` và `clippy`. |
| **Python** | `3.12` | Tùy chọn — chỉ cần cho một số tooling Tauri trên Windows. |
| **Tauri prerequisites** | theo OS | Xem <https://v2.tauri.app/start/prerequisites/>. |
| Công cụ | Phiên bản | Lý do |
| ----------------------- | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Node.js** | **26** — đúng phiên bản trong `.node-version` | CI, các workflow release và Cloudflare Workers Builds đều đọc `.node-version`, và `package.json` khai báo `engines.node >= 26`. Dùng [nvm](https://github.com/nvm-sh/nvm) hoặc [fnm](https://github.com/Schniz/fnm) (fnm đọc được `.node-version`). |
| **npm** | 11, đi kèm Node 26 | Dự án dùng npm; `pnpm` và `yarn` chưa test. |
| **Rust** | stable, `>= 1.90` | Bắt buộc cho bản build Tauri desktop và Android (Tauri 2.12 cần Rust 1.90). Cài qua [rustup](https://rustup.rs/); profile mặc định đã có sẵn `rustfmt` và `clippy`. |
| **Python** | `3.12` | Tùy chọn — chỉ cần cho một số tooling Tauri trên Windows. |
| **Tauri prerequisites** | theo OS | Xem <https://v2.tauri.app/start/prerequisites/>. |
### Windows
@@ -53,7 +53,7 @@ Quy trình tham chiếu dùng **JetBrains 2026.x** (WebStorm hoặc RustRover) l
- Bật plugin **Tailwind CSS**.
- Bật plugin **i18next** (hoặc dùng `src/i18n/locales/_schema.json` để autocomplete).
- Settings → Languages → TypeScript → "Use TypeScript from `node_modules/typescript`".
- Settings → Languages → TypeScript → giữ TypeScript service đi kèm IDE. `node_modules/typescript` không phải trình biên dịch: đó là npm alias của `@typescript/typescript6`, tức API TypeScript 6.0 mà typescript-eslint dùng. Dự án typecheck bằng TypeScript 7 (`tsc`, từ `@typescript/native`) — `npm run typecheck` là chuẩn.
- Settings → Code Style → Prettier → Run on save (`{src,tests,scripts,worker,build-plugins}/**/*.{ts,tsx,css}` — đúng các file mà `npm run format` xử lý).
### VS Code
@@ -88,6 +88,7 @@ Dev server chỉ chạy riêng app: không có cổng Turnstile, không có anal
- Tạo nhánh từ `main` (`feat/…`, `fix/…`, `docs/…`, `chore/…`) và mở pull request vào `main`. Không có nhánh dài hạn nào khác, và mỗi lần merge vào `main` đều deploy bản web.
- Tiêu đề PR theo định dạng commit `type(scope): message`; CI có kiểm tra.
- Mỗi PR đều chạy job `check` (xem bên dưới), `dependency-review`, `workflow-lint`, `reuse` và `pr-title`; hai job Rust `lint-and-test` và `cargo-deny` chạy khi có thay đổi trong `src-tauri/`.
- Sau `check`, job `sonarcloud` gửi mã nguồn và báo cáo coverage lên [SonarCloud](https://sonarcloud.io/project/overview?id=poli0981_youtube-generator) (cấu hình trong `sonar-project.properties`) và fail khi quality gate fail: code mới phải đạt hạng A, mọi security hotspot đã được review, trùng lặp tối đa 3 % và coverage tối thiểu 80 %. PR từ fork và từ Dependabot bỏ qua job này — chúng không có `SONAR_TOKEN` — còn `main` được phân tích sau mỗi lần merge.
Quy định đầy đủ: [CONTRIBUTING.md](../../../CONTRIBUTING.md).
@@ -117,7 +118,7 @@ Quy định đầy đủ: [CONTRIBUTING.md](../../../CONTRIBUTING.md).
| `npm run validate:locales` | Bắt buộc cả 8 locale khớp chính xác với `_schema.json`. **Phải pass trước khi merge PR động đến locale.** |
| `npm run test` | Vitest chế độ watch. |
| `npm run test:run` | Vitest chạy một lần. |
| `npm run test:coverage` | Chạy một lần kèm báo cáo coverage vào `coverage/`; fail nếu thấp hơn ngưỡng đặt cho `src/engine/` và `worker/` trong `vitest.config.ts`. CI chạy lệnh này. |
| `npm run test:coverage` | Chạy một lần kèm báo cáo coverage vào `coverage/` — các tầng logic, SonarCloud đọc `lcov.info`; fail nếu thấp hơn ngưỡng đặt cho `src/engine/` và `worker/` trong `vitest.config.ts`. CI chạy lệnh này. |
| `npm run check:version` | Kiểm tra cả **sáu** trường version khớp nhau (`package.json`, hai chỗ trong `package-lock.json`, `tauri.conf.json`, `Cargo.toml`, `Cargo.lock`). Đây là thứ duy nhất phát hiện khi bỏ sót một chỗ. |
| `npm run check:tauri` | Các package npm `@tauri-apps/*` và các crate Tauri phải cùng major.minor. Tauri CLI sẽ từ chối build nếu lệch, mà CI thì không chạy build Tauri. |
| `npm run check:licenses` | Mọi package được bundle đều có license nằm trong danh sách cho phép, và `THIRD_PARTY_NOTICES.md` khớp với những gì đang cài. |
@@ -247,3 +248,4 @@ docs/I18N.md). Lời khuyên restart ở trên vẫn áp dụng cho tất cả.
- [PACKAGING.md](../../PACKAGING.md) — Tauri release build và signing.
- [CONTRIBUTING.md ở root](../../../CONTRIBUTING.md) — quy trình PR, quy ước commit, auto-ignore rules.
- [SECURITY.md ở root](../../../SECURITY.md) — báo cáo lỗ hổng bảo mật.
- [ACCESSIBILITY.md ở root](../../../ACCESSIBILITY.md) — những gì dùng được với công nghệ hỗ trợ, và checklist cho thay đổi UI (bản tiếng Việt: [ACCESSIBILITY.md](./ACCESSIBILITY.md)).
+1 -1
View File
@@ -6,7 +6,7 @@
YTDescGen là dự án cá nhân do một người duy trì (`@poli0981`) để dùng cho kênh YouTube [`@SkullMute`](https://www.youtube.com/@SkullMute), và chia sẻ công khai dưới dạng mã nguồn mở. Đây **không phải sản phẩm thương mại** và không có nghĩa vụ hỗ trợ.
Mã nguồn, tài liệu, bản dịch locale, và các quyết định thiết kế trong repo này được **đồng tác giả với sự hỗ trợ của Anthropic's Claude Code (các model Claude Opus; từ bản v1.0.0 đến v1.2.0 dùng Claude Opus 5.5)**. Tất cả commit, release, và quyết định kiến trúc được người duy trì xem xét và phê duyệt trước khi merge.
Mã nguồn, tài liệu, bản dịch locale, và các quyết định thiết kế trong repo này được **đồng tác giả với sự hỗ trợ của Anthropic's Claude Code (các model Claude Opus; từ bản v1.0.0 đến v1.5.1 dùng Claude Opus 5.5, bản v1.5.2 dùng Claude Fable 5.2)**. Tất cả commit, release, và quyết định kiến trúc được người duy trì xem xét và phê duyệt trước khi merge.
Tuyên bố này áp dụng cho:
+758 -936
View File
File diff suppressed because it is too large. Load diff
+23 -23
View File
@@ -1,6 +1,6 @@
{
"name": "yt-desc-gen",
"version": "1.2.0",
"version": "1.5.2",
"private": true,
"license": "Apache-2.0",
"type": "module",
@@ -44,46 +44,46 @@
"@tauri-apps/plugin-opener": "^2.7.2",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"i18next": "^26.4.5",
"i18next-resources-to-backend": "^1.2.3",
"lucide-react": "^1.57.0",
"i18next": "~26.6.0",
"i18next-resources-to-backend": "^1.2.4",
"lucide-react": "^1.70.0",
"motion": "^13.5.1",
"radix-ui": "^1.8.1",
"react": "^19.3.0",
"react-dom": "^19.3.0",
"react-i18next": "^17.0.16",
"react-router-dom": "^7.18.4",
"simple-icons": "^16.33.0",
"react": "^19.3.1",
"react-dom": "^19.3.1",
"react-i18next": "^17.1.13",
"react-router-dom": "^7.18.5",
"simple-icons": "^16.37.0",
"sonner": "^2.0.8",
"zustand": "^5.0.15"
"zustand": "^5.1.0"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@resvg/resvg-js": "2.6.2",
"@tailwindcss/postcss": "^4.3.3",
"@tauri-apps/cli": "2.12.3",
"@tailwindcss/postcss": "^4.3.5",
"@tauri-apps/cli": "2.12.4",
"@testing-library/jest-dom": "^7.0.1",
"@testing-library/react": "^16.3.3",
"@types/node": "^26.6.3",
"@types/node": "^26.6.6",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"@typescript/native": "npm:typescript@^7.0.2",
"@vitejs/plugin-react": "^6.1.2",
"@vitejs/plugin-react": "^6.3.0",
"@vitest/coverage-v8": "^4.1.12",
"autoprefixer": "^10.6.1",
"eslint": "^10.12.0",
"autoprefixer": "^10.6.2",
"eslint": "^10.14.0",
"eslint-plugin-react-hooks": "^7.1.1",
"knip": "^6.41.0",
"marked": "18.1.1",
"postcss": "^8.5.30",
"knip": "^6.44.2",
"marked": "18.2.0",
"postcss": "^8.5.32",
"prettier": "^3.9.10",
"prettier-plugin-tailwindcss": "^0.8.1",
"tailwindcss": "^4.3.3",
"tailwindcss": "^4.3.5",
"tsx": "^4.23.15",
"typescript": "npm:@typescript/typescript6@^6.0.2",
"typescript-eslint": "^8.71.2",
"vite": "^8.3.4",
"typescript-eslint": "^8.72.2",
"vite": "^8.3.7",
"vitest": "^4.1.12",
"wrangler": "4.149.0"
"wrangler": "4.159.0"
}
}
+4 -4
View File
@@ -58,10 +58,10 @@ function readRepoFile(file: string): string {
/** The year HEAD was committed, or this UTC year when git is unavailable. */
export function headCommitYear(): number {
try {
const iso = execFileSync("git", ["log", "-1", "--format=%cI"], {
cwd: ROOT,
encoding: "utf8",
});
const options = { cwd: ROOT, encoding: "utf8" } as const;
// A dev/CI script: `git` is whichever one the developer's PATH or the CI
// image provides, by design — there is no fixed install path to pin.
const iso = execFileSync("git", ["log", "-1", "--format=%cI"], options); // NOSONAR
const year = Number(iso.trim().slice(0, 4));
if (Number.isInteger(year) && year >= 2000) return year;
} catch {
+4 -3
View File
@@ -38,8 +38,9 @@ const ALLOWED = new Set([
/** SPDX expression → allowed? `OR` needs one side, `AND` needs both. */
export function licenseAllowed(expression: string): boolean {
const expr = expression.trim().replace(/^\((.*)\)$/, "$1");
if (/\sOR\s/i.test(expr)) return expr.split(/\s+OR\s+/i).some(licenseAllowed);
if (/\sAND\s/i.test(expr)) return expr.split(/\s+AND\s+/i).every(licenseAllowed);
// Split on the bare operator; each part is trimmed by the recursive call.
if (/\sOR\s/i.test(expr)) return expr.split(/\sOR\s/i).some(licenseAllowed);
if (/\sAND\s/i.test(expr)) return expr.split(/\sAND\s/i).every(licenseAllowed);
return ALLOWED.has(expr);
}
@@ -110,7 +111,7 @@ export function directCrates(toml: string): string[] {
const name = inDependencies ? /^([A-Za-z0-9_-]+)\s*=/.exec(line)?.[1] : undefined;
if (name) names.add(name);
}
return [...names].sort();
return [...names].sort(compareCodeUnits);
}
/**
+50
View File
@@ -0,0 +1,50 @@
# SonarCloud, CI-based analysis. Automatic Analysis is off in the project's
# settings: the scanner runs in the `sonarcloud` job of
# .github/workflows/ci.yml, on every PR and every push to main, and reads this
# file. The version (package.json) is passed on the command line there.
sonar.organization=poli0981
sonar.projectKey=poli0981_youtube-generator
sonar.sourceEncoding=UTF-8
# Main code is the whole repository: the app, the Worker, the build plugins,
# the scripts, the Tauri shell (Rust, and the Android project, which is
# committed and edited), the migration page and the workflows. The tests are
# analysed as tests: the same files Vitest runs (vitest.config.ts) plus
# tests/helpers. Files git ignores are left out on their own; binary files
# (the icons, the Gradle wrapper's jar) are left out here — there is nothing
# in them to analyse, and the scanner warns about each one it reads as text.
sonar.sources=.
sonar.exclusions=tests/**,src/**/*.test.ts,src/**/*.test.tsx,**/*.png,**/*.ico,**/*.icns,**/*.jar
sonar.tests=.
sonar.test.inclusions=tests/**,src/**/*.test.ts,src/**/*.test.tsx
# Coverage is Vitest's LCOV report (`npm run test:coverage` in the `check`
# job), which measures the logic layers: src/engine, src/config, src/store,
# src/utils, worker/ and build-plugins/. SonarCloud would count a file missing
# from the report as 0 % covered, so everything else is excluded here. Keep
# this list in step with `coverage.include` in vitest.config.ts.
# - No test renders a component or page (there is no DOM environment); the
# hooks and i18n are React and i18next glue, checked in the running app.
# - worker/index.ts only wires the router to the Workers runtime.
# - scripts/ and the config files are tooling; the migration page and
# public/theme-init.js are static pages' scripts.
# - The Rust and Android code have no coverage tooling.
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.coverage.exclusions=\
src/App.tsx,\
src/main.tsx,\
src/components/**,\
src/pages/**,\
src/hooks/**,\
src/i18n/**,\
worker/index.ts,\
scripts/**,\
*.config.js,\
*.config.ts,\
migration-page/**,\
public/**,\
src-tauri/**
# The scan waits for the quality gate and fails the job when it fails, so the
# result is in CI as well as in SonarCloud's own check on the PR.
sonar.qualitygate.wait=true
+83 -193
View File
@@ -73,9 +73,9 @@ dependencies = [
[[package]]
name = "async-executor"
version = "1.14.0"
version = "1.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a"
checksum = "f426a31126c735126297bc5ea7a521263c9faff4f63ca415267ee625651c4f37"
dependencies = [
"async-task",
"concurrent-queue",
@@ -225,6 +225,12 @@ version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]]
name = "base64"
version = "0.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5"
[[package]]
name = "bit-set"
version = "0.8.0"
@@ -463,7 +469,7 @@ dependencies = [
"iana-time-zone",
"num-traits",
"serde",
"windows-link 0.2.1",
"windows-link",
]
[[package]]
@@ -1527,7 +1533,7 @@ dependencies = [
"js-sys",
"log",
"wasm-bindgen",
"windows-core 0.61.2",
"windows-core",
]
[[package]]
@@ -1541,12 +1547,12 @@ dependencies = [
[[package]]
name = "ico"
version = "0.5.0"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e795dff5605e0f04bff85ca41b51a96b83e80b281e96231bcaaf1ac35103371"
checksum = "d75e94d66081e4d8dcd098bd8dc5254800fea14a26389b298410158d834de167"
dependencies = [
"byteorder",
"png 0.17.16",
"png",
]
[[package]]
@@ -2007,7 +2013,7 @@ dependencies = [
"objc2-core-foundation",
"objc2-foundation",
"once_cell",
"png 0.18.1",
"png",
"serde",
"thiserror 2.0.18",
"windows-sys 0.61.2",
@@ -2368,7 +2374,7 @@ dependencies = [
"libc",
"redox_syscall",
"smallvec",
"windows-link 0.2.1",
"windows-link",
]
[[package]]
@@ -2472,19 +2478,6 @@ dependencies = [
"time",
]
[[package]]
name = "png"
version = "0.17.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526"
dependencies = [
"bitflags 1.3.2",
"crc32fast",
"fdeflate",
"flate2",
"miniz_oxide",
]
[[package]]
name = "png"
version = "0.18.1"
@@ -2746,9 +2739,9 @@ dependencies = [
[[package]]
name = "rfd"
version = "0.16.0"
version = "0.17.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a15ad77d9e70a92437d8f74c35d99b4e4691128df018833e99f90bcd36152672"
checksum = "20dafead71c16a34e1ff357ddefc8afc11e7d51d6d2b9fbd07eaa48e3e540220"
dependencies = [
"block2",
"dispatch2",
@@ -2756,16 +2749,18 @@ dependencies = [
"gobject-sys",
"gtk-sys",
"js-sys",
"libc",
"log",
"objc2",
"objc2-app-kit",
"objc2-core-foundation",
"objc2-foundation",
"percent-encoding",
"raw-window-handle",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
"windows-sys 0.60.2",
"windows-sys 0.61.2",
]
[[package]]
@@ -3170,6 +3165,12 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
[[package]]
name = "static_vcruntime"
version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff7589a1859b09232522bb9edf076ca7fcf14ded96685d3fa629db73023ffbb7"
[[package]]
name = "string_cache"
version = "0.9.0"
@@ -3202,9 +3203,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "swift-rs"
version = "1.0.8"
version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e45c444e496845d3f2a351146bff59aae4975b2280238df1dfaa0c7d1846f38e"
checksum = "cefd87076fd385308ee4aff597256c902f1fbb4d031de1558efc12f8ffefadd9"
dependencies = [
"base64 0.21.7",
"serde",
@@ -3267,9 +3268,9 @@ dependencies = [
[[package]]
name = "tao"
version = "0.37.1"
version = "0.37.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f37f381f4e048e6cdf038b5705f8cf14ad108279d46eb968140a7b291aba9400"
checksum = "d5777b06fe6435126ae8d816eba269e050e1e10d302cf5461e9c49eccabc3548"
dependencies = [
"bitflags 2.11.0",
"block2",
@@ -3300,7 +3301,7 @@ dependencies = [
"unicode-segmentation",
"url",
"windows",
"windows-core 0.62.2",
"windows-core",
"windows-version",
"x11-dl",
]
@@ -3324,9 +3325,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]]
name = "tauri"
version = "2.12.0"
version = "2.12.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb20ef8e6f97d6fe03039666cd82861f09a38b56291fa2f0f9fe140023f61c1a"
checksum = "5fb0244332cfb9cee7e2a568bf5da29a36ed8fdbd717f6f47a66b6b7b358c072"
dependencies = [
"anyhow",
"bytes",
@@ -3375,9 +3376,9 @@ dependencies = [
[[package]]
name = "tauri-build"
version = "2.7.0"
version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b5ae674f48836f5dd2eeaf9e221c095bd3e78a8d0439c77ca93b48740a1b644"
checksum = "adddb0e648752aaac5da9c3c3c6a68e1e87cab55e3b757b18a9441ef8c3ac614"
dependencies = [
"anyhow",
"cargo_toml",
@@ -3389,6 +3390,8 @@ dependencies = [
"semver",
"serde",
"serde_json",
"static_vcruntime",
"strsim",
"tauri-utils",
"tauri-winres",
"walkdir",
@@ -3396,16 +3399,16 @@ dependencies = [
[[package]]
name = "tauri-codegen"
version = "2.7.0"
version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3926b73ac01df7c14f19ff872cd56e67213a87acc0000ea37ddb300f3d11a3e3"
checksum = "fb37631cf71dab5e8ab55e1bdd701e18a52653d90b78e71d0e5598b1e0a61316"
dependencies = [
"base64 0.22.1",
"base64 0.23.1",
"brotli",
"ico",
"json-patch",
"plist",
"png 0.18.1",
"png",
"proc-macro2",
"quote",
"semver",
@@ -3423,9 +3426,9 @@ dependencies = [
[[package]]
name = "tauri-macros"
version = "2.7.0"
version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d21d0fa2c0529972ea6ecaf7404fcf40efac098eda0beb06ca682f41e33a6aa5"
checksum = "0cc38db58854c10fb5f91a887ed8bf82d3239bb92b5d8db86eda09e96d9963d1"
dependencies = [
"heck 0.5.0",
"proc-macro2",
@@ -3437,9 +3440,9 @@ dependencies = [
[[package]]
name = "tauri-plugin"
version = "2.7.0"
version = "2.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9ff3ebb9fda56ceb93d46f6cbb126bae82951bf43498543a5163dde5def49a1"
checksum = "67fb21a77e8f94e8beb3325e583102488659365af0a3948b7ea244c5b779c291"
dependencies = [
"anyhow",
"glob",
@@ -3453,9 +3456,9 @@ dependencies = [
[[package]]
name = "tauri-plugin-dialog"
version = "2.8.0"
version = "2.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7527c5fd1678032d116c1a82e5d609c67370e56f858ae6cfd376bbca37fe0490"
checksum = "ce0fb9c2b6d34a9720627ed930ebc8af26f61e648695aecaeb03d5c33c5896f5"
dependencies = [
"log",
"raw-window-handle",
@@ -3471,9 +3474,9 @@ dependencies = [
[[package]]
name = "tauri-plugin-fs"
version = "2.6.0"
version = "2.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "466eb32466fe5021b6728b06862f9ff14a9f7e1af890047654e03a96d7c0e1bb"
checksum = "5d58eb1d4984e535f47a642ffec09a2da6f5c18a12b5902d12126cb7626d628b"
dependencies = [
"anyhow",
"dunce",
@@ -3495,9 +3498,9 @@ dependencies = [
[[package]]
name = "tauri-plugin-opener"
version = "2.7.0"
version = "2.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d39404b2572927e0d3ed30a7ca226037f7508d22e79c96ee6ef0d42b6a4b3345"
checksum = "53810be1b4fed22bb6ac3f4cab5a2b80d9391d1af436bda145607532bc0bb219"
dependencies = [
"dunce",
"glob",
@@ -3517,9 +3520,9 @@ dependencies = [
[[package]]
name = "tauri-plugin-single-instance"
version = "2.5.1"
version = "2.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91baf4f5db4b008fc2bcada0f7d3a49b45d911f94575ac236f225ed67554f5c0"
checksum = "726b6da0dd5bd1344f84f4108a622c07d01923baacb5c803a605189672c5352f"
dependencies = [
"serde",
"serde_json",
@@ -3533,9 +3536,9 @@ dependencies = [
[[package]]
name = "tauri-runtime"
version = "2.12.0"
version = "2.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9e6d5ef76985b32ff012a43b58df205d25a285e400ca878afcacddc5d5f3238"
checksum = "7c55766d99cea69055904d1735b93c2049302b2e09effd462120deb5581d78e9"
dependencies = [
"cookie",
"dpi",
@@ -3558,9 +3561,9 @@ dependencies = [
[[package]]
name = "tauri-runtime-wry"
version = "2.12.0"
version = "2.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa829eb69860cf1fb0bedb21d2d5f1effce3527d054a68ca1cd7355c654400a3"
checksum = "e1aa9d8b7a120f879f44fdc1053f7b7dbf416bf0bbc6a72b714dec46b782b52f"
dependencies = [
"gtk",
"http",
@@ -3568,7 +3571,6 @@ dependencies = [
"log",
"objc2",
"objc2-app-kit",
"once_cell",
"percent-encoding",
"raw-window-handle",
"softbuffer",
@@ -3584,9 +3586,9 @@ dependencies = [
[[package]]
name = "tauri-utils"
version = "2.10.0"
version = "2.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4dd257082deff79550de3409ed146104aeaf86fe38649615b04a304144939677"
checksum = "362ab21cd4cc713f2a02b1a9b5688198b1541cfb6907c4281e9190e0f0ef4aa3"
dependencies = [
"anyhow",
"brotli",
@@ -3613,7 +3615,7 @@ dependencies = [
"serde_with",
"swift-rs",
"thiserror 2.0.18",
"toml 0.9.12+spec-1.1.0",
"toml 1.1.6+spec-1.1.0",
"url",
"urlpattern",
"uuid",
@@ -3989,7 +3991,7 @@ dependencies = [
"objc2-core-graphics",
"objc2-foundation",
"once_cell",
"png 0.18.1",
"png",
"serde",
"thiserror 2.0.18",
"windows-sys 0.61.2",
@@ -4353,7 +4355,7 @@ dependencies = [
"webview2-com-macros",
"webview2-com-sys",
"windows",
"windows-core 0.62.2",
"windows-core",
]
[[package]]
@@ -4375,7 +4377,7 @@ checksum = "b3a07132775117d6065853d9d1178157b8c90e228de47129d6bce2c7edebedfb"
dependencies = [
"thiserror 2.0.18",
"windows",
"windows-core 0.62.2",
"windows-core",
]
[[package]]
@@ -4432,7 +4434,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580"
dependencies = [
"windows-collections",
"windows-core 0.62.2",
"windows-core",
"windows-future",
"windows-numerics",
]
@@ -4443,20 +4445,7 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610"
dependencies = [
"windows-core 0.62.2",
]
[[package]]
name = "windows-core"
version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"
dependencies = [
"windows-implement",
"windows-interface",
"windows-link 0.1.3",
"windows-result 0.3.4",
"windows-strings 0.4.2",
"windows-core",
]
[[package]]
@@ -4467,9 +4456,9 @@ checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
dependencies = [
"windows-implement",
"windows-interface",
"windows-link 0.2.1",
"windows-result 0.4.1",
"windows-strings 0.5.1",
"windows-link",
"windows-result",
"windows-strings",
]
[[package]]
@@ -4478,8 +4467,8 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb"
dependencies = [
"windows-core 0.62.2",
"windows-link 0.2.1",
"windows-core",
"windows-link",
"windows-threading",
]
@@ -4505,12 +4494,6 @@ dependencies = [
"syn 2.0.117",
]
[[package]]
name = "windows-link"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
[[package]]
name = "windows-link"
version = "0.2.1"
@@ -4523,17 +4506,8 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26"
dependencies = [
"windows-core 0.62.2",
"windows-link 0.2.1",
]
[[package]]
name = "windows-result"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"
dependencies = [
"windows-link 0.1.3",
"windows-core",
"windows-link",
]
[[package]]
@@ -4542,16 +4516,7 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
dependencies = [
"windows-link 0.2.1",
]
[[package]]
name = "windows-strings"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"
dependencies = [
"windows-link 0.1.3",
"windows-link",
]
[[package]]
@@ -4560,7 +4525,7 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
dependencies = [
"windows-link 0.2.1",
"windows-link",
]
[[package]]
@@ -4581,22 +4546,13 @@ dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-sys"
version = "0.60.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
dependencies = [
"windows-targets 0.53.5",
]
[[package]]
name = "windows-sys"
version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
dependencies = [
"windows-link 0.2.1",
"windows-link",
]
[[package]]
@@ -4623,37 +4579,20 @@ dependencies = [
"windows_aarch64_gnullvm 0.52.6",
"windows_aarch64_msvc 0.52.6",
"windows_i686_gnu 0.52.6",
"windows_i686_gnullvm 0.52.6",
"windows_i686_gnullvm",
"windows_i686_msvc 0.52.6",
"windows_x86_64_gnu 0.52.6",
"windows_x86_64_gnullvm 0.52.6",
"windows_x86_64_msvc 0.52.6",
]
[[package]]
name = "windows-targets"
version = "0.53.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
dependencies = [
"windows-link 0.2.1",
"windows_aarch64_gnullvm 0.53.1",
"windows_aarch64_msvc 0.53.1",
"windows_i686_gnu 0.53.1",
"windows_i686_gnullvm 0.53.1",
"windows_i686_msvc 0.53.1",
"windows_x86_64_gnu 0.53.1",
"windows_x86_64_gnullvm 0.53.1",
"windows_x86_64_msvc 0.53.1",
]
[[package]]
name = "windows-threading"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37"
dependencies = [
"windows-link 0.2.1",
"windows-link",
]
[[package]]
@@ -4662,7 +4601,7 @@ version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4060a1da109b9d0326b7262c8e12c84df67cc0dbc9e33cf49e01ccc2eb63631"
dependencies = [
"windows-link 0.2.1",
"windows-link",
]
[[package]]
@@ -4677,12 +4616,6 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
[[package]]
name = "windows_aarch64_msvc"
version = "0.42.2"
@@ -4695,12 +4628,6 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_aarch64_msvc"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
[[package]]
name = "windows_i686_gnu"
version = "0.42.2"
@@ -4713,24 +4640,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnu"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_gnullvm"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
[[package]]
name = "windows_i686_msvc"
version = "0.42.2"
@@ -4743,12 +4658,6 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_i686_msvc"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
[[package]]
name = "windows_x86_64_gnu"
version = "0.42.2"
@@ -4761,12 +4670,6 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnu"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.42.2"
@@ -4779,12 +4682,6 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
[[package]]
name = "windows_x86_64_msvc"
version = "0.42.2"
@@ -4797,12 +4694,6 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "windows_x86_64_msvc"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
[[package]]
name = "winnow"
version = "0.5.40"
@@ -4936,11 +4827,11 @@ checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4"
[[package]]
name = "wry"
version = "0.57.0"
version = "0.57.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a819957a01b3119af85e638a38d242af76dbc87d130dca67bfd0441072e21ff0"
checksum = "759c50ddad0ef9913bb5496cb9d509a50433a3b78cb0238d61105526589cf0e9"
dependencies = [
"base64 0.22.1",
"base64 0.23.1",
"block2",
"cookie",
"crossbeam-channel",
@@ -4961,7 +4852,6 @@ dependencies = [
"objc2-foundation",
"objc2-ui-kit",
"objc2-web-kit",
"once_cell",
"percent-encoding",
"raw-window-handle",
"sha2",
@@ -4973,7 +4863,7 @@ dependencies = [
"webkit2gtk-sys",
"webview2-com",
"windows",
"windows-core 0.62.2",
"windows-core",
"windows-version",
"x11-dl",
]
@@ -5024,7 +4914,7 @@ dependencies = [
[[package]]
name = "yt-desc-gen"
version = "1.2.0"
version = "1.5.2"
dependencies = [
"serde",
"tauri",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "yt-desc-gen"
version = "1.2.0"
version = "1.5.2"
description = "YouTube Gameplay Description Generator"
authors = ["poli0981"]
edition = "2021"
+2 -1
View File
@@ -1,11 +1,12 @@
{
"identifier": "default",
"description": "Default capabilities for YTDescGen. File access goes through the app's own name-only commands and native dialogs run from Rust, so the webview gets no dialog, fs or shell permissions.",
"description": "Default capabilities for YTDescGen. File access goes through the app's own name-only commands and native dialogs run from Rust, so the webview gets no dialog, fs or shell permissions. set-webview-zoom backs the Ctrl/Cmd +/- zoom polyfill Tauri injects on macOS and Linux (zoomHotkeysEnabled).",
"windows": [
"main"
],
"permissions": [
"core:default",
"core:webview:allow-set-webview-zoom",
"opener:default"
]
}
@@ -5,7 +5,11 @@
<!-- AndroidTV support -->
<uses-feature android:name="android.software.leanback" android:required="false" />
<!-- allowBackup="false": the app's data (localStorage in the WebView) stays
on the device and is never copied to Google Drive backups. Users move
it to a new phone with the app's own Backup & Restore file. -->
<application
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.yt_desc_gen"
+1 -1
View File
@@ -1 +1 @@
{"default":{"identifier":"default","description":"Default capabilities for YTDescGen. File access goes through the app's own name-only commands and native dialogs run from Rust, so the webview gets no dialog, fs or shell permissions.","local":true,"windows":["main"],"permissions":["core:default","opener:default"]}}
{"default":{"identifier":"default","description":"Default capabilities for YTDescGen. File access goes through the app's own name-only commands and native dialogs run from Rust, so the webview gets no dialog, fs or shell permissions. set-webview-zoom backs the Ctrl/Cmd +/- zoom polyfill Tauri injects on macOS and Linux (zoomHotkeysEnabled).","local":true,"windows":["main"],"permissions":["core:default","core:webview:allow-set-webview-zoom","opener:default"]}}
+55 -17
View File
@@ -85,6 +85,9 @@ fn dialog(
/// Ask where to save, then write `content` there. Returns the file name that
/// was written, or `None` when the user cancelled.
///
/// Waiting for the dialog and writing the file both block, so they run on the
/// blocking thread pool instead of holding one of the async runtime's workers.
#[tauri::command]
pub async fn export_text_file(
app: AppHandle,
@@ -96,15 +99,29 @@ pub async fn export_text_file(
title: Option<String>,
) -> Result<Option<String>, String> {
let filter = allowed_filter(&extensions)?;
let refs: Vec<&str> = filter.iter().map(String::as_str).collect();
let picked = dialog(&app, &window, title)
.set_file_name(suggested_file_name(&suggested_name))
.add_filter(filter_name, &refs)
.blocking_save_file();
let Some(picked) = picked else {
return Ok(None);
};
let path = with_allowed_extension(picked_path(picked)?, &filter[0]);
tauri::async_runtime::spawn_blocking(move || {
let refs: Vec<&str> = filter.iter().map(String::as_str).collect();
let picked = dialog(&app, &window, title)
.set_file_name(suggested_file_name(&suggested_name))
.add_filter(filter_name, &refs)
.blocking_save_file();
match picked {
None => Ok(None),
Some(picked) => write_picked(picked, &filter[0], &content),
}
})
.await
.map_err(|e| e.to_string())?
}
/// Write `content` where the user chose, ending in an allowed extension, and
/// return the file name that was written.
fn write_picked(
picked: FilePath,
default_ext: &str,
content: &str,
) -> Result<Option<String>, String> {
let path = with_allowed_extension(picked_path(picked)?, default_ext);
fs::write(&path, content).map_err(|e| e.to_string())?;
Ok(path.file_name().map(|n| n.to_string_lossy().into_owned()))
}
@@ -141,6 +158,7 @@ fn read_picked(path: &Path, filter: &[String]) -> Result<PickedFile, String> {
}
/// Ask for a file, then return its name and text. `None` when cancelled.
/// Runs on the blocking thread pool, like `export_text_file`.
#[tauri::command]
pub async fn import_text_file(
app: AppHandle,
@@ -150,14 +168,18 @@ pub async fn import_text_file(
title: Option<String>,
) -> Result<Option<PickedFile>, String> {
let filter = allowed_filter(&extensions)?;
let refs: Vec<&str> = filter.iter().map(String::as_str).collect();
let picked = dialog(&app, &window, title)
.add_filter(filter_name, &refs)
.blocking_pick_file();
match picked {
None => Ok(None),
Some(picked) => read_picked(&picked_path(picked)?, &filter).map(Some),
}
tauri::async_runtime::spawn_blocking(move || {
let refs: Vec<&str> = filter.iter().map(String::as_str).collect();
let picked = dialog(&app, &window, title)
.add_filter(filter_name, &refs)
.blocking_pick_file();
match picked {
None => Ok(None),
Some(picked) => read_picked(&picked_path(picked)?, &filter).map(Some),
}
})
.await
.map_err(|e| e.to_string())?
}
#[cfg(test)]
@@ -204,6 +226,22 @@ mod tests {
);
}
#[test]
fn writing_keeps_the_name_and_adds_an_allowed_extension() {
let dir = std::env::temp_dir().join(format!("ytdescgen-export-{}", std::process::id()));
fs::create_dir_all(&dir).unwrap();
let name = write_picked(FilePath::Path(dir.join("backup")), "json", "{}").unwrap();
assert_eq!(name.as_deref(), Some("backup.json"));
assert_eq!(fs::read_to_string(dir.join("backup.json")).unwrap(), "{}");
let name = write_picked(FilePath::Path(dir.join("notes.MD")), "json", "# x").unwrap();
assert_eq!(name.as_deref(), Some("notes.MD"));
assert_eq!(fs::read_to_string(dir.join("notes.MD")).unwrap(), "# x");
let _ = fs::remove_dir_all(&dir);
}
#[test]
fn reading_checks_type_size_and_encoding() {
let dir = std::env::temp_dir().join(format!("ytdescgen-dialog-{}", std::process::id()));
+3 -2
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-cli/schema.json",
"productName": "YTDescGen",
"version": "1.2.0",
"version": "1.5.2",
"identifier": "com.skullmute.ytdescgen",
"build": {
"beforeBuildCommand": "npm run build",
@@ -20,7 +20,8 @@
"resizable": true,
"maximizable": true,
"fullscreen": false,
"center": true
"center": true,
"zoomHotkeysEnabled": true
}
],
"security": {
+11 -9
View File
@@ -55,21 +55,23 @@ export class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundarySt
// Best-effort: pull the in-app logger lazily so the boundary stays
// importable from non-React entry points. We never let the logger
// itself throw a secondary error — if the log store is missing we
// fall back to the browser console.
try {
// Dynamic import dodges a circular dep with files that themselves
// import ErrorBoundary, e.g. when the boundary is mounted in
// main.tsx before the store has registered.
void import("@utils/logger").then(({ logger }) => {
// fall back to the browser console. (A try/catch could not catch
// that: the import rejects asynchronously.)
//
// Dynamic import dodges a circular dep with files that themselves
// import ErrorBoundary, e.g. when the boundary is mounted in
// main.tsx before the store has registered.
void import("@utils/logger")
.then(({ logger }) => {
logger.error(
"errorBoundary",
`[${this.props.label ?? "app"}] ${error.message}`,
info.componentStack ?? error.stack ?? "",
);
})
.catch(() => {
console.error("ErrorBoundary caught:", error, info);
});
} catch {
console.error("ErrorBoundary caught:", error, info);
}
this.props.onError?.(error, info);
}
+6 -2
View File
@@ -265,6 +265,7 @@ export function EndingsEditor() {
type="number"
min={1}
max={MAX_ENDINGS}
aria-label={t("editor.endings.rowNumberAria", { row: i + 1 })}
value={entry.number?.toString() ?? ""}
onChange={(e) => {
const v = e.target.value.trim();
@@ -275,6 +276,7 @@ export function EndingsEditor() {
<td className="px-2 py-1.5">
<Input
placeholder={t("editor.endings.namePlaceholder")}
aria-label={t("editor.endings.rowNameAria", { row: i + 1 })}
value={entry.name}
onChange={(e) => updateEnding(i, { name: e.target.value })}
/>
@@ -322,8 +324,8 @@ export function EndingsEditor() {
<thead className="bg-surface-2 text-text-muted text-xs uppercase">
<tr>
<th className="px-2 py-1.5 text-left">{t("editor.endings.videoLabel")}</th>
<th className="px-2 py-1.5 text-left">From</th>
<th className="px-2 py-1.5 text-left">To</th>
<th className="px-2 py-1.5 text-left">{t("editor.endings.fromLabel")}</th>
<th className="px-2 py-1.5 text-left">{t("editor.endings.toLabel")}</th>
</tr>
</thead>
<tbody>
@@ -335,6 +337,7 @@ export function EndingsEditor() {
type="number"
min={1}
max={count}
aria-label={t("editor.endings.rangeFromAria", { video: i + 1 })}
value={String(r.from)}
onChange={(e) => updateRange(i, { from: Number(e.target.value) || 1 })}
/>
@@ -344,6 +347,7 @@ export function EndingsEditor() {
type="number"
min={1}
max={count}
aria-label={t("editor.endings.rangeToAria", { video: i + 1 })}
value={String(r.to)}
onChange={(e) => updateRange(i, { to: Number(e.target.value) || 1 })}
/>
+1 -1
View File
@@ -39,7 +39,7 @@ export default function GenreList({
<Command.Input
autoFocus
placeholder={t("editor.genreSearchPlaceholder")}
className="text-text-primary placeholder:text-text-muted h-10 w-full bg-transparent text-sm outline-none"
className="text-text-primary placeholder:text-text-muted h-10 w-full bg-transparent text-sm outline-hidden"
/>
</div>
<Command.List className="max-h-72 scrollbar-thin overflow-y-auto p-1">
+2 -2
View File
@@ -77,14 +77,14 @@ export function GenreSelector() {
{genres.map((id) => (
<span
key={id}
className="bg-accent-muted text-accent inline-flex h-7 items-center gap-1 rounded-full pr-1 pl-2.5 text-xs font-medium"
className="bg-accent-muted text-accent inline-flex h-7 items-center gap-1 rounded-full pr-0.5 pl-2.5 text-xs font-medium"
>
{labelOf(id)}
<button
type="button"
onClick={() => toggle(id)}
aria-label={t("editor.genreRemove", { genre: labelOf(id) })}
className="hover:bg-accent/20 flex size-5 cursor-pointer items-center justify-center rounded-full"
className="hover:bg-accent/20 flex size-6 cursor-pointer items-center justify-center rounded-full pointer-coarse:size-7"
>
<X className="size-3" aria-hidden="true" />
</button>
+1 -1
View File
@@ -55,7 +55,7 @@ export default function GpuList({
<Command.Input
autoFocus
placeholder={t("editor.gpuSearch")}
className="text-text-primary placeholder:text-text-muted h-10 w-full bg-transparent text-sm outline-none"
className="text-text-primary placeholder:text-text-muted h-10 w-full bg-transparent text-sm outline-hidden"
/>
</div>
<Command.List className="max-h-80 scrollbar-thin overflow-y-auto p-1">
+7 -3
View File
@@ -33,6 +33,7 @@ export function LivePreview({
// Without a game name the engine still renders "— Gameplay No Commentary";
// show the prompt instead so nothing half-built can be copied.
const hasGame = useEditorStore((s) => s.gameName.trim() !== "");
const lang = useEditorStore((s) => s.language);
const output = hasGame ? generated : EMPTY_GENERATOR_OUTPUT;
const [tab, setTab] = useState<PreviewTab>("title");
@@ -73,7 +74,7 @@ export function LivePreview({
>
<TabPanel value="title" className="p-4">
{output.title ? (
<p className="text-text-primary text-[0.9375rem] leading-snug font-medium">
<p lang={lang} className="text-text-primary text-[0.9375rem] leading-snug font-medium">
{output.title}
</p>
) : (
@@ -82,7 +83,10 @@ export function LivePreview({
</TabPanel>
<TabPanel value="description" className="p-4">
{output.description ? (
<pre className="text-text-secondary max-h-[min(52dvh,32rem)] scrollbar-thin overflow-y-auto font-sans text-xs leading-relaxed whitespace-pre-wrap">
<pre
lang={lang}
className="text-text-secondary max-h-[min(52dvh,32rem)] scrollbar-thin overflow-y-auto font-sans text-xs leading-relaxed whitespace-pre-wrap"
>
{output.description}
</pre>
) : (
@@ -91,7 +95,7 @@ export function LivePreview({
</TabPanel>
<TabPanel value="tags" className="p-4">
{output.tags.length > 0 ? (
<div className="flex flex-wrap gap-1">
<div lang={lang} className="flex flex-wrap gap-1">
{output.tags.map((tag, i) => (
<span
key={i}
+15 -10
View File
@@ -9,7 +9,6 @@ import { PopoverContent, PopoverRoot, PopoverTrigger } from "@components/ui/Popo
import { Spinner } from "@components/icons/animated";
import {
RIG_FIELDS,
cleanCpuName,
parseCompositeValue,
resolveCompositeOptions,
resolveCompositeLabelKey,
@@ -117,7 +116,7 @@ function GpuPicker({
);
}
/** CPU (and any other suggested text field): type freely or pick a suggestion. */
/** CPU, LUT (any suggested text field): type freely or pick a suggestion. */
function SuggestedTextField({
field,
value,
@@ -139,10 +138,11 @@ function SuggestedTextField({
list={listId}
autoComplete="off"
onChange={(e) => onChange(e.target.value)}
// "Intel(R) Core(TM) i7-12700K CPU @ 3.60GHz", as Windows shows it,
// becomes "Intel Core i7-12700K" once the user leaves the field.
// The field's own tidy-up once the user leaves it: Windows' "Intel(R)
// Core(TM) i7-12700K CPU @ 3.60GHz" becomes "Intel Core i7-12700K",
// a pasted "Rec709 Kodak 2383 D65.cube" loses its extension.
onBlur={(e) => {
const cleaned = field.id === "cpu" ? cleanCpuName(e.target.value) : e.target.value.trim();
const cleaned = field.clean ? field.clean(e.target.value) : e.target.value.trim();
if (cleaned !== e.target.value) onChange(cleaned);
}}
/>
@@ -293,12 +293,10 @@ export function RigEditor() {
}
if (field.type === "composite_dropdown") return renderComposite(field);
if (field.type === "dropdown_with_version") return renderDropdownWithVersion(field);
if (field.suggestions) {
return <SuggestedTextField key={field.id} field={field} value={value} onChange={set} />;
}
return (
const input = field.suggestions ? (
<SuggestedTextField field={field} value={value} onChange={set} />
) : (
<Input
key={field.id}
label={t(field.labelKey)}
maxLength={FIELD_LIMITS.SHORT_NAME}
placeholder={field.placeholder}
@@ -306,6 +304,13 @@ export function RigEditor() {
onChange={(e) => set(e.target.value)}
/>
);
// A wide field (the LUT) takes the whole row, right under the
// Video Editor row it belongs to.
return (
<div key={field.id} className={clsx("min-w-0", field.wide && "sm:col-span-2")}>
{input}
</div>
);
})}
</div>
</div>
+37 -9
View File
@@ -9,12 +9,14 @@ import {
RT_MODES,
FRAMEGEN_VENDORS,
ART_STYLES,
VIDEO_RESOLUTIONS,
type GraphicsPreset,
type RTMode,
type FrameGenVendor,
type FrameGenMultiplier,
type UpscaleQuality,
type ArtStyle,
type UpscaledFrom,
} from "@config/graphics-settings";
import {
getValidUpscaleQualities,
@@ -22,15 +24,11 @@ import {
coerceUpscaleQuality,
coerceFrameGenMultiplier,
} from "@engine/graphics-vendor";
import { upscaleSourcesFor, validUpscaleSource } from "@engine/upscale";
import { VIDEO_STYLE_ERA_IDS, type VideoStyleEra } from "@config/video-styles";
import { FIELD_LIMITS } from "@config/field-limits";
const RESOLUTION_OPTIONS = [
{ value: "720p", label: "720p" },
{ value: "1080p", label: "1080p" },
{ value: "1440p", label: "1440p" },
{ value: "4K", label: "4K" },
];
const RESOLUTION_OPTIONS = VIDEO_RESOLUTIONS.map((r) => ({ value: r, label: r }));
const FPS_OPTIONS = [
{ value: "30", label: "30 FPS" },
@@ -105,6 +103,26 @@ export function VideoSettingsForm() {
if (coercedM !== store.frameGenMultiplier) store.set("frameGenMultiplier", coercedM);
}
// v1.5.0: "Upscaled from" lists only resolutions below the video's own.
// A stale pair (an older profile applied over a 4K draft, say) shows as
// "Not upscaled" — the engine ignores it too.
const resolution = store.resolution ?? "1080p";
const upscaledFrom = validUpscaleSource(resolution, store.upscaledFrom);
const upscaleSources = upscaleSourcesFor(resolution);
const upscaledFromOptions = [
{ value: "", label: t("editor.upscaledFromNone") },
...upscaleSources.map((r) => ({ value: r, label: r })),
];
// Lowering the resolution to or below the upscale source ends the upscale,
// so the draft never keeps a pair the Select can't show.
function handleResolutionChange(next: string) {
store.set("resolution", next);
if (store.upscaledFrom && !validUpscaleSource(next, store.upscaledFrom)) {
store.set("upscaledFrom", "");
}
}
const artStyleOptions = ART_STYLES.map((s) => ({
value: s,
label: t(`editor.artStyleOptions.${s}`),
@@ -112,12 +130,19 @@ export function VideoSettingsForm() {
return (
<div className="flex flex-col gap-3">
<div className="grid grid-cols-1 gap-3 sm:grid-cols-3">
<div className="grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-4">
<Select
label={t("editor.resolution")}
options={RESOLUTION_OPTIONS}
value={store.resolution ?? "1080p"}
onChange={(v) => store.set("resolution", v)}
value={resolution}
onChange={handleResolutionChange}
/>
<Select
label={t("editor.upscaledFrom")}
options={upscaledFromOptions}
value={upscaledFrom}
disabled={upscaleSources.length === 0}
onChange={(v) => store.set("upscaledFrom", v as UpscaledFrom)}
/>
<Select
label={t("editor.fps")}
@@ -132,6 +157,9 @@ export function VideoSettingsForm() {
onChange={(v) => store.set("graphicsPreset", v as GraphicsPreset)}
/>
</div>
{upscaledFrom && (
<p className="text-text-muted -mt-1 text-xs">{t("editor.upscaledFromHelp")}</p>
)}
{store.graphicsPreset === "custom" && (
<Input
@@ -88,6 +88,7 @@ export function VietnameseDonateEditor() {
/>
{customMode && (
<Input
aria-label={t("editor.vnBankName")}
placeholder={t("editor.vnBankNamePlaceholder")}
value={vnBankName ?? ""}
onChange={(e) => store.set("vnBankName", e.target.value)}
+1 -1
View File
@@ -47,7 +47,7 @@ export function OfflineBanner() {
type="button"
onClick={() => setDismissed(true)}
aria-label={t("common.dismiss")}
className="text-text-muted hover:bg-surface-2 hover:text-text-primary flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-full transition-colors"
className="text-text-muted hover:bg-surface-2 hover:text-text-primary flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-full transition-colors pointer-coarse:size-9"
>
<X className="size-3.5" aria-hidden="true" />
</button>
+8 -2
View File
@@ -36,7 +36,10 @@ export function HistoryCard({ entry }: { entry: HistoryEntry }) {
<Icon className="size-4" aria-hidden />
</span>
<span className="min-w-0 flex-1">
<span className="text-text-primary block truncate text-sm font-medium">
<span
lang={entry.language}
className="text-text-primary block truncate text-sm font-medium"
>
{entry.title}
</span>
<span className="text-text-muted mt-0.5 block truncate text-xs">
@@ -75,7 +78,10 @@ export function HistoryCard({ entry }: { entry: HistoryEntry }) {
<CopyButton text={entry.description} label={t("output.copyDescription")} />
<CopyButton text={entry.tags} label={t("output.copyTags")} />
</div>
<pre className="bg-surface-0 border-border text-text-secondary max-h-56 scrollbar-thin overflow-y-auto rounded-lg border p-2.5 font-sans text-xs leading-relaxed whitespace-pre-wrap">
<pre
lang={entry.language}
className="bg-surface-0 border-border text-text-secondary max-h-56 scrollbar-thin overflow-y-auto rounded-lg border p-2.5 font-sans text-xs leading-relaxed whitespace-pre-wrap"
>
{entry.description}
</pre>
</div>
+3 -1
View File
@@ -5,6 +5,7 @@ import { Header } from "./Header";
import { Sidebar, NavList, NavFooterLinks } from "./Sidebar";
import { MobileNav } from "./MobileNav";
import { ScrollToTopButton } from "./ScrollToTopButton";
import { RouteAnnouncer } from "./RouteAnnouncer";
import { Drawer } from "@components/ui/Drawer";
import { useKeyboardShortcuts, type ShortcutHandlers } from "@hooks/use-keyboard-shortcuts";
import { useGlobalErrorHandler } from "@hooks/use-global-error-handler";
@@ -77,7 +78,7 @@ export function AppShell() {
e.preventDefault();
mainRef.current?.focus();
}}
className="bg-accent text-accent-fg rounded-control sr-only z-[60] px-3 py-2 text-sm font-medium focus:not-sr-only focus:fixed focus:top-2 focus:left-2"
className="bg-accent-solid text-accent-fg rounded-control sr-only z-[60] px-3 py-2 text-sm font-medium focus:not-sr-only focus:fixed focus:top-2 focus:left-2"
>
{t("nav.skipToContent")}
</a>
@@ -96,6 +97,7 @@ export function AppShell() {
<Outlet />
</main>
<ScrollToTopButton scrollRef={mainRef} />
<RouteAnnouncer />
</div>
<MobileNav onOpenMore={() => setMoreOpen(true)} moreActive={moreOpen} />
</div>
+1 -1
View File
@@ -98,7 +98,7 @@ function PaletteBody({
<Command.Input
autoFocus
placeholder={t("command.placeholder")}
className="text-text-primary placeholder:text-text-muted h-12 w-full bg-transparent text-sm outline-none"
className="text-text-primary placeholder:text-text-muted h-12 w-full bg-transparent text-sm outline-hidden"
/>
<Kbd>Esc</Kbd>
</div>
+54
View File
@@ -0,0 +1,54 @@
import { useEffect, useRef, useState } from "react";
import { useLocation } from "react-router-dom";
import { PAGE_TITLE_EVENT } from "@hooks/use-document-title";
/** A navigation whose page never names itself stops waiting after this long. */
const PENDING_MS = 5000;
/**
* Tells screen readers which page a navigation opened. A single-page app
* swaps the content without loading a page, so nothing is announced on its
* own. Focus stays where it was (on the link that was used), so keyboard users
* carry on from there.
*
* Every page names itself through useDocumentTitle, which fires
* PAGE_TITLE_EVENT — after the commit's effects, so a page rendered in the
* same commit as the path change is heard, and a lazy page is heard once its
* chunk arrives and it renders. A title change with no navigation behind it
* (switching the interface language) stays silent.
*/
export function RouteAnnouncer() {
const { pathname } = useLocation();
const [message, setMessage] = useState("");
const pending = useRef(false);
const lastPath = useRef(pathname);
useEffect(() => {
const onTitle = (event: Event) => {
if (!pending.current || !(event instanceof CustomEvent)) return;
if (typeof event.detail !== "string") return;
pending.current = false;
setMessage(event.detail);
};
window.addEventListener(PAGE_TITLE_EVENT, onTitle);
return () => window.removeEventListener(PAGE_TITLE_EVENT, onTitle);
}, []);
useEffect(() => {
// The first page is announced by the browser's own page load (and
// Strict Mode's second run of this effect must not count as a visit).
if (pathname === lastPath.current) return;
lastPath.current = pathname;
pending.current = true;
const timer = window.setTimeout(() => {
pending.current = false;
}, PENDING_MS);
return () => window.clearTimeout(timer);
}, [pathname]);
return (
<div role="status" aria-live="polite" aria-atomic="true" className="sr-only">
{message}
</div>
);
}
+2 -2
View File
@@ -79,14 +79,14 @@ export function LogEntryCard({ entry }: { entry: LogEntryType }) {
label={t("logs.copyEntry")}
size="icon-sm"
onClick={handleCopy}
className="size-7"
className="size-7 pointer-coarse:size-9"
>
<CopyStateIcon copied={copied} className="size-3.5" />
</IconButton>
<IconButton
label={t("logs.deleteEntry")}
size="icon-sm"
className="hover:text-danger size-7"
className="hover:text-danger size-7 pointer-coarse:size-9"
onClick={() => deleteEntry(entry.id)}
>
<Trash2 className="size-3.5" />
+1 -1
View File
@@ -98,7 +98,7 @@ export function OutputExtras() {
icon={MessageSquareText}
actions={<CopyButton text={templateText} label={t("output.copyPinnedCommentTemplate")} />}
>
<OutputText>{templateText}</OutputText>
<OutputText lang={input.language}>{templateText}</OutputText>
</OutputField>
)}
</div>
+14 -2
View File
@@ -24,10 +24,22 @@ export function OutputField({ title, icon: Icon, actions, children }: OutputFiel
);
}
/** Pre-formatted generated text, scrollable when long. */
export function OutputText({ children, tall }: { children: ReactNode; tall?: boolean }) {
/**
* Pre-formatted generated text, scrollable when long. `lang` is the language
* the text was generated in, so a screen reader reads it with that voice.
*/
export function OutputText({
children,
tall,
lang,
}: {
children: ReactNode;
tall?: boolean;
lang?: string;
}) {
return (
<pre
lang={lang}
className={
tall
? "bg-surface-0 border-border text-text-secondary max-h-[60dvh] scrollbar-thin overflow-y-auto rounded-lg border p-3 font-sans text-sm leading-relaxed whitespace-pre-wrap sm:max-h-[28rem]"
+21 -5
View File
@@ -1,12 +1,13 @@
import { useTranslation } from "react-i18next";
import { FileText, Tags, Type } from "lucide-react";
import { useGeneratedOutput } from "@hooks/use-generated-output";
import { useEditorStore } from "@store/editor-store";
import { useSettingsStore } from "@store/settings-store";
import { CopyButton } from "./CopyButton";
import { CharCounter } from "./CharCounter";
import { OutputField, OutputText } from "./OutputField";
import { YT_LIMITS } from "@engine/types";
import type { GeneratorOutput } from "@engine/types";
import type { GeneratorOutput, SupportedLanguage } from "@engine/types";
import type { OutputLimitStatus } from "@engine/limits";
import { useCopyGate } from "@hooks/use-copy-gate";
@@ -16,19 +17,26 @@ interface OutputPreviewProps {
status: OutputLimitStatus;
/** Strict Mode is blocking: nothing can be copied. */
strictBlocked?: boolean;
/** Language of `output` (the draft's output language when omitted). */
lang?: SupportedLanguage;
}
export function OutputPreview({
output: outputProp,
status,
strictBlocked = false,
lang: langProp,
}: OutputPreviewProps) {
const { t } = useTranslation("ui");
const gate = useCopyGate(status, strictBlocked);
const defaultOutput = useGeneratedOutput();
const showCharCount = useSettingsStore((s) => s.showCharCount);
const compactTagDisplay = useSettingsStore((s) => s.compactTagDisplay);
const draftLanguage = useEditorStore((s) => s.language);
const output = outputProp ?? defaultOutput;
// The cards' headings are interface text; only the generated text itself
// carries the output language.
const lang = langProp ?? draftLanguage;
return (
<div className="flex flex-col gap-4">
@@ -48,7 +56,10 @@ export function OutputPreview({
</>
}
>
<p className="bg-surface-0 border-border text-text-primary rounded-lg border p-3 text-[0.9375rem] font-medium">
<p
lang={lang}
className="bg-surface-0 border-border text-text-primary rounded-lg border p-3 text-[0.9375rem] font-medium"
>
{output.title || "…"}
</p>
</OutputField>
@@ -71,7 +82,9 @@ export function OutputPreview({
</>
}
>
<OutputText tall>{output.description || "…"}</OutputText>
<OutputText tall lang={lang}>
{output.description || "…"}
</OutputText>
</OutputField>
<OutputField
@@ -96,11 +109,14 @@ export function OutputPreview({
}
>
{compactTagDisplay ? (
<p className="bg-surface-0 border-border text-text-secondary rounded-lg border p-3 text-xs leading-relaxed">
<p
lang={lang}
className="bg-surface-0 border-border text-text-secondary rounded-lg border p-3 text-xs leading-relaxed"
>
{output.tagString}
</p>
) : (
<div className="flex flex-wrap gap-1.5">
<div lang={lang} className="flex flex-wrap gap-1.5">
{output.tags.map((tag, i) => (
<span
key={i}
+17 -4
View File
@@ -16,6 +16,8 @@ interface YouTubePreviewProps {
description: string;
channelName: string;
gameName: string;
/** Language the title and description were generated in. */
lang?: string;
}
/**
@@ -23,7 +25,13 @@ interface YouTubePreviewProps {
* search result and above the watch page's "…more". Most viewers never see
* anything past those points, so this is where the important words must go.
*/
export function YouTubePreview({ title, description, channelName, gameName }: YouTubePreviewProps) {
export function YouTubePreview({
title,
description,
channelName,
gameName,
lang,
}: YouTubePreviewProps) {
const { t } = useTranslation("ui");
const titleCut = title.length > SEARCH_TITLE_CHARS;
const descriptionCut = description.length > FOLD_DESCRIPTION_CHARS;
@@ -51,18 +59,23 @@ export function YouTubePreview({ title, description, channelName, gameName }: Yo
</span>
</div>
<div className="min-w-0 flex-1">
<p className="text-text-primary line-clamp-2 text-base leading-snug font-semibold">
<p
lang={lang}
className="text-text-primary line-clamp-2 text-base leading-snug font-semibold"
>
{title || "…"}
</p>
<p className="text-text-muted mt-1 text-xs">{channel}</p>
<p className="text-text-muted mt-2 line-clamp-2 text-xs leading-relaxed">{description}</p>
<p lang={lang} className="text-text-muted mt-2 line-clamp-2 text-xs leading-relaxed">
{description}
</p>
</div>
</div>
{/* Watch page, above "…more" */}
<div className="border-border bg-surface-0/60 mx-4 mb-4 rounded-xl border p-3">
<p className="text-text-secondary text-xs leading-relaxed whitespace-pre-line">
{fold || "…"}
<span lang={lang}>{fold || "…"}</span>
{descriptionCut && (
<span className="text-text-primary font-semibold">
{" "}
+1 -1
View File
@@ -58,7 +58,7 @@ export function Banner({
type="button"
onClick={onDismiss}
aria-label={dismissLabel}
className="-m-1 flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-md opacity-70 hover:opacity-100"
className="-m-1 flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-md opacity-70 hover:opacity-100 pointer-coarse:size-9"
>
<X className="size-3.5" aria-hidden="true" />
</button>
+2 -2
View File
@@ -17,13 +17,13 @@ export interface ButtonProps extends ComponentProps<"button"> {
}
const VARIANTS: Record<ButtonVariant, string> = {
primary: "bg-accent text-accent-fg shadow-sm hover:bg-accent-hover",
primary: "bg-accent-solid text-accent-fg shadow-sm hover:bg-accent-solid-hover",
brand: "bg-brand-gradient text-white shadow-sm hover:brightness-110",
secondary:
"border border-border bg-surface-2 text-text-primary hover:border-border-strong hover:bg-surface-3",
outline: "border border-border text-text-primary hover:bg-surface-2",
ghost: "text-text-secondary hover:bg-surface-2 hover:text-text-primary",
danger: "bg-danger text-white shadow-sm hover:brightness-110",
danger: "bg-danger-solid text-white shadow-sm hover:bg-danger-solid-hover",
};
const SIZES: Record<ButtonSize, string> = {
+1 -1
View File
@@ -63,7 +63,7 @@ export function Drawer({
{title}
</Dialog.Title>
<Dialog.Close
className="text-text-muted hover:bg-surface-2 hover:text-text-primary flex size-8 cursor-pointer items-center justify-center rounded-lg"
className="text-text-muted hover:bg-surface-2 hover:text-text-primary flex size-8 cursor-pointer items-center justify-center rounded-lg pointer-coarse:size-10"
aria-label={t("common.close")}
>
<X className="size-4" aria-hidden="true" />
+3 -1
View File
@@ -68,7 +68,9 @@ export const controlClasses = (invalid: boolean) =>
clsx(
"w-full min-w-0 rounded-control border bg-surface-1 px-3 text-text-primary",
"placeholder:text-text-muted transition-[border-color,box-shadow] duration-150",
"focus:outline-none focus-visible:outline-none focus:ring-3 focus:ring-accent/25",
// `outline-hidden`, not `outline-none`: Windows High Contrast drops the
// ring, and this keeps a transparent outline there that it paints instead.
"focus:outline-hidden focus-visible:outline-hidden focus:ring-3 focus:ring-accent/25",
"disabled:cursor-not-allowed disabled:opacity-55",
invalid
? "border-danger focus:border-danger"
+17 -2
View File
@@ -1,4 +1,4 @@
import type { ReactNode } from "react";
import type { ReactNode, RefObject } from "react";
import { useTranslation } from "react-i18next";
import { Dialog, VisuallyHidden } from "radix-ui";
import { X } from "lucide-react";
@@ -15,6 +15,12 @@ interface ModalProps {
/** Max width: sm 24rem · md 32rem (default) · lg 42rem · xl 56rem. */
size?: "sm" | "md" | "lg" | "xl";
className?: string;
/**
* Where focus lands when the dialog opens. Without it, Radix focuses the
* first focusable element (the close button). Use this instead of an
* `autoFocus` attribute on the target.
*/
initialFocusRef?: RefObject<HTMLElement | null>;
}
const SIZES = { sm: "max-w-sm", md: "max-w-lg", lg: "max-w-2xl", xl: "max-w-4xl" } as const;
@@ -34,6 +40,7 @@ export function Modal({
footer,
size = "md",
className,
initialFocusRef,
}: ModalProps) {
const { t } = useTranslation("ui");
return (
@@ -41,6 +48,14 @@ export function Modal({
<Dialog.Portal>
<Dialog.Overlay className="bg-overlay animate-fade-in fixed inset-0 z-50 backdrop-blur-[2px]" />
<Dialog.Content
onOpenAutoFocus={
initialFocusRef
? (event) => {
event.preventDefault();
initialFocusRef.current?.focus();
}
: undefined
}
className={clsx(
"bg-surface-1 border-border shadow-pop animate-pop-in rounded-panel fixed top-1/2 left-1/2 z-50 flex max-h-[min(88dvh,52rem)] w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col border",
"focus:outline-none",
@@ -65,7 +80,7 @@ export function Modal({
)}
</div>
<Dialog.Close
className="text-text-muted hover:bg-surface-2 hover:text-text-primary -m-1.5 flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-lg transition-colors"
className="text-text-muted hover:bg-surface-2 hover:text-text-primary -m-1.5 flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-lg transition-colors pointer-coarse:size-10"
aria-label={t("common.close")}
>
<X className="size-4" aria-hidden="true" />
+22 -7
View File
@@ -1,6 +1,7 @@
import { useMemo, useState } from "react";
import { useMemo, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { Search } from "lucide-react";
import { useSettingsStore } from "@store/settings-store";
import { Modal } from "./Modal";
import { ShortcutKeys, keyName } from "./Badge";
@@ -16,6 +17,8 @@ const SHORTCUTS = [
{ keys: ["mod", "shift", "C"], labelKey: "shortcuts.copyAll" },
{ keys: ["mod", "S"], labelKey: "shortcuts.saveToHistory" },
{ keys: ["mod", "B"], labelKey: "shortcuts.toggleSidebar" },
// sonner's hotkey: focuses the notifications while any are on screen.
{ keys: ["alt", "T"], labelKey: "shortcuts.notifications" },
{ keys: ["mod", "/"], labelKey: "shortcuts.help" },
{ keys: ["?"], labelKey: "shortcuts.help" },
{ keys: ["esc"], labelKey: "shortcuts.close" },
@@ -24,6 +27,10 @@ const SHORTCUTS = [
export function ShortcutHelpModal({ open, onClose }: ShortcutHelpModalProps) {
const { t } = useTranslation("ui");
const [query, setQuery] = useState("");
const singleKey = useSettingsStore((s) => s.singleKeyShortcuts);
// The search box gets focus when the modal opens (through Radix, not an
// `autoFocus` attribute).
const searchRef = useRef<HTMLInputElement>(null);
// A closed modal has no filter. Deriving this rather than resetting `query`
// in an effect means a re-open always starts fresh without an extra render
@@ -31,28 +38,36 @@ export function ShortcutHelpModal({ open, onClose }: ShortcutHelpModalProps) {
const activeQuery = open ? query : "";
const filtered = useMemo(() => {
// The bare `?` row goes when Settings turned single-key shortcuts off.
const available = singleKey ? SHORTCUTS : SHORTCUTS.filter((s) => s.keys[0] !== "?");
const trimmed = activeQuery.trim().toLowerCase();
if (!trimmed) return SHORTCUTS;
return SHORTCUTS.filter((s) => {
if (!trimmed) return available;
return available.filter((s) => {
const label = t(s.labelKey).toLowerCase();
const keys = s.keys.map(keyName).join(" ").toLowerCase();
return label.includes(trimmed) || keys.includes(trimmed);
});
}, [activeQuery, t]);
}, [activeQuery, singleKey, t]);
return (
<Modal open={open} onClose={onClose} title={t("shortcuts.title")} size="sm">
<Modal
open={open}
onClose={onClose}
title={t("shortcuts.title")}
size="sm"
initialFocusRef={searchRef}
>
<div className="flex flex-col gap-3">
<label className="border-border bg-surface-0 focus-within:border-accent focus-within:ring-accent/25 h-control rounded-control flex items-center gap-2 border px-3 transition-colors focus-within:ring-2">
<Search className="text-text-muted size-4 shrink-0" aria-hidden="true" />
<input
ref={searchRef}
type="search"
value={activeQuery}
onChange={(e) => setQuery(e.target.value)}
placeholder={t("shortcuts.searchPlaceholder")}
aria-label={t("shortcuts.searchPlaceholder")}
className="text-text-primary placeholder:text-text-muted w-full bg-transparent text-sm outline-none"
autoFocus
className="text-text-primary placeholder:text-text-muted w-full bg-transparent text-sm outline-hidden"
/>
</label>
{filtered.length === 0 ? (
+6 -1
View File
@@ -1,3 +1,4 @@
import { useTranslation } from "react-i18next";
import { Toaster as Sonner } from "sonner";
import { useSettingsStore } from "@store/settings-store";
@@ -8,21 +9,25 @@ import { useSettingsStore } from "@store/settings-store";
* floating elements.
*/
export function Toaster() {
const { t } = useTranslation("ui");
const theme = useSettingsStore((s) => s.theme);
return (
<Sonner
theme={theme}
position="bottom-center"
closeButton
// sonner's own labels are English ("Notifications alt+T", "Close toast").
customAriaLabel={t("common.notificationsRegion")}
// globals.css switches this at the md breakpoint, where the bar goes.
offset={{ bottom: "var(--toast-offset-bottom)" }}
mobileOffset={{ bottom: "var(--toast-offset-bottom)" }}
toastOptions={{
closeButtonAriaLabel: t("common.closeNotification"),
classNames: {
toast:
"!bg-surface-1 !border-border !text-text-primary !rounded-card !shadow-pop !font-sans",
description: "!text-text-secondary",
actionButton: "!bg-accent !text-accent-fg !rounded-lg !font-medium",
actionButton: "!bg-accent-solid !text-accent-fg !rounded-lg !font-medium",
cancelButton: "!bg-surface-2 !text-text-secondary !rounded-lg",
closeButton: "!bg-surface-2 !border-border !text-text-secondary",
},
+4
View File
@@ -7,6 +7,7 @@ import type {
FrameGenMultiplier,
UpscaleQuality,
ArtStyle,
UpscaledFrom,
} from "./graphics-settings";
import type { VideoStyleEra } from "./video-styles";
import { DEFAULT_GACHA_QUEST_TYPE, type GachaQuestType } from "./gacha-quest-types";
@@ -56,6 +57,8 @@ export interface EditorDefaults {
/** Gacha-quest game version label (v0.13) — e.g. "1.2", "2.4". Only used for `gacha_quest` videoType. */
gachaVersion: string;
resolution: string;
/** v1.5.0: recorded at this resolution, upscaled to `resolution` in the editor. "" = not upscaled. */
upscaledFrom: UpscaledFrom;
fps: string;
graphicsPreset: GraphicsPreset;
graphicsPresetCustom: string;
@@ -194,6 +197,7 @@ export const DEFAULTS = {
anniversaryYear: null,
gachaVersion: "",
resolution: "1080p",
upscaledFrom: "",
fps: "60",
graphicsPreset: "medium",
graphicsPresetCustom: "",
+21
View File
@@ -1,5 +1,26 @@
import type { GenreId } from "./genres";
/**
* The video's resolution — the uploaded file's, which is what the title badge,
* the quality tags and the description's "Video:" line name. Lowest first, so
* an index comparison tells which of two is higher.
*/
export const VIDEO_RESOLUTIONS = ["720p", "1080p", "1440p", "4K"] as const;
/**
* v1.5.0: the resolution the footage was recorded at when it was upscaled to
* {@link VIDEO_RESOLUTIONS} in the video editor (e.g. 1440p → 4K). `""` = not
* upscaled. Only a value below the video's resolution counts — the engine
* ignores any other pair (see `@engine/upscale`).
*/
export const UPSCALED_FROM_OPTIONS = ["", "720p", "1080p", "1440p"] as const;
export type UpscaledFrom = (typeof UPSCALED_FROM_OPTIONS)[number];
/** Type guard so the migration and patches can drop values from elsewhere. */
export function isUpscaledFrom(value: unknown): value is UpscaledFrom {
return typeof value === "string" && (UPSCALED_FROM_OPTIONS as readonly string[]).includes(value);
}
/**
* Graphics-quality preset ladder. Mirrors the most common in-game preset
* names across Unreal/Unity/proprietary engines. `"custom"` reveals a
+8
View File
@@ -20,6 +20,7 @@ export type LegalDocId =
| "license"
| "third-party"
| "security"
| "accessibility"
| "notice"
| "conduct";
@@ -54,6 +55,13 @@ export const LEGAL_DOCS: readonly LegalDoc[] = [
consent: false,
},
{ id: "security", labelKey: "legal.docs.security", source: "SECURITY.md", consent: false },
{
id: "accessibility",
labelKey: "legal.docs.accessibility",
source: "ACCESSIBILITY.md",
sourceVi: "docs/i18n/vi/ACCESSIBILITY.md",
consent: false,
},
{ id: "notice", labelKey: "legal.docs.notice", source: "NOTICE", consent: false },
{ id: "conduct", labelKey: "legal.docs.conduct", source: "CODE_OF_CONDUCT.md", consent: false },
];
+1
View File
@@ -18,6 +18,7 @@ export const PROFILE_FIELDS = [
"social",
"rig",
"resolution",
"upscaledFrom",
"fps",
"graphicsPreset",
"graphicsPresetCustom",
+5 -2
View File
@@ -140,8 +140,11 @@ export const PLATFORMS: readonly PlatformConfig[] = [
tagName: "Android",
label: "Google Play",
urlPrefix: "https://play.google.com/store/apps/details?id=",
// `id=` first or after other parameters (`?hl=en&id=…`).
urlPattern: /^https:\/\/play\.google\.com\/store\/apps\/details\?(?:[^\s]*&)?id=[\w.]+[^\s]*$/i,
// `id=` first or after other parameters (`?hl=en&id=…`). The lookahead
// finds the parameter (each `&`-separated step is unambiguous), then one
// `\S*$` scan checks the rest — linear, where `[^\s]*&` + `[^\s]*$` was not.
urlPattern:
/^https:\/\/play\.google\.com\/store\/apps\/details\?(?=(?:[^\s&]*&)*id=[\w.])\S*$/i,
},
{
id: "appstore",
+98 -11
View File
@@ -102,6 +102,15 @@ export interface RigField {
readonly composite?: CompositeFieldSpec;
/** `text` fields: values offered while typing (the user may type anything). */
readonly suggestions?: readonly string[];
/**
* `text` fields: tidies the typed or pasted text. Runs when the user
* leaves the field and again in {@link formatRigValue}, so a shortcut
* pressed while the cursor is still in the field prints the tidy form
* too. Must be idempotent.
*/
readonly clean?: (raw: string) => string;
/** Takes both columns of the editor's grid (long values, such as a LUT name). */
readonly wide?: boolean;
}
/**
@@ -461,15 +470,80 @@ export const CPU_SUGGESTIONS: readonly string[] = [
* Text it doesn't recognise is only trimmed and de-duplicated of spaces.
*/
export function cleanCpuName(raw: string): string {
return raw
.replace(/\((?:R|TM|C)\)|[®™©]/gi, "")
.replace(/^\s*\d{1,2}(?:st|nd|rd|th)\s+Gen\s+/i, "")
.replace(/\s+CPU\s*@\s*[\d.]+\s*[GM]Hz\b/i, "")
.replace(/\s+@\s*[\d.]+\s*[GM]Hz\b/i, "")
.replace(/\s+\d{1,3}-Core\s+Processor\b/i, "")
.replace(/\s+(?:with\s+Radeon(?:\s+\w+)?\s+Graphics|Processor)\s*$/i, "")
.replace(/\s{2,}/g, " ")
.trim();
return (
raw
.replace(/\((?:R|TM|C)\)|[®™©]/gi, "")
// From here on every whitespace run is a single character, so the
// patterns below need only `\s` / `\s?`. A leading `\s+` would be
// re-tried at every position of a long run (quadratic).
.replace(/\s{2,}/g, " ")
.replace(/^\s*\d{1,2}(?:st|nd|rd|th)\s+Gen\s+/i, "")
.replace(/\sCPU\s?@\s?[\d.]+\s?[GM]Hz\b/i, "")
.replace(/\s@\s?[\d.]+\s?[GM]Hz\b/i, "")
.replace(/\s\d{1,3}-Core\sProcessor\b/i, "")
.replace(/\s(?:with\sRadeon(?:\s\w+)?\sGraphics|Processor)\s?$/i, "")
.trim()
);
}
/**
* LUTs that come with DaVinci Resolve, named the way its LUT menu shows
* them (from Resolve 21's own LUT folder), offered while typing in the
* LUT field. Any other LUT's name is accepted as typed.
*/
export const LUT_SUGGESTIONS: readonly string[] = [
"Arri Alexa LogC to Rec709",
"Rec709 Kodak 2383 D65",
"Rec709 Kodak 2383 D60",
"Rec709 Kodak 2383 D55",
"Rec709 Fujifilm 3513DI D65",
"Rec709 Fujifilm 3513DI D60",
"Rec709 Fujifilm 3513DI D55",
"HDR 1000 nits to Gamma 2.4",
"Blackmagic Gen 6 DaVinci to Rec709 BT1886 Film Look",
"SLog3SGamut3.CineToLC-709",
"SLog3SGamut3.CineToLC-709TypeA",
"V-Log to V-709",
"Leica Pure L-Log to Rec.709 Gamma 2.4",
"Samsung Log to Rec709",
];
/** The file extensions LUTs come in. Anchored at the end: linear. */
const LUT_FILE_EXTENSION = /\.(?:cube|3dl|dat|csp|ilut|olut|look)$/i;
/** One pass of {@link cleanLutName}. */
function tidyLutNameOnce(text: string): string {
let name = text.trim();
// Explorer's "Copy as path" wraps the path in double quotes.
if (name.length >= 2 && name.startsWith('"') && name.endsWith('"')) {
name = name.slice(1, -1).trim();
}
// A path (a backslash, a drive letter, or a leading / or ~/) keeps only
// its file name. A slash in an ordinary name ("Teal/Orange") stays.
const isPath =
name.includes("\\") || /^[a-z]:\//i.test(name) || name.startsWith("/") || name.startsWith("~/");
if (isPath) {
name = name.slice(Math.max(name.lastIndexOf("\\"), name.lastIndexOf("/")) + 1).trim();
}
return name.replace(LUT_FILE_EXTENSION, "").trim();
}
/**
* Tidy a LUT name pasted from a file manager:
* `"Rec709 Kodak 2383 D65.cube"` → `"Rec709 Kodak 2383 D65"`, and
* Explorer's `"C:\…\Arri\Arri Alexa LogC to Rec709.dat"` (or a macOS
* path) → `"Arri Alexa LogC to Rec709"`. Dots inside a name
* ("SLog3SGamut3.CineToLC-709", "Rec.709 Gamma 2.4") stay. Idempotent:
* passes repeat until nothing changes.
*/
export function cleanLutName(raw: string): string {
let name = raw;
let previous: string;
do {
previous = name;
name = tidyLutNameOnce(name);
} while (name !== previous);
return name;
}
/**
@@ -483,6 +557,7 @@ export const RIG_FIELDS: readonly RigField[] = [
type: "text",
placeholder: "AMD Ryzen 7 9800X3D",
suggestions: CPU_SUGGESTIONS,
clean: cleanCpuName,
},
{ id: "gpu", labelKey: "rig.gpu", type: "gpu" },
{ id: "ram", labelKey: "rig.ram", type: "composite_dropdown", composite: RAM_COMPOSITE },
@@ -509,6 +584,16 @@ export const RIG_FIELDS: readonly RigField[] = [
options: VIDEO_EDITOR_OPTIONS,
versionPlaceholder: "20 / 2026 / v25",
},
// The LUT graded in that editor — its own line, right under it.
{
id: "lut",
labelKey: "rig.lut",
type: "text",
placeholder: "Arri Alexa LogC to Rec709",
suggestions: LUT_SUGGESTIONS,
clean: cleanLutName,
wide: true,
},
];
/**
@@ -562,7 +647,9 @@ function withSuffix(text: string, suffix: string): string {
* - `composite_dropdown` ("32|DDR5|6000", "custom:48|DDR5|") →
* "32 GB DDR5-6000" / "48 GB DDR5" via the field's
* {@link CompositeFieldSpec.format}.
* - All other field types pass the raw value through.
* - `text` fields with a {@link RigField.clean} go through it (a pasted
* "Rec709 Kodak 2383 D65.cube" → "Rec709 Kodak 2383 D65"); other text
* passes through as typed.
*/
export function formatRigValue(fieldId: string, raw: string): string {
const field = RIG_FIELDS.find((f) => f.id === fieldId);
@@ -614,5 +701,5 @@ export function formatRigValue(fieldId: string, raw: string): string {
return field.composite.format(resolved);
}
return raw;
return field.clean ? field.clean(raw) : raw;
}
+3 -1
View File
@@ -58,5 +58,7 @@ export function withoutEmptyChannel(text: string, language: SupportedLanguage):
let out = text;
for (const pattern of [...DROP[language], ENGLISH]) out = out.replace(pattern, "");
out = out.split(CHANNEL_SLOT).join(FALLBACK[language]);
return out.replace(/[ \t]{2,}/g, " ").replace(/[ \t]+([.,!?。!?])/g, "$1");
// After the first replace no run of spaces/tabs is longer than one, so the
// second needs no `+` (which would make it quadratic on long runs).
return out.replace(/[ \t]{2,}/g, " ").replace(/[ \t]([.,!?。!?])/g, "$1");
}
+33 -6
View File
@@ -1,4 +1,4 @@
import type { GeneratorInput, TranslationFn, CharLimitWarning } from "./types";
import type { GeneratorInput, TranslationFn, CharLimitWarning, AutoTechNote } from "./types";
import { channelOrSlot, withoutEmptyChannel } from "./channel-phrase";
import { YT_LIMITS } from "./types";
import { PLATFORMS } from "@config/platforms";
@@ -11,6 +11,7 @@ import { buildRigLines } from "./rig-block";
import { parseTimeline, renderTimeline } from "./timeline-parser";
import { formatEndingEntry, sliceEndingsForVideo } from "./endings-format";
import { sanitizeHashtag } from "@utils/sanitize";
import { validUpscaleSource } from "./upscale";
const SOCIAL_ICONS: Record<string, string> = {
kofi: "☕",
@@ -223,6 +224,26 @@ function composeVideoStyleLine(input: GeneratorInput, t: TranslationFn): string
return t("description.videoSettings.styleLineNoEditor", { era: eraLabel });
}
/**
* The v1.5.0 "Upscale:" line — `Upscale: 1440p → 4K (DaVinci Resolve Studio
* 21.2)`, the editor named by the rig's `video_editor` field (no brackets when
* it's empty). Empty string when the video isn't upscaled. Like the style
* line, it survives `skipGraphicsSettings`: it describes the video, not the
* game's settings, and the title's "Upscaled" badge needs it explained.
*/
function composeUpscaleLine(input: GeneratorInput, t: TranslationFn): string {
const from = validUpscaleSource(input.resolution, input.upscaledFrom);
if (!from) return "";
const editor = formatRigValue("video_editor", input.rig?.video_editor ?? "").trim();
const tool = editor ? ` (${editor})` : "";
return `${t("description.graphics.upscaleLabel")}: ${from} → ${input.resolution}${tool}`;
}
/** The tech notes the engine adds after the user's own ({@link AUTO_TECH_NOTES}). */
function autoTechNotes(input: GeneratorInput): AutoTechNote[] {
return validUpscaleSource(input.resolution, input.upscaledFrom) ? ["editor_upscaled"] : [];
}
export interface BuildDescriptionOptions {
hashtagCount?: number;
/** When true and channelName is non-empty, appends an auto-generated
@@ -450,6 +471,7 @@ export function buildDescription(
// still edit their footage, so the style credit shouldn't disappear
// with the graphics block.
const styleLine = composeVideoStyleLine(input, t);
const upscaleLine = composeUpscaleLine(input, t);
if (!input.skipGraphicsSettings) {
const lines: string[] = [];
@@ -461,6 +483,8 @@ export function buildDescription(
if (captureParts.length > 0) {
lines.push(`${t("description.graphics.videoLabel")}: ${captureParts.join(" - ")}`);
}
// v1.5.0: what the video was upscaled from, right under its resolution.
if (upscaleLine) lines.push(upscaleLine);
// In-game side: preset + modifiers + RT.
const gfxPart = composeGraphicsPart(input, t);
@@ -489,11 +513,12 @@ export function buildDescription(
if (lines.length > 0) {
sections.push(`${t("description.sections.videoSettings")}\n${lines.join("\n")}`);
}
} else if (styleLine) {
} else if (upscaleLine || styleLine) {
// 2D / pixel-art path: the graphics block is suppressed but the
// creator still set a style era, so emit a single-line standalone
// section under the same header.
sections.push(`${t("description.sections.videoSettings")}\n${styleLine}`);
// creator still upscaled the video or set a style era, so emit those
// lines as a standalone section under the same header.
const lines = [upscaleLine, styleLine].filter(Boolean);
sections.push(`${t("description.sections.videoSettings")}\n${lines.join("\n")}`);
}
// 5.5 Difficulty — moved into the unified Playthrough Notes block
@@ -534,8 +559,10 @@ export function buildDescription(
// Sits next to Content Warnings because both are transparency blocks;
// grouping them keeps disclaimers visually together. Same bilingual
// checklist shape.
// v1.5.0: the engine's own notes (the upscaling warning) follow the user's.
const techNotes = [...(input.techNotes ?? []), ...autoTechNotes(input)];
const tnSection = buildBilingualBulletSection(
input.techNotes ?? [],
techNotes,
"description.techNotes",
input.language,
t,
+120 -11
View File
@@ -1,6 +1,7 @@
import type { GeneratorInput, SupportedLanguage } from "./types";
import { YT_LIMITS } from "./types";
import { PLATFORMS } from "@config/platforms";
import { VIDEO_TYPES } from "@config/video-types";
/**
* Length of a tag list as YouTube counts it against the 500-character
@@ -26,8 +27,12 @@ export function youtubeTagsLength(tags: readonly string[]): number {
*/
const COMPOSITE_NAME_BUDGET = YT_LIMITS.SINGLE_TAG_MAX - 9;
// The match may only start right before a run of `:`/whitespace (or at the
// start), never inside one — a leading `[:\s]+` alone would be re-tried at
// every position of a long run (quadratic). Group 1 keeps the character before
// the run; the caller puts it back with "$1".
const QUALIFIER_SUFFIX_RE =
/[:\s]+(?:Definitive|Complete|Collector'?s?|Deluxe|Game\s+of\s+the\s+Year|GOTY|Ultimate|Special|Anniversary|Remastered|Remake|Enhanced|HD)(?:\s+(?:Edition|Cut|Version))?\s*$/i;
/(^|[^:\s])[:\s]+(?:Definitive|Complete|Collector'?s?|Deluxe|Game\s+of\s+the\s+Year|GOTY|Ultimate|Special|Anniversary|Remastered|Remake|Enhanced|HD)(?:\s+(?:Edition|Cut|Version))?\s*$/i;
/**
* Strips characters that YouTube treats as tag delimiters (`,` `;` `|`) plus
@@ -57,7 +62,7 @@ export function tagFriendlyGameName(name: string, budget: number): string {
let prev: string;
do {
prev = n;
n = n.replace(QUALIFIER_SUFFIX_RE, "").trim();
n = n.replace(QUALIFIER_SUFFIX_RE, "$1").trim();
} while (n !== prev);
if (n.length <= budget) return n;
@@ -69,16 +74,111 @@ export function tagFriendlyGameName(name: string, budget: number): string {
n = head;
}
const words = n.split(/\s+/);
const acc: string[] = [];
let len = 0;
for (const w of words) {
const sep = acc.length === 0 ? 0 : 1;
if (len + sep + w.length > budget) break;
acc.push(w);
len += sep + w.length;
return leadingWordsWithin(n.split(/\s+/), budget);
}
/**
* The leading whole words that fit `budget` characters, joined by single
* spaces; when even the first word is longer, its first `budget`
* characters.
*/
function leadingWordsWithin(words: readonly string[], budget: number): string {
const kept: string[] = [];
let length = 0;
for (const word of words) {
const separator = kept.length === 0 ? 0 : 1;
if (length + separator + word.length > budget) break;
kept.push(word);
length += separator + word.length;
}
return acc.join(" ") || n.slice(0, budget);
return kept.join(" ") || (words[0] ?? "").slice(0, budget);
}
/**
* What a boss name's tag keeps: letters in any script (with their
* combining marks), digits, whitespace, and `.` `'` `’` `-` for the word
* rules below. Everything else — `,` `;` `:` `!` `?` quotes, brackets,
* `&` `/` `#`, `「」` `・` `、` `。`, ™, emoji — becomes a space. A single
* character class: linear.
*/
const BOSS_NAME_NOISE = /[^\p{L}\p{M}\p{N}\s.'’-]/gu;
/**
* Where a long boss name's title starts: "Loretta, Knight of the
* Haligtree", "Margit – the Fell Omen", "Sister Friede (Phase 2)".
*/
const BOSS_NAME_BREAK = /[,,、::;;(([【「『|—–]| - /;
const DIGIT = /^\p{Nd}$/u;
const INITIAL = /^\p{L}\p{M}*$/u;
/** Apostrophes and hyphens belong inside a word ("Mergo's", "T-103"), not at its edges. */
const WORD_EDGE_MARKS = new Set(["'", "’", "-"]);
function trimWordEdges(word: string): string {
let start = 0;
let end = word.length;
while (start < end && WORD_EDGE_MARKS.has(word.charAt(start))) start++;
while (end > start && WORD_EDGE_MARKS.has(word.charAt(end - 1))) end--;
return word.slice(start, end);
}
/**
* The dots in one word: kept between two digits ("2.0"), dropped between
* initials ("S.T.A.L.K.E.R." → "STALKER", "K.K." → "KK"), a space
* everywhere else ("Mr.X" → "Mr X", "Dr.ワイリー" → "Dr ワイリー").
* Done in code, not with a lookbehind: older WebKit (the macOS 11–13
* desktop webview) rejects one, and the whole chunk would fail to load.
*/
function resolveDots(word: string): string {
const parts = word.split(".");
let out = parts[0] ?? "";
for (let i = 1; i < parts.length; i++) {
const before = parts[i - 1] ?? "";
const after = parts[i] ?? "";
if (DIGIT.test(before.slice(-1)) && DIGIT.test(after.charAt(0))) out += ".";
else if (!(INITIAL.test(before) && (after === "" || INITIAL.test(after)))) out += " ";
out += after;
}
return out;
}
function bossNameWords(text: string): string[] {
return text
.replace(BOSS_NAME_NOISE, " ")
.split(/\s+/)
.flatMap((word) => resolveDots(word).split(" "))
.map(trimWordEdges)
.filter(Boolean);
}
/**
* The boss's name as one tag, without the marks that add nothing to a
* search: "Gael, Slave Knight" → "Gael Slave Knight", "Mr. X" → "Mr X",
* "「マレニア」" → "マレニア". Over 30 characters (the per-tag limit), the
* name before its title is tried ("Loretta, Knight of the Haligtree" →
* "Loretta"), then the leading words that fit. Empty when nothing is left.
*
* Pure — exported for testing.
*/
export function bossNameTag(name: string): string {
const text = name.normalize("NFC");
const words = bossNameWords(text);
const full = words.join(" ");
if (full.length <= YT_LIMITS.SINGLE_TAG_MAX) return full;
const breakAt = text.search(BOSS_NAME_BREAK);
const headWords = breakAt > 0 ? bossNameWords(text.slice(0, breakAt)) : [];
const head = headWords.join(" ");
if (head && head.length <= YT_LIMITS.SINGLE_TAG_MAX) return head;
return leadingWordsWithin(headWords.length > 0 ? headWords : words, YT_LIMITS.SINGLE_TAG_MAX);
}
/** Video types that ask for a boss name (Boss Fight, Boss No Hit). */
function takesBossName(videoType: string): boolean {
const extraFields: readonly string[] =
VIDEO_TYPES.find((type) => type.id === videoType)?.extraFields ?? [];
return extraFields.includes("bossName");
}
/**
@@ -537,6 +637,15 @@ export function generateTags(input: GeneratorInput, options?: TagOptions): strin
if (bareNameTag) allTags.push(bareNameTag);
if (composeName && composeName !== bareNameTag) allTags.push(composeName);
// Boss videos (v1.4.0): the boss's name as a tag of its own, right after
// the game's, so fitting the list to 500 characters never drops it. Only
// for the video types that ask for a boss name — one left in the draft
// after switching to another type isn't this video's.
if (takesBossName(input.videoType)) {
const bossTag = bossNameTag(input.bossName ?? "");
if (bossTag) allTags.push(bossTag);
}
// Core tags — language-specific (highest priority)
const coreFn = CORE_TAGS_BY_LANG[input.language] ?? CORE_TAGS_BY_LANG.en;
allTags.push(...coreFn(composeName));
+8 -4
View File
@@ -25,9 +25,13 @@ export interface TimelineEntry {
* frames `:FF` dropped, as editors export them), an optional `]` / `)`,
* an optional separator (`-`, `–`, `—`, `:`, `|`, `•`) and the label.
* "[0:00] Intro", "0:00 - Intro" and "00:00:00:12 Intro" all parse.
*
* Match it against `line.trimEnd()`: the label runs to the end of the line,
* and trimming first (rather than a lazy label + `\s*$`) keeps the match
* linear on long runs of spaces.
*/
const LINE_RE =
/^\s*[[(]?((?:\d{1,2}:)?\d{1,2}:\d{2})(?::\d{2})?[\])]?\s*(?:[-–—:|•·]\s*)?(\S.*?)\s*$/u;
/^\s*[[(]?((?:\d{1,2}:)?\d{1,2}:\d{2})(?::\d{2})?[\])]?\s*(?:[-–—:|•·]\s*)?(\S.*)$/u;
// Keyword patterns. Order matters — "final boss" must be tried before "boss".
// Each regex captures the optional number group when applicable.
@@ -128,7 +132,7 @@ export function parseTimeline(raw: string): TimelineEntry[] {
for (const line of lines) {
if (!line.trim()) continue;
const lineMatch = line.match(LINE_RE);
const lineMatch = LINE_RE.exec(line.trimEnd());
if (!lineMatch) {
// Not a `time label` line — keep the raw text so nothing disappears.
entries.push({ time: "", rawLabel: line.trim() });
@@ -152,7 +156,7 @@ export function parseTimeline(raw: string): TimelineEntry[] {
for (let i = 1; i < m.length - 1; i++) {
const g = m[i];
if (g && /^\d+$/.test(g)) {
entry.number = parseInt(g, 10);
entry.number = Number.parseInt(g, 10);
break;
}
}
@@ -200,7 +204,7 @@ export function renderTimeline(
// Collapse the trailing whitespace that creeps in when a numbered
// keyword pattern (`"Boss {{n}}"`) interpolates with an empty `n`.
const translated = t(`timeline.keywords.${entry.keyword}`, { n: numberVar })
.replace(/\s+$/u, "")
.trimEnd()
.replace(/\s{2,}/gu, " ");
const withRest = entry.rest ? `${translated} ${entry.rest}` : translated;
rendered.push(`${entry.time} ${withRest}`);
+17 -5
View File
@@ -15,6 +15,7 @@ import {
} from "@config/gacha-quest-types";
import { formatEndingEntry, sliceEndingsForVideo } from "./endings-format";
import type { EndingEntry } from "./types";
import { validUpscaleSource } from "./upscale";
/**
* Compact "[2K 60FPS]" badge appended to the video-type segment when the
@@ -26,10 +27,15 @@ import type { EndingEntry } from "./types";
* - Non-default FPS → include the resolution alongside (e.g. "1080p 120FPS")
* so a lonely FPS number isn't ambiguous.
*
* Always returns upper-case. Callers apply `badgeCase: "lower"` downstream
* — this function is a label producer, not a display formatter.
* - v1.5.0: `upscaledWord` (the locale's "Upscaled", passed only when the
* video was upscaled in the editor) follows the resolution — "4K Upscaled",
* "4K Upscaled 120FPS". It never makes a badge on its own: 1080p 60fps
* upscaled from 720p still has none (the description says so instead).
*
* Callers apply `badgeCase: "lower"` downstream — this function is a label
* producer, not a display formatter.
*/
export function buildQualityBadge(resolution?: string, fps?: string): string {
export function buildQualityBadge(resolution?: string, fps?: string, upscaledWord = ""): string {
const res = resolution || "1080p";
const fpsValue = fps || "60";
const resDefault = res === "1080p";
@@ -37,7 +43,8 @@ export function buildQualityBadge(resolution?: string, fps?: string): string {
if (resDefault && fpsDefault) return "";
const resLabel = res === "1440p" ? "2K" : res;
return fpsDefault ? resLabel : `${resLabel} ${fpsValue}FPS`;
const head = upscaledWord ? `${resLabel} ${upscaledWord}` : resLabel;
return fpsDefault ? head : `${head} ${fpsValue}FPS`;
}
export interface BuildTitleOptions {
@@ -285,7 +292,12 @@ export function buildTitle(
const gameName = input.gameNameLocalized?.[input.language] ?? input.gameName;
let badge = opts.showQualityBadge ? buildQualityBadge(input.resolution, input.fps) : "";
const upscaledWord = validUpscaleSource(input.resolution, input.upscaledFrom)
? t("title.upscaled")
: "";
let badge = opts.showQualityBadge
? buildQualityBadge(input.resolution, input.fps, upscaledWord)
: "";
if (badge && opts.badgeCase === "lower") badge = badge.toLowerCase();
// Gacha-quest titles compose their own head segment via the
+19
View File
@@ -255,6 +255,17 @@ export const TECH_NOTES = [
] as const;
export type TechNote = (typeof TECH_NOTES)[number];
/**
* Tech notes the engine adds on its own (v1.5.0), after the ones the user
* picked — never stored in `techNotes` and not in the editor's checklist.
* `editor_upscaled` comes with a valid {@link GeneratorInput.upscaledFrom}: the
* structured "Upscale:" line in 🖥 VIDEO SETTINGS says what was upscaled to
* what, this note warns what upscaling does to the image. Their bullets share
* `description.techNotes.items` with {@link TECH_NOTES}.
*/
export const AUTO_TECH_NOTES = ["editor_upscaled"] as const;
export type AutoTechNote = (typeof AUTO_TECH_NOTES)[number];
/**
* Content warnings (v0.11 unified bilingual checklist). Replaces the
* v0.7 trio (flashing_lights / loud_noises / jump_scares) plus the
@@ -644,7 +655,15 @@ export interface GeneratorInput {
* is rendered inside Gacha-specific intros (showcase / anniversary etc.).
*/
gachaVersion?: string;
/** The video's resolution — the uploaded file's ("4K" when 1440p footage was upscaled). */
resolution?: string;
/**
* v1.5.0: recorded at this resolution and upscaled to {@link resolution} in
* the video editor. Adds "Upscaled" to the title badge, an "Upscale:" line
* to 🖥 VIDEO SETTINGS and the {@link AUTO_TECH_NOTES} warning. Ignored
* unless it is below `resolution` (`@engine/upscale`).
*/
upscaledFrom?: string;
fps?: string;
/**
* Graphics-quality preset (v0.8 enum + `"custom"` escape hatch).
+39
View File
@@ -0,0 +1,39 @@
import {
UPSCALED_FROM_OPTIONS,
VIDEO_RESOLUTIONS,
type UpscaledFrom,
} from "@config/graphics-settings";
/**
* Upscaling in the video editor (v1.5.0): footage recorded at one resolution
* and exported at a higher one, e.g. 1440p → 4K. The title badge, the
* description's "Upscale:" line and the automatic tech note all go through
* {@link validUpscaleSource}, so a pair that isn't an upscale (same or higher
* source, unknown value) changes nothing anywhere.
*/
function rank(resolution: string): number {
return (VIDEO_RESOLUTIONS as readonly string[]).indexOf(resolution);
}
/**
* `from` when it is a known resolution below `resolution` (the video's own,
* 1080p when unset — the editor's default); otherwise `""`.
*/
export function validUpscaleSource(
resolution: string | undefined,
from: string | undefined,
): string {
if (!from) return "";
const source = rank(from);
const target = rank(resolution || "1080p");
return source >= 0 && target >= 0 && source < target ? from : "";
}
/** The sources a video at `resolution` can be upscaled from, lowest first. */
export function upscaleSourcesFor(resolution: string | undefined): Exclude<UpscaledFrom, "">[] {
return UPSCALED_FROM_OPTIONS.filter(
(from): from is Exclude<UpscaledFrom, ""> =>
from !== "" && validUpscaleSource(resolution, from) !== "",
);
}
+1
View File
@@ -44,6 +44,7 @@ export function buildGeneratorInputFromEditor(
anniversaryYear: state.anniversaryYear,
gachaVersion: state.gachaVersion,
resolution: state.resolution,
upscaledFrom: state.upscaledFrom,
fps: state.fps,
graphicsPreset: state.graphicsPreset,
graphicsPresetCustom: state.graphicsPresetCustom,
+12
View File
@@ -1,5 +1,12 @@
import { useEffect } from "react";
/**
* Fired on `window` (detail: the page name) whenever a page sets its title.
* RouteAnnouncer reads it out after a navigation; restoring the previous title
* on unmount does not fire it, so a page being left is never announced.
*/
export const PAGE_TITLE_EVENT = "ytdescgen:page-title";
/**
* Sets `document.title` to `"<title> · YTDescGen"` for the lifetime of the
* component, and restores the previous title on unmount. Per-page titles
@@ -12,6 +19,11 @@ export function useDocumentTitle(title: string): void {
useEffect(() => {
const previous = document.title;
document.title = `${title} · YTDescGen`;
// A microtask, so listeners hear it after every effect of this commit has
// run — RouteAnnouncer marks the navigation in one of them.
queueMicrotask(() => {
window.dispatchEvent(new CustomEvent(PAGE_TITLE_EVENT, { detail: title }));
});
return () => {
document.title = previous;
};
+5 -1
View File
@@ -1,5 +1,6 @@
import { useEffect, useRef } from "react";
import { useNavigate } from "react-router-dom";
import { useSettingsStore } from "@store/settings-store";
import { useOutputCopy } from "./use-output-copy";
import { useSaveToHistory } from "./use-save-to-history";
@@ -60,9 +61,12 @@ export function useKeyboardShortcuts(handlers: ShortcutHandlers) {
} else if (
// Bare `?` (Shift+/) opens the cheatsheet too. Skip when the
// user is typing into a form field — `?` is a legitimate
// character in titles, descriptions, and other inputs.
// character in titles, descriptions, and other inputs — and when
// Settings › Editor turned single-key shortcuts off (WCAG 2.1.4:
// speech input says "question mark" and opens a dialog otherwise).
e.key === "?" &&
!mod &&
useSettingsStore.getState().singleKeyShortcuts &&
!isEditableTarget(e.target)
) {
e.preventDefault();
+2 -1
View File
@@ -1,6 +1,7 @@
import { useEffect, useMemo, useState } from "react";
import { ensureLanguagesLoaded, hasLanguageBundles } from "@i18n/index";
import type { SupportedLanguage } from "@engine/types";
import { compareCodeUnits } from "@utils/sort";
/**
* Returns true once every requested language has its locale bundles in
@@ -17,7 +18,7 @@ export function useLanguagesReady(langs: readonly SupportedLanguage[]): boolean
// Stable identity for the requested set — callers pass fresh array
// literals on every render.
const key = useMemo(
() => [...new Set(joined ? joined.split(",") : [])].sort().join(","),
() => [...new Set(joined ? joined.split(",") : [])].sort(compareCodeUnits).join(","),
[joined],
);
const [readyKey, setReadyKey] = useState<string | null>(() =>
+17 -10
View File
@@ -109,6 +109,9 @@
"vnZalopay",
"vnZalopayPlaceholder",
"resolution",
"upscaledFrom",
"upscaledFromNone",
"upscaledFromHelp",
"fps",
"graphicsPreset",
"graphicsPresetCustom",
@@ -315,7 +318,7 @@
"editor.endings": [
"countLabel",
"videoCountLabel",
"videoLabel",
"videoLabel", "fromLabel", "toLabel", "rowNumberAria", "rowNameAria", "rangeFromAria", "rangeToAria",
"numberLabel",
"nameLabel",
"namePlaceholder",
@@ -737,7 +740,7 @@
"scrollToTop",
"exported",
"exportFailed",
"close",
"close", "notificationsRegion", "closeNotification",
"edit",
"loading"
],
@@ -826,7 +829,8 @@
"capture",
"motherboard",
"controller",
"video_editor"
"video_editor",
"lut"
],
"social": [
"kofi",
@@ -963,7 +967,7 @@
"genrePlaylistsBadge",
"numberRange",
"themeDark",
"themeLight", "titleOrder", "titleOrderGameFirst", "titleOrderTypeFirst", "copyAllIncludesTags", "copyAllIncludesTagsHint", "hideScrollbars", "hideScrollbarsHint"
"themeLight", "titleOrder", "titleOrderGameFirst", "titleOrderTypeFirst", "copyAllIncludesTags", "copyAllIncludesTagsHint", "hideScrollbars", "hideScrollbarsHint", "singleKeyShortcuts", "singleKeyShortcutsHint"
],
"batch": [
"title",
@@ -1001,7 +1005,7 @@
"help",
"close",
"searchPlaceholder",
"noResults", "saveToHistory"
"noResults", "saveToHistory", "notifications"
],
"validation": [
"emailInvalid",
@@ -1075,7 +1079,7 @@
"disclaimer",
"license",
"thirdParty",
"security",
"security", "accessibility",
"notice",
"conduct"
],
@@ -1085,7 +1089,7 @@
"disclaimer",
"license",
"thirdParty",
"security",
"security", "accessibility",
"notice",
"conduct"
],
@@ -1137,7 +1141,7 @@
"editor.socialGroups": ["donate", "social"]
},
"templates": {
"title": ["separator", "suffix"],
"title": ["separator", "suffix", "upscaled"],
"title.separators": ["emDash", "hyphen", "colon", "pipe"],
"title.videoType": [
"full",
@@ -1304,6 +1308,7 @@
"low_graphics_performance",
"fps_drops_hardware",
"upscaling_artifacts_possible",
"editor_upscaled",
"bug_from_game",
"crash_kept_transparency",
"loading_cut",
@@ -1587,7 +1592,8 @@
"artStyle",
"videoLabel",
"inGameSettingLabel",
"versionLabel"
"versionLabel",
"upscaleLabel"
],
"description.graphics.presetOptions": [
"low",
@@ -1717,7 +1723,8 @@
"monitor",
"capture",
"controller",
"video_editor"
"video_editor",
"lut"
]
}
}
+7 -3
View File
@@ -8,6 +8,7 @@
"pipe": " | "
},
"suffix": "Gameplay No Commentary",
"upscaled": "Upscaled",
"videoType": {
"full": "",
"part": "Part {{partNumber}}",
@@ -209,7 +210,8 @@
"edited_for_pacing": "Edited for pacing — not real-time",
"support_developers": "Original game music — please support the developers",
"online_connectivity_issues": "Online game — possible connectivity issues",
"upscaling_artifacts_possible": "Possible upscaling / frame-generation artifacts (DLSS, FSR, XeSS)"
"upscaling_artifacts_possible": "Possible upscaling / frame-generation artifacts (DLSS, FSR, XeSS)",
"editor_upscaled": "Upscaled to a higher resolution in editing — fine detail is reconstructed, so text, textures and edges may look slightly different from the original image"
}
},
"contentWarnings": {
@@ -558,7 +560,8 @@
},
"videoLabel": "Video",
"inGameSettingLabel": "In-game Setting",
"versionLabel": "Version"
"versionLabel": "Version",
"upscaleLabel": "Upscale"
},
"videoSettings": {
"styleLine": "Edited in {{era}} style using {{editor}}",
@@ -592,7 +595,8 @@
"monitor": "Monitor",
"capture": "Capture Software",
"controller": "Controller",
"video_editor": "Video Editor"
"video_editor": "Video Editor",
"lut": "LUT"
}
},
"pinnedComment": {
+21 -4
View File
@@ -168,6 +168,9 @@
"vnZalopay": "ZaloPay",
"vnZalopayPlaceholder": "ZaloPay phone number",
"resolution": "Resolution",
"upscaledFrom": "Upscaled from",
"upscaledFromNone": "Not upscaled",
"upscaledFromHelp": "The title says “Upscaled”; the description adds an Upscale line and a note that fine detail may differ from the original image.",
"fps": "FPS",
"graphicsPreset": "Graphics Preset",
"graphicsPresetOptions": {
@@ -667,6 +670,12 @@
"countLabel": "Number of endings",
"videoCountLabel": "Number of videos",
"videoLabel": "Video",
"fromLabel": "From",
"toLabel": "To",
"rowNumberAria": "Ending {{row}}: number",
"rowNameAria": "Ending {{row}}: name",
"rangeFromAria": "Video {{video}}: from ending",
"rangeToAria": "Video {{video}}: to ending",
"numberLabel": "Number",
"nameLabel": "Name",
"namePlaceholder": "e.g. Best Ending",
@@ -877,6 +886,8 @@
"exported": "Exported",
"exportFailed": "Export failed",
"close": "Close",
"notificationsRegion": "Notifications (Alt+T)",
"closeNotification": "Close notification",
"edit": "Edit",
"loading": "Loading…"
},
@@ -1001,7 +1012,8 @@
"capture": "Capture Software",
"motherboard": "Motherboard",
"controller": "Controller",
"video_editor": "Video Editor"
"video_editor": "Video Editor",
"lut": "LUT"
},
"social": {
"kofi": "Ko-fi",
@@ -1175,7 +1187,9 @@
"copyAllIncludesTags": "Copy All includes the tags",
"copyAllIncludesTagsHint": "Title, description, then the tags — for pasting everything into a notes app in one go.",
"hideScrollbars": "Hide scrollbars",
"hideScrollbarsHint": "Removes every scrollbar in the app — the mouse wheel, touchpad, touch and keyboard still scroll."
"hideScrollbarsHint": "Removes every scrollbar in the app — the mouse wheel, touchpad, touch and keyboard still scroll.",
"singleKeyShortcuts": "Single-key shortcuts",
"singleKeyShortcutsHint": "? opens the shortcut list when you're not typing in a field. Turn this off if you use speech input or press keys by accident — Ctrl/⌘ + / still works."
},
"socialPost": {
"title": "Cross-Post Captions",
@@ -1222,7 +1236,8 @@
"close": "Close Modal",
"searchPlaceholder": "Search shortcuts",
"noResults": "No matching shortcuts",
"saveToHistory": "Save to History"
"saveToHistory": "Save to History",
"notifications": "Go to notifications"
},
"validation": {
"numberRequired": "Enter a number.",
@@ -1322,7 +1337,7 @@
},
"legal": {
"title": "Legal",
"intro": "Terms, privacy, licensing and security for YTDescGen — the same documents published at ytgenerator.stream/legal.",
"intro": "Terms, privacy, licensing, security and accessibility for YTDescGen — the same documents published at ytgenerator.stream/legal.",
"englishOnly": "Documents are published in English; the Disclaimer also has a Vietnamese version.",
"back": "Back",
"allDocuments": "All documents",
@@ -1336,6 +1351,7 @@
"license": "License (Apache-2.0)",
"thirdParty": "Third-party notices",
"security": "Security policy",
"accessibility": "Accessibility",
"notice": "NOTICE",
"conduct": "Code of Conduct"
},
@@ -1346,6 +1362,7 @@
"license": "The Apache License 2.0 the source code is released under.",
"thirdParty": "Open-source libraries, fonts and services YTDescGen relies on.",
"security": "How to report a vulnerability privately, and what is in scope.",
"accessibility": "What works with a keyboard, screen readers and zoom, known gaps, and how to report a barrier.",
"notice": "The Apache-2.0 NOTICE file with copyright and attribution.",
"conduct": "Contributor Covenant rules for the project's community spaces."
}
+7 -3
View File
@@ -8,6 +8,7 @@
"pipe": " | "
},
"suffix": "Gameplay No Commentary",
"upscaled": "Reescalado",
"videoType": {
"full": "",
"part": "Parte {{partNumber}}",
@@ -209,7 +210,8 @@
"edited_for_pacing": "Editado para el ritmo — no es en tiempo real",
"support_developers": "Música original del juego — apoya a los desarrolladores",
"online_connectivity_issues": "Juego online — posibles problemas de conexión",
"upscaling_artifacts_possible": "Posibles artefactos de escalado / generación de fotogramas (DLSS, FSR, XeSS)"
"upscaling_artifacts_possible": "Posibles artefactos de escalado / generación de fotogramas (DLSS, FSR, XeSS)",
"editor_upscaled": "Reescalado a una resolución mayor en la edición: los detalles finos se reconstruyen, así que textos, texturas y bordes pueden verse algo distintos de la imagen original"
}
},
"contentWarnings": {
@@ -558,7 +560,8 @@
},
"videoLabel": "Video",
"inGameSettingLabel": "In-game Setting",
"versionLabel": "Version"
"versionLabel": "Version",
"upscaleLabel": "Upscale"
},
"videoSettings": {
"styleLine": "Editado con estilo {{era}} usando {{editor}}",
@@ -592,7 +595,8 @@
"monitor": "Monitor",
"capture": "Software de Captura",
"controller": "Mando",
"video_editor": "Editor de Video"
"video_editor": "Editor de Video",
"lut": "LUT"
}
},
"pinnedComment": {
+21 -4
View File
@@ -168,6 +168,9 @@
"vnZalopay": "ZaloPay",
"vnZalopayPlaceholder": "ZaloPay phone number",
"resolution": "Resolución",
"upscaledFrom": "Reescalado desde",
"upscaledFromNone": "Sin reescalar",
"upscaledFromHelp": "El título dice «Reescalado»; la descripción añade una línea de reescalado y un aviso de que los detalles finos pueden diferir de la imagen original.",
"fps": "FPS",
"graphicsPreset": "Calidad Gráfica",
"graphicsPresetOptions": {
@@ -667,6 +670,12 @@
"countLabel": "Número de finales",
"videoCountLabel": "Número de videos",
"videoLabel": "Video",
"fromLabel": "Desde",
"toLabel": "Hasta",
"rowNumberAria": "Final {{row}}: número",
"rowNameAria": "Final {{row}}: nombre",
"rangeFromAria": "Video {{video}}: desde el final",
"rangeToAria": "Video {{video}}: hasta el final",
"numberLabel": "Número",
"nameLabel": "Nombre",
"namePlaceholder": "ej. Mejor Final",
@@ -877,6 +886,8 @@
"exported": "Exportado",
"exportFailed": "Error al exportar",
"close": "Cerrar",
"notificationsRegion": "Notificaciones (Alt+T)",
"closeNotification": "Cerrar notificación",
"edit": "Editar",
"loading": "Cargando…"
},
@@ -1001,7 +1012,8 @@
"capture": "Software de Captura",
"motherboard": "Placa Base",
"controller": "Mando",
"video_editor": "Editor de Video"
"video_editor": "Editor de Video",
"lut": "LUT"
},
"social": {
"kofi": "Ko-fi",
@@ -1175,7 +1187,9 @@
"copyAllIncludesTags": "Copiar todo incluye las etiquetas",
"copyAllIncludesTagsHint": "Título, descripción y luego las etiquetas, para pegarlo todo de una vez en una app de notas.",
"hideScrollbars": "Ocultar barras de desplazamiento",
"hideScrollbarsHint": "Quita todas las barras de desplazamiento de la app; la rueda del ratón, el touchpad, la pantalla táctil y el teclado siguen desplazando."
"hideScrollbarsHint": "Quita todas las barras de desplazamiento de la app; la rueda del ratón, el touchpad, la pantalla táctil y el teclado siguen desplazando.",
"singleKeyShortcuts": "Atajos de una tecla",
"singleKeyShortcutsHint": "? abre la lista de atajos cuando no estás escribiendo en un campo. Desactívalo si usas entrada por voz o pulsas teclas sin querer; Ctrl/⌘ + / sigue funcionando."
},
"socialPost": {
"title": "Publicaciones multiplataforma",
@@ -1222,7 +1236,8 @@
"close": "Cerrar",
"searchPlaceholder": "Buscar atajos",
"noResults": "No se encontraron atajos",
"saveToHistory": "Guardar en el historial"
"saveToHistory": "Guardar en el historial",
"notifications": "Ir a las notificaciones"
},
"validation": {
"numberRequired": "Introduce un número.",
@@ -1322,7 +1337,7 @@
},
"legal": {
"title": "Información legal",
"intro": "Términos, privacidad, licencias y seguridad de YTDescGen: los mismos documentos publicados en ytgenerator.stream/legal.",
"intro": "Términos, privacidad, licencias, seguridad y accesibilidad de YTDescGen: los mismos documentos publicados en ytgenerator.stream/legal.",
"englishOnly": "Los documentos se publican en inglés; el Descargo de responsabilidad también tiene versión en vietnamita.",
"back": "Volver",
"allDocuments": "Todos los documentos",
@@ -1336,6 +1351,7 @@
"license": "Licencia (Apache-2.0)",
"thirdParty": "Avisos de terceros",
"security": "Política de seguridad",
"accessibility": "Accesibilidad",
"notice": "NOTICE",
"conduct": "Código de conducta"
},
@@ -1346,6 +1362,7 @@
"license": "La Licencia Apache 2.0 bajo la que se publica el código fuente.",
"thirdParty": "Bibliotecas de código abierto, fuentes y servicios en los que se basa YTDescGen.",
"security": "Cómo informar de una vulnerabilidad en privado y qué está dentro del alcance.",
"accessibility": "Qué funciona con teclado, lectores de pantalla y zoom, limitaciones conocidas y cómo informar de una barrera.",
"notice": "El archivo NOTICE de Apache-2.0 con derechos de autor y atribución.",
"conduct": "Normas del Contributor Covenant para los espacios comunitarios del proyecto."
}
+7 -3
View File
@@ -8,6 +8,7 @@
"pipe": " | "
},
"suffix": "Gameplay Tanpa Komentar",
"upscaled": "Upscale",
"videoType": {
"full": "",
"part": "Part {{partNumber}}",
@@ -209,7 +210,8 @@
"edited_for_pacing": "Diedit demi tempo — bukan waktu nyata",
"support_developers": "Musik asli game — dukung para pengembangnya",
"online_connectivity_issues": "Game online — kemungkinan ada kendala koneksi",
"upscaling_artifacts_possible": "Kemungkinan ada artefak upscaling / frame generation (DLSS, FSR, XeSS)"
"upscaling_artifacts_possible": "Kemungkinan ada artefak upscaling / frame generation (DLSS, FSR, XeSS)",
"editor_upscaled": "Di-upscale ke resolusi lebih tinggi saat editing — detail halus direkonstruksi, jadi teks, tekstur, dan tepi bisa terlihat sedikit berbeda dari gambar asli"
}
},
"contentWarnings": {
@@ -558,7 +560,8 @@
},
"videoLabel": "Video",
"inGameSettingLabel": "Pengaturan dalam game",
"versionLabel": "Versi"
"versionLabel": "Versi",
"upscaleLabel": "Upscale"
},
"videoSettings": {
"styleLine": "Diedit dengan gaya {{era}} memakai {{editor}}",
@@ -592,7 +595,8 @@
"monitor": "Monitor",
"capture": "Software Perekam",
"controller": "Kontroler",
"video_editor": "Editor Video"
"video_editor": "Editor Video",
"lut": "LUT"
}
},
"pinnedComment": {
+21 -4
View File
@@ -168,6 +168,9 @@
"vnZalopay": "ZaloPay",
"vnZalopayPlaceholder": "Nomor telepon ZaloPay",
"resolution": "Resolusi",
"upscaledFrom": "Di-upscale dari",
"upscaledFromNone": "Tanpa upscale",
"upscaledFromHelp": "Judul menampilkan “Upscale”; deskripsi menambahkan baris Upscale dan catatan bahwa detail halus bisa berbeda dari gambar asli.",
"fps": "FPS",
"graphicsPreset": "Preset Grafis",
"graphicsPresetOptions": {
@@ -667,6 +670,12 @@
"countLabel": "Jumlah ending",
"videoCountLabel": "Jumlah video",
"videoLabel": "Video",
"fromLabel": "Dari",
"toLabel": "Sampai",
"rowNumberAria": "Ending {{row}}: nomor",
"rowNameAria": "Ending {{row}}: nama",
"rangeFromAria": "Video {{video}}: dari ending",
"rangeToAria": "Video {{video}}: sampai ending",
"numberLabel": "Nomor",
"nameLabel": "Nama",
"namePlaceholder": "mis. Ending Terbaik",
@@ -877,6 +886,8 @@
"exported": "Diekspor",
"exportFailed": "Ekspor gagal",
"close": "Tutup",
"notificationsRegion": "Notifikasi (Alt+T)",
"closeNotification": "Tutup notifikasi",
"edit": "Edit",
"loading": "Memuat…"
},
@@ -1001,7 +1012,8 @@
"capture": "Software Perekam",
"motherboard": "Motherboard",
"controller": "Kontroler",
"video_editor": "Editor Video"
"video_editor": "Editor Video",
"lut": "LUT"
},
"social": {
"kofi": "Ko-fi",
@@ -1175,7 +1187,9 @@
"copyAllIncludesTags": "Salin semua termasuk tag",
"copyAllIncludesTagsHint": "Judul, deskripsi, lalu tag — untuk menempel semuanya sekaligus ke aplikasi catatan.",
"hideScrollbars": "Sembunyikan scrollbar",
"hideScrollbarsHint": "Menyembunyikan semua scrollbar di aplikasi — roda mouse, touchpad, sentuhan, dan keyboard tetap bisa menggulir."
"hideScrollbarsHint": "Menyembunyikan semua scrollbar di aplikasi — roda mouse, touchpad, sentuhan, dan keyboard tetap bisa menggulir.",
"singleKeyShortcuts": "Pintasan satu tombol",
"singleKeyShortcutsHint": "? membuka daftar pintasan saat Anda tidak sedang mengetik di kolom. Matikan jika Anda memakai input suara atau sering salah tekan — Ctrl/⌘ + / tetap berfungsi."
},
"socialPost": {
"title": "Caption Lintas Platform",
@@ -1222,7 +1236,8 @@
"close": "Tutup Modal",
"searchPlaceholder": "Cari pintasan",
"noResults": "Tidak ada pintasan yang cocok",
"saveToHistory": "Simpan ke Riwayat"
"saveToHistory": "Simpan ke Riwayat",
"notifications": "Ke notifikasi"
},
"validation": {
"numberRequired": "Masukkan angka.",
@@ -1322,7 +1337,7 @@
},
"legal": {
"title": "Informasi hukum",
"intro": "Ketentuan, privasi, lisensi, dan keamanan YTDescGen — dokumen yang sama dengan yang diterbitkan di ytgenerator.stream/legal.",
"intro": "Ketentuan, privasi, lisensi, keamanan, dan aksesibilitas YTDescGen — dokumen yang sama dengan yang diterbitkan di ytgenerator.stream/legal.",
"englishOnly": "Dokumen diterbitkan dalam bahasa Inggris; Penafian juga tersedia dalam bahasa Vietnam.",
"back": "Kembali",
"allDocuments": "Semua dokumen",
@@ -1336,6 +1351,7 @@
"license": "Lisensi (Apache-2.0)",
"thirdParty": "Pemberitahuan pihak ketiga",
"security": "Kebijakan keamanan",
"accessibility": "Aksesibilitas",
"notice": "NOTICE",
"conduct": "Kode Etik"
},
@@ -1346,6 +1362,7 @@
"license": "Lisensi Apache 2.0 yang berlaku untuk kode sumber.",
"thirdParty": "Pustaka sumber terbuka, font, dan layanan yang digunakan YTDescGen.",
"security": "Cara melaporkan kerentanan secara pribadi, dan cakupannya.",
"accessibility": "Apa yang bisa dipakai dengan keyboard, pembaca layar, dan zoom, keterbatasan yang diketahui, dan cara melaporkan hambatan.",
"notice": "Berkas NOTICE Apache-2.0 berisi hak cipta dan atribusi.",
"conduct": "Aturan Contributor Covenant untuk ruang komunitas proyek."
}
+7 -3
View File
@@ -8,6 +8,7 @@
"pipe": " | "
},
"suffix": "Gameplay No Commentary",
"upscaled": "アップスケール",
"videoType": {
"full": "",
"part": "パート{{partNumber}}",
@@ -209,7 +210,8 @@
"edited_for_pacing": "テンポ調整の編集あり — 実時間ではありません",
"support_developers": "原曲使用 — 開発者への応援をよろしくお願いします",
"online_connectivity_issues": "オンラインゲーム — 接続不調の可能性",
"upscaling_artifacts_possible": "アップスケーリング / フレーム生成(DLSS・FSR・XeSS)由来のアーティファクトの可能性あり"
"upscaling_artifacts_possible": "アップスケーリング / フレーム生成(DLSS・FSR・XeSS)由来のアーティファクトの可能性あり",
"editor_upscaled": "編集時に高解像度へアップスケール — 細部は再構成されるため、文字・テクスチャ・輪郭が元の映像とわずかに異なる場合があります"
}
},
"contentWarnings": {
@@ -558,7 +560,8 @@
},
"videoLabel": "Video",
"inGameSettingLabel": "In-game Setting",
"versionLabel": "Version"
"versionLabel": "Version",
"upscaleLabel": "Upscale"
},
"videoSettings": {
"styleLine": "{{editor}}で{{era}}スタイルに編集",
@@ -592,7 +595,8 @@
"monitor": "モニター",
"capture": "キャプチャソフト",
"controller": "コントローラー",
"video_editor": "動画編集ソフト"
"video_editor": "動画編集ソフト",
"lut": "LUT"
}
},
"pinnedComment": {
+21 -4
View File
@@ -168,6 +168,9 @@
"vnZalopay": "ZaloPay",
"vnZalopayPlaceholder": "ZaloPay phone number",
"resolution": "解像度",
"upscaledFrom": "アップスケール元",
"upscaledFromNone": "なし",
"upscaledFromHelp": "タイトルに「アップスケール」と表示し、説明欄にアップスケールの行と、細部が元の映像と異なる場合がある旨の注意を追加します。",
"fps": "FPS",
"graphicsPreset": "グラフィック設定",
"graphicsPresetOptions": {
@@ -667,6 +670,12 @@
"countLabel": "エンディング数",
"videoCountLabel": "動画数",
"videoLabel": "動画",
"fromLabel": "開始",
"toLabel": "終了",
"rowNumberAria": "エンディング {{row}}: 番号",
"rowNameAria": "エンディング {{row}}: 名前",
"rangeFromAria": "動画 {{video}}: 開始エンディング",
"rangeToAria": "動画 {{video}}: 終了エンディング",
"numberLabel": "番号",
"nameLabel": "名前",
"namePlaceholder": "例: ベストエンド",
@@ -877,6 +886,8 @@
"exported": "エクスポートしました",
"exportFailed": "エクスポートに失敗しました",
"close": "閉じる",
"notificationsRegion": "通知 (Alt+T)",
"closeNotification": "通知を閉じる",
"edit": "編集",
"loading": "読み込み中…"
},
@@ -1001,7 +1012,8 @@
"capture": "キャプチャソフト",
"motherboard": "マザーボード",
"controller": "コントローラー",
"video_editor": "動画編集ソフト"
"video_editor": "動画編集ソフト",
"lut": "LUT"
},
"social": {
"kofi": "Ko-fi",
@@ -1175,7 +1187,9 @@
"copyAllIncludesTags": "「すべてコピー」にタグも含める",
"copyAllIncludesTagsHint": "タイトル、説明、タグの順。メモアプリにまとめて貼り付けるときに。",
"hideScrollbars": "スクロールバーを隠す",
"hideScrollbarsHint": "アプリ内のすべてのスクロールバーを非表示にします。マウスホイール、タッチパッド、タッチ操作、キーボードでのスクロールはそのまま使えます。"
"hideScrollbarsHint": "アプリ内のすべてのスクロールバーを非表示にします。マウスホイール、タッチパッド、タッチ操作、キーボードでのスクロールはそのまま使えます。",
"singleKeyShortcuts": "1 キーのショートカット",
"singleKeyShortcutsHint": "入力欄の外で ? を押すとショートカット一覧が開きます。音声入力を使う場合や誤って押してしまう場合はオフにしてください。Ctrl/⌘ + / は引き続き使えます。"
},
"socialPost": {
"title": "クロス投稿キャプション",
@@ -1222,7 +1236,8 @@
"close": "モーダルを閉じる",
"searchPlaceholder": "ショートカットを検索",
"noResults": "該当するショートカットはありません",
"saveToHistory": "履歴に保存"
"saveToHistory": "履歴に保存",
"notifications": "通知へ移動"
},
"validation": {
"numberRequired": "数値を入力してください。",
@@ -1322,7 +1337,7 @@
},
"legal": {
"title": "法的情報",
"intro": "YTDescGen の利用規約、プライバシー、ライセンス、セキュリティ。ytgenerator.stream/legal で公開しているものと同じ文書です。",
"intro": "YTDescGen の利用規約、プライバシー、ライセンス、セキュリティ、アクセシビリティ。ytgenerator.stream/legal で公開しているものと同じ文書です。",
"englishOnly": "文書は英語で公開しています(免責事項のみベトナム語版もあります)。",
"back": "戻る",
"allDocuments": "すべての文書",
@@ -1336,6 +1351,7 @@
"license": "ライセンス(Apache-2.0)",
"thirdParty": "サードパーティ通知",
"security": "セキュリティポリシー",
"accessibility": "アクセシビリティ",
"notice": "NOTICE",
"conduct": "行動規範"
},
@@ -1346,6 +1362,7 @@
"license": "ソースコードに適用される Apache License 2.0。",
"thirdParty": "YTDescGen が利用しているオープンソースライブラリ、フォント、サービス。",
"security": "脆弱性を非公開で報告する方法と対象範囲。",
"accessibility": "キーボード・スクリーンリーダー・拡大表示で使える機能、既知の制限、利用上の障壁を報告する方法。",
"notice": "著作権と帰属を記した Apache-2.0 の NOTICE ファイル。",
"conduct": "プロジェクトのコミュニティに適用される Contributor Covenant の規則。"
}
+7 -3
View File
@@ -8,6 +8,7 @@
"pipe": " | "
},
"suffix": "Gameplay No Commentary",
"upscaled": "업스케일",
"videoType": {
"full": "",
"part": "파트 {{partNumber}}",
@@ -209,7 +210,8 @@
"edited_for_pacing": "리듬을 위해 편집 — 실시간 아님",
"support_developers": "원곡 사용 — 개발자를 응원해 주세요",
"online_connectivity_issues": "온라인 게임 — 연결 문제 가능성",
"upscaling_artifacts_possible": "업스케일링 / 프레임 생성 (DLSS, FSR, XeSS) 아티팩트 가능성"
"upscaling_artifacts_possible": "업스케일링 / 프레임 생성 (DLSS, FSR, XeSS) 아티팩트 가능성",
"editor_upscaled": "편집 과정에서 더 높은 해상도로 업스케일 — 세부 묘사가 재구성되므로 글자, 텍스처, 윤곽이 원본과 조금 다르게 보일 수 있습니다"
}
},
"contentWarnings": {
@@ -558,7 +560,8 @@
},
"videoLabel": "Video",
"inGameSettingLabel": "In-game Setting",
"versionLabel": "Version"
"versionLabel": "Version",
"upscaleLabel": "Upscale"
},
"videoSettings": {
"styleLine": "{{editor}}로 {{era}} 스타일 편집",
@@ -592,7 +595,8 @@
"monitor": "모니터",
"capture": "캡처 소프트웨어",
"controller": "컨트롤러",
"video_editor": "영상 편집 프로그램"
"video_editor": "영상 편집 프로그램",
"lut": "LUT"
}
},
"pinnedComment": {
+21 -4
View File
@@ -168,6 +168,9 @@
"vnZalopay": "ZaloPay",
"vnZalopayPlaceholder": "ZaloPay phone number",
"resolution": "해상도",
"upscaledFrom": "업스케일 원본",
"upscaledFromNone": "업스케일 안 함",
"upscaledFromHelp": "제목에 ‘업스케일’이 표시되고, 설명에 업스케일 줄과 세부 묘사가 원본과 다를 수 있다는 안내가 추가됩니다.",
"fps": "FPS",
"graphicsPreset": "그래픽 프리셋",
"graphicsPresetOptions": {
@@ -667,6 +670,12 @@
"countLabel": "엔딩 개수",
"videoCountLabel": "영상 개수",
"videoLabel": "영상",
"fromLabel": "시작",
"toLabel": "끝",
"rowNumberAria": "엔딩 {{row}}: 번호",
"rowNameAria": "엔딩 {{row}}: 이름",
"rangeFromAria": "영상 {{video}}: 시작 엔딩",
"rangeToAria": "영상 {{video}}: 끝 엔딩",
"numberLabel": "번호",
"nameLabel": "이름",
"namePlaceholder": "예: 베스트 엔딩",
@@ -877,6 +886,8 @@
"exported": "내보냈습니다",
"exportFailed": "내보내기 실패",
"close": "닫기",
"notificationsRegion": "알림 (Alt+T)",
"closeNotification": "알림 닫기",
"edit": "편집",
"loading": "불러오는 중…"
},
@@ -1001,7 +1012,8 @@
"capture": "캡처 소프트웨어",
"motherboard": "메인보드",
"controller": "컨트롤러",
"video_editor": "영상 편집 프로그램"
"video_editor": "영상 편집 프로그램",
"lut": "LUT"
},
"social": {
"kofi": "Ko-fi",
@@ -1175,7 +1187,9 @@
"copyAllIncludesTags": "모두 복사에 태그 포함",
"copyAllIncludesTagsHint": "제목, 설명, 태그 순서로 — 메모 앱에 한 번에 붙여넣을 때 좋습니다.",
"hideScrollbars": "스크롤바 숨기기",
"hideScrollbarsHint": "앱의 모든 스크롤바를 숨깁니다. 마우스 휠, 터치패드, 터치, 키보드로는 계속 스크롤할 수 있습니다."
"hideScrollbarsHint": "앱의 모든 스크롤바를 숨깁니다. 마우스 휠, 터치패드, 터치, 키보드로는 계속 스크롤할 수 있습니다.",
"singleKeyShortcuts": "단일 키 단축키",
"singleKeyShortcutsHint": "입력란 밖에서 ?를 누르면 단축키 목록이 열립니다. 음성 입력을 사용하거나 실수로 키를 누르는 경우 끄세요. Ctrl/⌘ + /는 계속 작동합니다."
},
"socialPost": {
"title": "크로스포스트 캡션",
@@ -1222,7 +1236,8 @@
"close": "닫기",
"searchPlaceholder": "단축키 검색",
"noResults": "일치하는 단축키 없음",
"saveToHistory": "기록에 저장"
"saveToHistory": "기록에 저장",
"notifications": "알림으로 이동"
},
"validation": {
"numberRequired": "숫자를 입력하세요.",
@@ -1322,7 +1337,7 @@
},
"legal": {
"title": "법적 고지",
"intro": "YTDescGen의 약관, 개인정보, 라이선스, 보안 문서입니다. ytgenerator.stream/legal에 게시된 것과 같은 내용입니다.",
"intro": "YTDescGen의 약관, 개인정보, 라이선스, 보안, 접근성 문서입니다. ytgenerator.stream/legal에 게시된 것과 같은 내용입니다.",
"englishOnly": "문서는 영어로 게시됩니다. 면책 조항은 베트남어 버전도 있습니다.",
"back": "뒤로",
"allDocuments": "모든 문서",
@@ -1336,6 +1351,7 @@
"license": "라이선스(Apache-2.0)",
"thirdParty": "타사 고지",
"security": "보안 정책",
"accessibility": "접근성",
"notice": "NOTICE",
"conduct": "행동 강령"
},
@@ -1346,6 +1362,7 @@
"license": "소스 코드에 적용되는 Apache License 2.0.",
"thirdParty": "YTDescGen이 사용하는 오픈 소스 라이브러리, 글꼴, 서비스.",
"security": "취약점을 비공개로 제보하는 방법과 적용 범위.",
"accessibility": "키보드, 화면 낭독기, 확대 기능으로 쓸 수 있는 것, 알려진 제한 사항, 접근성 문제를 알리는 방법.",
"notice": "저작권과 출처 표시를 담은 Apache-2.0 NOTICE 파일.",
"conduct": "프로젝트 커뮤니티 공간에 적용되는 Contributor Covenant 규칙."
}
+7 -3
View File
@@ -8,6 +8,7 @@
"pipe": " | "
},
"suffix": "Gameplay Sem Comentários",
"upscaled": "Upscale",
"videoType": {
"full": "",
"part": "Parte {{partNumber}}",
@@ -209,7 +210,8 @@
"edited_for_pacing": "Editado para o ritmo — não é em tempo real",
"support_developers": "Música original do jogo — apoiem os desenvolvedores",
"online_connectivity_issues": "Jogo online — possíveis problemas de conexão",
"upscaling_artifacts_possible": "Possíveis artefatos de upscaling / geração de quadros (DLSS, FSR, XeSS)"
"upscaling_artifacts_possible": "Possíveis artefatos de upscaling / geração de quadros (DLSS, FSR, XeSS)",
"editor_upscaled": "Upscale para uma resolução maior na edição — os detalhes finos são reconstruídos, então textos, texturas e bordas podem parecer um pouco diferentes da imagem original"
}
},
"contentWarnings": {
@@ -558,7 +560,8 @@
},
"videoLabel": "Vídeo",
"inGameSettingLabel": "Configuração no jogo",
"versionLabel": "Versão"
"versionLabel": "Versão",
"upscaleLabel": "Upscale"
},
"videoSettings": {
"styleLine": "Editado no estilo {{era}} usando {{editor}}",
@@ -592,7 +595,8 @@
"monitor": "Monitor",
"capture": "Software de captura",
"controller": "Controle",
"video_editor": "Editor de vídeo"
"video_editor": "Editor de vídeo",
"lut": "LUT"
}
},
"pinnedComment": {
Loaded 100 of 144 files, more files were not shown because too many files have changed in this diff. Show more