fix: live-update Speed and WPM cells during benchmark run (v1.12.11)
Previously the bench/wpm cells only updated after loadVoiceLibrary() at the end of the full batch. Now each row is patched in-place immediately after its voice finishes, for both batch and single-voice benchmarks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c5181b499a
commit
ca3ce3adcb
@ -9,6 +9,13 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## [1.12.11] — 2026-06-27
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- **Speed and WPM cells now update live** during a benchmark run — each row's cells are patched in-place immediately after its voice finishes, without waiting for the full batch to complete and the list to re-render. Same fix applied to the single-voice "Benchmark this voice" button.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## [1.12.10] — 2026-06-27
|
## [1.12.10] — 2026-06-27
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<!-- ── Core styles (local — no CDN dependency for first paint) ────────── -->
|
<!-- ── Core styles (local — no CDN dependency for first paint) ────────── -->
|
||||||
<link rel="stylesheet" href="/static/vendor/mdi/materialdesignicons.min.css">
|
<link rel="stylesheet" href="/static/vendor/mdi/materialdesignicons.min.css">
|
||||||
<link rel="stylesheet" href="/static/style.css?v=1.12.10">
|
<link rel="stylesheet" href="/static/style.css?v=1.12.11">
|
||||||
|
|
||||||
|
|
||||||
<!-- ── Flag icons — non-blocking (loaded async, icons appear after JS) ── -->
|
<!-- ── Flag icons — non-blocking (loaded async, icons appear after JS) ── -->
|
||||||
@ -336,7 +336,7 @@
|
|||||||
<script src="/static/vendor/wavesurfer-regions.min.js"></script>
|
<script src="/static/vendor/wavesurfer-regions.min.js"></script>
|
||||||
|
|
||||||
<!-- loader.js: fetches sections → loads JS modules → removes skeleton -->
|
<!-- loader.js: fetches sections → loads JS modules → removes skeleton -->
|
||||||
<script src="/static/loader.js?v=1.12.10"></script>
|
<script src="/static/loader.js?v=1.12.11"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -833,6 +833,20 @@ async function runVoiceBenchmarkBatch() {
|
|||||||
stats.ok++;
|
stats.ok++;
|
||||||
if (b.realtime_ok === false) stats.slow++;
|
if (b.realtime_ok === false) stats.slow++;
|
||||||
stats.last = `${voice.id}: ${Number(b.elapsed_sec || 0).toFixed(1)}s${b.speed != null ? ` · ${Number(b.speed).toFixed(2)}x` : ''}${b.realtime_ok === false ? ' · slow' : ''}`;
|
stats.last = `${voice.id}: ${Number(b.elapsed_sec || 0).toFixed(1)}s${b.speed != null ? ` · ${Number(b.speed).toFixed(2)}x` : ''}${b.realtime_ok === false ? ' · slow' : ''}`;
|
||||||
|
// Live-update the row cells so results appear immediately
|
||||||
|
if (row) {
|
||||||
|
const benchCell = row.querySelector('.vl-tbl-bench');
|
||||||
|
const wpmCell = row.querySelector('.vl-tbl-wpm');
|
||||||
|
if (benchCell) {
|
||||||
|
const bt = fmtBenchmark(voice), bc = benchmarkClass(voice), btitle = benchmarkTitle(voice);
|
||||||
|
benchCell.innerHTML = bt !== '-' ? `<span class="vl-bench-chip ${bc}" title="${escHtml(btitle)}"><span class="mdi mdi-timer-outline"></span> ${escHtml(bt)}</span>` : '-';
|
||||||
|
}
|
||||||
|
if (wpmCell) {
|
||||||
|
const wpm = voiceWpm(voice);
|
||||||
|
wpmCell.textContent = fmtWpm(voice);
|
||||||
|
wpmCell.title = wpm != null ? `${wpm} wpm — 130–180 wpm is natural for long listening` : '';
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
stats.errors++;
|
stats.errors++;
|
||||||
stats.last = `${voice.id}: failed${b && b.error ? ' · ' + b.error : ''}`;
|
stats.last = `${voice.id}: failed${b && b.error ? ' · ' + b.error : ''}`;
|
||||||
@ -2927,6 +2941,21 @@ function makeVoiceRow(v) {
|
|||||||
benchCell.className = 'vr-bench ' + benchmarkClass(v);
|
benchCell.className = 'vr-bench ' + benchmarkClass(v);
|
||||||
benchCell.title = benchmarkTitle(v);
|
benchCell.title = benchmarkTitle(v);
|
||||||
benchCell.querySelector('.vr-bench-value').textContent = fmtBenchmark(v);
|
benchCell.querySelector('.vr-bench-value').textContent = fmtBenchmark(v);
|
||||||
|
// Also update the table row cells
|
||||||
|
const tblRow = document.querySelector(`.vl-row[data-id="${CSS.escape(v.id)}"]`);
|
||||||
|
if (tblRow) {
|
||||||
|
const tblBench = tblRow.querySelector('.vl-tbl-bench');
|
||||||
|
const tblWpm = tblRow.querySelector('.vl-tbl-wpm');
|
||||||
|
if (tblBench) {
|
||||||
|
const bt = fmtBenchmark(v), bc = benchmarkClass(v), btitle = benchmarkTitle(v);
|
||||||
|
tblBench.innerHTML = bt !== '-' ? `<span class="vl-bench-chip ${bc}" title="${escHtml(btitle)}"><span class="mdi mdi-timer-outline"></span> ${escHtml(bt)}</span>` : '-';
|
||||||
|
}
|
||||||
|
if (tblWpm) {
|
||||||
|
const wpm = voiceWpm(v);
|
||||||
|
tblWpm.textContent = fmtWpm(v);
|
||||||
|
tblWpm.title = wpm != null ? `${wpm} wpm — 130–180 wpm is natural for long listening` : '';
|
||||||
|
}
|
||||||
|
}
|
||||||
setBenchmarkProgress(1, 1, `Finished ${v.id}`);
|
setBenchmarkProgress(1, 1, `Finished ${v.id}`);
|
||||||
toast('Benchmarked ' + v.id, 'success');
|
toast('Benchmarked ' + v.id, 'success');
|
||||||
setVoiceRestartState(false, 'Benchmark saved for ' + v.id);
|
setVoiceRestartState(false, 'Benchmark saved for ' + v.id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user