diff --git a/e2e/playwright.config.js b/e2e/playwright.config.js index 3aae8bb..fd628ba 100644 --- a/e2e/playwright.config.js +++ b/e2e/playwright.config.js @@ -5,8 +5,12 @@ module.exports = defineConfig({ testMatch: '*.spec.js', timeout: 300_000, retries: 0, + expect: { + timeout: 10_000, + }, use: { baseURL: 'http://localhost:8889', + actionTimeout: 10_000, launchOptions: { args: ['--disable-dev-shm-usage'], }, diff --git a/web/public/app.js b/web/public/app.js index 0895a6e..a149a44 100644 --- a/web/public/app.js +++ b/web/public/app.js @@ -9,6 +9,10 @@ let selectedPrefix = null; let patchesLoaded = false; let isRestore = false; + let availablePatches = null; + + // Fetch patch index immediately so it's ready when needed. + const availablePatchesReady = scanAvailablePatches().then(p => { availablePatches = p; }); // DOM elements const stepNav = document.getElementById('step-nav'); @@ -108,9 +112,9 @@ manualMode = true; manualChromeHint.hidden = false; - const available = await scanAvailablePatches(); + await availablePatchesReady; manualVersion.innerHTML = ''; - for (const p of available) { + for (const p of availablePatches) { const opt = document.createElement('option'); opt.value = p.version; opt.textContent = p.version; @@ -166,8 +170,7 @@ if (!version || !selectedPrefix) return; try { - const available = await scanAvailablePatches(); - const loaded = await loadPatchesForVersion(version, available); + const loaded = await loadPatchesForVersion(version, availablePatches); if (!loaded) { showError('Could not load patches for software version ' + version); return; @@ -196,8 +199,8 @@ selectedPrefix = info.serialPrefix; - const available = await scanAvailablePatches(); - const match = available.find(p => p.version === info.firmware); + await availablePatchesReady; + const match = availablePatches.find(p => p.version === info.firmware); if (match) { deviceStatus.className = ''; diff --git a/web/public/index.html b/web/public/index.html index bbdbc63..cde4403 100644 --- a/web/public/index.html +++ b/web/public/index.html @@ -7,7 +7,7 @@ - + @@ -246,9 +246,9 @@ - - - - + + + + diff --git a/web/public/kobo-device.js b/web/public/kobo-device.js index 2047da9..beab194 100644 --- a/web/public/kobo-device.js +++ b/web/public/kobo-device.js @@ -44,7 +44,7 @@ const KOBO_MODELS = { * The date path segment (e.g. Mar2026) changes per release. * help.kobo.com may lag behind; verify URLs when adding new versions. */ -const FIRMWARE_DOWNLOADS = { +var FIRMWARE_DOWNLOADS = { '4.45.23646': { 'N428': 'https://ereaderfiles.kobo.com/firmwares/kobo13/Mar2026/kobo-update-4.45.23646.zip', 'N365': 'https://ereaderfiles.kobo.com/firmwares/kobo12/Mar2026/kobo-update-4.45.23646.zip', diff --git a/web/public/patch-worker.js b/web/public/patch-worker.js index c23d113..5426eb1 100644 --- a/web/public/patch-worker.js +++ b/web/public/patch-worker.js @@ -10,7 +10,7 @@ async function loadWasm() { const go = new Go(); const result = await WebAssembly.instantiateStreaming( - fetch('kobopatch.wasm?ts=1773672116'), + fetch('kobopatch.wasm?ts=1773690621'), go.importObject ); go.run(result.instance); diff --git a/web/public/patches/index.json b/web/public/patches/index.json index fe0dbb3..a97f4d1 100644 --- a/web/public/patches/index.json +++ b/web/public/patches/index.json @@ -3,5 +3,5 @@ "filename": "patches_4.45.23646.zip", "versions": ["4.45.23646"], "date": "03-2026" - }, + } ]