Compare commits

...
Author SHA1 Message Date
poli0981andClaude Opus 5.5 b2eb8236b4 chore(repo): enter maintenance mode — policy, auto-triage, issue forms, badges
YTDescGen is feature-complete; from 1.6.0 on it is maintained, not
extended. Still accepted: scheduled dependency updates; fixes for high or
critical CVEs and serious runtime issues; major language / runtime /
framework upgrades; bug, UI/UX and accessibility fixes, and options added
to or removed from the app's lists when people really need them;
translation fixes; Cloudflare / Worker changes the platform forces and
website incidents.

- README: status, CI, Qodana and SonarCloud badges; a Project status
  section; Contributing and the Roadmap row follow it.
- CONTRIBUTING: a Maintenance mode section, Option requests, issue and
  pull request rules, What We Want / Don't Want.
- SECURITY, MAINTAINERS, CLAUDE.md: the policy where each one needs it.
- ROADMAP: status block, a Maintenance mode section, Phase 5 and the
  backlog frozen. FEATURES: the extension points are frozen.
- Issue forms: Feature request removed; Option request and Translation or
  wording fix added; Bug report and Accessibility barrier now carry the
  `needs-triage` label (`triage` never existed). config.yml points feature
  ideas at Discussions → Ideas. The PR template gains a Scope checklist.
- maintenance-triage.yml closes, with a bilingual comment and the
  `out-of-scope` label, feature issues and `feat:` pull requests from
  outside contributors (scopes options, a11y and i18n stay open) and
  anything labelled `out-of-scope`. pull_request_target without checkout;
  listed under zizmor's dangerous-triggers ignore with the reason.

Labels created on the repository: out-of-scope, needs-triage, i18n,
option-request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 10:53:40 +07:00
poli0981 e71949cf21 Merge pull request #259 from poli0981/feat/dlss5-framegen-lut
feat(editor): add DLSS 5 neural rendering, more frame generation modes and a custom LUT
2026-11-17 10:53:36 +07:00
poli0981andClaude Opus 5.5 cefbbd13ee feat(editor): add DLSS 5 neural rendering, more frame generation modes and a custom LUT
Video settings:
- NVIDIA frame generation gains x6 (the multiplier was already in the list
  but offered by no vendor) and Dynamic Multi Frame Generation (DLSS 4.5).
- "Custom…" for every vendor reveals a text field (`frameGenCustom`); the
  description prints what was typed, like a custom graphics preset, and
  nothing for an empty box.
- A "DLSS 5 Neural Rendering" switch (`dlssNeuralRendering`), shown for
  NVIDIA only and printed after the DLSS mode:
  "Ultra - NVIDIA DLSS Quality + NVIDIA DLSS 5 Neural Rendering + NVIDIA
  Dynamic Multi Frame Generation". Another vendor turns it off
  (`coerceDlssNeuralRendering`: the vendor switch, applied profiles and
  templates, backup import).
- Editor store v21 -> v22 back-fills both fields.
- composeGraphicsPart's vendor half moves into small helpers.

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

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

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 10:46:35 +07:00
poli0981 731e194a70 Merge pull request #258 from poli0981/ci/qodana
ci(qodana): add Qodana for TypeScript and Rust
2026-11-17 10:46:27 +07:00
poli0981andClaude Opus 5.5 3b1b17ebf1 fix(qodana): clear the first run's findings
The first Qodana run found 74 problems in TypeScript / JavaScript and 12 in
Rust. Fixed:
- React 19.3 deprecates `FormEvent`: the three save forms take the
  `SubmitEvent` their `onSubmit` hands them.
- The URL patterns read `\S` instead of `[^\s]` (18 patterns in platforms.ts
  and playtest-platforms.ts, same characters).
- public/theme-init.js declares its browser globals and drops an unused
  catch binding.
- The two private `stable()` JSON helpers (restore.ts, library-apply.ts)
  become one `stableJson()` in src/utils/stable-json.ts, with a test.
- vitest.config.ts reuses vite.config.ts's alias map instead of a copy.
- Accordion destructures `icon` as `Icon` instead of copying it, a JSDoc
  link points at nothing any more, and i18next's `init()` promise is
  `void`ed on purpose.
- Rust: the three "show the main window" blocks become `show_main_window`.

Excluded in qodana.yaml, each with its reason: the Discord webhook secret
reference (HardcodedPasswords), escaped `]` / `}` in regexes, the
`@i18n/index` imports tsconfig needs, the three react-hooks warnings
eslint.config.js documents, the legacy `@deprecated` draft fields in the
files that migrate them; in src-tauri/qodana.yaml the module paths
`generate_handler!` needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 10:38:59 +07:00
poli0981andClaude Opus 5.5 5a9e7e83de ci(qodana): add Qodana for TypeScript and Rust
A Qodana workflow with one job per Qodana Cloud project:
- typescript: Qodana for JS in native mode, on the runner's Node 26 and
  node_modules (qodana.yaml, project yt-ts-js, QODANA_TOKEN_TS_JS);
- rust: Qodana for Rust, Early Access, in Docker on src-tauri/
  (src-tauri/qodana.yaml, project yt-rust, QODANA_TOKEN_RUST). Its
  bootstrap installs what rust.yml installs; a stand-in dist/index.html
  lets generate_context!() expand.

Both use qodana.recommended with a quality gate of zero problems and
analyse the whole project on every run. A tokens job skips the analysis
for Dependabot and fork PRs, which get no secrets; the token reaches only
the scan step, never `npm ci`. Annotations and artifacts, no PR comment.
Failures reach Discord through notify-ci-failure.yml.

