From 542f44fbb807c3133ee4aad11e3c49c1d90dbcb8 Mon Sep 17 00:00:00 2001 From: mARTin-B78 Date: Fri, 4 Sep 2026 13:36:55 +0200 Subject: [PATCH] refactor: scope seed finder --- CHANGELOG.md | 2 ++ VERSION | 2 +- docs/ARCHITECTURE.md | 1 + static/index.html | 16 ++++++++-------- static/js/seed-finder.js | 7 +++++++ 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 548ac46..583a06c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi ## [Unreleased] ### Changed +- **Seed-finder namespace migration.** Seed sample generation, caching, and batch controls now use a private scope with + compatibility exports and a `window.TTVC.seedFinder` API. - **Character-column namespace migration.** Character-table metadata, persisted column visibility, and completeness helpers now use a private scope with compatibility exports and a `window.TTVC.characterColumns` API. - **Constrained character pagination.** Character-library pages now stop at 25 rendered characters on every device, diff --git a/VERSION b/VERSION index 9dc425a..41edee9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.24.93 +1.24.94 diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 915a0c1..4db78bb 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -80,6 +80,7 @@ Done incrementally as global-scope ordered files (no ES-module change needed) - ✅ Voice-inspector selection state uses a private scope with a compatibility export and namespace API. - ✅ Shared utility helpers use a private scope with explicit compatibility exports and a `window.TTVC.utils` API. - ✅ Character-table metadata and column/completeness helpers use a private scope with a namespace API. +- ✅ Seed-finder generation and caching helpers use a private scope with compatibility exports and a namespace API. - ✅ `static/css/resource-diagnostics.css` — isolated Performance/resource diagnostic panel styles. - ✅ `static/css/background-jobs.css` — isolated background-job history and retry-panel styles. - ✅ `static/css/voice-design.css` — isolated Voice Design form, samples, and preview-match styles. diff --git a/static/index.html b/static/index.html index 6b77cd5..2c514e4 100644 --- a/static/index.html +++ b/static/index.html @@ -10,7 +10,7 @@ - + @@ -27,12 +27,12 @@ - - - - - - + + + + + + @@ -397,7 +397,7 @@ window.toggleNavTree = function(treeId, chevronId) { - + diff --git a/static/js/seed-finder.js b/static/js/seed-finder.js index d1f50fb..0916ca1 100644 --- a/static/js/seed-finder.js +++ b/static/js/seed-finder.js @@ -1,4 +1,5 @@ // ── Seed Finder — find the best RNG seed for a voice ───────────────────────── +(function (root) { // // Appended to the voice inspector body by voice-inspector.js. // Generates audio samples for a voice across a range of seeds so the user @@ -579,3 +580,9 @@ async function _seedBatchRun(ids, from, to, box, ov) { } if (typeof $ === 'function') $('seed-batch-all-btn')?.addEventListener('click', seedFinderBatchAll); + +Object.assign(root, { attachSeedFinder, seedFinderBatchAll }); +root.TTVC = root.TTVC || {}; +root.TTVC.seedFinder = root.TTVC.seedFinder || {}; +Object.assign(root.TTVC.seedFinder, { attach: attachSeedFinder, batchAll: seedFinderBatchAll }); +})(window);