Skip to content

VoiceStudio is the open-source, fully-local ElevenLabs alternative — voice cloning, voice design, video dubbing, dictation, transcription & audiobook creation in 646 languages.

test: count gallery preview loads, not byte-range reads

velixio297531e3fae6
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3d93f602c..1f9efd0d8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -28,6 +28,8 @@ metadata and the backend fallback mirror it.
- New UI crawler clicks every button on every screen while the backend fails, and catches stuck spinners, buttons left greyed out, silent failures and crashes before they ship (#3014)
+- Gallery preview fallback smoke no longer flakes when a slower runner reads the playing clip in several byte ranges (#3014)
+
## [0.5.7] — 2026-10-17
**VoiceStudio now runs on PCs without a GPU and recovers instead of giving up.** Voice cloning uses the speech-to-text model you installed from Model Catalogue, GPU-less computers get the small CPU PyTorch build, and slow or busy backends are no longer reported as failed.
diff --git a/electron/tests/gallery-preview-fallback-smoke.mjs b/electron/tests/gallery-preview-fallback-smoke.mjs
index a042d96b4..2d9b5901d 100644
--- a/electron/tests/gallery-preview-fallback-smoke.mjs
+++ b/electron/tests/gallery-preview-fallback-smoke.mjs
@@ -34,8 +34,12 @@ await page.route('**/api/community/items?*', (route) =>
);
await page.route('**/api/community/items/feat_00_the_librarian/preview*', async (route) => {
const local = new URL(route.request().url()).searchParams.get('local') === 'true';
- if (local) fallback++;
- else canonical++;
+ // Count loads, not reads: a playing media element may fetch further byte ranges of the same
+ // clip (slower CI runners do), but every new load starts at byte 0.
+ if (!/^bytes=[1-9]/.test(route.request().headers().range ?? '')) {
+ if (local) fallback++;
+ else canonical++;
+ }
const audio =
local && !broken
? readFileSync(