Docs: TECH-SPEC (workflow table, Qodana notes), DEVELOPMENT (+ vi),
CONTRIBUTING, CLAUDE.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 10:21:18 +07:00
poli0981 d060444ab1 Merge pull request #257 from poli0981/chore/deps-2026-11-17
chore(deps): fold this week's updates; async-executor 1.14.1
2026-11-17 10:20:55 +07:00
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
75 changed files with 2007 additions and 778 deletions

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
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"]
labels: ["accessibility", "needs-triage"]
body:
- type: markdown
attributes:
+1 -1
View File
@@ -1,7 +1,7 @@
name: Bug report
description: Something is broken or behaving unexpectedly.
title: "[Bug]: "
labels: ["bug", "triage"]
labels: ["bug", "needs-triage"]
body:
- type: markdown
attributes:
+4 -1
View File
@@ -1,5 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Feature ideas (maintenance mode)
url: https://github.com/poli0981/youtube-generator/discussions/categories/ideas
about: YTDescGen is in maintenance mode and takes no new features. Share ideas in Discussions, with no commitment. To add or remove an option in one of the app's lists, use the Option request form.
- name: Report a security vulnerability
url: https://github.com/poli0981/youtube-generator/security/advisories/new
about: Privately, please — never in a public issue. See SECURITY.md.
@@ -8,7 +11,7 @@ contact_links:
about: How-tos, backup & restore, troubleshooting and the FAQ.
- name: Discord
url: https://discord.gg/kDM9GMu5vm
about: For casual questions, gameplay chat, or quick help. Use a bug report or feature request for anything actionable.
about: For casual questions, gameplay chat, or quick help. Use an issue form for anything actionable.
- name: All channels and contacts
url: https://poli0981.dev/links/
about: Email addresses by purpose and every other way to reach the maintainer.
@@ -1,56 +0,0 @@
name: Feature request
description: Suggest a new feature or improvement.
title: "[Feature]: "
labels: ["enhancement", "triage"]
body:
- type: textarea
id: problem
attributes:
label: Problem
description: What pain point or workflow gap are you running into today?
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed solution
description: What should YTDescGen do? Be concrete — UI sketch, example output, etc.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Other approaches you thought about and why you ruled them out.
- type: dropdown
id: scope
attributes:
label: Scope
description: Which surfaces does this affect?
multiple: true
options:
- Editor
- Output / preview
- Batch
- Social captions
- Playlist
- History
- Profiles / presets
- Templates (description, title, tags)
- Backup & restore
- i18n / locales
- Settings
- Accessibility (keyboard, screen readers, zoom, contrast)
- Web app (ytgenerator.stream)
- Desktop (Tauri)
- Android
- Documentation
validations:
required: true
- type: checkboxes
id: checks
attributes:
label: Pre-flight checks
options:
- label: I searched existing issues and this is not a duplicate.
required: true
+62
View File
@@ -0,0 +1,62 @@
name: Option request
description: Add or remove an option in one of the app's lists — a store, platform, genre, video type, content warning, tech note, GPU or upscaler / frame-generation mode.
title: "[Option]: "
labels: ["option-request", "needs-triage"]
body:
- type: markdown
attributes:
value: |
YTDescGen is in **maintenance mode** ([CONTRIBUTING.md → Maintenance mode](https://github.com/poli0981/youtube-generator/blob/main/CONTRIBUTING.md#maintenance-mode)): it takes no new features, but an option people really need can still join — or leave — one of the lists the app already has. For anything else, share the idea in [Discussions → Ideas](https://github.com/poli0981/youtube-generator/discussions/categories/ideas).
- type: dropdown
id: action
attributes:
label: Add or remove?
options:
- Add an option
- Remove an option
validations:
required: true
- type: dropdown
id: list
attributes:
label: Which list
options:
- Store (store links)
- Social or donate platform
- Game genre
- Video type
- Content warning
- Tech note
- GPU (rig catalog)
- Upscaler / frame generation (Video settings)
- Another list (say which below)
validations:
required: true
- type: input
id: option
attributes:
label: The option
description: Its name as it should appear, e.g. "itch.io", "Roguelite", "AMD FSR 4 x4".
validations:
required: true
- type: textarea
id: why
attributes:
label: Who needs it, and why
description: What can't you do today? A link helps — the store page, the vendor's announcement, a video of yours that needed it.
validations:
required: true
- type: textarea
id: wording
attributes:
label: Suggested wording (optional)
description: For a content warning or tech note, the editor label and the line the description should print, in any of the eight languages you know.
- type: checkboxes
id: checks
attributes:
label: Pre-flight checks
options:
- label: I searched existing issues and this is not a duplicate.
required: true
- label: This adds or removes an option in a list the app already has — it is not a new feature.
required: true
+69
View File
@@ -0,0 +1,69 @@
name: Translation or wording fix
description: Wording that doesn't fit a culture or region, or a spelling mistake that could mislead — in the interface or in the generated text.
title: "[i18n]: "
labels: ["i18n", "needs-triage"]
body:
- type: markdown
attributes:
value: |
YTDescGen ships eight languages. Vietnamese is native-reviewed; Japanese, Spanish, Korean, Chinese, Portuguese (Brazil) and Indonesian are AI-translated (see [DISCLAIMER.md](https://github.com/poli0981/youtube-generator/blob/main/DISCLAIMER.md)), so corrections from native speakers are very welcome.
- type: dropdown
id: language
attributes:
label: 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: dropdown
id: where
attributes:
label: Where
options:
- The interface (buttons, labels, messages)
- The generated title, description or tags
- Both
validations:
required: true
- type: textarea
id: current
attributes:
label: Current text
description: Copy it exactly as shown, and say where you saw it — the page or field, or the section of the description. A screenshot helps.
validations:
required: true
- type: textarea
id: suggested
attributes:
label: Suggested text
validations:
required: true
- type: dropdown
id: why
attributes:
label: Why
options:
- It doesn't fit the culture, region or usual tone
- A spelling or grammar mistake that could mislead
- The meaning is wrong (a mistranslation)
- Something else (say below)
validations:
required: true
- type: textarea
id: details
attributes:
label: Details (optional)
- type: checkboxes
id: checks
attributes:
label: Pre-flight checks
options:
- label: I searched existing issues and this is not a duplicate.
required: true
+18
View File
@@ -1,3 +1,10 @@
<!--
YTDescGen is in maintenance mode (CONTRIBUTING.md → "Maintenance mode"):
new features are out of scope, and `feat:` pull requests from outside
contributors are closed automatically unless their scope is `options`
(an agreed option request), `a11y` or `i18n`.
-->
## Summary
<!-- 1-3 bullet points describing the change -->
@@ -5,6 +12,17 @@
-
-
## Scope
<!-- Tick what this PR is. Anything else is out of scope while YTDescGen is in maintenance mode. -->
- [ ] Bug fix, broken UI/UX or accessibility fix
- [ ] Translation or wording fix
- [ ] Add or remove an option in one of the app's lists, agreed in issue #
- [ ] Dependency update, security fix, or major language/runtime/framework upgrade
- [ ] Cloudflare / Worker change, or a fix for a website incident
- [ ] Docs or tests only
## Type
- [ ] `feat` — new feature
+107
View File
@@ -0,0 +1,107 @@
name: Maintenance triage
# YTDescGen is in maintenance mode (CONTRIBUTING.md → Maintenance mode). This
# workflow closes, with a bilingual comment and the `out-of-scope` label:
# • any issue or pull request the maintainer labels `out-of-scope`;
# • when opened by an outside contributor: issues titled [Feature…] or
# labelled `enhancement`, and pull requests titled `feat:` — except the
# scopes maintenance mode still takes: `options` (an agreed option
# request), `a11y` and `i18n`. The owner, members, collaborators and bots
# are skipped.
# pull_request_target runs in the base repository so it can comment on and
# close pull requests from forks. It never checks out or runs pull request
# code, and the script reads titles from the event payload itself instead of
# having untrusted text interpolated into it (.github/zizmor.yml says so too).
on:
issues:
types: [opened, labeled]
pull_request_target:
types: [opened, labeled]
permissions: {}
concurrency:
group: maintenance-triage-${{ github.event.issue.number || github.event.pull_request.number }}
cancel-in-progress: false
jobs:
triage:
name: Close out-of-scope requests
if: >-
(github.event.action == 'labeled' && github.event.label.name == 'out-of-scope') ||
(github.event.action == 'opened' &&
!contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'),
github.event.issue.author_association || github.event.pull_request.author_association))
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
issues: write
pull-requests: write
steps:
- name: Close if out of scope
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const OUT_OF_SCOPE = 'out-of-scope';
const TRUSTED = ['OWNER', 'MEMBER', 'COLLABORATOR'];
// Feature pull requests maintenance mode still takes.
const KEPT_SCOPES = ['options', 'a11y', 'i18n'];
const { payload } = context;
const isPR = Boolean(payload.pull_request);
const item = payload.pull_request ?? payload.issue;
if (!item || item.state !== 'open') return;
const labels = (item.labels ?? []).map((label) => label.name);
let reason = null;
if (payload.action === 'labeled') {
if (payload.label?.name === OUT_OF_SCOPE) reason = 'labelled out-of-scope';
} else if (payload.action === 'opened') {
const trusted = TRUSTED.includes(item.author_association);
const bot = item.user?.type === 'Bot';
const title = String(item.title ?? '').trim();
if (!trusted && !bot) {
if (isPR) {
// Conventional Commits: feat:, feat(scope):, feat!:
const feat = /^feat(?:\(([^)]*)\))?!?:/i.exec(title);
const scope = (feat?.[1] ?? '').trim().toLowerCase();
if (feat && !KEPT_SCOPES.includes(scope)) reason = 'feat: pull request';
} else if (/^\[feature/i.test(title) || labels.includes('enhancement')) {
reason = 'feature request';
}
}
}
if (!reason) {
core.info(`#${item.number}: within scope, nothing to do.`);
return;
}
const ideas = 'https://github.com/poli0981/youtube-generator/discussions/categories/ideas';
const policy = 'https://github.com/poli0981/youtube-generator/blob/main/CONTRIBUTING.md#maintenance-mode';
const en = isPR ? 'pull request' : 'issue';
const vi = isPR ? 'Pull request' : 'Issue';
const body = [
'<!-- maintenance-triage -->',
'Thanks for taking the time to write this. YTDescGen is in **maintenance mode**: it still takes dependency and security updates, major runtime upgrades, fixes for bugs, UI/UX, accessibility and translations, options added to or removed from its lists when people really need them, and Cloudflare or website fixes, but no new features.',
'',
`This ${en} falls outside that scope, so it has been closed. If it is actually a bug, an accessibility or translation fix, or an option request, reply here and the maintainer will take another look. Ideas are welcome in [Discussions → Ideas](${ideas}). The full policy is in [CONTRIBUTING.md → Maintenance mode](${policy}).`,
'',
'---',
'',
'Cảm ơn bạn đã dành thời gian. YTDescGen đang ở **giai đoạn bảo trì**: vẫn nhận cập nhật thư viện và bảo mật, nâng cấp runtime lớn, sửa lỗi, UI/UX, trợ năng (accessibility) và bản dịch, thêm hoặc bỏ một tuỳ chọn trong các danh sách của app khi thật sự có người cần, và sửa lỗi Cloudflare hay website, nhưng không thêm tính năng mới.',
'',
`${vi} này nằm ngoài phạm vi đó nên đã được đóng. Nếu thực ra đây là lỗi, sửa trợ năng hay bản dịch, hoặc yêu cầu tuỳ chọn, hãy trả lời tại đây để maintainer xem lại. Ý tưởng có thể gửi ở [Discussions → Ideas](${ideas}). Chính sách đầy đủ: [CONTRIBUTING.md → Maintenance mode](${policy}).`,
].join('\n');
const { owner, repo } = context.repo;
const number = item.number;
await github.rest.issues.createComment({ owner, repo, issue_number: number, body });
if (!labels.includes(OUT_OF_SCOPE)) {
await github.rest.issues.addLabels({ owner, repo, issue_number: number, labels: [OUT_OF_SCOPE] });
}
if (isPR) {
await github.rest.pulls.update({ owner, repo, pull_number: number, state: 'closed' });
} else {
await github.rest.issues.update({ owner, repo, issue_number: number, state: 'closed', state_reason: 'not_planned' });
}
core.notice(`Closed ${en} #${number} as out of scope (${reason}).`);
+3 -3
View File
@@ -3,9 +3,9 @@ name: Notify CI Failures
on:
workflow_run:
# Match the exact `name:` of each watched workflow (ci.yml, security.yml,
# compliance.yml, rust.yml). Renaming one silently breaks this filter —
# keep them in sync.
workflows: ["CI", "Security", "Compliance", "Rust"]
# compliance.yml, rust.yml, qodana.yml). Renaming one silently breaks
# this filter — keep them in sync.
workflows: ["CI", "Security", "Compliance", "Rust", "Qodana"]
types: [completed]
# REQUIRED: declare permissions matching the reusable workflow's needs.
+137
View File
@@ -0,0 +1,137 @@
name: Qodana
# JetBrains Qodana static analysis, one linter per Qodana Cloud project:
#
# typescript - qodana-js (native mode) the repository project yt-ts-js, secret QODANA_TOKEN_TS_JS, qodana.yaml
# rust - qodana-rust (Docker, EAP) src-tauri/ project yt-rust, secret QODANA_TOKEN_RUST, src-tauri/qodana.yaml
#
# Every run analyses the whole project (`pr-mode: false`), so a pull request
# and `main` report the same way, and each qodana.yaml holds a quality gate of
# zero problems. Results: Qodana Cloud, check annotations on the run, and the
# qodana-report-* artifacts (SARIF and logs). Not a required check.
#
# Both linters need an Ultimate licence; the account runs the Qodana Ultimate
# trial. When the licence lapses, both jobs fail at the licence check: renew
# it, or delete this file and the two qodana.yaml files.
#
# PRs from forks and from Dependabot get no repository secrets: the `tokens`
# job sees that, and the analysis is skipped there, not failed — main is
# analysed once they merge. The token reaches the scan step only: npm
# packages are installed in a step that never sees it.
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions: {}
concurrency:
group: qodana-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
tokens:
name: Qodana tokens
runs-on: ubuntu-latest
timeout-minutes: 5
permissions: {}
outputs:
ts-js: ${{ steps.check.outputs.ts-js }}
rust: ${{ steps.check.outputs.rust }}
steps:
- name: Check which Qodana tokens this run has
id: check
env:
HAS_TS_JS: ${{ secrets.QODANA_TOKEN_TS_JS != '' }}
HAS_RUST: ${{ secrets.QODANA_TOKEN_RUST != '' }}
run: |
echo "ts-js=$HAS_TS_JS" >> "$GITHUB_OUTPUT"
echo "rust=$HAS_RUST" >> "$GITHUB_OUTPUT"
if [ "$HAS_TS_JS" != true ] || [ "$HAS_RUST" != true ]; then
echo "::notice::No Qodana token in this run (a Dependabot or fork pull request): that analysis is skipped."
fi
typescript:
name: TypeScript / JavaScript
needs: tokens
if: needs.tokens.outputs.ts-js == 'true'
runs-on: ubuntu-latest
timeout-minutes: 40
permissions:
contents: read
checks: write # the action's annotations
steps:
# The pull request's own head commit, not the merge GitHub makes, so
# the report names a commit that exists; full history for its VCS data.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .node-version
cache: npm
# The linter resolves imports and types from node_modules. No lifecycle
# scripts, as in every workflow (ci.yml says why).
- run: npm ci --ignore-scripts
# Native mode: the linter runs on this runner's Node 26 and node_modules
# instead of the older Node the Qodana image ships.
- name: Qodana scan
uses: JetBrains/qodana-action@3e8d76ff0e0241618abd808682f426afe84bab3f # v2026.2.2
with:
args: --linter qodana-js --within-docker false
pr-mode: false
post-pr-comment: false
upload-result: true
artifact-name: qodana-report-typescript
primary-cache-key: qodana-2026.2-js-${{ github.ref }}-${{ github.sha }}
# A prefix, so pull requests can restore the cache saved on main.
additional-cache-key: qodana-2026.2-js-
cache-default-branch-only: true
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_TS_JS }}
rust:
name: Rust (Early Access)
needs: tokens
if: needs.tokens.outputs.rust == 'true'
runs-on: ubuntu-latest
timeout-minutes: 45
permissions:
contents: read
checks: write # the action's annotations
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0
persist-credentials: false
# tauri::generate_context!() refuses to expand without the frontend
# directory (frontendDist, ../dist): an empty page stands in for the web
# build, which the analysis does not need. The icons are committed.
- name: Stand-in for the web build
run: |
mkdir -p dist
echo '<!doctype html><title>stand-in</title>' > dist/index.html
# qodana-rust ships only as a Docker image. It runs as root so that the
# bootstrap in src-tauri/qodana.yaml can install the C toolchain and the
# libraries Tauri links against — without them `cargo check` fails and
# the linter loads no Cargo package. The crates go to the cached Qodana
# directory. --repository-root keeps ../dist and the git data visible.
- name: Qodana scan
uses: JetBrains/qodana-action@3e8d76ff0e0241618abd808682f426afe84bab3f # v2026.2.2
with:
args: --project-dir src-tauri --repository-root . --linter qodana-rust -u root -e CARGO_HOME=/data/cache/cargo
pr-mode: false
post-pr-comment: false
upload-result: true
artifact-name: qodana-report-rust
primary-cache-key: qodana-2026.2-rust-${{ github.ref }}-${{ github.sha }}
# A prefix, so pull requests can restore the cache saved on main.
additional-cache-key: qodana-2026.2-rust-
cache-default-branch-only: true
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_RUST }}
+6
View File
@@ -18,3 +18,9 @@ rules:
# actor) to the notifier script through `env:`, never by interpolation.
- notify-ci-failure.yml
- notify-release-pipeline.yml
# Runs on `pull_request_target` so it can label, comment on and close
# an out-of-scope pull request from a fork (maintenance mode). It never
# checks out the pull request, runs none of its code, and reads the
# title from the event payload inside the script — nothing from the
# pull request is interpolated into the workflow.
- maintenance-triage.yml
+26 -13
View File
@@ -9,21 +9,32 @@
- **Repository**: `github.com/poli0981/youtube-generator` · **License**: Apache-2.0 (`LICENSE`, `NOTICE`, REUSE-compliant).
- **Maintainer**: poli0981 (SkullMute). Contacts by purpose: see `src/config/about.ts` and README.
**Status: maintenance mode** (since v1.6.0). Don't propose new features. Every change must fall under the policy in [`CONTRIBUTING.md` → Maintenance mode](CONTRIBUTING.md#maintenance-mode):
- dependency updates on the regular schedule;
- security fixes (a CVE rated high or critical, a serious runtime issue);
- major language, runtime or framework upgrades;
- bug, UI/UX and accessibility fixes, and adding or removing an option in one of the app's lists (stores, platforms, genres, video types, content warnings, tech notes, GPUs, upscaler / frame-gen modes) when people really need it;
- translation fixes (wording that doesn't fit a culture or region, misleading spelling);
- Cloudflare / Worker changes the platform forces, website incidents.
`.github/workflows/maintenance-triage.yml` closes out-of-scope issues and pull requests (label `out-of-scope`); `feat(options)`, `feat(a11y)` and `feat(i18n)` pull requests stay open.
## Tech Stack
| 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) |
| 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), Qodana (JS + Rust) |
## Project Structure
@@ -181,8 +192,10 @@ 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`.
- New upscaler / frame-gen option: the id in `src/config/graphics-settings.ts`, the vendor's list in `src/engine/graphics-vendor.ts`, the editor label (`editor.upscaleQuality.<vendor>` / `editor.frameGenMultiplier.<vendor>`, `ui.json`) and the description label (`description.graphics.upscale|frameGen.<vendor>`, `templates.json`) in all 8 locales and `_schema.json` — `tests/engine/graphics-vendor.test.ts` fails on a gap. A new id only widens the lists (no store bump); a new field does need one.
- 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.
- Qodana (`.github/workflows/qodana.yml`) runs on every PR and push to `main`: job `typescript` is Qodana for JS in native mode (`qodana.yaml`, Cloud project `yt-ts-js`, secret `QODANA_TOKEN_TS_JS`), job `rust` is Qodana for Rust, Early Access, in Docker on `src-tauri/` (`src-tauri/qodana.yaml`, project `yt-rust`, secret `QODANA_TOKEN_RUST`). Both gate on zero problems: fix a finding, or exclude it in the `qodana.yaml` with a comment saying why. Both skip without their token (Dependabot and fork PRs). It needs an Ultimate licence (currently the trial): when it lapses both jobs fail at the licence check.
- 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.
+39 -5
View File
@@ -6,6 +6,28 @@ Thanks for taking the time to contribute. Read this once before opening your fir
Participation is governed by the [Code of Conduct](./CODE_OF_CONDUCT.md). By contributing, you agree to its terms.
## Maintenance mode
Since 1.6.0 (November 2026) YTDescGen is in **maintenance mode**. It is feature-complete and stays maintained, but it doesn't grow new features. These changes are still accepted:
1. **Dependency updates** on a regular schedule (weekly, grouped by Dependabot after a 7-day cooldown).
2. **Security fixes**, as soon as possible: a dependency with a high or critical CVE, or a serious security issue in a runtime such as Node.js.
3. **Major upgrades** of a language, runtime or framework, for example Node 24 → 26 or TypeScript 6 → 7.
4. **Issues and pull requests** that:
- add or remove an option in one of the app's lists when people really need it — a store, a social or donate platform, a genre, a video type, a content warning or tech note, a GPU, an upscaler or frame-generation mode (open an [option request](#option-requests) first);
- fix a bug, a broken UI/UX or an accessibility barrier.
5. **Language fixes**: wording that doesn't fit a culture or region, and spelling mistakes that could mislead (see [i18n Contributions](#i18n-contributions)).
6. **Cloudflare / Worker** changes when the platform changes significantly.
7. **Website incidents** such as DDoS or bot spam.
Anything else is out of scope, new features in particular, unless the maintainer judges one genuinely necessary.
- The [maintenance triage workflow](.github/workflows/maintenance-triage.yml) closes feature issues and `feat:` pull requests from outside contributors automatically — a `feat(options)`, `feat(a11y)` or `feat(i18n)` pull request stays open. It also closes anything the maintainer labels `out-of-scope`.
- Feature ideas are welcome in [Discussions → Ideas](https://github.com/poli0981/youtube-generator/discussions/categories/ideas), with no commitment.
- If your issue or pull request was closed by mistake, reply to it and the maintainer will take another look.
Releases ship only when one of these changes needs one, for example a security fix for the desktop and Android apps. The website keeps deploying from `main`.
## Getting Started
1. Read the [Development Guide](./docs/DEVELOPMENT.md) — also available in [Vietnamese](./docs/i18n/vi/DEVELOPMENT.md).
@@ -32,15 +54,25 @@ Participation is governed by the [Code of Conduct](./CODE_OF_CONDUCT.md). By con
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.
- **Option request** — add or remove an option in one of the app's lists; see [Option requests](#option-requests).
- **Translation or wording fix** — wording that doesn't fit a culture or region, or a spelling mistake that could mislead, in any of the eight languages.
- **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).
There is no feature request form any more: YTDescGen is in [maintenance mode](#maintenance-mode). Share ideas in [Discussions → Ideas](https://github.com/poli0981/youtube-generator/discussions/categories/ideas).
### Option requests
The one kind of addition maintenance mode still takes: an option in a list the app already has, when people really need it — a store (store links), a social or donate platform, a genre, a video type, a content warning or tech note, a GPU in the rig catalog, an upscaler or frame-generation mode. Removing one that no longer makes sense works the same way.
Open an **Option request** issue first: the option's name as it should appear, which list, and who needs it and why (a link to the store page, the vendor's announcement or a video that needed it helps). Once it's agreed, a pull request titled `feat(options): …` is welcome. [ARCHITECTURE.md → Extensibility Points](./docs/ARCHITECTURE.md) and CLAUDE.md's "Important Notes" say which files each kind of option touches, and the checks fail until all eight locales have its strings.
### 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. 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.
- 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`). JetBrains Qodana does the same for TypeScript and for the Rust shell, and fails on any problem it finds. Commits on `main` are signed.
- PR titles start with a lower-case letter after the colon (`feat(editor): add …`, not `feat(editor): Add …`).
- In [maintenance mode](#maintenance-mode) a `feat` pull request from an outside contributor is closed automatically, unless its scope is `options`, `a11y` or `i18n`. A fix is a `fix`.
- 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.
@@ -74,15 +106,17 @@ The following are closed without review and may result in a contributor ban —
## What We Want
Within [maintenance mode](#maintenance-mode):
- Bug fixes with a reproduction case and a regression test.
- Locale corrections from native speakers.
- New content-warning or tech-note IDs with all 8 translations and a clear rationale (especially horror-genre vocabulary) — the checks fail until every locale has its label and description line.
- New video types or genres that fit the gameplay no-commentary use case.
- Accessibility and mobile-responsive improvements.
- An option people really need, agreed in an [option request](#option-requests) first — for example a content-warning or tech-note ID with all 8 translations and a clear rationale (especially horror-genre vocabulary), a store, a genre or a video type that fits the gameplay no-commentary use case.
- Accessibility and mobile-responsive fixes.
- Performance fixes with a `before/after` measurement.
## What We Don't Want
- New features, unless the maintainer judges one genuinely necessary — share the idea in [Discussions → Ideas](https://github.com/poli0981/youtube-generator/discussions/categories/ideas) instead.
- Cosmetic refactors with no behavior change.
- Adding new runtime dependencies without first opening an issue to discuss the tradeoff.
- Renaming files without coordinating with open PRs.
+10 -1
View File
@@ -1,5 +1,7 @@
# Maintainers
Since 1.6.0 the project is in **maintenance mode**: no new features, only the changes listed in [CONTRIBUTING.md → Maintenance mode](./CONTRIBUTING.md#maintenance-mode).
## Active Maintainers
### `@poli0981`
@@ -12,12 +14,19 @@
## Maintainer Responsibilities
- Triage incoming issues and PRs.
- Triage incoming issues and PRs, keeping them within the maintenance scope: the [triage workflow](./.github/workflows/maintenance-triage.yml) closes feature requests from outside contributors, and anything labelled `out-of-scope`, with an explanation.
- Run the release process: `CHANGELOG.md` entry, version bump, build artifacts, signed tag.
- Enforce the [Code of Conduct](./CODE_OF_CONDUCT.md).
- Review and approve locale translation contributions.
- Coordinate security advisory disclosure per [SECURITY.md](./SECURITY.md).
## Where to Reach Us
- Bug reports, translation fixes and option requests: [GitHub Issues](https://github.com/poli0981/youtube-generator/issues)
- Feature ideas, with no commitment while in maintenance mode: [Discussions → Ideas](https://github.com/poli0981/youtube-generator/discussions/categories/ideas)
- Accessibility barriers: the [Accessibility barrier](https://github.com/poli0981/youtube-generator/issues/new?template=accessibility.yml) form — see [ACCESSIBILITY.md](./ACCESSIBILITY.md)
- Vulnerabilities: privately, as [SECURITY.md](./SECURITY.md) describes
## Becoming a Maintainer
There is currently no formal pathway. The project has been solo since inception. If you'd like to help maintain a specific area — most realistically, native-speaker review for one of the AI-translated locales (JA / ES / KO / ZH / PT-BR / ID) — open an issue describing what you'd like to take on.
+18 -2
View File
@@ -6,6 +6,10 @@
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.
[![Status: maintenance mode](https://img.shields.io/badge/status-maintenance_mode-yellow.svg)](#project-status)
[![CI](https://github.com/poli0981/youtube-generator/actions/workflows/ci.yml/badge.svg)](https://github.com/poli0981/youtube-generator/actions/workflows/ci.yml)
[![Qodana](https://github.com/poli0981/youtube-generator/actions/workflows/qodana.yml/badge.svg)](https://github.com/poli0981/youtube-generator/actions/workflows/qodana.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=poli0981_youtube-generator&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=poli0981_youtube-generator)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](./LICENSE)
[![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)
@@ -23,6 +27,18 @@ It doesn't talk to the YouTube API and has no account. Your work — profiles, p
Built for the gameplay no-commentary niche — especially horror / scary games — by someone running the [@SkullMute](https://www.youtube.com/@SkullMute) channel who got tired of pasting the same boilerplate into every video. Released under Apache 2.0 in case it's useful to anyone else.
## Project status
**Maintenance mode** since 1.6.0 (November 2026). YTDescGen is feature-complete, and it stays maintained:
- dependency updates on a regular schedule, and fast fixes for high or critical CVEs and serious runtime security issues;
- major language, runtime and framework upgrades (for example Node 24 → 26, TypeScript 6 → 7);
- bug, UI/UX and accessibility fixes, and adding or removing an option in one of the app's lists — a store, platform, genre, video type, content warning, GPU or upscaler mode — when people really need it;
- translation fixes: wording that doesn't fit a culture or region, and spelling mistakes that could mislead;
- changes the Cloudflare or Worker platform forces, and website incidents such as DDoS or bot spam.
New features are not planned, except the rare one that is genuinely necessary. Feature issues and pull requests outside this list are closed automatically. The full policy is in [CONTRIBUTING.md](./CONTRIBUTING.md#maintenance-mode).
## Features
- **20 video types** — Full Gameplay, Part, Boss Fight, Boss No-Hit, Ending, Speedrun, 100%, DLC, NG+, Challenge, Side Quest, Secret, Comparison, Guide, Mods, Collectibles, Livestream, Gacha Quest, Demo, Demo Part.
@@ -104,7 +120,7 @@ Architecture overview: [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md).
| [Architecture](./docs/ARCHITECTURE.md) | Layer model, data flow, engine design. |
| [Features](./docs/FEATURES.md) | Full feature matrix. |
| [Content Inventory](./docs/CONTENT-INVENTORY.md) | Every video type, genre, content warning and tech note the editor surfaces. _(Also: [Vietnamese](./docs/i18n/vi/CONTENT-INVENTORY.md).)_ |
| [Roadmap](./docs/ROADMAP.md) | What shipped and what's next. |
| [Roadmap](./docs/ROADMAP.md) | What shipped, and what maintenance mode still covers. |
| [Tech Spec](./docs/TECH-SPEC.md) | Implementation details and configs. |
| [i18n Guide](./docs/I18N.md) | Adding new locales. |
| [Packaging](./docs/PACKAGING.md) | Tauri desktop + Android release builds and signing. |
@@ -121,7 +137,7 @@ Architecture overview: [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md).
## Contributing
PRs welcome — read [CONTRIBUTING.md](./CONTRIBUTING.md) first. Native-speaker corrections to the AI-translated locales (JA / ES / KO / ZH / PT-BR / ID) are especially appreciated.
YTDescGen is in [maintenance mode](#project-status): bug, accessibility and translation fixes and agreed option requests are welcome — read [CONTRIBUTING.md](./CONTRIBUTING.md) first. Native-speaker corrections to the AI-translated locales (JA / ES / KO / ZH / PT-BR / ID) are especially appreciated. Feature ideas go to [Discussions → Ideas](https://github.com/poli0981/youtube-generator/discussions/categories/ideas).
## License
+2
View File
@@ -9,6 +9,8 @@ Only the latest released version of YTDescGen receives security updates, and the
| 1.5.x | ✅ |
| < 1.5 | ❌ |
YTDescGen has been in [maintenance mode](./CONTRIBUTING.md#maintenance-mode) since 1.6.0. That doesn't change this policy: security fixes keep shipping, and a dependency with a high or critical CVE is fixed as soon as possible.
## Reporting a Vulnerability
Please report security issues **privately**. Do not open a public issue.
+12 -12
View File
@@ -20,16 +20,16 @@ Bundled into the web app and the desktop / Android apps.
| `cmdk` | 1.1.1 | MIT | <https://github.com/pacocoursey/cmdk> |
| `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.66.0 | ISC | <https://github.com/lucide-icons/lucide> |
| `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.1 | MIT | <https://github.com/react/react> |
| `react-dom` | 19.3.1 | MIT | <https://github.com/react/react> |
| `react-i18next` | 17.1.11 | MIT | <https://github.com/i18next/react-i18next> |
| `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.36.0 | CC0-1.0 | <https://simpleicons.org> |
| `simple-icons` | 16.37.0 | CC0-1.0 | <https://simpleicons.org> |
| `sonner` | 2.0.8 | MIT | <https://github.com/emilkowalski/sonner> |
| `zustand` | 5.0.16 | MIT | <https://github.com/pmndrs/zustand> |
| `zustand` | 5.1.0 | MIT | <https://github.com/pmndrs/zustand> |
## Build and development tools
@@ -39,7 +39,7 @@ 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.4 | MIT | <https://github.com/tailwindlabs/tailwindcss> |
| `@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> |
@@ -47,23 +47,23 @@ Used to build, test and check YTDescGen. Not shipped to users.
| `@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.2.1 | 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.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.44.1 | ISC | <https://github.com/webpro-nl/knip> |
| `marked` | 18.1.3 | MIT | <https://github.com/markedjs/marked> |
| `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.4 | 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.72.1 | MIT | <https://github.com/typescript-eslint/typescript-eslint> |
| `vite` | 8.3.5 | 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.156.2 | 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)
+1
View File
@@ -87,6 +87,7 @@ The dev server is the app alone: no Turnstile gate and no analytics. To run the
- 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.
- The `Qodana` workflow runs JetBrains [Qodana](https://www.jetbrains.com/qodana/) on every PR and every push to `main`: Qodana for JS on the repository (`qodana.yaml`) and Qodana for Rust on `src-tauri/` (`src-tauri/qodana.yaml`). Both fail on any problem. Like SonarCloud, it skips PRs from forks and from Dependabot, which get no Qodana token. It is not a required check.
Full rules: [CONTRIBUTING.md](../CONTRIBUTING.md).
+40 -11
View File
@@ -165,6 +165,9 @@ 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`.
**Custom** (v1.6.0), the first suggestion (typing "custom" works too), is for
a LUT of your own: the line then reads just _LUT applied_ (_Có áp dụng LUT_ in
Vietnamese), without a name.
**GPU catalog (v1.0.0)** — 198 models in 29 groups: NVIDIA GeForce (desktop
and laptop), AMD Radeon (including integrated), Intel Arc and integrated,
@@ -227,6 +230,29 @@ 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.
**Upscaler and frame generation** — Video settings › the vendor picks the
options the other fields offer, and the `In-game Setting:` line names each
one under its brand (kept in English in every language, as viewers search
for it):
| Vendor | Upscaling | Frame generation |
| ------ | --------------------------------------------------------------- | ---------------------------------------------------------------------- |
| NVIDIA | DLAA, DLSS Quality / Balanced / Performance / Ultra Performance | x2, x3, x4, **x6**, **Dynamic** (Dynamic Multi Frame Gen), **Custom…** |
| AMD | FSR Native AA, Quality / Balanced / Performance / Ultra Perf. | x2, x3 (Fluid Motion Frames), **Custom…** |
| Intel | XeSS Native AA, Ultra Quality, Quality … Ultra Performance | x2 (XeFG), **Custom…** |
New in v1.6.0 (bold): NVIDIA's x6 and Dynamic Multi Frame Generation;
**Custom…** for every vendor, which prints what you type (_NVIDIA Smooth
Motion_, _Lossless Scaling x3_); and, for NVIDIA, a **DLSS 5 Neural
Rendering** switch, printed after the DLSS mode:
```
In-game Setting: Ultra - NVIDIA DLSS Quality + NVIDIA DLSS 5 Neural Rendering + NVIDIA Dynamic Multi Frame Generation with Path Tracing
```
Changing the vendor drops what the new one doesn't offer. These settings
belong to the draft and to templates, not to the 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 —
@@ -429,17 +455,17 @@ In **Settings › Backup & restore**:
`Ctrl` on Windows / Linux / Android, `⌘` on a Mac — both work everywhere.
| Shortcut | Action |
| ---------------------------- | --------------------------------------------------------------- |
| `Ctrl/⌘+K` | Command palette |
| `Ctrl/⌘+Enter` or `Ctrl/⌘+G` | Generate (switch to Output) |
| `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 |
| `Alt+T` | Go to the notifications (while any are on screen) |
| Shortcut | Action |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------ |
| `Ctrl/⌘+K` | Command palette |
| `Ctrl/⌘+Enter` or `Ctrl/⌘+G` | Generate (switch to Output) |
| `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 |
| `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 |
| `Ctrl/⌘+=` / `Ctrl/⌘+−` | Zoom in / out — desktop app (v1.5.1) |
| `Escape` | Close modal |
## 🔧 Settings
@@ -573,7 +599,10 @@ documents and ticks one "I agree" checkbox.
## 🔌 Future Extension Points
See [ROADMAP.md](./ROADMAP.md) for the post-1.0 backlog.
**Frozen: YTDescGen is in maintenance mode** (since v1.6.0) and takes no new
features — see [CONTRIBUTING.md → Maintenance mode](../CONTRIBUTING.md#maintenance-mode).
The ideas below and the [ROADMAP.md](./ROADMAP.md) backlog stay as a record; one
moves only if the maintainer judges it genuinely necessary.
| Extension | Description | Effort |
| -------------------- | ----------------------------------------------------------- | ------ |
+61 -12
View File
@@ -2,10 +2,12 @@
## YTDescGen — Phased Development Plan
> **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.
> **Status (2026-11-17): maintenance mode, from v1.6.0.** YTDescGen is
> feature-complete: it stays maintained but takes no new features — see
> [Maintenance mode](#maintenance-mode--from-v160) below. 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). Phase 5 and the backlog are frozen.
---
@@ -375,8 +377,54 @@ the initial load inside its budget —
---
## Maintenance mode — from v1.6.0
**Status**: ongoing since v1.6.0 (November 2026).
YTDescGen is feature-complete. From 1.6.0 on it is maintained, not extended:
no new features unless one is judged genuinely necessary. The accepted
changes, and how out-of-scope issues and pull requests are closed, are in
[CONTRIBUTING.md → Maintenance mode](../CONTRIBUTING.md#maintenance-mode):
1. Dependency updates on a regular schedule.
2. Security fixes: a dependency with a high or critical CVE, a serious runtime
issue.
3. Major language, runtime and framework upgrades (Node 24 → 26, TypeScript
6 → 7).
4. Bug, UI/UX and accessibility fixes, and adding or removing an option in one
of the app's lists when people really need it.
5. Translation fixes: wording that doesn't fit a culture or region, misleading
spelling mistakes.
6. Cloudflare / Worker changes the platform forces.
7. Website incidents such as DDoS or bot spam.
What 1.6.0 set up for it:
- [x] **Policy**: README → Project status, CONTRIBUTING → Maintenance mode,
SECURITY, MAINTAINERS, CLAUDE.md.
- [x] **Issue forms**: the feature request form is gone; an Option request
and a Translation or wording fix form joined Bug report and
Accessibility barrier; a Scope checklist in the pull request template.
- [x] **Auto-close**: `maintenance-triage.yml` closes, with a bilingual
comment and the `out-of-scope` label, feature issues and `feat:` pull
requests from outside contributors (`feat(options)`, `feat(a11y)` and
`feat(i18n)` stay open), and anything the maintainer labels
`out-of-scope`.
- [x] **Qodana**: Qodana for JS and Qodana for Rust (Early Access) on every
push and pull request, reported to Qodana Cloud, with a gate of zero
problems.
Known maintenance already queued: the GitHub Pages moving notice comes down
on 2026-11-29 (issue #177); i18next 27 and Tauri 3 arrive as planned major
upgrades when they are ready.
---
## Phase 5 — Extensions & Ecosystem (Priority: P2-P3)
**Frozen while YTDescGen is in maintenance mode.** An item moves only if it
falls under the [maintenance policy](../CONTRIBUTING.md#maintenance-mode).
**Goal**: IDE extension, CLI, community features.
**Estimated**: Ongoing
@@ -423,7 +471,8 @@ the initial load inside its budget —
## Backlog (after v1.0.0)
Ideas carried over from the v1.0.0 planning — not scheduled.
Ideas carried over from the v1.0.0 planning — not scheduled, and frozen while
YTDescGen is in maintenance mode.
```
- [ ] Auto-fill game info from Steam through the Worker — needs rate limiting
@@ -441,13 +490,13 @@ Ideas carried over from the v1.0.0 planning — not scheduled.
## Timeline Summary
| Phase | Scope | Days | Cumulative |
| ------- | ------------------ | ------- | ---------- |
| Phase 1 | MVP Core | 3-4 | 3-4 days |
| Phase 2 | Profiles & Presets | 2-3 | 5-7 days |
| Phase 3 | Polish & Advanced | 2-3 | 7-10 days |
| Phase 4 | Desktop App | 2-3 | 9-13 days |
| Phase 5 | Extensions | Ongoing | — |
| Phase | Scope | Days | Cumulative |
| ------- | ------------------ | ------ | ---------- |
| Phase 1 | MVP Core | 3-4 | 3-4 days |
| Phase 2 | Profiles & Presets | 2-3 | 5-7 days |
| Phase 3 | Polish & Advanced | 2-3 | 7-10 days |
| Phase 4 | Desktop App | 2-3 | 9-13 days |
| Phase 5 | Extensions | Frozen | — |
**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.5.2 (2026-11-10).**
+11 -6
View File
@@ -347,8 +347,9 @@ export interface GeneratorInput {
// liveUrl, scheduledTime, gachaQuestType, chapterName, questName, characterName,
// anniversaryYear, gachaVersion.
// Video settings: resolution, upscaledFrom (v1.5.0), fps, graphicsPreset (+ graphicsPresetCustom),
// skipGraphicsSettings, rayTracingModes, frameGenVendor, frameGenMultiplier,
// upscaleQuality, artStyle, videoStyleEra, versionInfo.
// skipGraphicsSettings, rayTracingModes, frameGenVendor, frameGenMultiplier
// (+ frameGenCustom, v1.6.0), upscaleQuality, dlssNeuralRendering (v1.6.0),
// artStyle, videoStyleEra, versionInfo.
// Content: timestamps, playlistLink, contactEmail, adEmail, gameKeyEmail,
// copyrightEmail, musicAttribution, sponsorName, sponsorPlatform, pubDevName,
// thirdPartyAdText,
@@ -420,7 +421,7 @@ export interface TitleFormatConfig {
**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, 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.
**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). A field with a `customNoteKey` whose value is "Custom" (any case) prints that templates key as its whole line instead — since v1.6.0 the LUT's "LUT applied" (`description.rigNotes.lut_custom`), for a LUT of one's own. Keys that are no longer rig fields are still printed, after the known ones.
**Chapters** (`timeline-parser.ts`):
@@ -474,7 +475,7 @@ interface EditorActions {
}
/** Bump together with a new step in migrateEditorState. */
export const EDITOR_STORE_VERSION = 21;
export const EDITOR_STORE_VERSION = 22;
export const useEditorStore = create<EditorData & EditorActions>()(
persist(
@@ -508,7 +509,7 @@ export function migrateEditorState(persistedState: unknown, version: number): Ed
| Store | localStorage key | Version | Migration (exported) |
| ------------------ | ------------------------ | ----------------------------- | ---------------------------------------------------------------------------------------------- |
| `useEditorStore` | `ytdescgen-editor-draft` | `EDITOR_STORE_VERSION` = 21 | `migrateEditorState` |
| `useEditorStore` | `ytdescgen-editor-draft` | `EDITOR_STORE_VERSION` = 22 | `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` |
@@ -525,6 +526,8 @@ v1.5.0: editor v21 back-fills `upscaledFrom` (recorded at a lower resolution, up
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`.
v1.6.0: editor v22 back-fills `frameGenCustom` (the frame generation typed for the new `"custom"` multiplier) with `""` and `dlssNeuralRendering` (NVIDIA DLSS 5 Neural Rendering) with `false`, coercing values of the wrong type. The multiplier list only widens (`x6` and `dynamic` for NVIDIA, `custom` for every vendor), and the backup whitelist checks it against `FRAMEGEN_MULTIPLIERS`. `normalizeEditorPatch` and the backup import turn `dlssNeuralRendering` off for any vendor but NVIDIA (`coerceDlssNeuralRendering`). Neither field is a profile or preset field, like the rest of the frame-gen settings. The LUT's "Custom" needs no migration: it is a rig value like any LUT name.
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.
@@ -595,6 +598,7 @@ An unknown version is read as 0: every migration step is idempotent, so running
| `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`) |
| `qodana.yml` (Qodana) | PRs to and pushes on `main`, manual | `typescript` — Qodana for JS in native mode (`qodana.yaml`); `rust` — Qodana for Rust, Early Access, in Docker (`src-tauri/qodana.yaml`); both skip without their token (Dependabot and fork PRs) |
| `release-desktop.yml`, `release-android.yml` | `v*` tags, manual with a `tag` input | `verify`, then the builds — see [PACKAGING.md](PACKAGING.md) |
| `announce-release.yml` | Release published, manual | Links the release to an Announcements discussion and posts to Discord |
| `notify-ci-failure.yml`, `notify-release-pipeline.yml` | `workflow_run` | Discord notifications through the maintainer's shared workflows |
@@ -642,7 +646,8 @@ Then `sonarcloud` (after `check` succeeds):
- **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.
- **Qodana** (v1.6.0; JetBrains, Ultimate licence — the account runs the trial): `qodana.yml` runs Qodana for JS in native mode, on the runner's Node 26 and `node_modules` (`qodana.yaml`), and Qodana for Rust (Early Access, Docker only) on `src-tauri/` (`src-tauri/qodana.yaml`: its `bootstrap` installs the packages `rust.yml` installs, and a stand-in `dist/index.html` lets `generate_context!` expand). Both use the `qodana.recommended` profile and a quality gate of zero problems; every exclusion in a `qodana.yaml` says why. Every run analyses the whole project (`pr-mode: false`). Results go to Qodana Cloud (projects `yt-ts-js` and `yt-rust`), the run's annotations and the `qodana-report-*` artifacts — no PR comment. A `tokens` job checks for `QODANA_TOKEN_TS_JS` and `QODANA_TOKEN_RUST`, which Dependabot and fork PRs don't get, so the analysis is skipped there; the token reaches only the scan step, never the `npm ci` one. Not a required check. When the licence lapses, both jobs fail at the licence check.
- 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, Rust and Qodana 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).
+1
View File
@@ -89,6 +89,7 @@ Dev server chỉ chạy riêng app: không có cổng Turnstile, không có anal
- 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.
- Workflow `Qodana` chạy JetBrains [Qodana](https://www.jetbrains.com/qodana/) trên mọi PR và mọi lần push vào `main`: Qodana for JS cho cả repo (`qodana.yaml`) và Qodana for Rust cho `src-tauri/` (`src-tauri/qodana.yaml`). Cả hai fail khi có bất kỳ lỗi nào. Giống SonarCloud, PR từ fork và từ Dependabot bỏ qua phân tích vì không có token Qodana. Đây không phải check bắt buộc.
Quy định đầy đủ: [CONTRIBUTING.md](../../../CONTRIBUTING.md).
+418 -420
View File
File diff suppressed because it is too large. Load diff
+12 -12
View File
@@ -46,21 +46,21 @@
"cmdk": "^1.1.1",
"i18next": "~26.6.0",
"i18next-resources-to-backend": "^1.2.4",
"lucide-react": "^1.66.0",
"lucide-react": "^1.70.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-i18next": "^17.1.13",
"react-router-dom": "^7.18.5",
"simple-icons": "^16.36.0",
"simple-icons": "^16.37.0",
"sonner": "^2.0.8",
"zustand": "^5.0.16"
"zustand": "^5.1.0"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@resvg/resvg-js": "2.6.2",
"@tailwindcss/postcss": "^4.3.4",
"@tailwindcss/postcss": "^4.3.5",
"@tauri-apps/cli": "2.12.4",
"@testing-library/jest-dom": "^7.0.1",
"@testing-library/react": "^16.3.3",
@@ -68,22 +68,22 @@
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"@typescript/native": "npm:typescript@^7.0.2",
"@vitejs/plugin-react": "^6.2.1",
"@vitejs/plugin-react": "^6.3.0",
"@vitest/coverage-v8": "^4.1.12",
"autoprefixer": "^10.6.2",
"eslint": "^10.14.0",
"eslint-plugin-react-hooks": "^7.1.1",
"knip": "^6.44.1",
"marked": "18.1.3",
"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.72.1",
"vite": "^8.3.5",
"typescript-eslint": "^8.72.2",
"vite": "^8.3.7",
"vitest": "^4.1.12",
"wrangler": "4.156.2"
"wrangler": "4.159.0"
}
}
+2 -1
View File
@@ -2,6 +2,7 @@
// first paint, so a light-theme user never sees the dark default flash. A
// separate file rather than an inline <script> so the Content-Security-Policy
// needs no exception.
/* global document, localStorage */
(function () {
var root = document.documentElement;
var theme = "dark";
@@ -14,7 +15,7 @@
// Unhealed raw storage, so only a real `true` counts.
if (state && state.hideScrollbars === true) hideScrollbars = true;
if (state && typeof state.appLanguage === "string") lang = state.appLanguage;
} catch (e) {
} catch {
/* storage blocked or corrupt: keep the defaults */
}
root.classList.toggle("dark", theme === "dark");
+59
View File
@@ -0,0 +1,59 @@
# Qodana for JavaScript / TypeScript: the web app (src/), the Worker, the
# build plugins, scripts, tests and workflows. Run by
# .github/workflows/qodana.yml (job `typescript`, native mode), reported to
# the Qodana Cloud project yt-ts-js (secret QODANA_TOKEN_TS_JS).
version: "1.0"
linter: qodana-js
profile:
name: qodana.recommended
# The quality gate: any problem fails the job.
failureConditions:
severityThresholds:
any: 0
exclude:
- name: All
paths:
# The Tauri shell is the Rust project (src-tauri/qodana.yaml).
- src-tauri
# Build output, caches and reports.
- dist
- coverage
- node_modules
- .wrangler
# The GitHub Pages moving notice, removed on 2026-11-29 (issue #177).
- migration-page
# `${{ secrets.DISCORD_RELEASE_PIPELINE_WEBHOOK }}` is a reference to a
# repository secret, not a secret: the "discord-client-secret" rule only
# sees the word.
- name: HardcodedPasswords
paths:
- .github/workflows/notify-release-pipeline.yml
# `\]` and `\}` outside a character class stay escaped: they read as the
# literal brackets they are, and the patterns stay valid if they ever get
# the `u` or `v` flag, where a lone `]` or `}` is a syntax error. ESLint's
# no-useless-escape accepts them too.
- name: RegExpRedundantEscape
# `@i18n/index` is the form tsconfig.json's `@i18n/*` path resolves. The
# bare `@i18n` this suggests resolves only through Vite's alias, so tsc
# would no longer find the module.
- name: ES6PreferShortImport
# The three react-hooks warnings eslint.config.js documents (state synced
# from i18next, from a store number, and a useMemo the React Compiler
# can't keep): each needs a restructure, and the config keeps them as
# warnings on purpose. ESLint runs in CI's `check` job as well.
- name: Eslint
paths:
- src/hooks/use-languages-ready.ts
- src/components/editor/PlaytestEditor.tsx
- src/components/editor/StoreLinkEditor.tsx
# The legacy draft fields `spoilerWarning`, `matureWarning` and
# `endingsShown` are `@deprecated` so new code doesn't use them; these
# files carry them on purpose, to read and migrate drafts, presets and
# templates saved by older versions.
- name: JSDeprecatedSymbols
paths:
- src/config/defaults.ts
- src/store/editor-store.ts
- src/hooks/use-current-generator-input.ts
- src/engine/description-builder.ts
- src/utils/library-apply.ts
+2 -2
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",
+32
View File
@@ -0,0 +1,32 @@
# Qodana for Rust (Early Access): the Tauri 2 shell of the desktop and
# Android apps. Run by .github/workflows/qodana.yml (job `rust`, Docker),
# reported to the Qodana Cloud project yt-rust (secret QODANA_TOKEN_RUST).
version: "1.0"
linter: qodana-rust
profile:
name: qodana.recommended
# The quality gate: any problem fails the job.
failureConditions:
severityThresholds:
any: 0
# The linter evaluates build scripts and expands macros with `cargo check`,
# and its image has neither a C toolchain nor the libraries Tauri links
# against (the same packages rust.yml installs). Needs root in the container:
# the workflow passes `-u root`.
bootstrap: |
apt-get update -qq
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends build-essential pkg-config libssl-dev libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
exclude:
- name: All
paths:
# Cargo's build output, and the Android project `tauri android init`
# generated (Kotlin and Gradle, not Rust).
- target
- gen
# tauri::generate_handler! needs each command's module path
# (`storage::backup_list`): the #[tauri::command] macro puts a hidden
# helper next to the function, and the handler finds it through that
# path. Without the prefix the crate no longer compiles.
- name: RsUnnecessaryQualifications
paths:
- src/lib.rs
+14 -18
View File
@@ -17,6 +17,17 @@ use tauri::{
mod file_dialog;
mod storage;
/// Bring the main window back: show it, restore it if minimized and focus
/// it. Used by a second launch, the tray menu's "Show" and a tray click.
#[cfg(desktop)]
fn show_main_window<R: tauri::Runtime>(app: &tauri::AppHandle<R>) {
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.unminimize();
let _ = window.set_focus();
}
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
// Plugins and commands shared by every platform (desktop + Android).
@@ -62,11 +73,7 @@ pub fn run() {
// in the *first* (already-running) instance when a second launch is
// attempted: we surface its window instead of letting the second boot.
.plugin(tauri_plugin_single_instance::init(|app, _argv, _cwd| {
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.unminimize();
let _ = window.set_focus();
}
show_main_window(app);
}))
.setup(move |app| {
let show = MenuItem::with_id(app, "show", "Show YTDescGen", true, None::<&str>)?;
@@ -83,13 +90,7 @@ pub fn run() {
.tooltip("YTDescGen — YouTube Description Generator")
.menu(&menu)
.on_menu_event(move |app, event| match event.id.as_ref() {
"show" => {
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.unminimize();
let _ = window.set_focus();
}
}
"show" => show_main_window(app),
"quit" => {
quitting_menu.store(true, Ordering::SeqCst);
app.exit(0);
@@ -103,12 +104,7 @@ pub fn run() {
..
} = event
{
let app = tray.app_handle();
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.unminimize();
let _ = window.set_focus();
}
show_main_window(tray.app_handle());
}
})
.build(app)?;
@@ -23,6 +23,7 @@ import {
getValidFrameGenMultipliers,
coerceUpscaleQuality,
coerceFrameGenMultiplier,
coerceDlssNeuralRendering,
} from "@engine/graphics-vendor";
import { upscaleSourcesFor, validUpscaleSource } from "@engine/upscale";
import { VIDEO_STYLE_ERA_IDS, type VideoStyleEra } from "@config/video-styles";
@@ -101,6 +102,12 @@ export function VideoSettingsForm() {
if (coercedQ !== store.upscaleQuality) store.set("upscaleQuality", coercedQ);
const coercedM = coerceFrameGenMultiplier(next, store.frameGenMultiplier);
if (coercedM !== store.frameGenMultiplier) store.set("frameGenMultiplier", coercedM);
// v1.6.0: DLSS 5 Neural Rendering is NVIDIA's; its switch hides for
// other vendors, so it turns off rather than linger unseen.
const coercedNeural = coerceDlssNeuralRendering(next, store.dlssNeuralRendering);
if (coercedNeural !== store.dlssNeuralRendering) {
store.set("dlssNeuralRendering", coercedNeural);
}
}
// v1.5.0: "Upscaled from" lists only resolutions below the video's own.
@@ -211,6 +218,17 @@ export function VideoSettingsForm() {
/>
</div>
{/* v1.6.0: "Custom…" frame generation, printed as typed. */}
{store.frameGenMultiplier === "custom" && (
<Input
label={t("editor.frameGenCustom")}
maxLength={FIELD_LIMITS.LABEL}
placeholder={t("editor.frameGenCustomPlaceholder")}
value={store.frameGenCustom}
onChange={(e) => store.set("frameGenCustom", e.target.value)}
/>
)}
<div className="grid gap-3 sm:grid-cols-2">
<Select
label={t("editor.upscaleQuality")}
@@ -226,6 +244,15 @@ export function VideoSettingsForm() {
/>
</div>
{/* v1.6.0: DLSS 5 Neural Rendering — NVIDIA (RTX 50 series) only. */}
{store.frameGenVendor === "nvidia" && (
<Toggle
label={t("editor.dlssNeuralRendering")}
checked={store.dlssNeuralRendering}
onChange={(v) => store.set("dlssNeuralRendering", v)}
/>
)}
<Input
label={t("editor.versionInfo")}
maxLength={FIELD_LIMITS.LABEL}
+2 -2
View File
@@ -1,4 +1,4 @@
import { useId, useState, type FormEvent } from "react";
import { useId, useState, type SubmitEvent } from "react";
import { useTranslation } from "react-i18next";
import { toast } from "sonner";
import { Modal } from "@components/ui/Modal";
@@ -35,7 +35,7 @@ function PresetSaveFormBody({ onClose, editPreset }: PresetSaveFormProps) {
);
const [fromEditor, setFromEditor] = useState(false);
const save = (e: FormEvent) => {
const save = (e: SubmitEvent) => {
e.preventDefault();
const fields = presetFieldsFromEditor(editorDataOf(useEditorStore.getState()));
const name = gameName.trim() || fields.gameName.trim() || t("presets.unnamed");
+2 -2
View File
@@ -1,4 +1,4 @@
import { useId, useState, type FormEvent } from "react";
import { useId, useState, type SubmitEvent } from "react";
import { useTranslation } from "react-i18next";
import { toast } from "sonner";
import { Modal } from "@components/ui/Modal";
@@ -38,7 +38,7 @@ function ProfileSaveFormBody({ onClose, editProfile }: ProfileSaveFormProps) {
);
const [fromEditor, setFromEditor] = useState(false);
const save = (e: FormEvent) => {
const save = (e: SubmitEvent) => {
e.preventDefault();
const fields = profileFieldsFromEditor(editorDataOf(useEditorStore.getState()));
const finalName = name.trim() || fields.channelName.trim() || t("profiles.unnamed");
@@ -1,4 +1,4 @@
import { useId, useState, type FormEvent } from "react";
import { useId, useState, type SubmitEvent } from "react";
import { useTranslation } from "react-i18next";
import { toast } from "sonner";
import { Modal } from "@components/ui/Modal";
@@ -32,7 +32,7 @@ function TemplateSaveFormBody({ onClose, editTemplate }: TemplateSaveFormProps)
const [name, setName] = useState(editTemplate?.name ?? "");
const [fromEditor, setFromEditor] = useState(false);
const save = (e: FormEvent) => {
const save = (e: SubmitEvent) => {
e.preventDefault();
const snapshot = structuredClone(editorDataOf(useEditorStore.getState()));
const finalName = name.trim() || snapshot.gameName.trim() || t("templates.unnamed");
+2 -2
View File
@@ -29,7 +29,8 @@ interface AccordionProps {
export function Accordion({
id,
title,
icon,
// Capitalised so JSX reads it as a component, not an HTML tag.
icon: Icon,
summary,
badge,
open,
@@ -37,7 +38,6 @@ export function Accordion({
children,
}: AccordionProps) {
const panelId = `section-${id}-panel`;
const Icon = icon;
return (
<section
id={`section-${id}`}
+6
View File
@@ -66,7 +66,11 @@ export interface EditorDefaults {
rayTracingModes: RTMode[];
frameGenVendor: FrameGenVendor;
frameGenMultiplier: FrameGenMultiplier;
/** v1.6.0: the frame generation as typed, when the multiplier is `"custom"`. */
frameGenCustom: string;
upscaleQuality: UpscaleQuality;
/** v1.6.0: NVIDIA DLSS 5 Neural Rendering (NVIDIA only). */
dlssNeuralRendering: boolean;
artStyle: ArtStyle;
/** v0.22.0 opt-in. Empty string = no style line in the description. */
videoStyleEra: VideoStyleEra;
@@ -205,7 +209,9 @@ export const DEFAULTS = {
rayTracingModes: [],
frameGenVendor: "none",
frameGenMultiplier: "none",
frameGenCustom: "",
upscaleQuality: "none",
dlssNeuralRendering: false,
artStyle: "none",
videoStyleEra: "" satisfies VideoStyleEra,
versionInfo: "",
+11 -5
View File
@@ -60,12 +60,18 @@ export const FRAMEGEN_VENDORS = ["none", "nvidia", "amd", "intel"] as const;
export type FrameGenVendor = (typeof FRAMEGEN_VENDORS)[number];
/**
* Frame-generation multiplier — DLSS 4 supports up to x4, FSR 3 up to x3,
* Intel XeFG is ramping up. `"none"` means upscaling is in use but frame
* generation isn't; useful for builds where DLSS Quality is enabled but
* FG was left off.
* Frame-generation multiplier — DLSS 4 supports up to x4 and DLSS 4.5 adds
* x6 and Dynamic Multi Frame Generation (`"dynamic"`, which picks the
* multiplier itself), FSR 3 goes up to x3, Intel XeFG is ramping up.
* `"none"` means upscaling is in use but frame generation isn't; useful for
* builds where DLSS Quality is enabled but FG was left off.
*
* v1.6.0: `"custom"` reveals a free-form text field (`frameGenCustom`),
* printed as typed — the same escape hatch as the graphics preset's, for
* modes the list doesn't name (a driver-level or third-party frame
* generator, a newer multiplier).
*/
export const FRAMEGEN_MULTIPLIERS = ["none", "x2", "x3", "x4", "x6"] as const;
export const FRAMEGEN_MULTIPLIERS = ["none", "x2", "x3", "x4", "x6", "dynamic", "custom"] as const;
export type FrameGenMultiplier = (typeof FRAMEGEN_MULTIPLIERS)[number];
/**
+14 -14
View File
@@ -46,7 +46,7 @@ export const PLATFORMS: readonly PlatformConfig[] = [
// /app/, /sub/ (package) or /bundle/ + <digits>, optionally followed by
// /<slug>; or the s.team/a/<digits> short link.
urlPattern:
/^https:\/\/(?:store\.steampowered\.com\/(?:app|sub|bundle)\/\d+(?:\/[^\s]*)?|s\.team\/a\/\d+\/?)$/i,
/^https:\/\/(?:store\.steampowered\.com\/(?:app|sub|bundle)\/\d+(?:\/\S*)?|s\.team\/a\/\d+\/?)$/i,
normalize: normalizeSteamUrl,
},
{
@@ -54,14 +54,14 @@ export const PLATFORMS: readonly PlatformConfig[] = [
tagName: "Epic Games",
label: "Epic Games Store",
urlPrefix: "https://store.epicgames.com/",
urlPattern: /^https:\/\/(?:store\.epicgames\.com|www\.epicgames\.com\/store)\/[^\s]+$/i,
urlPattern: /^https:\/\/(?:store\.epicgames\.com|www\.epicgames\.com\/store)\/\S+$/i,
},
{
id: "ps",
tagName: "PlayStation",
label: "PlayStation Store",
urlPrefix: "https://store.playstation.com/",
urlPattern: /^https:\/\/store\.playstation\.com\/[^\s]+$/i,
urlPattern: /^https:\/\/store\.playstation\.com\/\S+$/i,
},
{
id: "xbox",
@@ -70,7 +70,7 @@ export const PLATFORMS: readonly PlatformConfig[] = [
urlPrefix: "https://www.xbox.com/games/",
// xbox.com (with or without www) and the Microsoft Store web pages.
urlPattern:
/^https:\/\/(?:(?:www\.)?xbox\.com|apps\.microsoft\.com|www\.microsoft\.com\/[a-z-]*\/?store)\/[^\s]*$/i,
/^https:\/\/(?:(?:www\.)?xbox\.com|apps\.microsoft\.com|www\.microsoft\.com\/[a-z-]*\/?store)\/\S*$/i,
},
{
id: "nintendo",
@@ -80,14 +80,14 @@ export const PLATFORMS: readonly PlatformConfig[] = [
// Every regional site: nintendo.com/us/…, nintendo.co.uk, nintendo.de,
// store.nintendo.co.uk, nintendo.co.jp …
urlPattern:
/^https:\/\/(?:[a-z0-9-]+\.)*nintendo\.(?:com|co\.[a-z]{2}|com\.[a-z]{2}|[a-z]{2})\/[^\s]+$/i,
/^https:\/\/(?:[a-z0-9-]+\.)*nintendo\.(?:com|co\.[a-z]{2}|com\.[a-z]{2}|[a-z]{2})\/\S+$/i,
},
{
id: "gog",
tagName: "GOG",
label: "GOG",
urlPrefix: "https://www.gog.com/game/",
urlPattern: /^https:\/\/(?:www\.)?gog\.com\/[^\s]+$/i,
urlPattern: /^https:\/\/(?:www\.)?gog\.com\/\S+$/i,
},
{
id: "itchio",
@@ -103,7 +103,7 @@ export const PLATFORMS: readonly PlatformConfig[] = [
tagName: "Humble Bundle",
label: "Humble Bundle",
urlPrefix: "https://www.humblebundle.com/store/",
urlPattern: /^https:\/\/(?:www\.)?humblebundle\.com\/[^\s]+$/i,
urlPattern: /^https:\/\/(?:www\.)?humblebundle\.com\/\S+$/i,
},
{
id: "amazon",
@@ -111,21 +111,21 @@ export const PLATFORMS: readonly PlatformConfig[] = [
label: "Amazon Luna",
urlPrefix: "https://luna.amazon.com/game/",
// Luna's own site, or the game's page on any Amazon storefront.
urlPattern: /^https:\/\/(?:luna\.amazon\.com|(?:www\.)?amazon\.[a-z.]{2,6})\/[^\s]+$/i,
urlPattern: /^https:\/\/(?:luna\.amazon\.com|(?:www\.)?amazon\.[a-z.]{2,6})\/\S+$/i,
},
{
id: "ea",
tagName: "EA app",
label: "EA app",
urlPrefix: "https://www.ea.com/games/",
urlPattern: /^https:\/\/(?:www\.)?ea\.com\/[^\s]+$/i,
urlPattern: /^https:\/\/(?:www\.)?ea\.com\/\S+$/i,
},
{
id: "ubisoft",
tagName: "Ubisoft Connect",
label: "Ubisoft Store",
urlPrefix: "https://store.ubisoft.com/",
urlPattern: /^https:\/\/(?:store\.ubisoft\.com|(?:www\.)?ubisoft\.com)\/[^\s]+$/i,
urlPattern: /^https:\/\/(?:store\.ubisoft\.com|(?:www\.)?ubisoft\.com)\/\S+$/i,
},
{
id: "battlenet",
@@ -133,7 +133,7 @@ export const PLATFORMS: readonly PlatformConfig[] = [
label: "Battle.net",
urlPrefix: "https://shop.battle.net/",
// shop.battle.net and its regional hosts (us.shop.battle.net …).
urlPattern: /^https:\/\/(?:[a-z0-9-]+\.)*battle\.net\/[^\s]+$/i,
urlPattern: /^https:\/\/(?:[a-z0-9-]+\.)*battle\.net\/\S+$/i,
},
{
id: "googleplay",
@@ -151,7 +151,7 @@ export const PLATFORMS: readonly PlatformConfig[] = [
tagName: "iOS",
label: "App Store",
urlPrefix: "https://apps.apple.com/app/",
urlPattern: /^https:\/\/apps\.apple\.com\/[^\s]+$/i,
urlPattern: /^https:\/\/apps\.apple\.com\/\S+$/i,
},
{
id: "meta",
@@ -159,7 +159,7 @@ export const PLATFORMS: readonly PlatformConfig[] = [
label: "Meta Quest Store",
urlPrefix: "https://www.meta.com/experiences/",
// meta.com, and oculus.com links that still circulate.
urlPattern: /^https:\/\/(?:www\.)?(?:meta|oculus)\.com\/[^\s]+$/i,
urlPattern: /^https:\/\/(?:www\.)?(?:meta|oculus)\.com\/\S+$/i,
},
{
// Catch-all for indie / niche releases distributed only from a
@@ -170,6 +170,6 @@ export const PLATFORMS: readonly PlatformConfig[] = [
id: "publisher",
label: "Publisher / Developer site",
urlPrefix: "https://",
urlPattern: /^https:\/\/[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+(?:\/[^\s]*)?$/i,
urlPattern: /^https:\/\/[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+(?:\/\S*)?$/i,
},
] as const;
+4 -4
View File
@@ -36,14 +36,14 @@ export const PLAYTEST_PLATFORMS: readonly PlaytestPlatformConfig[] = [
id: "steam",
label: "Steam Playtest",
urlPrefix: "https://store.steampowered.com/app/",
urlPattern: /^https:\/\/store\.steampowered\.com\/app\/\d+(?:\/[^\s]*)?$/i,
urlPattern: /^https:\/\/store\.steampowered\.com\/app\/\d+(?:\/\S*)?$/i,
maxInvites: 100,
},
{
id: "epic",
label: "Epic Games Store",
urlPrefix: "https://store.epicgames.com/",
urlPattern: /^https:\/\/store\.epicgames\.com\/[^\s]+$/i,
urlPattern: /^https:\/\/store\.epicgames\.com\/\S+$/i,
maxInvites: 100,
},
{
@@ -57,7 +57,7 @@ export const PLAYTEST_PLATFORMS: readonly PlaytestPlatformConfig[] = [
id: "discord",
label: "Discord / Community",
urlPrefix: "https://discord.gg/",
urlPattern: /^https:\/\/(?:discord\.gg|discord\.com\/invite)\/[^\s]+$/i,
urlPattern: /^https:\/\/(?:discord\.gg|discord\.com\/invite)\/\S+$/i,
maxInvites: 100,
},
{
@@ -66,7 +66,7 @@ export const PLAYTEST_PLATFORMS: readonly PlaytestPlatformConfig[] = [
id: "other",
label: "Other / Signup form",
urlPrefix: "https://",
urlPattern: /^https:\/\/[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+(?:\/[^\s]*)?$/i,
urlPattern: /^https:\/\/[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+(?:\/\S*)?$/i,
maxInvites: 100,
},
] as const;
+19 -1
View File
@@ -111,6 +111,21 @@ export interface RigField {
readonly clean?: (raw: string) => string;
/** Takes both columns of the editor's grid (long values, such as a LUT name). */
readonly wide?: boolean;
/**
* `text` fields (v1.6.0): when the value is "Custom" (any case — the
* field's first suggestion), the description prints this templates key
* as the whole line instead of "Label: Custom". The LUT's is "LUT
* applied", for a LUT of one's own that has no name worth printing.
*/
readonly customNoteKey?: string;
}
/** The value that selects a field's {@link RigField.customNoteKey} line. */
const RIG_CUSTOM_VALUE = "Custom";
/** True when a rig value is the "Custom" choice (case and spaces ignored). */
export function isCustomRigValue(value: string): boolean {
return value.trim().toLowerCase() === RIG_CUSTOM_VALUE.toLowerCase();
}
/**
@@ -489,9 +504,11 @@ export function cleanCpuName(raw: string): string {
/**
* 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.
* LUT field. Any other LUT's name is accepted as typed. v1.6.0: "Custom"
* comes first — a LUT of one's own, printed as just "LUT applied".
*/
export const LUT_SUGGESTIONS: readonly string[] = [
RIG_CUSTOM_VALUE,
"Arri Alexa LogC to Rec709",
"Rec709 Kodak 2383 D65",
"Rec709 Kodak 2383 D60",
@@ -593,6 +610,7 @@ export const RIG_FIELDS: readonly RigField[] = [
suggestions: LUT_SUGGESTIONS,
clean: cleanLutName,
wide: true,
customNoteKey: "description.rigNotes.lut_custom",
},
];
+62 -46
View File
@@ -97,6 +97,65 @@ const VENDOR_GFX_BRANDS: Record<"nvidia" | "amd" | "intel", { upscale: string; f
intel: { upscale: "Intel XeSS", framegen: "Intel XeFG" },
};
type GfxVendor = keyof typeof VENDOR_GFX_BRANDS;
/** A translation that exists and isn't blank, else `""`. */
function resolvedLabel(t: TranslationFn, key: string): string {
const label = t(key);
return label && label !== key && label.trim() ? label : "";
}
/**
* The upscaling part — v0.11: the vendor-keyed full label first ("NVIDIA
* DLAA", "AMD FSR Native AA", "Intel XeSS Ultra Quality"), which embeds the
* brand; else the pre-v0.11 flat key with the brand in front, for legacy
* locales / unmigrated translations.
*/
function upscalePart(input: GeneratorInput, vendor: GfxVendor, t: TranslationFn): string {
const quality = input.upscaleQuality;
if (!quality || quality === "none") return "";
const label = resolvedLabel(t, `description.graphics.upscale.${vendor}.${quality}`);
if (label) return label;
const legacyKey = `description.graphics.upscaleQualityOptions.${quality}`;
const legacyLabel = t(legacyKey);
return legacyLabel && legacyLabel !== legacyKey
? `${VENDOR_GFX_BRANDS[vendor].upscale} ${legacyLabel}`
: "";
}
/**
* The frame-generation part. The vendor-keyed label embeds the brand AND
* the feature name ("NVIDIA Frame Generation x2", "AMD Fluid Motion Frames
* x3", "Intel XeFG x2"), with brand + raw multiplier as the fallback for
* pre-v0.11 locales. v1.6.0: `"custom"` prints what was typed (like a
* custom preset); an empty box prints nothing rather than "custom".
*/
function frameGenPart(input: GeneratorInput, vendor: GfxVendor, t: TranslationFn): string {
const multiplier = input.frameGenMultiplier;
if (!multiplier || multiplier === "none") return "";
if (multiplier === "custom") return (input.frameGenCustom ?? "").trim();
return (
resolvedLabel(t, `description.graphics.frameGen.${vendor}.${multiplier}`) ||
`${VENDOR_GFX_BRANDS[vendor].framegen} ${multiplier}`
);
}
/**
* The vendor half of the "In-game Setting:" line — e.g. `NVIDIA DLSS
* Quality + NVIDIA DLSS 5 Neural Rendering + NVIDIA Multi Frame Generation
* x4`. v1.6.0: DLSS 5 Neural Rendering follows the DLSS mode, for NVIDIA
* only — a stale flag on another vendor's draft prints nothing.
*/
function composeVendorModifier(input: GeneratorInput, vendor: GfxVendor, t: TranslationFn): string {
const neural =
vendor === "nvidia" && input.dlssNeuralRendering
? t("description.graphics.dlssNeuralRendering")
: "";
return [upscalePart(input, vendor, t), neural, frameGenPart(input, vendor, t)]
.filter(Boolean)
.join(" + ");
}
/**
* Compose the value half of the "In-game Setting:" line — e.g.
* `Cinematic - NVIDIA Frame Generation x2 with Ray Tracing`.
@@ -123,54 +182,11 @@ function composeGraphicsPart(input: GeneratorInput, t: TranslationFn): string {
if (resolved && resolved !== key) presetLabel = resolved;
}
// 2. Modifier (upscale + frame-gen). Vendor gates the whole clause —
// upscaling/frame-gen quality without a vendor is meaningless.
// 2. Modifier (upscale + DLSS 5 + frame-gen). Vendor gates the whole
// clause — upscaling/frame-gen quality without a vendor is meaningless.
const vendor =
input.frameGenVendor && input.frameGenVendor !== "none" ? input.frameGenVendor : null;
const upscaleQ =
input.upscaleQuality && input.upscaleQuality !== "none" ? input.upscaleQuality : null;
const fgMul =
input.frameGenMultiplier && input.frameGenMultiplier !== "none"
? input.frameGenMultiplier
: null;
let modifier = "";
if (vendor) {
const brands = VENDOR_GFX_BRANDS[vendor];
const parts: string[] = [];
if (upscaleQ) {
// v0.11: try the vendor-keyed full label first ("NVIDIA DLAA",
// "AMD FSR Native AA", "Intel XeSS Ultra Quality"). Fall back to
// the pre-v0.11 flat key + brand prefix for legacy locales /
// unmigrated translations. The vendor-keyed label embeds the
// brand so we don't double-prefix on this path.
const newKey = `description.graphics.upscale.${vendor}.${upscaleQ}`;
const newLabel = t(newKey);
if (newLabel && newLabel !== newKey && newLabel.trim()) {
parts.push(newLabel);
} else {
const legacyKey = `description.graphics.upscaleQualityOptions.${upscaleQ}`;
const legacyLabel = t(legacyKey);
if (legacyLabel && legacyLabel !== legacyKey) {
parts.push(`${brands.upscale} ${legacyLabel}`);
}
}
}
if (fgMul) {
// Vendor-keyed full label embeds the brand AND the feature name
// ("NVIDIA Frame Generation x2", "AMD Fluid Motion Frames x3",
// "Intel XeFG x2"). Fall back to brand + raw multiplier for
// pre-v0.11 locales.
const newKey = `description.graphics.frameGen.${vendor}.${fgMul}`;
const newLabel = t(newKey);
if (newLabel && newLabel !== newKey && newLabel.trim()) {
parts.push(newLabel);
} else {
parts.push(`${brands.framegen} ${fgMul}`);
}
}
modifier = parts.join(" + ");
}
const modifier = vendor ? composeVendorModifier(input, vendor, t) : "";
// 3. Ray-tracing clause. Each mode runs through i18n; falls back to
// the snake_case id if a locale hasn't translated it.
+17 -4
View File
@@ -6,13 +6,17 @@ import type { FrameGenVendor, FrameGenMultiplier, UpscaleQuality } from "@config
* tiers it actually ships:
*
* - NVIDIA: DLAA (anti-aliasing-only) + 4 quality bins. DLSS 4 supports
* multi-frame-gen up to x4.
* multi-frame-gen up to x4; DLSS 4.5 adds x6 and Dynamic Multi Frame
* Generation (v1.6.0).
* - AMD: FSR Native AA + 4 quality bins. FSR 3.1 caps at x3.
* - Intel: XeSS Native AA + Ultra Quality + 4 quality bins. Intel XeFG
* has only shipped x2.
* - none: vendor-agnostic legacy ladder (no DLAA, no Ultra Quality) —
* keeps pre-v0.11 presets / templates rendering without coercion loss.
*
* Every vendor also offers `"custom"` (v1.6.0): the frame generation typed
* into `frameGenCustom`, for a mode the list doesn't name.
*
* Pure functions — used by VideoSettingsForm to filter Select options
* and by description-builder / editor-store / template-store to coerce
* invalid vendor×quality combos back to `"none"` on rehydrate.
@@ -55,16 +59,25 @@ export function getValidUpscaleQualities(vendor: FrameGenVendor): readonly Upsca
export function getValidFrameGenMultipliers(vendor: FrameGenVendor): readonly FrameGenMultiplier[] {
switch (vendor) {
case "nvidia":
return ["none", "x2", "x3", "x4"] as const;
return ["none", "x2", "x3", "x4", "x6", "dynamic", "custom"] as const;
case "amd":
return ["none", "x2", "x3"] as const;
return ["none", "x2", "x3", "custom"] as const;
case "intel":
return ["none", "x2"] as const;
return ["none", "x2", "custom"] as const;
case "none":
return ["none"] as const;
}
}
/**
* DLSS 5 Neural Rendering (v1.6.0) is NVIDIA's (RTX 50 series): any other
* vendor turns it off, the way an invalid quality or multiplier falls back
* to `"none"`.
*/
export function coerceDlssNeuralRendering(vendor: FrameGenVendor, current: boolean): boolean {
return vendor === "nvidia" && current;
}
/** Returns `current` if it's valid for the vendor, else `"none"`. */
export function coerceUpscaleQuality(
vendor: FrameGenVendor,
+7 -2
View File
@@ -1,4 +1,4 @@
import { RIG_FIELDS, formatRigValue } from "@config/rig-fields";
import { RIG_FIELDS, formatRigValue, isCustomRigValue } from "@config/rig-fields";
import type { TranslationFn } from "./types";
/**
@@ -9,6 +9,9 @@ import type { TranslationFn } from "./types";
* order is {@link RIG_FIELDS}'. Both used to come from the stored object:
* every language printed English keys in capitals ("VIDEO EDITOR:"), in
* whatever order the fields had first been filled in.
*
* v1.6.0: a field with a `customNoteKey` set to "Custom" prints that note
* as its whole line — the LUT's "LUT applied".
*/
export function buildRigLines(
rig: Partial<Record<string, string>> | undefined,
@@ -19,7 +22,9 @@ export function buildRigLines(
const lines = RIG_FIELDS.flatMap((field) => {
const value = formatRigValue(field.id, rig[field.id] ?? "").trim();
return value ? [`${t(`description.rigLabels.${field.id}`)}: ${value}`] : [];
if (!value) return [];
if (field.customNoteKey && isCustomRigValue(value)) return [t(field.customNoteKey)];
return [`${t(`description.rigLabels.${field.id}`)}: ${value}`];
});
// Keys that aren't rig fields any more (older versions, hand-edited
+5 -1
View File
@@ -686,15 +686,19 @@ export interface GeneratorInput {
frameGenVendor?: FrameGenVendor;
/** Frame-generation multiplier (only meaningful when vendor !== "none"). */
frameGenMultiplier?: FrameGenMultiplier;
/** v1.6.0: the frame generation as typed, when {@link frameGenMultiplier} is `"custom"`. */
frameGenCustom?: string;
/** Upscaling quality (DLSS / FSR / XeSS quality preset). */
upscaleQuality?: UpscaleQuality;
/** v1.6.0: NVIDIA DLSS 5 Neural Rendering — printed only when the vendor is NVIDIA. */
dlssNeuralRendering?: boolean;
/** High-level art-style descriptor — surfaces a separate line. */
artStyle?: ArtStyle;
/**
* Video-style era opt-in (v0.22.0). When set to a non-empty era id,
* the renderer emits a single "Edited in {era} style using {editor}"
* credit at the end of the Video Settings section. Combines with
* {@link rig.video_editor}. Renders even when
* the rig's `video_editor`. Renders even when
* {@link skipGraphicsSettings} is true.
*/
videoStyleEra?: string;
+2
View File
@@ -52,7 +52,9 @@ export function buildGeneratorInputFromEditor(
rayTracingModes: state.rayTracingModes,
frameGenVendor: state.frameGenVendor,
frameGenMultiplier: state.frameGenMultiplier,
frameGenCustom: state.frameGenCustom,
upscaleQuality: state.upscaleQuality,
dlssNeuralRendering: state.dlssNeuralRendering,
artStyle: state.artStyle,
videoStyleEra: state.videoStyleEra,
versionInfo: state.versionInfo,
+3 -1
View File
@@ -23,7 +23,9 @@ export const SUPPORTED_LANGUAGES = [
nativeName: string;
}[];
i18n
// `void`: nothing waits on init. `en` is bundled, so the first render already
// has its strings, and every other language loads on demand.
void i18n
.use(initReactI18next)
.use(
// Vite statically analyses this template literal and emits one async
+12 -7
View File
@@ -121,7 +121,10 @@
"rayTracing",
"frameGenVendor",
"frameGenMultiplier",
"frameGenCustom",
"frameGenCustomPlaceholder",
"upscaleQuality",
"dlssNeuralRendering",
"artStyle",
"videoStyle",
"videoStyleHelp",
@@ -229,10 +232,10 @@
],
"editor.rtOptions": ["ray_tracing", "full_rt", "path_tracing", "ray_reconstruction"],
"editor.frameGenVendorOptions": ["none", "nvidia", "amd", "intel"],
"editor.frameGenMultiplierOptions": ["none", "x2", "x3", "x4", "x6"],
"editor.frameGenMultiplier.nvidia": ["none", "x2", "x3", "x4"],
"editor.frameGenMultiplier.amd": ["none", "x2", "x3"],
"editor.frameGenMultiplier.intel": ["none", "x2"],
"editor.frameGenMultiplierOptions": ["none", "x2", "x3", "x4", "x6", "dynamic", "custom"],
"editor.frameGenMultiplier.nvidia": ["none", "x2", "x3", "x4", "x6", "dynamic", "custom"],
"editor.frameGenMultiplier.amd": ["none", "x2", "x3", "custom"],
"editor.frameGenMultiplier.intel": ["none", "x2", "custom"],
"editor.upscaleQualityOptions": [
"none",
"native_aa",
@@ -1593,7 +1596,8 @@
"videoLabel",
"inGameSettingLabel",
"versionLabel",
"upscaleLabel"
"upscaleLabel",
"dlssNeuralRendering"
],
"description.graphics.presetOptions": [
"low",
@@ -1642,7 +1646,7 @@
"performance",
"ultra_performance"
],
"description.graphics.frameGen.nvidia": ["none", "x2", "x3", "x4"],
"description.graphics.frameGen.nvidia": ["none", "x2", "x3", "x4", "x6", "dynamic"],
"description.graphics.frameGen.amd": ["none", "x2", "x3"],
"description.graphics.frameGen.intel": ["none", "x2"],
"description.graphics.artStyleOptions": [
@@ -1725,6 +1729,7 @@
"controller",
"video_editor",
"lut"
]
],
"description.rigNotes": ["lut_custom"]
}
}
+8 -2
View File
@@ -534,7 +534,9 @@
"none": "",
"x2": "NVIDIA Frame Generation x2",
"x3": "NVIDIA Multi Frame Generation x3",
"x4": "NVIDIA Multi Frame Generation x4"
"x4": "NVIDIA Multi Frame Generation x4",
"x6": "NVIDIA Multi Frame Generation x6",
"dynamic": "NVIDIA Dynamic Multi Frame Generation"
},
"amd": {
"none": "",
@@ -561,7 +563,8 @@
"videoLabel": "Video",
"inGameSettingLabel": "In-game Setting",
"versionLabel": "Version",
"upscaleLabel": "Upscale"
"upscaleLabel": "Upscale",
"dlssNeuralRendering": "NVIDIA DLSS 5 Neural Rendering"
},
"videoSettings": {
"styleLine": "Edited in {{era}} style using {{editor}}",
@@ -597,6 +600,9 @@
"controller": "Controller",
"video_editor": "Video Editor",
"lut": "LUT"
},
"rigNotes": {
"lut_custom": "LUT applied"
}
},
"pinnedComment": {
+14 -4
View File
@@ -207,23 +207,32 @@
"x2": "x2",
"x3": "x3",
"x4": "x4",
"x6": "x6"
"x6": "x6",
"dynamic": "Dynamic",
"custom": "Custom…"
},
"frameGenMultiplier.nvidia": {
"none": "None",
"x2": "x2 (Frame Gen)",
"x3": "x3 (Multi Frame Gen)",
"x4": "x4 (Multi Frame Gen)"
"x4": "x4 (Multi Frame Gen)",
"x6": "x6 (Multi Frame Gen)",
"dynamic": "Dynamic (Multi Frame Gen)",
"custom": "Custom…"
},
"frameGenMultiplier.amd": {
"none": "None",
"x2": "x2 (Fluid Motion Frames)",
"x3": "x3 (Fluid Motion Frames)"
"x3": "x3 (Fluid Motion Frames)",
"custom": "Custom…"
},
"frameGenMultiplier.intel": {
"none": "None",
"x2": "x2 (XeFG)"
"x2": "x2 (XeFG)",
"custom": "Custom…"
},
"frameGenCustom": "Custom frame generation",
"frameGenCustomPlaceholder": "e.g. NVIDIA Smooth Motion, Lossless Scaling x3",
"upscaleQuality": "Upscaling Quality",
"upscaleQualityOptions": {
"none": "None",
@@ -258,6 +267,7 @@
"performance": "XeSS Performance",
"ultra_performance": "XeSS Ultra Performance"
},
"dlssNeuralRendering": "DLSS 5 Neural Rendering",
"artStyle": "Art Style",
"artStyleOptions": {
"none": "— Not set —",
+8 -2
View File
@@ -534,7 +534,9 @@
"none": "",
"x2": "NVIDIA Frame Generation x2",
"x3": "NVIDIA Multi Frame Generation x3",
"x4": "NVIDIA Multi Frame Generation x4"
"x4": "NVIDIA Multi Frame Generation x4",
"x6": "NVIDIA Multi Frame Generation x6",
"dynamic": "NVIDIA Dynamic Multi Frame Generation"
},
"amd": {
"none": "",
@@ -561,7 +563,8 @@
"videoLabel": "Video",
"inGameSettingLabel": "In-game Setting",
"versionLabel": "Version",
"upscaleLabel": "Upscale"
"upscaleLabel": "Upscale",
"dlssNeuralRendering": "NVIDIA DLSS 5 Neural Rendering"
},
"videoSettings": {
"styleLine": "Editado con estilo {{era}} usando {{editor}}",
@@ -597,6 +600,9 @@
"controller": "Mando",
"video_editor": "Editor de Video",
"lut": "LUT"
},
"rigNotes": {
"lut_custom": "LUT aplicada"
}
},
"pinnedComment": {
+14 -4
View File
@@ -207,23 +207,32 @@
"x2": "x2",
"x3": "x3",
"x4": "x4",
"x6": "x6"
"x6": "x6",
"dynamic": "Dynamic",
"custom": "Custom…"
},
"frameGenMultiplier.nvidia": {
"none": "None",
"x2": "x2 (Frame Gen)",
"x3": "x3 (Multi Frame Gen)",
"x4": "x4 (Multi Frame Gen)"
"x4": "x4 (Multi Frame Gen)",
"x6": "x6 (Multi Frame Gen)",
"dynamic": "Dynamic (Multi Frame Gen)",
"custom": "Custom…"
},
"frameGenMultiplier.amd": {
"none": "None",
"x2": "x2 (Fluid Motion Frames)",
"x3": "x3 (Fluid Motion Frames)"
"x3": "x3 (Fluid Motion Frames)",
"custom": "Custom…"
},
"frameGenMultiplier.intel": {
"none": "None",
"x2": "x2 (XeFG)"
"x2": "x2 (XeFG)",
"custom": "Custom…"
},
"frameGenCustom": "Custom frame generation",
"frameGenCustomPlaceholder": "e.g. NVIDIA Smooth Motion, Lossless Scaling x3",
"upscaleQuality": "Upscaling Quality",
"upscaleQualityOptions": {
"none": "None",
@@ -258,6 +267,7 @@
"performance": "XeSS Performance",
"ultra_performance": "XeSS Ultra Performance"
},
"dlssNeuralRendering": "DLSS 5 Neural Rendering",
"artStyle": "Art Style",
"artStyleOptions": {
"none": "— Not set —",
+8 -2
View File
@@ -534,7 +534,9 @@
"none": "",
"x2": "NVIDIA Frame Generation x2",
"x3": "NVIDIA Multi Frame Generation x3",
"x4": "NVIDIA Multi Frame Generation x4"
"x4": "NVIDIA Multi Frame Generation x4",
"x6": "NVIDIA Multi Frame Generation x6",
"dynamic": "NVIDIA Dynamic Multi Frame Generation"
},
"amd": {
"none": "",
@@ -561,7 +563,8 @@
"videoLabel": "Video",
"inGameSettingLabel": "Pengaturan dalam game",
"versionLabel": "Versi",
"upscaleLabel": "Upscale"
"upscaleLabel": "Upscale",
"dlssNeuralRendering": "NVIDIA DLSS 5 Neural Rendering"
},
"videoSettings": {
"styleLine": "Diedit dengan gaya {{era}} memakai {{editor}}",
@@ -597,6 +600,9 @@
"controller": "Kontroler",
"video_editor": "Editor Video",
"lut": "LUT"
},
"rigNotes": {
"lut_custom": "LUT diterapkan"
}
},
"pinnedComment": {
+14 -4
View File
@@ -207,23 +207,32 @@
"x2": "x2",
"x3": "x3",
"x4": "x4",
"x6": "x6"
"x6": "x6",
"dynamic": "Dinamis",
"custom": "Kustom…"
},
"frameGenMultiplier.nvidia": {
"none": "Tidak ada",
"x2": "x2 (Frame Gen)",
"x3": "x3 (Multi Frame Gen)",
"x4": "x4 (Multi Frame Gen)"
"x4": "x4 (Multi Frame Gen)",
"x6": "x6 (Multi Frame Gen)",
"dynamic": "Dynamic (Multi Frame Gen)",
"custom": "Kustom…"
},
"frameGenMultiplier.amd": {
"none": "Tidak ada",
"x2": "x2 (Fluid Motion Frames)",
"x3": "x3 (Fluid Motion Frames)"
"x3": "x3 (Fluid Motion Frames)",
"custom": "Kustom…"
},
"frameGenMultiplier.intel": {
"none": "Tidak ada",
"x2": "x2 (XeFG)"
"x2": "x2 (XeFG)",
"custom": "Kustom…"
},
"frameGenCustom": "Frame Gen kustom",
"frameGenCustomPlaceholder": "mis. NVIDIA Smooth Motion, Lossless Scaling x3",
"upscaleQuality": "Kualitas Upscaling",
"upscaleQualityOptions": {
"none": "Tidak ada",
@@ -258,6 +267,7 @@
"performance": "XeSS Performance",
"ultra_performance": "XeSS Ultra Performance"
},
"dlssNeuralRendering": "DLSS 5 Neural Rendering",
"artStyle": "Gaya visual",
"artStyleOptions": {
"none": "— Tidak diatur —",
+8 -2
View File
@@ -534,7 +534,9 @@
"none": "",
"x2": "NVIDIA Frame Generation x2",
"x3": "NVIDIA Multi Frame Generation x3",
"x4": "NVIDIA Multi Frame Generation x4"
"x4": "NVIDIA Multi Frame Generation x4",
"x6": "NVIDIA Multi Frame Generation x6",
"dynamic": "NVIDIA Dynamic Multi Frame Generation"
},
"amd": {
"none": "",
@@ -561,7 +563,8 @@
"videoLabel": "Video",
"inGameSettingLabel": "In-game Setting",
"versionLabel": "Version",
"upscaleLabel": "Upscale"
"upscaleLabel": "Upscale",
"dlssNeuralRendering": "NVIDIA DLSS 5 Neural Rendering"
},
"videoSettings": {
"styleLine": "{{editor}}で{{era}}スタイルに編集",
@@ -597,6 +600,9 @@
"controller": "コントローラー",
"video_editor": "動画編集ソフト",
"lut": "LUT"
},
"rigNotes": {
"lut_custom": "LUT適用"
}
},
"pinnedComment": {
+14 -4
View File
@@ -207,23 +207,32 @@
"x2": "x2",
"x3": "x3",
"x4": "x4",
"x6": "x6"
"x6": "x6",
"dynamic": "Dynamic",
"custom": "Custom…"
},
"frameGenMultiplier.nvidia": {
"none": "None",
"x2": "x2 (Frame Gen)",
"x3": "x3 (Multi Frame Gen)",
"x4": "x4 (Multi Frame Gen)"
"x4": "x4 (Multi Frame Gen)",
"x6": "x6 (Multi Frame Gen)",
"dynamic": "Dynamic (Multi Frame Gen)",
"custom": "Custom…"
},
"frameGenMultiplier.amd": {
"none": "None",
"x2": "x2 (Fluid Motion Frames)",
"x3": "x3 (Fluid Motion Frames)"
"x3": "x3 (Fluid Motion Frames)",
"custom": "Custom…"
},
"frameGenMultiplier.intel": {
"none": "None",
"x2": "x2 (XeFG)"
"x2": "x2 (XeFG)",
"custom": "Custom…"
},
"frameGenCustom": "Custom frame generation",
"frameGenCustomPlaceholder": "e.g. NVIDIA Smooth Motion, Lossless Scaling x3",
"upscaleQuality": "Upscaling Quality",
"upscaleQualityOptions": {
"none": "None",
@@ -258,6 +267,7 @@
"performance": "XeSS Performance",
"ultra_performance": "XeSS Ultra Performance"
},
"dlssNeuralRendering": "DLSS 5 Neural Rendering",
"artStyle": "Art Style",
"artStyleOptions": {
"none": "— Not set —",
+8 -2
View File
@@ -534,7 +534,9 @@
"none": "",
"x2": "NVIDIA Frame Generation x2",
"x3": "NVIDIA Multi Frame Generation x3",
"x4": "NVIDIA Multi Frame Generation x4"
"x4": "NVIDIA Multi Frame Generation x4",
"x6": "NVIDIA Multi Frame Generation x6",
"dynamic": "NVIDIA Dynamic Multi Frame Generation"
},
"amd": {
"none": "",
@@ -561,7 +563,8 @@
"videoLabel": "Video",
"inGameSettingLabel": "In-game Setting",
"versionLabel": "Version",
"upscaleLabel": "Upscale"
"upscaleLabel": "Upscale",
"dlssNeuralRendering": "NVIDIA DLSS 5 Neural Rendering"
},
"videoSettings": {
"styleLine": "{{editor}}로 {{era}} 스타일 편집",
@@ -597,6 +600,9 @@
"controller": "컨트롤러",
"video_editor": "영상 편집 프로그램",
"lut": "LUT"
},
"rigNotes": {
"lut_custom": "LUT 적용"
}
},
"pinnedComment": {
+14 -4
View File
@@ -207,23 +207,32 @@
"x2": "x2",
"x3": "x3",
"x4": "x4",
"x6": "x6"
"x6": "x6",
"dynamic": "Dynamic",
"custom": "Custom…"
},
"frameGenMultiplier.nvidia": {
"none": "None",
"x2": "x2 (Frame Gen)",
"x3": "x3 (Multi Frame Gen)",
"x4": "x4 (Multi Frame Gen)"
"x4": "x4 (Multi Frame Gen)",
"x6": "x6 (Multi Frame Gen)",
"dynamic": "Dynamic (Multi Frame Gen)",
"custom": "Custom…"
},
"frameGenMultiplier.amd": {
"none": "None",
"x2": "x2 (Fluid Motion Frames)",
"x3": "x3 (Fluid Motion Frames)"
"x3": "x3 (Fluid Motion Frames)",
"custom": "Custom…"
},
"frameGenMultiplier.intel": {
"none": "None",
"x2": "x2 (XeFG)"
"x2": "x2 (XeFG)",
"custom": "Custom…"
},
"frameGenCustom": "Custom frame generation",
"frameGenCustomPlaceholder": "e.g. NVIDIA Smooth Motion, Lossless Scaling x3",
"upscaleQuality": "Upscaling Quality",
"upscaleQualityOptions": {
"none": "None",
@@ -258,6 +267,7 @@
"performance": "XeSS Performance",
"ultra_performance": "XeSS Ultra Performance"
},
"dlssNeuralRendering": "DLSS 5 Neural Rendering",
"artStyle": "Art Style",
"artStyleOptions": {
"none": "— Not set —",
+8 -2
View File
@@ -534,7 +534,9 @@
"none": "",
"x2": "NVIDIA Frame Generation x2",
"x3": "NVIDIA Multi Frame Generation x3",
"x4": "NVIDIA Multi Frame Generation x4"
"x4": "NVIDIA Multi Frame Generation x4",
"x6": "NVIDIA Multi Frame Generation x6",
"dynamic": "NVIDIA Dynamic Multi Frame Generation"
},
"amd": {
"none": "",
@@ -561,7 +563,8 @@
"videoLabel": "Vídeo",
"inGameSettingLabel": "Configuração no jogo",
"versionLabel": "Versão",
"upscaleLabel": "Upscale"
"upscaleLabel": "Upscale",
"dlssNeuralRendering": "NVIDIA DLSS 5 Neural Rendering"
},
"videoSettings": {
"styleLine": "Editado no estilo {{era}} usando {{editor}}",
@@ -597,6 +600,9 @@
"controller": "Controle",
"video_editor": "Editor de vídeo",
"lut": "LUT"
},
"rigNotes": {
"lut_custom": "LUT aplicada"
}
},
"pinnedComment": {
+14 -4
View File
@@ -207,23 +207,32 @@
"x2": "x2",
"x3": "x3",
"x4": "x4",
"x6": "x6"
"x6": "x6",
"dynamic": "Dinâmico",
"custom": "Personalizado…"
},
"frameGenMultiplier.nvidia": {
"none": "Nenhum",
"x2": "x2 (Frame Gen)",
"x3": "x3 (Multi Frame Gen)",
"x4": "x4 (Multi Frame Gen)"
"x4": "x4 (Multi Frame Gen)",
"x6": "x6 (Multi Frame Gen)",
"dynamic": "Dynamic (Multi Frame Gen)",
"custom": "Personalizado…"
},
"frameGenMultiplier.amd": {
"none": "Nenhum",
"x2": "x2 (Fluid Motion Frames)",
"x3": "x3 (Fluid Motion Frames)"
"x3": "x3 (Fluid Motion Frames)",
"custom": "Personalizado…"
},
"frameGenMultiplier.intel": {
"none": "Nenhum",
"x2": "x2 (XeFG)"
"x2": "x2 (XeFG)",
"custom": "Personalizado…"
},
"frameGenCustom": "Frame Gen personalizado",
"frameGenCustomPlaceholder": "ex.: NVIDIA Smooth Motion, Lossless Scaling x3",
"upscaleQuality": "Qualidade do upscaling",
"upscaleQualityOptions": {
"none": "Nenhuma",
@@ -258,6 +267,7 @@
"performance": "XeSS Performance",
"ultra_performance": "XeSS Ultra Performance"
},
"dlssNeuralRendering": "DLSS 5 Neural Rendering",
"artStyle": "Estilo de arte",
"artStyleOptions": {
"none": "— Não definido —",
+8 -2
View File
@@ -534,7 +534,9 @@
"none": "",
"x2": "NVIDIA Frame Generation x2",
"x3": "NVIDIA Multi Frame Generation x3",
"x4": "NVIDIA Multi Frame Generation x4"
"x4": "NVIDIA Multi Frame Generation x4",
"x6": "NVIDIA Multi Frame Generation x6",
"dynamic": "NVIDIA Dynamic Multi Frame Generation"
},
"amd": {
"none": "",
@@ -561,7 +563,8 @@
"videoLabel": "Video",
"inGameSettingLabel": "In-game Setting",
"versionLabel": "Version",
"upscaleLabel": "Upscale"
"upscaleLabel": "Upscale",
"dlssNeuralRendering": "NVIDIA DLSS 5 Neural Rendering"
},
"videoSettings": {
"styleLine": "Dựng theo phong cách {{era}} bằng {{editor}}",
@@ -597,6 +600,9 @@
"controller": "Tay cầm",
"video_editor": "Phần mềm dựng video",
"lut": "LUT"
},
"rigNotes": {
"lut_custom": "Có áp dụng LUT"
}
},
"pinnedComment": {
+14 -4
View File
@@ -207,23 +207,32 @@
"x2": "x2",
"x3": "x3",
"x4": "x4",
"x6": "x6"
"x6": "x6",
"dynamic": "Dynamic",
"custom": "Tùy chỉnh…"
},
"frameGenMultiplier.nvidia": {
"none": "Không",
"x2": "x2 (Frame Gen)",
"x3": "x3 (Multi Frame Gen)",
"x4": "x4 (Multi Frame Gen)"
"x4": "x4 (Multi Frame Gen)",
"x6": "x6 (Multi Frame Gen)",
"dynamic": "Dynamic (Multi Frame Gen)",
"custom": "Tùy chỉnh…"
},
"frameGenMultiplier.amd": {
"none": "Không",
"x2": "x2 (Fluid Motion Frames)",
"x3": "x3 (Fluid Motion Frames)"
"x3": "x3 (Fluid Motion Frames)",
"custom": "Tùy chỉnh…"
},
"frameGenMultiplier.intel": {
"none": "Không",
"x2": "x2 (XeFG)"
"x2": "x2 (XeFG)",
"custom": "Tùy chỉnh…"
},
"frameGenCustom": "Frame Gen tuỳ chỉnh",
"frameGenCustomPlaceholder": "vd: NVIDIA Smooth Motion, Lossless Scaling x3",
"upscaleQuality": "Chất lượng Upscale",
"upscaleQualityOptions": {
"none": "Không",
@@ -258,6 +267,7 @@
"performance": "XeSS Performance",
"ultra_performance": "XeSS Ultra Performance"
},
"dlssNeuralRendering": "DLSS 5 Neural Rendering",
"artStyle": "Phong cách hình ảnh",
"artStyleOptions": {
"none": "— Chưa chọn —",
+8 -2
View File
@@ -534,7 +534,9 @@
"none": "",
"x2": "NVIDIA Frame Generation x2",
"x3": "NVIDIA Multi Frame Generation x3",
"x4": "NVIDIA Multi Frame Generation x4"
"x4": "NVIDIA Multi Frame Generation x4",
"x6": "NVIDIA Multi Frame Generation x6",
"dynamic": "NVIDIA Dynamic Multi Frame Generation"
},
"amd": {
"none": "",
@@ -561,7 +563,8 @@
"videoLabel": "Video",
"inGameSettingLabel": "In-game Setting",
"versionLabel": "Version",
"upscaleLabel": "Upscale"
"upscaleLabel": "Upscale",
"dlssNeuralRendering": "NVIDIA DLSS 5 Neural Rendering"
},
"videoSettings": {
"styleLine": "使用 {{editor}} 以 {{era}} 风格剪辑",
@@ -597,6 +600,9 @@
"controller": "手柄",
"video_editor": "视频编辑软件",
"lut": "LUT"
},
"rigNotes": {
"lut_custom": "已应用 LUT"
}
},
"pinnedComment": {
+14 -4
View File
@@ -207,23 +207,32 @@
"x2": "x2",
"x3": "x3",
"x4": "x4",
"x6": "x6"
"x6": "x6",
"dynamic": "Dynamic",
"custom": "Custom…"
},
"frameGenMultiplier.nvidia": {
"none": "None",
"x2": "x2 (Frame Gen)",
"x3": "x3 (Multi Frame Gen)",
"x4": "x4 (Multi Frame Gen)"
"x4": "x4 (Multi Frame Gen)",
"x6": "x6 (Multi Frame Gen)",
"dynamic": "Dynamic (Multi Frame Gen)",
"custom": "Custom…"
},
"frameGenMultiplier.amd": {
"none": "None",
"x2": "x2 (Fluid Motion Frames)",
"x3": "x3 (Fluid Motion Frames)"
"x3": "x3 (Fluid Motion Frames)",
"custom": "Custom…"
},
"frameGenMultiplier.intel": {
"none": "None",
"x2": "x2 (XeFG)"
"x2": "x2 (XeFG)",
"custom": "Custom…"
},
"frameGenCustom": "Custom frame generation",
"frameGenCustomPlaceholder": "e.g. NVIDIA Smooth Motion, Lossless Scaling x3",
"upscaleQuality": "Upscaling Quality",
"upscaleQualityOptions": {
"none": "None",
@@ -258,6 +267,7 @@
"performance": "XeSS Performance",
"ultra_performance": "XeSS Ultra Performance"
},
"dlssNeuralRendering": "DLSS 5 Neural Rendering",
"artStyle": "Art Style",
"artStyleOptions": {
"none": "— Not set —",
+34 -2
View File
@@ -27,7 +27,11 @@ import {
isUpscaledFrom,
} from "@config/graphics-settings";
import { isVideoStyleEra, type VideoStyleEra } from "@config/video-styles";
import { coerceUpscaleQuality, coerceFrameGenMultiplier } from "@engine/graphics-vendor";
import {
coerceUpscaleQuality,
coerceFrameGenMultiplier,
coerceDlssNeuralRendering,
} from "@engine/graphics-vendor";
import {
GACHA_QUEST_TYPES,
DEFAULT_GACHA_QUEST_TYPE,
@@ -81,7 +85,17 @@ export interface EditorData {
rayTracingModes: RTMode[];
frameGenVendor: FrameGenVendor;
frameGenMultiplier: FrameGenMultiplier;
/**
* v1.6.0: the frame generation as typed, printed when
* {@link frameGenMultiplier} is `"custom"` (e.g. "NVIDIA Smooth Motion").
*/
frameGenCustom: string;
upscaleQuality: UpscaleQuality;
/**
* v1.6.0: NVIDIA DLSS 5 Neural Rendering, printed after the DLSS mode.
* NVIDIA only: another vendor turns it off (`coerceDlssNeuralRendering`).
*/
dlssNeuralRendering: boolean;
artStyle: ArtStyle;
/**
* Video-style era opt-in (v0.22.0). When non-empty, the description
@@ -270,6 +284,10 @@ export function normalizeEditorPatch(
if (typeof patch.frameGenMultiplier === "string") {
out.frameGenMultiplier = coerceFrameGenMultiplier(vendor, patch.frameGenMultiplier);
}
// v1.6.0: DLSS 5 Neural Rendering is NVIDIA's.
if (typeof patch.dlssNeuralRendering === "boolean") {
out.dlssNeuralRendering = coerceDlssNeuralRendering(vendor, patch.dlssNeuralRendering);
}
}
// v0.11: legacy `spoilerWarning` / `matureWarning` booleans on profiles
// / presets / templates need to be expressed as checklist items in the
@@ -419,7 +437,9 @@ const initialState: EditorData = {
rayTracingModes: [...DEFAULTS.editor.rayTracingModes],
frameGenVendor: DEFAULTS.editor.frameGenVendor,
frameGenMultiplier: DEFAULTS.editor.frameGenMultiplier,
frameGenCustom: DEFAULTS.editor.frameGenCustom,
upscaleQuality: DEFAULTS.editor.upscaleQuality,
dlssNeuralRendering: DEFAULTS.editor.dlssNeuralRendering,
artStyle: DEFAULTS.editor.artStyle,
videoStyleEra: DEFAULTS.editor.videoStyleEra,
versionInfo: DEFAULTS.editor.versionInfo,
@@ -493,7 +513,7 @@ export function editorDataOf(state: EditorData): EditorData {
* Bump together with a new step in {@link migrateEditorState}; backups
* record this number so an import can run the steps a draft still needs.
*/
export const EDITOR_STORE_VERSION = 21;
export const EDITOR_STORE_VERSION = 22;
export const useEditorStore = create<EditorState>()(
persist(
@@ -649,6 +669,12 @@ export const useEditorStore = create<EditorState>()(
// upscaled to `resolution` in the video editor) joined the
// schema. Additive: back-fills to "" (not upscaled); a value
// outside UPSCALED_FROM_OPTIONS coerces to "".
// v21 → v22: v1.6.0. `frameGenCustom` (the frame generation typed
// for the new `"custom"` multiplier) and `dlssNeuralRendering`
// (NVIDIA DLSS 5 Neural Rendering) joined the schema.
// Additive: back-fill to "" and false; non-string / non-boolean
// values coerce to them. The new multipliers (`x6` for NVIDIA,
// `dynamic`, `custom`) only widen the lists.
version: EDITOR_STORE_VERSION,
migrate: (persistedState, version) => migrateEditorState(persistedState, version),
partialize: (state) => editorDataOf(state),
@@ -928,6 +954,12 @@ export function migrateEditorState(persistedState: unknown, version: number): Ed
// v1.5.0 upscaled video. Additive back-fill + defensive coercion.
if (!isUpscaledFrom(state.upscaledFrom)) state.upscaledFrom = "";
}
if (version < 22) {
// v1.6.0 custom frame generation + DLSS 5. Additive back-fill +
// defensive coercion.
if (typeof state.frameGenCustom !== "string") state.frameGenCustom = "";
if (typeof state.dlssNeuralRendering !== "boolean") state.dlssNeuralRendering = false;
}
return { ...initialState, ...state } as EditorData;
}
+6 -14
View File
@@ -11,6 +11,7 @@ import { extractData, useSettingsStore } from "@store/settings-store";
import { editorDataOf, useEditorStore, type EditorData } from "@store/editor-store";
import type { SettingsData } from "@store/settings-heal";
import { generateId } from "@utils/uuid";
import { stableJson } from "@utils/stable-json";
import { PLATFORMS } from "@config/platforms";
import type { ParsedFile } from "./detect";
import { SECTIONS, isListSection, type ListSection, type Section } from "./format";
@@ -78,22 +79,13 @@ export function readCurrentData(): CurrentData {
};
}
/** JSON with sorted keys, so equal data compares equal whatever its key order. */
function stable(value: unknown): string {
return JSON.stringify(value, (_key, v: unknown) =>
v && typeof v === "object" && !Array.isArray(v)
? Object.fromEntries(
Object.entries(v as Record<string, unknown>).sort(([a], [b]) => (a < b ? -1 : 1)),
)
: v,
);
}
const BOOKKEEPING = new Set(["id", "createdAt", "updatedAt"]);
/** The part of an item that matters when comparing: no id, no timestamps. */
function content(item: object): string {
return stable(Object.fromEntries(Object.entries(item).filter(([key]) => !BOOKKEEPING.has(key))));
return stableJson(
Object.fromEntries(Object.entries(item).filter(([key]) => !BOOKKEEPING.has(key))),
);
}
function changedAt(item: { createdAt: string; updatedAt?: string }): number {
@@ -191,13 +183,13 @@ export function planRestore(
if (clean.settings) {
plan.settings = {
incoming: clean.settings,
status: stable(clean.settings) === stable(current.settings) ? "same" : "changed",
status: stableJson(clean.settings) === stableJson(current.settings) ? "same" : "changed",
};
}
if (clean.draft) {
plan.draft = {
incoming: clean.draft,
status: stable(clean.draft) === stable(current.draft) ? "same" : "changed",
status: stableJson(clean.draft) === stableJson(current.draft) ? "same" : "changed",
};
}
return plan;
+4 -14
View File
@@ -7,6 +7,7 @@ import {
type EditorData,
} from "@store/editor-store";
import { useSettingsStore } from "@store/settings-store";
import { stableJson } from "@utils/stable-json";
import type { Profile } from "@store/profile-store";
import type { GamePreset } from "@store/preset-store";
import type { EditorTemplate } from "@store/template-store";
@@ -89,17 +90,6 @@ function isBlank(value: unknown): boolean {
return false;
}
/** JSON with sorted keys, so equal maps compare equal whatever their order. */
function stable(value: unknown): string {
return JSON.stringify(value, (_key, v: unknown) =>
v && typeof v === "object" && !Array.isArray(v)
? Object.fromEntries(
Object.entries(v as Record<string, unknown>).sort(([a], [b]) => (a < b ? -1 : 1)),
)
: v,
);
}
/**
* Fields a patch would overwrite that hold something else in the editor
* right now — what "Replace N filled fields?" counts. Empty fields and
@@ -113,8 +103,8 @@ export function overwrittenFields(editor: EditorData, patch: Partial<EditorData>
.filter(
([key, value]) =>
!isBlank(now[key]) &&
stable(now[key]) !== stable(blank[key]) &&
stable(now[key]) !== stable(value),
stableJson(now[key]) !== stableJson(blank[key]) &&
stableJson(now[key]) !== stableJson(value),
)
.map(([key]) => key);
}
@@ -127,7 +117,7 @@ export function overwrittenFields(editor: EditorData, patch: Partial<EditorData>
export function changedSince(editor: EditorData, patch: Partial<EditorData>): string[] {
const now = editor as unknown as Record<string, unknown>;
return Object.entries(patch)
.filter(([key, value]) => stable(now[key] ?? "") !== stable(value ?? ""))
.filter(([key, value]) => stableJson(now[key] ?? "") !== stableJson(value ?? ""))
.map(([key]) => key);
}
+15
View File
@@ -0,0 +1,15 @@
/**
* JSON with every object's keys sorted, so equal data compares equal
* whatever order its keys were written in. Arrays keep their order.
* Used to compare library items (restore) and editor fields (applying a
* profile, preset or template).
*/
export function stableJson(value: unknown): string {
return JSON.stringify(value, (_key, v: unknown) =>
v && typeof v === "object" && !Array.isArray(v)
? Object.fromEntries(
Object.entries(v as Record<string, unknown>).sort(([a], [b]) => (a < b ? -1 : 1)),
)
: v,
);
}
+139
View File
@@ -323,6 +323,123 @@ describe("buildDescription", () => {
expect(result).toContain("In-game Setting: High - Intel XeSS Ultra Quality + Intel XeFG x2");
});
describe("v1.6.0: x6, Dynamic and Custom frame generation, DLSS 5 Neural Rendering", () => {
const settingLine = (text: string) =>
text.split("\n").find((line) => line.startsWith("In-game Setting:"));
it("names NVIDIA x6 and Dynamic Multi Frame Generation", () => {
const t = createMockT("en");
const x6 = buildDescription(
makeInput({
graphicsPreset: "ultra",
frameGenVendor: "nvidia",
upscaleQuality: "performance",
frameGenMultiplier: "x6",
}),
t,
);
expect(settingLine(x6)).toBe(
"In-game Setting: Ultra - NVIDIA DLSS Performance + NVIDIA Multi Frame Generation x6",
);
const dynamic = buildDescription(
makeInput({
graphicsPreset: "ultra",
frameGenVendor: "nvidia",
frameGenMultiplier: "dynamic",
}),
t,
);
expect(settingLine(dynamic)).toBe(
"In-game Setting: Ultra - NVIDIA Dynamic Multi Frame Generation",
);
});
it("prints a custom frame generation as typed, for any vendor", () => {
const result = buildDescription(
makeInput({
graphicsPreset: "high",
frameGenVendor: "amd",
upscaleQuality: "quality",
frameGenMultiplier: "custom",
frameGenCustom: " Lossless Scaling x3 ",
}),
createMockT("en"),
);
expect(settingLine(result)).toBe(
"In-game Setting: High - AMD FSR Quality + Lossless Scaling x3",
);
});
it("prints nothing for an empty custom box — not the word “custom”", () => {
const result = buildDescription(
makeInput({
graphicsPreset: "high",
frameGenVendor: "intel",
upscaleQuality: "quality",
frameGenMultiplier: "custom",
frameGenCustom: " ",
}),
createMockT("en"),
);
expect(settingLine(result)).toBe("In-game Setting: High - Intel XeSS Quality");
});
it("puts DLSS 5 Neural Rendering after the DLSS mode and before frame generation", () => {
const result = buildDescription(
makeInput({
graphicsPreset: "ultra",
frameGenVendor: "nvidia",
upscaleQuality: "quality",
dlssNeuralRendering: true,
frameGenMultiplier: "dynamic",
rayTracingModes: ["path_tracing"],
}),
createMockT("en"),
);
expect(settingLine(result)).toBe(
"In-game Setting: Ultra - NVIDIA DLSS Quality + NVIDIA DLSS 5 Neural Rendering + NVIDIA Dynamic Multi Frame Generation with Path Tracing",
);
});
it("prints DLSS 5 Neural Rendering on its own, in every output language", () => {
const vi = buildDescription(
makeInput({
language: "vi",
graphicsPreset: "ultra",
frameGenVendor: "nvidia",
dlssNeuralRendering: true,
}),
createMockT("vi"),
);
expect(vi).toContain("NVIDIA DLSS 5 Neural Rendering");
});
it("ignores a DLSS 5 flag left on another vendor's draft", () => {
const result = buildDescription(
makeInput({
graphicsPreset: "ultra",
frameGenVendor: "amd",
upscaleQuality: "quality",
dlssNeuralRendering: true,
}),
createMockT("en"),
);
expect(settingLine(result)).toBe("In-game Setting: Ultra - AMD FSR Quality");
});
it("keeps the brand + multiplier fallback for a locale without the label", () => {
// A mock translator that knows no frame-gen label at all.
const en = createMockT("en");
const bare = (key: string, options?: Record<string, string>) =>
key.startsWith("description.graphics.frameGen.") ? key : en(key, options);
const result = buildDescription(
makeInput({ graphicsPreset: "ultra", frameGenVendor: "nvidia", frameGenMultiplier: "x6" }),
bare,
);
expect(settingLine(result)).toBe("In-game Setting: Ultra - NVIDIA Frame Generation x6");
});
});
it("emits multiple RT modes joined with commas", () => {
const t = createMockT("en");
const result = buildDescription(
@@ -751,6 +868,28 @@ describe("buildDescription", () => {
expect(noLut).not.toContain("LUT:");
});
it("prints a Custom LUT as just “LUT applied”, in the output language (v1.6.0)", () => {
const rig = { video_editor: "davinci_resolve_studio|21.2", lut: "Custom" };
const lineAfter = (text: string, line: string) => {
const lines = text.split("\n");
const at = lines.indexOf(line);
return at >= 0 ? lines[at + 1] : undefined;
};
const en = buildDescription(makeInput({ rig }), createMockT("en"));
expect(lineAfter(en, "Video Editor: DaVinci Resolve Studio 21.2")).toBe("LUT applied");
expect(en).not.toContain("LUT: Custom");
const vi = buildDescription(makeInput({ language: "vi", rig }), createMockT("vi"));
expect(lineAfter(vi, "Phần mềm dựng video: DaVinci Resolve Studio 21.2")).toBe(
"Có áp dụng LUT",
);
// Typed rather than picked: any case, stray spaces.
const typed = buildDescription(makeInput({ rig: { lut: " cUSTOM " } }), createMockT("ja"));
expect(typed).toContain("LUT適用");
expect(typed).not.toContain("LUT: ");
});
it("prints rig lines in a fixed order, whatever order they were filled in", () => {
const t = createMockT("en");
const result = buildDescription(
+126
View File
@@ -0,0 +1,126 @@
import { describe, it, expect } from "vitest";
import {
coerceDlssNeuralRendering,
coerceFrameGenMultiplier,
coerceUpscaleQuality,
getValidFrameGenMultipliers,
getValidUpscaleQualities,
} from "@engine/graphics-vendor";
import {
FRAMEGEN_MULTIPLIERS,
FRAMEGEN_VENDORS,
UPSCALE_QUALITIES,
} from "@config/graphics-settings";
import { normalizeEditorPatch } from "@store/editor-store";
import { compareCodeUnits } from "@utils/sort";
import { schemaKeys } from "../helpers/locale-schema";
const VENDORS = FRAMEGEN_VENDORS.filter((vendor) => vendor !== "none");
const sorted = (list: readonly string[]) => [...list].sort(compareCodeUnits);
describe("getValidFrameGenMultipliers", () => {
it("offers NVIDIA x6, Dynamic and Custom (v1.6.0)", () => {
expect(getValidFrameGenMultipliers("nvidia")).toEqual([
"none",
"x2",
"x3",
"x4",
"x6",
"dynamic",
"custom",
]);
});
it("offers Custom to AMD and Intel too, and only `none` without a vendor", () => {
expect(getValidFrameGenMultipliers("amd")).toEqual(["none", "x2", "x3", "custom"]);
expect(getValidFrameGenMultipliers("intel")).toEqual(["none", "x2", "custom"]);
expect(getValidFrameGenMultipliers("none")).toEqual(["none"]);
});
it("offers only values the stored lists know", () => {
for (const vendor of FRAMEGEN_VENDORS) {
for (const multiplier of getValidFrameGenMultipliers(vendor)) {
expect(FRAMEGEN_MULTIPLIERS).toContain(multiplier);
}
for (const quality of getValidUpscaleQualities(vendor)) {
expect(UPSCALE_QUALITIES).toContain(quality);
}
}
});
});
describe("coercion", () => {
it("keeps a value the vendor offers and falls back to `none` otherwise", () => {
expect(coerceFrameGenMultiplier("nvidia", "dynamic")).toBe("dynamic");
expect(coerceFrameGenMultiplier("amd", "dynamic")).toBe("none");
expect(coerceFrameGenMultiplier("amd", "custom")).toBe("custom");
expect(coerceFrameGenMultiplier("none", "custom")).toBe("none");
expect(coerceFrameGenMultiplier("intel", undefined)).toBe("none");
expect(coerceUpscaleQuality("nvidia", "dlaa")).toBe("dlaa");
expect(coerceUpscaleQuality("amd", "dlaa")).toBe("none");
expect(coerceUpscaleQuality("intel", undefined)).toBe("none");
});
it("keeps DLSS 5 Neural Rendering for NVIDIA only", () => {
expect(coerceDlssNeuralRendering("nvidia", true)).toBe(true);
expect(coerceDlssNeuralRendering("nvidia", false)).toBe(false);
for (const vendor of ["amd", "intel", "none"] as const) {
expect(coerceDlssNeuralRendering(vendor, true)).toBe(false);
}
});
it("applies the same rules to a profile, preset or template patch", () => {
expect(
normalizeEditorPatch({
frameGenVendor: "amd",
frameGenMultiplier: "custom",
frameGenCustom: "Lossless Scaling x3",
dlssNeuralRendering: true,
}),
).toMatchObject({
frameGenMultiplier: "custom",
frameGenCustom: "Lossless Scaling x3",
dlssNeuralRendering: false,
});
expect(
normalizeEditorPatch({
frameGenVendor: "nvidia",
frameGenMultiplier: "dynamic",
dlssNeuralRendering: true,
}),
).toMatchObject({ frameGenMultiplier: "dynamic", dlssNeuralRendering: true });
});
});
/**
* The editor and the description read their labels from vendor-keyed keys
* that `_schema.json` lists for all eight locales (`validate:locales`). The
* mock `t` prints a missing key as-is, so without this a new option could
* ship with no label and every test still pass.
*/
describe("a label for every option", () => {
it("has an editor label for each vendor's multipliers and qualities", () => {
for (const vendor of VENDORS) {
expect(schemaKeys("ui", `editor.frameGenMultiplier.${vendor}`)).toEqual(
sorted(getValidFrameGenMultipliers(vendor)),
);
expect(schemaKeys("ui", `editor.upscaleQuality.${vendor}`)).toEqual(
sorted(getValidUpscaleQualities(vendor)),
);
}
expect(schemaKeys("ui", "editor.frameGenMultiplierOptions")).toEqual(
sorted(FRAMEGEN_MULTIPLIERS),
);
});
it("has a description label for each vendor's options but the typed custom one", () => {
for (const vendor of VENDORS) {
expect(schemaKeys("templates", `description.graphics.frameGen.${vendor}`)).toEqual(
sorted(getValidFrameGenMultipliers(vendor).filter((m) => m !== "custom")),
);
expect(schemaKeys("templates", `description.graphics.upscale.${vendor}`)).toEqual(
sorted(getValidUpscaleQualities(vendor)),
);
}
});
});
+30
View File
@@ -4,6 +4,7 @@ import {
cleanLutName,
CPU_SUGGESTIONS,
formatRigValue,
isCustomRigValue,
LUT_SUGGESTIONS,
migrateRig,
RIG_FIELDS,
@@ -207,6 +208,35 @@ describe("LUT (v1.4.0)", () => {
"Arri Alexa LogC to Rec709",
);
});
it("offers “Custom” first, which prints as the “LUT applied” note (v1.6.0)", () => {
expect(LUT_SUGGESTIONS[0]).toBe("Custom");
const field = RIG_FIELDS.find((f) => f.id === "lut");
expect(field?.customNoteKey).toBe("description.rigNotes.lut_custom");
});
});
describe("isCustomRigValue", () => {
it("matches “Custom” in any case, with stray spaces", () => {
expect(isCustomRigValue("Custom")).toBe(true);
expect(isCustomRigValue(" cUSTOM ")).toBe(true);
});
it("does not match a name that merely contains it", () => {
expect(isCustomRigValue("Custom Teal Orange")).toBe(false);
expect(isCustomRigValue("")).toBe(false);
});
});
describe("custom notes", () => {
it("has a description line in every locale for each field's note", () => {
const notes = RIG_FIELDS.flatMap((f) => (f.customNoteKey ? [f.customNoteKey] : []));
expect(notes.length).toBeGreaterThan(0);
for (const key of notes) {
const at = key.lastIndexOf(".");
expect(schemaKeys("templates", key.slice(0, at))).toContain(key.slice(at + 1));
}
});
});
describe("cleanLutName", () => {
@@ -69,7 +69,9 @@ function makeEditorData(overrides: Partial<EditorData> = {}): EditorData {
rayTracingModes: [...DEFAULTS.editor.rayTracingModes] as RTMode[],
frameGenVendor: DEFAULTS.editor.frameGenVendor as FrameGenVendor,
frameGenMultiplier: DEFAULTS.editor.frameGenMultiplier as FrameGenMultiplier,
frameGenCustom: DEFAULTS.editor.frameGenCustom,
upscaleQuality: DEFAULTS.editor.upscaleQuality as UpscaleQuality,
dlssNeuralRendering: DEFAULTS.editor.dlssNeuralRendering,
artStyle: DEFAULTS.editor.artStyle as ArtStyle,
videoStyleEra: DEFAULTS.editor.videoStyleEra,
versionInfo: DEFAULTS.editor.versionInfo,
+48
View File
@@ -492,3 +492,51 @@ describe("migrateEditorState — v20 → v21 (v1.5.0 upscaled video)", () => {
expect(migrateEditorState({ ...once }, 20)).toEqual(once);
});
});
describe("migrateEditorState — v21 → v22 (v1.6.0 custom frame generation, DLSS 5)", () => {
function makeV21Persisted(overrides: Record<string, unknown> = {}): Record<string, unknown> {
const full = migrateEditorState(makeV9Persisted(), 9) as unknown as Record<string, unknown>;
delete full.frameGenCustom;
delete full.dlssNeuralRendering;
return { ...full, ...overrides };
}
it("back-fills an empty custom frame generation and DLSS 5 off", () => {
const migrated = migrateEditorState(makeV21Persisted(), 21);
expect(migrated.frameGenCustom).toBe("");
expect(migrated.dlssNeuralRendering).toBe(false);
});
it("coerces values of the wrong type", () => {
const migrated = migrateEditorState(
makeV21Persisted({ frameGenCustom: 6, dlssNeuralRendering: "yes" }),
21,
);
expect(migrated.frameGenCustom).toBe("");
expect(migrated.dlssNeuralRendering).toBe(false);
});
it("keeps the frame-gen choices a v21 draft made, and running it again changes nothing", () => {
const once = migrateEditorState(
makeV21Persisted({
frameGenVendor: "nvidia",
frameGenMultiplier: "x4",
upscaleQuality: "quality",
}),
21,
);
expect(once.frameGenVendor).toBe("nvidia");
expect(once.frameGenMultiplier).toBe("x4");
expect(once.upscaleQuality).toBe("quality");
expect(migrateEditorState({ ...once }, 21)).toEqual(once);
});
it("keeps values a newer draft already holds", () => {
const migrated = migrateEditorState(
makeV21Persisted({ frameGenCustom: "NVIDIA Smooth Motion", dlssNeuralRendering: true }),
21,
);
expect(migrated.frameGenCustom).toBe("NVIDIA Smooth Motion");
expect(migrated.dlssNeuralRendering).toBe(true);
});
});
+28
View File
@@ -47,6 +47,34 @@ describe("sanitizeEditorFields", () => {
expect(out).not.toHaveProperty("set");
});
it("keeps v1.6.0 frame generation and DLSS 5 fields, typed as the editor holds them", () => {
expect(
sanitizeEditorFields({
frameGenVendor: "nvidia",
frameGenMultiplier: "dynamic",
frameGenCustom: "NVIDIA Smooth Motion",
dlssNeuralRendering: true,
}),
).toEqual({
frameGenVendor: "nvidia",
frameGenMultiplier: "dynamic",
frameGenCustom: "NVIDIA Smooth Motion",
dlssNeuralRendering: true,
});
const wrong = sanitizeEditorFields({
frameGenVendor: "amd",
frameGenMultiplier: "x6",
frameGenCustom: 3,
dlssNeuralRendering: true,
});
// x6 is NVIDIA's; DLSS 5 too. A number is not a typed name.
expect(wrong).toEqual({
frameGenVendor: "amd",
frameGenMultiplier: "none",
dlssNeuralRendering: false,
});
});
it("never copies prototype keys", () => {
const raw = JSON.parse('{"__proto__": {"polluted": true}, "social": {"__proto__": "x"}}');
const out = sanitizeEditorFields(raw);
+17
View File
@@ -0,0 +1,17 @@
import { describe, expect, it } from "vitest";
import { stableJson } from "@utils/stable-json";
describe("stableJson", () => {
it("gives equal objects the same JSON whatever their key order", () => {
expect(stableJson({ b: 1, a: { d: [2, 1], c: null } })).toBe(
stableJson({ a: { c: null, d: [2, 1] }, b: 1 }),
);
expect(stableJson({ b: 1, a: 2 })).toBe('{"a":2,"b":1}');
});
it("keeps array order and tells different data apart", () => {
expect(stableJson([2, 1])).not.toBe(stableJson([1, 2]));
expect(stableJson({ a: 1 })).not.toBe(stableJson({ a: "1" }));
expect(stableJson("text")).toBe('"text"');
});
});
+14 -13
View File
@@ -6,6 +6,19 @@ import { cloudflareWebAnalytics, securityTxt } from "./build-plugins/web-only.ts
const isTauri = !!process.env.TAURI_ENV_PLATFORM;
/** Import aliases — the same as tsconfig.json's `paths`. vitest.config.ts reuses them. */
export const alias = {
"@": path.resolve(import.meta.dirname, "./src"),
"@config": path.resolve(import.meta.dirname, "./src/config"),
"@engine": path.resolve(import.meta.dirname, "./src/engine"),
"@store": path.resolve(import.meta.dirname, "./src/store"),
"@hooks": path.resolve(import.meta.dirname, "./src/hooks"),
"@components": path.resolve(import.meta.dirname, "./src/components"),
"@pages": path.resolve(import.meta.dirname, "./src/pages"),
"@utils": path.resolve(import.meta.dirname, "./src/utils"),
"@i18n": path.resolve(import.meta.dirname, "./src/i18n"),
};
export default defineConfig({
plugins: [
react(),
@@ -19,19 +32,7 @@ export default defineConfig({
// wrangler.jsonc) and the Tauri build from its own asset protocol. The old
// GitHub Pages sub-path `/youtube-generator/` is gone as of v1.0.0.
base: "/",
resolve: {
alias: {
"@": path.resolve(import.meta.dirname, "./src"),
"@config": path.resolve(import.meta.dirname, "./src/config"),
"@engine": path.resolve(import.meta.dirname, "./src/engine"),
"@store": path.resolve(import.meta.dirname, "./src/store"),
"@hooks": path.resolve(import.meta.dirname, "./src/hooks"),
"@components": path.resolve(import.meta.dirname, "./src/components"),
"@pages": path.resolve(import.meta.dirname, "./src/pages"),
"@utils": path.resolve(import.meta.dirname, "./src/utils"),
"@i18n": path.resolve(import.meta.dirname, "./src/i18n"),
},
},
resolve: { alias },
server: {
// `tauri dev` loads this server while cargo rewrites files under
// src-tauri/target, and watching those crashed Vite on Windows (EBUSY on
+3 -17
View File
@@ -1,23 +1,9 @@
import { defineConfig } from "vitest/config";
// `import.meta.dirname` rather than `__dirname`: Vite 8's native config
// loader (planned to become the default) does not provide the CJS global,
// and warns on every run until this changes.
import path from "path";
// The app's import aliases, defined once in vite.config.ts.
import { alias } from "./vite.config.ts";
export default defineConfig({
resolve: {
alias: {
"@": path.resolve(import.meta.dirname, "./src"),
"@config": path.resolve(import.meta.dirname, "./src/config"),
"@engine": path.resolve(import.meta.dirname, "./src/engine"),
"@store": path.resolve(import.meta.dirname, "./src/store"),
"@hooks": path.resolve(import.meta.dirname, "./src/hooks"),
"@components": path.resolve(import.meta.dirname, "./src/components"),
"@pages": path.resolve(import.meta.dirname, "./src/pages"),
"@utils": path.resolve(import.meta.dirname, "./src/utils"),
"@i18n": path.resolve(import.meta.dirname, "./src/i18n"),
},
},
resolve: { alias },
test: {
globals: true,
// Node 25+ defines a global `localStorage` that is `undefined` unless